Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Software Technology Linux

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."
This discussion has been archived. No new comments can be posted.

Migrating Visual Basic Applications?

Comments Filter:
  • by numbski ( 515011 ) * <[numbski] [at] [hksilver.net]> on Monday April 04, 2005 @05:39PM (#12138194) Homepage Journal
    RealBasic 5.5+ [realbasic.com] 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.
  • by Uber Banker ( 655221 ) on Monday April 04, 2005 @05:53PM (#12138305)
    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).
  • Maturity (Score:5, Interesting)

    by Spudley ( 171066 ) on Monday April 04, 2005 @06:13PM (#12138501) Homepage Journal
    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.

  • Migrating (Score:4, Interesting)

    by Anonymous Coward on Monday April 04, 2005 @06:13PM (#12138502)
    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 [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 ;)
  • by scottsevertson ( 25582 ) on Monday April 04, 2005 @06:16PM (#12138537) Homepage
    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.
  • Funny, I can't seem to find their Linux version of RealBasic.
  • by Omega996 ( 106762 ) on Monday April 04, 2005 @06:53PM (#12138863)
    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.

    More info here, I think...

    http://www.realsoftware.com/realbasic/guides/porti ngvisualbasic/ [realsoftware.com]
  • by apgdev ( 873377 ) on Monday April 04, 2005 @07:08PM (#12138997)
    Consider using Appgen as an alternative to VB, offering a single set of developed code that can then run on a variety of OS platforms.

    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]
  • by Tablizer ( 95088 ) on Monday April 04, 2005 @07:58PM (#12139367) Journal
    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...

    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.
  • This might help... (Score:3, Interesting)

    by leonbrooks ( 8043 ) <SentByMSBlast-No ... .brooks.fdns.net> on Monday April 04, 2005 @09:46PM (#12140054) Homepage
    ...thanks, Naken [naken.cc]. I'd like to see VB2Ruby one day, please, if any of y'all have some free time.
  • by Latent Heat ( 558884 ) on Tuesday April 05, 2005 @08:27AM (#12142584)
    I poked around the RealBasic site and didn't get too many leads on this.

    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:Maturity (Score:2, Interesting)

    by indifferent children ( 842621 ) on Tuesday April 05, 2005 @08:32AM (#12142608)
    On Linux, I use Java with the free NetBeans IDE as a VB 'replacement'. It has a drag-and-drop form designer that will automatically tie control-events to your functions (it writes an empty stub method for you). It uses Swing, and is a good bit slower than C++ (partly Swing's fault, largely Java's fault), but likely as fast as VB. This will be more like a re-write than a simple port, but it uses a more 'popular' platform than any of the Basic solutions that have been mentioned, and is probably easier and more portable than the C++ solutions.
  • Re:Java (Score:3, Interesting)

    by Joey Vegetables ( 686525 ) on Tuesday April 05, 2005 @09:11AM (#12142800) Journal

    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].

  • Mono (Score:1, Interesting)

    by Anonymous Coward on Tuesday April 05, 2005 @10:14AM (#12143408)
    If you can stand to wait until Mono has gotten the WinForms [mono-project.com] 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

Today is a good day for information-gathering. Read someone else's mail file.

Working...