Porting Visual Basic Apps to Linux OPENING DOORS Realbasic Provides an Easy Solution for Convert- Ing Visual Basic Programs to Linux

Porting Visual Basic Apps to Linux OPENING DOORS Realbasic Provides an Easy Solution for Convert- Ing Visual Basic Programs to Linux

COVER STORY Realbasic Porting Visual Basic apps to Linux OPENING DOORS Realbasic provides an easy solution for convert- www.sxc.hu ing Visual Basic programs to Linux. BY FRANK WIEDUWILT isual Basic owes its popularity in and enhancements for a fixed period of the world of Windows to its rep- time. After this time, the customer re- Vutation as an easy-to-learn and tains the license but does not get the easily readable programming language. bugfixes. Real Software promises to re- But users moving to Linux typically have lease a new version every 90 days, so li- to re-write their Visual Basic programs in censed users can look forward to new a different language. Free Basic variants features at regular intervals. such as Gambas [1], HBasic [2], or WX- The Standard Edition for Linux is free; Basic [3] are just too far removed from the Professional Version costs 330 Euros VB to support no-worries porting. KBasic (US$ 399.95) with six months worth of [4] promises complete syntactical com- updates. Other license arrangements are patibility to Visual Basic, but it is still at also available. Table 1 shows the differ- a fairly unstable beta stage despite sev- ences between the two versions. eral years of development. Real Software The Professional version of Realbasic Figure 2: A cross hair cursor facilitates recently launched Realbasic [5], a com- for Linux can create programs for any accurate positioning of GUI elements. mercial tool designed to pick up Visual Windows version from 95 through to XP. Basic projects and give users the ability The programs do not require any addi- documentation is also available from the to run them on Linux and Mac OS X. tional DLL files, and Realbasic programs Realsoftware homepage. The Realbasic licensing model is in Linux comprise a single executable. When first launched, the program slightly unusual. In addition to the right The Standard version can also produce prompts you to enter your name and to use the program, customers addition- binaries for testing on Windows and email address before it downloads the ally purchase the right to free bug fixes Mac OS, although the program runtime license key. is restricted to five minutes. GUI The Realbasic GUI can hold sway with Installation most other modern developer environ- The binary pack- ments (see Figure 1). Programmers mov- ages were easy to ing from Visual Basic will find their way install. Red Hat around just as quickly as those familiar Desktop Linux with other IDEs. The editor supports and Novell Desk- syntax highlighting and completion of top Linux users keywords, variables, classes, and meth- can download the ods. The editor can also hide or display Realbasic RPMs; code blocks on request to help develop- there is also a TGZ ers keep track of larger-scale projects. archive. Both vari- The form editor provides widgets for ants work per- all three supported platforms. It also has fectly on any re- OLE elements to allow developers to cent distribution. embed Microsoft Word and Excel ob- Figure 1: Realbasic is easy to use and offers a rich array of features. The PDF-based jects. Of course, this will not work in 36 ISSUE 64 MARCH 2006 WWW.LINUX - MAGAZINE.COM Realbasic COVER STORY Flex Grid in Visual Basic. Real Software offers a conversion tool [7] (Fig- ure 3) to help develop- ers convert Visual Basic project files, modules, and forms to XML-based Realbasic projects – un- fortunately, the tool only runs on Windows. The software discovers Figure 3: The Visual Basic converter con- and removes syntax er- verts projects to Realbasic format – but only rors during this process, on Windows. but it fails if control la- bels contain non-stan- Figure 4: The converter logs problems and solutions in an Linux, which does not prevent the tools dard characters, truncat- HTML file. from being displayed in the toolbox. ing the names at the A cross hair cursor makes it easier for first occurrence of the non-standard vides a Plugin Development Kit free of developers to position and align screen character. The converter logs any prob- charge at [8]. As SQL is the preferred elements by displaying a green line to lems it runs into, and possible solutions, query language, applications developed highlight the edges of other objects, and in an HTML file (Figure 4). And the new with the internal database should also by snapping the selected element into source code contains comments with work with other back-ends. place when it is at 90 degrees to a refer- tips on improving the results. If you are moving from Visual Basic to ence object (Figure 2). Realbasic, you do not need to worry Databases about the differences in SQL dialects; the Porting Existing Code The Standard Version of Realbasic only conversion program takes care of that. You are probably wondering if it is possi- uses an internal database based on ble to use existing Visual Basic projects SQLite. In contrast to this, the Profes- Conclusions in Realbasic. The answer is a very non- sional Version uses plugins to support Realbasic allows developers to port Vi- committal, “Basically, yes.” The Real access to MySQL, MS SQL, and MS Ac- sual Basic applications to Linux with Software homepage provides a HOWTO cess databases. To support development very little effort – however, you will for Visual Basic developers [6] that of more interfaces, Realsoftware pro- probably need Windows to run the con- points out the pitfalls of verter. If you do not draw heavily on porting. Table 1: Standard and ActiveX controls, your own controls, or Although it is quite Professional Versions controls from toolboxes, you should be simple to modify key- Standard Pro able to migrate your Visual Basic proj- words that are used Create Linux programs (x86 processors) ✔ ✔ ects without too many changes. Your slightly differently or Create Linux, Mac OS, and Windows programs – ✔ programs should then run on Linux and different data types Convert and import Visual Basic projects ✔ ✔ Windows, Mac OS X, and even the leg- (Table 1), Realbasic mi- Integrated single host database ✔ ✔ acy Mac OS. ■ grators are likely to run Access to external databases – ✔ into trouble if they (Access, PostgreSQL, MySQL, ODBC) INFO draw heavily on Ac- SSL support – ✔ [1] Gambas: tiveX components and http:// gambas. sourceforge. net more exotic controls. Table 2: Data Types [2] HBasic: http:// hbasic. sourceforge. net Realbasic gives you Visual Basic Realbasic [3] WXBasic: controls that handle the 16 Bit Integer Integer Not supported, uses http:// wxbasic. sourceforge. net tasks performed by 32 Bit Integer [4] KBasic: http:// www. kbasic. org some ActiveX compo- 32 Bit Integer Long Integer [5] Realbasic: http:// www. realbasic. com nents. The documenta- Single Single Single [6] Howto for Visual Basic programmers: tion describes these Double Double Double http:// www. realbasic. com/ support/ functions, giving you a String String String whitepapers/ portingvisualbasic chance to assess the Currency Currency Memory Block [7] Visual Basic converter: odds before you decide 8-Bit Byte Memory Block http:// highspeed. realsoftware. com/ to purchase. As an ex- Boolean Boolean Boolean REALbasic55/ VBPC. zip ample, Realbasic’s List- Colors Not supported Color [8] Realbasic Plugin SDK: Box does the job han- Variant Variant Variant http:// highspeed. realsoftware. com/ REALbasic2005r4/ PluginsSDK. zip dled by the popular Object Object Object WWW.LINUX - MAGAZINE.COM ISSUE 64 MARCH 2006 37.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us