Migrating Visual Basic Applications? 72
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."
Depends on the Quality (Score:5, Interesting)
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).
Re:Depends on the Coupling (Score:5, Interesting)
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.
You may not like it, but.... (Score:5, Interesting)
Makes UI development easy, and I do all of the 'hard working' code in perl.
Re:You may not like it, but.... (Score:3, Interesting)
Re:You may not like it, but.... (Score:5, Interesting)
More info here, I think...
http://www.realsoftware.com/realbasic/guides/port
Re:You may not like it, but.... (Score:1)
Re:You may not like it, but.... (Score:4, Informative)
Re:You may not like it, but.... (Score:1)
Re:You may not like it, but.... (Score:5, Informative)
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 [realsoftware.com] 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
Re:You may not like it, but.... (Score:5, Insightful)
to be fair I haven't used VB since VB 6, so I have no idea what
What about extension modules? (Score:3, Interesting)
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++?
Re:What about extension modules? (Score:3, Informative)
theres a dated plug in writing example here [mactech.com] which'll give you a rough idea of how it all works, RB plug-ins are only platform specific if you use platform specific code, if you use active x for example, it becomes a windows specific plug-in.
Re:You may not like it, but.... (Score:2)
There's a utility to convert a VB6 project to RealBasic as well as a migration guide.
I've downloaded and installed, but haven't taken the time to review it yet.
Maturity (Score:5, Interesting)
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.
This might help... (Score:3, Interesting)
Re:Maturity (Score:2, Interesting)
Re:Maturity (Score:1)
That's what I keep telling people about
They started over from scratch (at least on the VB part.) So you're starting out with a still maturing product.
Re:Maturity (Score:2)
In the unstable 1.9 tree there's working support for ODBC, Gtk (in addition to and code compatible with the Qt support), full screen and windowed SDL, perl-compatible regular expressions, a VB form importer (just the form, not the code yet), support for components which themselves are written in Gambas, and a bunch of other awesome stuff. I wouldn't use the unstable tree for production code yet, but the 1.0.x series is
Migrating (Score:4, Interesting)
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 [wxwindows.org]) 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
Re:Migrating (Score:1)
Problem with the licencing????? (Score:5, Insightful)
Anybody read this? http://www.mono-project.com/FAQ:_Licensing [mono-project.com]
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....
Re:Problem with the licencing????? (Score:4, Informative)
Re:Problem with the licencing????? (Score:1)
The problem is, mono isn't close to supporting winforms. So you're rewriting your entire GUI no matter how you slice it.
COM and other considerations (Score:5, Insightful)
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!
Re:COM and other considerations (Score:2)
For clusters, the optimal solution is to use OpenMOSIX and Distributed Shared Memory to provide some of the more useful features. DSM is vastly under-utilized in Linux applications and it might be a good idea if it made its way into the off
Re:COM and other considerations (Score:2, Interesting)
VB had two different "modes": bound database connections and record-set-based connections. Bound connections (live cursors) simplified a lot of development, but tended to be hard-wired to a lot of MS-specific tools and were not as efficient over a trifficy network. It would probably be much easier to port non-bound VB code
Re:COM and other considerations (Score:2)
Just a minor complaint with your post.
Packaging is not a issue if he/she chooses the correct runtime environment. POSIX/
Re:COM and other considerations (Score:3, Insightful)
I guess I'm assuming that portability is an issue: Linux users aren't all on x86 platforms, and there are other free *n*xes besides LSB-compliant distributions of Linux. If you care about supporting anything other than x86 Linux, then releasing anything other than source ends up being a LOT of work.
Not to want to start a Gentoo flamefest here, but I'm impressed with how easy it is to work with Gentoo ebuilds (and *BSD ports). You really end up not having to do much packaging at all: the scripts are smart
Re:COM and other considerations (Score:2)
I guess I'm assuming that portability is an issue: Linux users aren't all on x86 platforms, and there are other free *n*xes besides LSB-compliant distributions of Linux. If you care about supporting anything other than x86 Linux, then releasing anything other than source ends up being a LOT of work.
I deal with SCO/NCR/OS2/AIX/Windows/Linux binaries. No issues when your POSIX/ANSI compliant. Compiler
Re:best answer, likely (Score:3, Insightful)
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".
Re:PHP + Apache + web browser (Score:2)
Try Sydney [sf.net] 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
Re:PHP + Apache + web browser (Score:2)
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
ASP Clone (Score:2, Informative)
If VB-script (ASP), then Sun Microsystems has an ASP clone that used to be under ChilliSoft IIRC. It uses Java bytecode I beleive.
Yes (Score:1, Informative)
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 [joelonsoftware.com] 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.
Appgen as an alternative to VB development (Score:3, Interesting)
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/ [appgen.com]Re:Appgen as an alternative to VB development (Score:3, Insightful)
I'm always suspicious of a company that posts a website and wants you to arrange a visit from a salesdrone in order to get a price, or even a "ballpark estimate".
Maybe it's just me.
I've got it (Score:1)
Now we just need the programming to fit to the name.
Oh great... (Score:2)
And where does it lead? YOUR post. Ta-da!
anti-mono troll (Score:2)
Re:anti-mono troll (Score:1)
Re:anti-mono troll (Score:3, Insightful)
the Mono Project is an incredible benefit to the open source community. We don't need pointless trolling about its licensing on Slashdot.
To answer your question (Score:3, Funny)
Java (Score:4, Insightful)
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.
Re:Java (Score:3, Interesting)
The only real problem Java has is that there is no good Free JVM. But I expect that will change in the future.
I too expect it will change, but the JVM and class libraries are very tightly coupled, meaning one can't really be complete without the other. Thus, I strongly encourage anyone who can to support Free (as in Freedom) Java efforts like GCJ [gnu.org], Kaffe [kaffe.org], Jikes [sourceforge.net], and probably most importantly GNU Classpath [gnu.org].
Re:Java (Score:3, Informative)
Re:Multiple Licenses? (Score:2)
Mono is the obvious choice (Score:4, Insightful)
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.
Mono (Score:1, Interesting)
Re:okay...a question (Score:1)
VB.NET brings you the power of CLR libraries (Score:1)
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/ [db4o.com]
http://bbooprevalence.sourceforge.net/ [sourceforge.net]
http://nhibernate.sourceforge.net/ [sourceforge.net]
http://nant.sourcefo [sourceforge.net]
Unfortunately, there isn't. (Score:2)
(Check out this link for Differences between Gambas and VB [binara.com] )
My advise is to rewrite your app using C# and then move it to Mono. Sorry, can't think of anything else.