Thursday, September 16, 2010

Lesson 1





Lesson 1

The basics first.


GoDB is a Multi-Platform Application Builder.


With GoDB you can 
       Develop Once
Deploy to any
popular PDA,Laptop or Desktop.

       Develop Online / Offline and Occasionally Connected applications.


GoDB
VM has four primary components.




  1. Microbrowser for rendering forms.

  2. GBasic Scripting engine.

  3. ANSI SQL RDBMS to manage local data.

  4. Smart sync engine to keep local and remote tables and files in sync.



GStudio IDE has the following components.




  1. Form Builder.

  2. Simulators for devices/PCs.

  3. Integrated source level debugger.

  4. Single click deployment to multiples devices.







Creating a Project




In this tutorial we will see how to create a simple Hello World application.


Step 1: Launch GStudio


GStudio is the RAD(Rapid Application Development) IDE(Integrated Development Environment) for developing GoDB applications.


Start Menu->Programs->GoDB->GStudio.






Step2: File->New Project.

Select the Project Type "Hello World Application".

Select the Project Directory by clicking on the button next to "Location".

Enter a Project Name in the "Project Name" box

Select the Platforms for which you want to build this project

Click OK button to create the project


Note: You may add additional platforms to the project any time later.








This should create a project, add some startup files.


Lets look at the files that were created now.



Logon.frm All GoDB projects start with a logon screen so that the user can login before using the application.


Home.frm When the user logs in successfully, this page is loaded.
Config.frm,Config.ini These pages are for viewing and storing configuration information. We will see how to use these pages in detail in later chapters.


Now Lets compile and run the project.


Select the Platform,





Compile.





Run





You Should see the Login Screen in the Simulator





Click on Logon Button.





You Should see the Welcome to GoDB Button.


Close the simulator by clicking on the Power button .







Writing Event
Handlers



Event handlers in GoDB are GBasic scripts that are invoked when an event on a control is fired.


In the IDE Open home.frm by Double clicking on it in the project tree.






When the form opens up Double click on the "Welcome to GoDB" Button.





This should add a bas file called Home.bas and open up the code editor where you can write GoDB GBasic Scripts.





Type the above code Save, Compile and run the Project. In the simulator when you login and click on the Welcome to GoDB Button you should see a "Hello There" message box.










GoDB Files



GoDB Projects have three types of files.


FRM files that have forms.

BAS files that have scripts for event handlers.

BIN files for storing images.


When a project is compiled all these files are bundled into a single BDB file.

The GoDB VM loads and executes this BDB file.


This BDB file is platform neutral so you can copy a BDB file created on one platform say Win32, copy it to an another
platform say Linux your application should run without any change.


GoDB Achieves Platform neutrality by having separate GoDB VMs for separate platforms.


When you distribute your applications you just need to bundle the BDB file and the GoDB VM for the platform you wish to run the application on.



 



0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home