Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Mon Dec 10, 2018 7:37 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Running Java code from RealBasic
PostPosted: Thu Feb 16, 2006 6:13 pm 
Offline

Joined: Thu Feb 16, 2006 11:34 am
Posts: 3
Location: Pittsburgh, PA
I've decided to take a serious look at RealBasic, after working on a Java application using Swing for several months and not getting nearly as far I would have liked. This is both because of my having to learn all of the technologies and that Java doesn't have the tools that made developing GUI based application so easy in VB.

RealBasic will certainly work as far as screens will go, but I also need to do some sophisticated charting. I found a great Java charting library called JFreeChart, which is open source and free. I'd like to be able to call the Java from a RealBasic application. I haven't seen any mention of this so it may not be possible directly.

I can think of a few alternatives if calling Java directly is not possible:

1. Run whatever RB's equivalent of a System command is to run the Java code with the JVM and pass it the arguments via the command line or a property file.
2. Wrap the Java calls in C/C++ and create a plugin.
3. Find a sophisticated charting library that I can call directly from RB, which also would have to be free or inexpensive.

Which of the scenarios would be the best approach in RB?

_________________
Seth Fuller


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 16, 2006 7:05 pm 
Offline

Joined: Fri Sep 30, 2005 9:30 pm
Posts: 1712
Location: U.S.A.
You can launch a program written in Java from REALbasic, but you cannot interact with a Java program directly. In my limited experience I would say #2 may be the easiest solution. You may be asle to use a shell to pass parameters, but that is something that I am wholy unfamiliar with.

_________________
Education, not legislation!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Feb 23, 2006 5:27 am 
Offline

Joined: Sun Oct 16, 2005 8:14 am
Posts: 56
hi
you can call Java directly to realbasic.

by using the PLugins provided by
Monkeybread softwar

have a look here

http://www.monkeybreadsoftware.info

http://www.monkeybreadsoftware.info/plu ... java.shtml

me to trying for the same things are working

bye


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 07, 2006 9:32 am 
Offline

Joined: Sun Oct 02, 2005 10:10 pm
Posts: 125
Location: Providence, RI
Seth,

This is a pretty late reply, but I was curious what Java GUI tools you had tried. If you haven't seen it yet, the latest version of NetBeans (http://www.neatbeans.org) has a pretty terrific swing builder called Matisse. Using Matisse is very similar to using VB or RB GUI tools, no fussing with GridBagLayout etc.

I had been contemplating the RB GUI for Java backend route until I started using Matisse, now it seems hardly worth losing the power of some of the Swing components if you need to use Java on the backend.

_________________
Best regards,
Gareth Conner


Top
 Profile  
Reply with quote  
 Post subject: Re: Java development tools
PostPosted: Mon Apr 10, 2006 1:22 pm 
Offline

Joined: Thu Feb 16, 2006 11:34 am
Posts: 3
Location: Pittsburgh, PA
I've used Jigloo and the free edition of Swing Designer. Both of those worked fairly well, but had more rough edges than VB or RB. I've been using RB 2006R1 for OSX for about a month now and have gotten more of the GUI completed than I had in the previous several months of Java development. I'm sure part of that was the learning curve, but also part of it was that an environment like RB has things like database access and GUI design built in and you don't have to spend time getting different classes from different open source development projects working together as I did.

I also had a lot of trouble with different open source databases I tried with Java. I tried Derby and found that if you didn't exit correctly (like say a program crash) it left a lock file around that made the database unusable until it was removed. A minor thing, but I could just imagine the headaches in supporting something like that. I also tried HSQLDB, but was put off by the fact that the database by default was stored only in memory and you had to send special options to save records to disk. I also didn't like that the database (HSQLDB) is just a set of SQL statements stored to disk. Anybody could go in and muck around with them and mess up the database (I think this is much less likely with a db stored in binary form, since somebody who thinks they know what they're doing might edit the HSQLDB files, but not binary files).

I much prefer the REALSQLDatabase, which is of course slqite under the hood. I realize that I could use sqlite with Java, but again the GUI tools make maintaining and creating the database much easier. From what I've read and experience sqlite is a very robust database. If you can live without a stored procedure language and a couple of other minor (to me) limitations it is a great choice.

Now conversely one of my few major complaints about REALbasic is that the projects are stored totally in binary and it isn't easy to get the code out and make changes to it. The only export format is XML (I believe). I've tried exporting a Container Control as XML and deleting fields, but the result was unloadable by RB. I realize this was an error on my part, but I know of no documentation of the XML format. I have had success with exporting a window and changing the positions of several existing controls and fixing indexes of control arrays (if you delete controls from an array the indexes of the other controls aren't automatically updated). It would be great to be able export the code as standard text files, edit them and re-import them into RB. Actually it just occurred to me that I might be able to use their VB conversion tool to do that if I created a fake VB project and edited it and then imported my changes to RB. I don't know how featurefull, and solid the VB converter is, but its an interesting possibility. I'm working on a Mac running OSX, so I'd probably have to download an example VB project to do this.

My other major problem (which I should report as a bug) is that I can consistently make RB crash by deleting multiple controls that are parts of different control arrays (my application has many fields with questions that can be answered by selecting the options from a combobox so I use many control arrays in my application). Other than that I'm very happy with RB and find it a very productive environment to work in.

_________________
Seth Fuller


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Apr 24, 2006 10:32 pm 
Offline

Joined: Fri Mar 03, 2006 2:12 pm
Posts: 63
I can use java swing (beans), pasted into eclipse, and
match the development speed of RB.

But the learning curve is high, and events are easy in
java IF your IDE handles them for you.

RB is a lot easier, esp for newer programmers.... :)
RB just kicks JAVA to the curb when compiling.
Not even Excelsior Jet matches the speed, which you
have to buy.

Because Java is wider spread, there are a lot more options and
things you can buy, that you have to make yourself in RB.


Top
 Profile  
Reply with quote  
 Post subject: RealBasic vs. Java
PostPosted: Sat Apr 29, 2006 9:29 pm 
Offline

Joined: Thu Feb 16, 2006 11:34 am
Posts: 3
Location: Pittsburgh, PA
Actually my point was that RealBasic was more seamless than Java. It wasn't that I couldn't get things to work in Java, it was that there were too many rough edges. First I struggled with layout managers for Swing. I wanted the kind of exact placement that VB or RB allows you. Then I had problems with consistency storing data reliably in the open source databases I tried.

I'm doing this project as a part time effort and didn't have time to track down all of little problems which made the Java versions not stable enough or polished enough for prime time. I've done a lot of C, VB, Access, perl, C++, shell, awk, and sed programming over the years and I have no trouble making things work. It was my frustration with the lack of polish and/or robustness of the tools I tried. Java has been around for over 10 years and it seems that Java tools that allow the kind of desktop development you can do with VB and RB are just leaving infancy and going into toddlerhood.

This was my first major project in Java, before I switched to RB and so I had a lot of learning curve that slowed me down. But I've gotten to a nearly finished beta version in two months with RB and was still trying to get the screens right and the database storage reliable in Java over the previous ten months.

_________________
Seth Fuller


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group