BibleGateway.com Verse Of The Day

Thursday, December 14, 2006

Ant Visualization Tool - yWorks Ant Explorer

Found this free tool last night that shows a visual graph of an Ant build.xml and shows the hierarchy of task dependencies. Can be stand-alone installed or Webstart, or IDE plugin for Eclipse or Netbeans.

http://www.yworks.com/en/products_antexplorer_about.htm

Wednesday, December 13, 2006

DAO Gen Update 12/13

Between other tasks and our Christmas party, I got some work done on the DAO generator tool.

Completed Tasks
  • ResourceManager - getConnection() for when Connection is not supplied: Currently it's guts are commented out. Should put a JNDI lookup for a data source in there. That's how we do it, most likely anyone doing server-side code also does this. They could always customize for using DBCP or some other mechanism.
  • DB query tab. Lets you enter queries and run them. Results come out to output tab as tab-separated text, along with number of rows retrieved and how long it took to run.
  • simple Batch file launcher for Windows.
  • Fixed an elusive NPE on describe that only happened once in a blue moon.
  • Usability stuff: there are validations now for required fields being blank, and clicking on describe button will take you to output tab to show what is going on. When done, it goes to DB explorer tab. If a field is blank when validation runs, the config tab is selected so user can fill in,and some other things that make it all more usable.
Screenshot of simple query runner tab:


Outstanding Tasks
  • DaoFactory - generated factory class is missing factory methods for stored procedure DAO's (easy fix, but have been busy with GUI)
  • Stored Proc DAO's - need a lot of work
  • CLOBS/BLOBS/BFILES - haven't accounted for those at all. they are a pain to write by hand so they should be done right in the generated code.
  • Generated DAO's and all classes need to be fully tested to make sure the templates are right.
  • Dist - need to come up with a distribution package mechanism, with shell and batch files to launch, special directory for templates, etc.
  • Custom Queries - not implemented in generator or GUI yet.
  • Saving new project file - app should put .prj extension on filename automatically if it isn't there.
  • Help screen needs content
  • Code cleanup w/ respect to comments, package names, etc.
  • Pick a better name for application and update the package names
  • Documentation would be helpful
  • Pick an open source license and OS project hosting

Tuesday, December 12, 2006

DAO Gen Update 12/12

I got lots of cosmetic and functional work done on the GUI side of my persistence generator. Still need to work on the Velocity templates, implement custom query generation, clean up code/comments, pick a better name, open source it somewhere, and some more GUI features to add.

Progress this week:
  • Added a Browse button for the template directory to make it more consistant with the generated code destination field. Also improved the layout a little bit on the screen.
  • Switched to a tabbed interface. The main screen from last week is now the configuration tab. There will be a tab for writing the custom query methods, running queries against the current DB, the output window has been nixed in favor of an output tab, and a tab that visually shows the DB objects to some extent.
  • Add mnemonics to menu and toolbar controls.
  • Open and Save/Save As now fully work, and described database meta data gets saved with project.
  • Help "about" and "contents" actually launch screens, even if there is no real content yet.
Screenshots: Config Tab (default Java "Metal" look and feel)Output tab (used to be separate window)

DB Explorer tab:
Look And Feel is controlled by View menu, below are the Windows (native) and the crappy "Motif" look-a-like that comes with Java:



Outstanding task list:
  • ResourceManager - getConnection() for when Connection is not supplied: Currently it's guts are commented out. Should put a JNDI lookup for a data source in there. That's how we do it, most likely anyone doing server-side code also does this. They could always customize for using DBCP or some other mechanism.
  • DaoFactory - generated factory class is missing factory methods for stored procedure DAO's (easy fix, but have been busy with GUI)
  • Stored Proc DAO's - need a lot of work
  • CLOBS/BLOBS/BFILES - haven't accounted for those at all. they are a pain to write by hand so they should be done right in the generated code.
  • Generated DAO's and all classes need to be fully tested to make sure the templates are right.
  • Dist - need to come up with a distribution package mechanism, with shell and batch files to launch, special directory for templates, etc.
  • DB query tab - not implemented yet
  • Custom Queries - not implemented in generator or GUI yet.

Tuesday, December 05, 2006

A Few Unix Shell Tricks

If you want to set a value in a shell script, but only if it isn't already set (e.g. set a default value but let it be overridden), try this. The following command will set PROJECT to be mqbridge, unless PROJECT is already set. In that case, the current value overrides. I have used this trick in ksh and bash. Not sure what other shells it works in.

export PROJECT=${PROJECT:-"mqbridge"}

Redirecting stderr to stdout: If you are trying to capture output of a command into a file, you will notice the regular output goes into the file, but errors go directly to the screen instead. If you want to capture both, use shell redirection like this (2>&1) after your command.

For example, to have all output go to the screen and to a file, you can do something like this:

    run.sh 2>&1 | tee output.log