If you wish to be kept informed about the event,
please enter your email address below:
|
|
Talk Details
| Speaker Name |
Arjun Jain and Nalini V |
 |
| Company |
R.V. College of Engineering |
| Scope |
General |
| Track |
FOSS Projects |
| Talk Title |
GAMBAS - Gambas Almost Means BASic! |
| Synopsis |
##GAMBAS - Gambas Almost Means BASic!
Gambas is a VB replacement for Linux. Not a clone. Gambas is intended to be a better Visual Basic. Gambas took from VB that what was found really useful: the BASIC language and the easy IDE. It also took some ideas from Java, resulting an easy and powerful language. How powerful? The entire IDE was created in Gambas itself, an indicator of its level of sophistication even before reaching 1.0. (Gambas is currently v0.99). Gambas provides familiarity to VB coders using Linux and thus will increase the application programmers base for the Linux Environment.
#Background
Gambas is not the first attempt to create a VB replacement for Linux by a longshot, but is the closest to maturity.
In fact, there were many other unfinished attempts to create a VB clone for Linux:
* RapidQ bought out by RealBASIC, which is just now shipping a Linux runtime with no IDE
* Phoenix BASIC is frozen for 3 years
* KBasic stalled
* GNOME Basic shifted its focus to provide VBA support for GNOME apps
* XBasic is mature but more primitive than VB and
* HBasic - a worthy contender but is unstable
On the other hand, there are many BASIC languages without integrated IDEs, and many IDEs without the BASIC language.
Gambas has an unique mix of features that will help thousands of VB developers to migrate from Windows to Linux. Therefore, Gambas can bring more *applications* and *users* more *quickly* to Linux.
Finally, Gambas' component design means someone should be able to write a GUI component based on GTK+ with the same interface than the QT one, so that every gambas program can then switch between QT GUI and GTK+ GUI.
#Demo the POWER of Gambas (the 2 min Apps!)
1. Hello VB World (First, one of the first programs you'll certainly find, in any programming language, is the venerable "Hello World")
2. A two minute Movie Player!
3. A one minute image viewer
3. An analog clock with circular boundaries (not a rectangular form)
4. A Kate like editor
5. A Data base app with MySQL backend
6. etc
#Differences from VB
While Gambas is not intended to be a clone of Microsoft Visual Basic, it's still BASIC and there are many similarities between the two languages, and many one to one relationships between features. There are probably more similarities than differences, but you can't simply copy your VB projects over and expect them to compile under Gambas.
>Non-Language-Specific Differences
* VB embeds the class code for each form object into the same file as the form definition. Gambas keeps them separate, in a .form and a .class file.
* Form controls in Gambas programs are private by default. You can change this by going into the Project Properties dialog and checking the Make Form Controls Public checkbox, etc
>VB Has It, Gambas Doesn't
* You can't edit code in Break mode in Gambas; you need to end program execution first.
* Function and procedure parameters are passed by value. They cannot be passed by reference as in Visual Basic.
* There is no such thing as a project-wide global variable in Gambas. (There are workarounds though).
* Unless you include "Option Explicit" in a VB module, you don't need to declare variables prior to using them. Gambas behaves as if "Option Explicit" were always turned on, which makes for much better code at the expense of a bit more work.
* You can't currently create transparent labels in Gambas; the background is always opaque.
* The MouseMove event only occurs when a mouse button is depressed in Gambas, meaning you can't use it for the traditional mouse-over effects yet (other than the standard Tooltip associated with each control). The exception is the DrawingArea control, which has a Tracking property that allows getting mouse move events even if no mouse button is pressed.
>Gambas Has It, VB Doesn't
* Unlike VB, you're not required to compile in GUI support if you want to write a Gambas command-line application.
* Gambas has the concept of control groups, which allow you to handle events from any number of different controls with one handler subroutine. This reduces redundant code and can be used to do many of the things VB's control indexes can do, and some things that VB can't.
* Whereas VB makes it impossible to run a program synchronously and receive its output without learning how to do API calls (Shell merely launches the program in the background) Gambas allows you to do so using SHELL and EXEC, control the processes you start using the Process object, and even read from and write to them, allowing you to easily add functionality with helper applications. This makes it incredibly easy to write Gambas front-ends for almost any command-line procedure.
* You can do all of the above with Unix devices and special files as well, such as serial or parallel ports. Use the /proc filesystem to write a RAID monitor, for example, or use named pipes to get multiple channels of information from a back-end program in any other language.
* To make an odd-shaped window you just set the ME.Mask? property of the current window to a picture that has transparent areas. VB requires API calls and a bit more work..
* You can create controls and menu dynamically, just by instantiating them with the NEW instruction.
* In Gambas, you can create and display as many copies of a form as you wish.
* You can embed a Gambas form into another one: when you instantiate the first, specify the second as the parent.
* And of course, Gambas is Free Software whose development environment is written in itself, allowing you to customize it to a large degree using just your BASIC skillset.
#Leveraging the power of Linux
"This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface." One of the greatest advantages of Gambas over VB is that Gambas is built upon the Unix philosophy. That means you can leverage the power of Linux, and its thousands of tools, instead of writing code.
A few examples are the "PowerDemos" - for example the Media Player which has a mplayer back end. The philosophy is *NOT TO RINVENT THE WHEEL*.
#Leveraging your current knowledge
If you ever programmed in BASIC, you'll have that warm feeling of familiarity when you start programming in Gambas. VB programmers will feel comfortable right from the beginning. For sure, Gambas is not VB, and VB programmers must be prepared for a few differences. But most changes are there for a specific reason: to make a better language. (It's important to remember that Gambas borrowed some good ideas from Java and other programming languages.) With Gambas anyone can start programming graphical applications in minutes, and it will bring much more programmers and applications to GNU/Linux.
#Converting your legacy code
If you are a VB programmer and are unhappy with the recent platform changes (and the associated cost), you may consider converting your applications to Gambas. Gambas developers have already released a small script, currently in version 0.1, which will convert VB forms to Gambas. Vb2Gb was programmed in Perl due the strong text processing capabilities of that language, which soon will be implemented in Gambas.
#Summary
Gambas is the best thing that happend to Linux in terms of the amount of User Apps that can now be written. It is the closest thing to VB in the Linux world. It wasn't primarily intended to replace the millions of lines of VB code, but provide a rapid development tool based on the BASIC language. Nonetheless, Gambas already provides a tool to ease the migration from legacy VB applications.
|
| Speaker Profile |
Arjun has been using Linux for over two years now but only recently has started using it as his primary OS. He is the sys admin for his college and loves playing around with Linux.
Nalini has been using Linux since for the past two years during which she has completed projects like text editors and speech recognition system using Qt libraries and GNU Tools. She is also a major Linux enthusiast and an active member of RVLug - The Linux users group of RVCE.
Arjun and Nalini are presently in the 7th Semester Computer Science and Engineering at RV College of Engineering and are currently playing around with Gambas and trying to contribute to it by writing components for it. They are also currently working on “Reducing the TCP Instruction Path Length under normal load conditions” for their networks laboratory.
They stumbled on Gambas, loved it, and want the world to try it and fall in love with it :)
|
Download Slides
No of Downloads - 938
|
Download Slides |
|
|
See Talk Schedule
|
Platinum Sponsor
Gold Sponsor
Silver Sponsor
Track Sponsors
Web Applications

Supporting Sponsors
PCs & WLAN

|