JGuiGenDemo Script

From lightwiki
Revision as of 20:46, 29 April 2006 by God-fearer (Talk | contribs) (EXtra, Find, Reports, and Help)

Jump to: navigation, search

Back to JGuiGen Demo

The demo pre-script

  1. ./rec.sh
    1. rm -rf ~vds/.java/
    2. cd ~vds/downloads
    3. rm -rf jguigen
  2. enter password
  3. cd ~vds/downloads
  4. hide the panel
  5. xview JGuiGen_Screenshot.jpg & - Elegant CRUD
  6. maximize it
  7. throw it into workspace 2
  8. rec -c 1 -d /dev/dsp -t wav -r 44100 - | lame -h - junk.mp3
  9. F8 start recording swf

The Checkout and Build

  1. Here we are in a virtual network computing session ... going hardcore ...
  2. click the terminal's workspace
  3. svn checkout https://svn.sourceforge.net/svnroot/jguigen/JGuiGen/trunk/ jguigen
    1. Checking out of the latest JGuiGen source code
    2. In case this is your first time hearing about JGuiGen ... it is all about J for Java, Gui for Graphical User Interfaces, and the Generation thereof, hence "J" ... "Gui" ... "Gen"
    3. file:///home/vds/downloads/jguigen/htmlhelp/index.html
      1. 4
      2. 5 JTable prefs
      3. 6 All code generated by JGuiGen can run in from a class, a jar or as part of a Java Web Start application
      4. 7. The JPanel's generated are internationalized ... text, dates in other countries, money, and even the hot keys "y" for "yes" becomes "s" for "si senior" ...
      5. 8. The JPanels are set up to work with Assistive Technology. for both blind and color blind.
    4. Some have said that they'd rather write code that writes code than just write code.
    5. So again what we are checking out here is code that compiles in order to generate code that compiles in order to render GUIs that allow users to do something I call ... View, add, edit, and delete from a table.
    6. The big picture here is that we will be able to quickly generate a screen that allows users to view, add, edit, and delete entries from a table.
    7. Another person called this "Elegant CRUD" which sounds like an oxymoron where CRUD stands for Create, review, update, and delete ... or as I translate it ... add, view, edit, delete
    8. Only the most motivated, high speed, open source development allowed ... no holding back
    9. grabbing the latest source using subversion on sourceforge.net
    10. The jars, a 3 MB sample database, help files, and of course the source ... there it is
    11. we have revision ...
    12. Let's get down to business in JGuiGen
  4. cd jguigen
  5. ls -l - looks like a normal project folder
  6. here's some images ... here's a lib for supporting libraries ...
  7. all code here is under the Gnu General Public License ... the GPL
  8. unzip JGuiGenMisc.zip - these are starter files that we usually don't want other folks committing back into the source, such as configuration files that you'll need to customize for yourself when you are generating your own Graphical User Interfaces here ... and other files that you will need to ...
  9. time ./build.sh
  10. Again, what we are doing here is building some code that builds some code that builds a screen that users can have to do views, adds, edits, and deletes from a table in a database.

Two of the widgets

  1. Ok so lets start JGuiGen ...
  2. ./run.sh JGuiGen
    1. first we will need to tell it who we are ... let's tell it we are Hale ... one of the folks in the default config file we checked out
    2. Look it found our browser ... and ...
    3. Look it found our word processor
  3. Users
  4. JGuiGenDemo
    1. Let launch right into a full blown gui ... with all the bells and whistles, to give you an idea of what you will be able to generate when you generate your own guis using JGuiGen
    2. Now this is a big screen with, lots, and lots of features ... let's look at a few of them
  5. change the social security number
  6. change the start date
  7. change to a different row in the table and show off the validation catch
  8. sort by clicking on a column
  9. right click and drop your jaw
  10. click back in the main window and change the ssn

Some validation

  1. right click ... choose next
  2. watch validation work again
  3. mention the 10 or so actions which are already coded for me, and I dont have to write code for that correctly validate and make sure the users of my gui do not loose data in irritating ways
    1. changing rows in the table
    2. right click and ... wow look at all these things you'll get ... do you want to write the code yourself to do all this?
    3. Anyway, if we try to right click and ...
      1. go to the "next" row in the table
      2. go to the "previous" row in the table
      3. "Dup" this row - which means duplicate the current row with a new id number
      4. "Refresh table" in the right click pop-up (not working ... oops)
      5. "Add" a new row
      6. "Find" another row
      7. "Extra" or any of a number of other things, like
    4. "Add" another row from the main menu
    5. "Find" another row from the main menu
    6. Or "Extra" another row from the main menu
    7. Or the "Exit" button in the upper left
    8. or even this nasty X button over here
    9. It's going to perform a check to see if we've changed something ... web developers eat your heart out
    10. Again, this checking is something we want in our gui ... it's just not something we want to actually have to sit down and write the code to do for our gui ... JGuiGen does that for us.
  4. then when we finally hit save ... we mention that this is a multi user save and what we did not just see, because it looked so painless, is that JGuiGen's gui did a multi user check to see if anything had changed since the record was retrieved.
  5. click into one of the big text fields ... nice feature ... do not want to write the code for that.

Print, EXtra, Find, Reports, and Help

  1. PRINT button that does a print screen.
  2. Notice that "ExtRa" button ...
    1. This is just a simple button in the code that
    2. you will be able to easily find the code for it in the java
    3. rename it to "my custom report"
    4. add your own functionalty to it
    5. and look it has built in functionality underneath that you might like to use ... option 1, 2, 3
  3. Notice that the "font chooser" has octothorpes around the text, two points I'd like to make about this:
    1. This entire gui is Internationalized ... every bit of text you see here is coming from a resource bundle ... these pound signs are telling us as a developer of this gui that there is no entry in the resource bundle for this text, but even though the entry is missing
    2. the code still runs, which, for anyone whose ever had to do serious i18n in Java, you will appreciate
    3. we could also go in now with JGuiGen and regenerate the resource bundles for the internationalization of that menu option ... we'll get to tht a bit later
  4. Find
    1. First name "is equal to" Hale
    2. OR
    3. last name "is like" Sing%
    4. Execute
    5. click on one of the columns and note the sorting
    6. Find ... note it saved our most recent find critereon
    7. note the "Show inactive" button which toggles and ... guess what allows the user to find rows that they or someone else deleted last week, but were not really deleted of course ... just flagged that way so that you did not have to write that code again ... just use JGuiGen
  5. Click Help in the Find box and talk it
    1. Reports
    2. Look and feel
      1. right click again ... choose inverse mono look and feel
      2. right click ... choose Native
    3. Print the screen
  6. click Help in upper right ... This is your place to put your own help for your gui
  7. Exit out of User Demo
  8. The help that is "here" one of the many examples of JGuiGen eating it's own dog food.
    1. Simply tonnes of documentation about JGuiGen e.g.
    2. here is a manual and for those of you who like to RTFM
    3. here is a read me which shows you, for example, all of the databases suppoerted by JGuiGen
    4. Let's mention the different DBs by name: Oracle, SQLServer, MySQL and Postgres
    5. You can cuddle up with this in bed some evening
  9. Now let us move on now and generate our own gui
  10. Exit JGuiGen