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."
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'm not sure there's a version of RealBASIC that actually runs on Linux. I think it's more like a compiler target. Maybe with their next version (should be out soon) there'll be something that actually allows Linux dev on Linux.
i ngvisualbasic/
More info here, I think...
http://www.realsoftware.com/realbasic/guides/port
The about to be released version of RealBasic does allow the IDE to run on Linux and is written in RealBasic.
This implies that its Linux support will be more robust than the current version's.
Also, if you have a VB 6 license, you can get a free RealBasic Standard for Windows license through April 15th.
One thing to look out for if your writing a RealBasic application for Linux is DB support. There are many database plugins for RB but I've had issues getting some of them to work properly on Linux (though it's been awhile since I've tried so things may have improved).
Anyway, if you're a licensed VB6 user, you probably have a Windows machine, so why not get the free RB license and give it a whirl. It is a "better basic" than VB6, mostly because it's a real OOP environment and is actively being worked on by a company that lives or dies on it being a good product.
HTH
to be fair I haven't used VB since VB 6, so I have no idea what