Migrating Visual Basic Applications?
goose69 asks: "I was looking at the various options available to migrate Visual Basic applications on to GNU/Linux ,
as usual the choices were many from Free Solutions like wxWindows, Gambas, vb2py, to proprietary ones like Phoenix, and so on. Unfortunately, Mono was too much with its multiple licenses. I want to know if anyone out there has done a successful migrations from Visual Basic on Windows to any application framework on GNU/Linux."
RealBasic 5.5+ does a large portion of the work involved for you. Simple applications port right over to Windows, Mac, and Linux (thus FreeBSD).
Makes UI development easy, and I do all of the 'hard working' code in perl.
Karma: Chameleon (mostly due to the fact that you come and go).
It depends on the quality the VB was written in.
If it was highly specific, low levels of abstraction, high levels of re-typed (or almost re-typed with subtle code differences) structures, then it will be a nightmare. If it was highly abstracted and carefully programmed it should be easy to re-implement.
It is easy to find an equivalent library, it is easy to adapt the constructs of well structured code: as easy as going from pseudo code to pascal in past decades, no matter what the language. But it is hard to go from poorly written source to an adaptable solution: VB shows its pitfalls here, but only so much as C (in this respect, not many others which VB implements poorly, but programming it is not the point, reprogramming it is).
It comes down the maturity of the development environment. For all its many faults, VB is a mature platform. Gambas is not. If you're planning to release an application for use in the real world, Gambas is not a choice you should be considering. No matter how tempting it may be for a VB developer, if you're serious about using it, at least wait until v1.0 is ready.
I think the closest match you're going to find for a serious project would probably be the QT designer. I know it's based around C++, but it is a stable and mature environment, and has a track record of producing real-world applications.
If your VB app was well written, with a decent class structure, it shouldn't be too hard to convert to any OO language, so as long as you have a grasp of C++, the process wouldn't be too difficult.
If the app *isn't* well written, converting it is probably the wrong approach - you should be thinking of re-implimenting it your chosen new language - in other words, take the opportunity of the change in language to improve your code structure; don't carry your old mistakes across into new code.
(Spudley Strikes Again!)
If you want to migrate a single application from VB use Gambas. The languages are quite similar which will make the transistion much quicker and doesn't need as much new knowledge. ;)
OTOH if you want to migrate a business task from VB and are prepared to actually rewrite whole applications use wxWidgets (it's been called wxWidgets for some time already, read this document) with whatever language you want, binding for many common (and not so common) languages exist. Use C or C++, use Ruby or Python or Perl or even use JavaScript
Excuse me, but I really can't understand the phrase: "Unfortunately, Mono was too much with its multiple licenses."
Anybody read this? http://www.mono-project.com/FAQ:_Licensing
Uses 3 common licences from the GNU/Linux world, GPL, LGPL and MIT/X11. Don't you use X? Don't you use the linux kernel? Does the licensing trouble you?
I really didn't understand this, Mono is one of the clearest (and most convienient) in licensing terms....
---- Fear the mighty TsEA
Even poor *quality* code can be *ported* easily to another platform/language, but only if the code is not highly coupled to the interface.
Case in point: I'm currently porting a portion of a PowerBuilder app [88k+ LOC] to Java. Fortunately, the code is not coupled to the interface (other than poping up message boxes for errors, due to PB's lack of exception handling).
My strategy? ~50 regular expressions to translate the syntax between PB and Java, plus ~30 classes emulating the PowerBuilder functions/libraries used by the code. The code quality is the same as it was before, but I had successful test cases running less than 3 weeks after starting the project (including developing the regular expressions and the support classes). If that's all you need, you can stop there.
I got away with this strategy because the code wasn't coupled to the interface. The code *was* tied heavily to the database, but it's much easier to mock up data access than it is to recreate a visual interface.
On the other hand, if you're talking about re-writing or cleaning up the code in the process, that's another story entirely. I've spent the past three months reworking the ported code to use Java idioms, decoupling it from the data layer, and refactoring the "almost re-typed with subtle code differences" sections; if the original code had been higher quality, the project would have been done two months ago.
Scott Severtson
Senior Architect, Digital Measures
A lot of VB code is mostly glue tying together COM components, such as UI elements, database libraries (ODBC/OLEDB), etc..
There is nothing exactly like COM in the Linux/UNIX world, although large projects such as KDE, Gnome, and Mozilla do have rough equivalents if you are willing to rely on them for part of your functionality. Also, much of what Linux lacks in terms of COM is more than compensated by the existence of rich CLI tools that are designed to be tied together with a "glue" language such as shell, Python, Perl, etc.
My approach has generally been to enforce separation between data, business logic, and presentation to the greatest extent possible. This way, any component can be replaced or migrated to another dev tool or platform if needed.
Postgres is a great back-end database, and the only Free one I can recommend for most serious apps. Middle-tier / business logic components can be written in pretty much any language that can communicate with both the database and the front end. I like to prototype in Python and then possibly port to C++ later when/if there's a need.
The front end is the biggest challenge. The Qt and wxWidgets libraries are extremely well regarded and mature, and there are form builder utilities for both, which approximate (but IMO don't exactly equal) the ease of the Windows forms designers. For reporting, numerous PDF generation tools exist although I don't have a lot of experience with any of them, and most will not have the "drag and drop" interface you may be used to from Crystal or Access, but once you get used to writing code that generates output, I find it's a lot more productive than "drag and drop" anyway.
Most VB code isn't particularly object-oriented (especially since until .NET, VB did not support implementation inheritance). As such, a good multiparadigm language like Python, which supports but does not require OOP, seems like a very good choice.
Packaging will be an issue. Not all of your target users will have identical operating systems, libraries, or locations for common files. You will need to use some combination of Ant, Make, Autoconf, and similar tools in order to distribute your software in such a way that it can be easily compiled and installed by end users (if appropriate) or whomever else your target market may be.
Good luck!
Nonaggression works!
I want to know if anyone out there has done a successful migrations from Visual Basic on Windows to any application framework on GNU/Linux."
It's VBScript, rather than VB, but FogBugz has been automatically translated from ASP/VBScript to PHP. IIRC, some of the trickier problems were resolved through a hack that relies on Hungarian notation.
Brief comparison:
The Appgen 4GL Development System and Microsoft Visual Basic are both application generators.Visual Basic generates one executable file which runs strictly on the Windows operating system. Appgen creates parameter files which run within the Appgen Run Time engine (Appgen is more like Java in this area). The Appgen Run Time is available for multiple operating systems, such as Windows, Mac OSX, Linux (multiple distributions and UNIX (multiple vendors and versions).
Appgen and Visual Basic both use a screen painter to layout the screen display, and both have screen properties and functions which tie with each screen field.
Appgen 4GL development is fully integrated with the Appgen Database system; VB has no integrated database.
With each screen field, Appgen also has a database property where the user can simply define the data field, type, format. The Appgen Run Time will take care of the file open and close, data fetch, update, and type checking. Visual Basic requires another database engine (ex. Oracle, MS SQL) to have the database ability. The user needs to write all functions to connect to the database, open or close files, and need to write SQL commands in all the fields to fetch and update data.Although Visual Basic can be fully integrated with MS Access to work in a manner similar to Appgen, the Access database limitation on handling large quantities of data significantly reduces the value of this feature.
Appgen runs on multiple platforms with the same set of parameter files. VB applications run only on Windows. Appgen supports linking with C programs, which gives user the power to add-on or incorporate their own functions. http://www.appgen.com/Are you talking about VB 6.0? VBA? VBScript? VB.NET?
If VB-script (ASP), then Sun Microsystems has an ASP clone that used to be under ChilliSoft IIRC. It uses Java bytecode I beleive.
Table-ized A.I.
Exactly.
Visual Rails++
Now we just need the programming to fit to the name.
Table-ized A.I.
Web browsers for real GUI's? Aaaaaaaaaah! I want my combo box, tabbed windows, grid control, and tree browser widgets without crashy JavaScript implementations.
rediculous anti-mono troll. use mono, it's better than Microsoft and free enough for a lot of people.
Amazing magic tricks
Do you even lift?
These aren't the 'roids you're looking for.
...thanks, Naken. I'd like to see VB2Ruby one day, please, if any of y'all have some free time.
Got time? Spend some of it coding or testing
You could always consider Java. Java has lots of support in the Open Source world. The Eclipse IDE is pretty nice. JBuilder, while not Free, has a decent GUI editor (never looked for one for Eclipse, so I don't know if it has one) that can approximate the drag-and-drop approach of VB. Java can do pretty much anything you need it to do, and it's cross-platform. Performace with a modern VM is not a problem.
The only real problem Java has is that there is no good Free JVM. But I expect that will change in the future. But in the meantime, the Sun JVM is available for most interesting platforms. Java code is pretty easy to write, and maintain, it's well understood by lots of people, it's proven to work well on large workloads, and it has good open-source and proprietary support.
Bahahaa. Mono's multiple licenses are too much? Let's see. The compiler is GPL, the runtime is LGPL, and the libraries are MIT/X11.
Let's hope this guy's boss doesn't know about this post and realize that he can't hold 3 simple concepts in his head at one time.
But the compiler being GPL, the runtime being LGPL, and the libraries being MIT/X11 are too much for this guy too handle.
Seriously, they're an MS shop who is used to using Visual Studio. The most natural, non-painful migration is to write code using C# and Gtk# or possibly winforms (depending on the maturity of Mono's effort) in Visual Studio on Windows and just copy the binaries or re-compile on Unix until such time that MonoDevelop or some other IDE is mature enough to use.
These are VB guys we're talking about. They're just going to laugh at you if you throw them in front of a Unix workstation and tell them to fire up Emacs or Vim.
Then it's ready, right?
>> If it's too late for that, well.. sorry about your luck.
Sometimes you don't have any choice. PHB says "I hear VB is better for programming than Excel.." Before you can get your jaw off your chest, you're committed to using VB.
About the best you can do then is write the interface in VB and do all the heavy lifting in DLLs written in C/C++. - I've actually done this before just so I could meet the requirement of "using VB for the project".
http://request-header.info
Banteng seeks to deliver a platform that would make it easy to develop an application that runs on Windows, Linux, and Mac OS X. The language is JavaScript and the toolkit is Eclipse.org's SWT. And thanks to GCJ - it doesn't require Java.
Try Sydney then. The SourceForge page is a little out of date because I've been busy with school/work, but we've done a lot of work at Navtech recently (that's been the work bit of my excuse) to improve Sydney for the live web application we've built on top of it. It gives you combo boxes, tabbed windows, a table widget (a grid control would be an obvious extension to this) and a tree widget, amongst other things, and the Javascript's not crashy.
Other interesting features: cross-browser (works in Moz, IE, Safari, and (probably) Opera--no it doesn't work in Lynx, Emacs, etc.), keyboard support (you can navigate the tree and table widgets with the arrows, etc.), robust library code for managing data-presentation separation, custom context menus, unit test framework modelled after JUnit, and a source cruncher and a server-side include manager for speeding up downloads. I can't remember if any of these features are still only in the Navtech repository, but all the recents in-house improvements will be in the public repository before the end of April, maybe before the middle of April, depending on my final exam schedule.
Sydney works. We've built a complex web application on top of it that consists of more than 90,000 lines (3,000,000 characters) of Javascript (according to `find . -name *.js | xargs wc -l -c`) and several tens of thousand lines of Perl.
Ian -- Sydney maintainer
What does it take to write extension modules (either GUI or non-GUI) for RealBasic? Do you write them in RealBasic or is there a way to write them in C/C++?
If you do a GUI extension module, does your application become dependent on Windows/OS-X/Linux or does it have some kind of abstraction of the GUI and abstraction of the graphics drawing surface accessible from C/C++?
If you can stand to wait until Mono has gotten the WinForms is done, then afaik, you will be able to write a single app that runs on both win32 and linux(using GTK/Gnome I assume).. Or so I've been lead to believe
Also, what brand deoderant will get the the chix at the local linux users group?
none
And when the user disables Javascript?
It doesn't work. It's not intended for "web pages" that I fully agree should be completely accessible and gracefully degrade. Syndey is intended to be an application framework. Applications come with minimum system requirements, and Sydney's list includes "JavaScript is turned on".
Ian
Why the hell where you using VB to start with. I would never dream of using VB for *IMPORTANT* applications...it's plain retarded...
Let me introduce you to this little known programming Lang...its name is C..look it up... works great!
But if you really want to port that VB app and want all the same functionabilty of it...let me recommend Javascript...
But for now, I wan't to learn how to bring down my company from the inside by convincing someone that a stupid idea makes sense, like taking working applications and converting them to something marginal on a different platform that no one in the enterprise uses.
Many people in this thread have come up with alternatives to VB.NET. Here is a very strong argument for VB.NET and for the .NET platform in general, whether you want to run on Mono or on MS:
Since Java and C# are very similar, just about all the important open source Java libraries are being ported to C#. Once on C#, they are available for all CLR languages - also for VB.NET.
Some examples:
http://www.db4o.com/
http://bbooprevalence.sourceforge.net/
http://nhibernate.sourceforge.net/
http://nant.sourceforge.net/
Strong libraries is what make up the power of a programming language.
db4o - open source object database for Java and
I've been searching for it for YEARS, but no, there's no Open Source RAD for Linux that is compatible with C++. Much less with Visual Basic.
(Check out this link for Differences between Gambas and VB )
My advise is to rewrite your app using C# and then move it to Mono. Sorry, can't think of anything else.
Search for Visual Rails++
And where does it lead? YOUR post. Ta-da!