Hi all, I have this tool I cobbled together for building vanilla java web applications. You feed it an XML config file that defines tables and columns. It generates:
1) source for simple databeans to hold those rows 2) source for simple database access classes (mapping a result set to a databean, composing an INSERT, UPDATE, or SELECT clause) 3) basic JSP forms to edit the beans. I find this tool somewhat useful, I'd like to continue to refactor it and make it more generally useful. I've done some looking at various tools out there. I'm not going to worry about the JSP side much, for the foreseeable future. JSP code is simple enough by itself, and the JSP side always ends up getting massaged extensively, so I'm not sure I really like generating it like this. (I keep meaning to read up on JSF and get a solid idea of what it brings into this but I can't seem to find a simple, concise definition of what JSF is/does.) Hiberate looks very, very cool and I want to move as much as possible to using it for the database side. I don't see anything in Hibernate - or anywhere else for that matter, though I may not be using the right google search terms - for generating the simple databeans. My immediate plans, however, are to: 1) move from using print() to using a more sophisticated code generation tool (velocity?) 2) refactor a lot of the boilerplate that gets wrapped around each databean instance variable into a set of standard input classes. E.g. instead of using a Date class and having a lot of boilerplate generated for each bean for parsing the date on input and formatting it on output, I'd have a DateInput class that would have that, and use a DateInput for the bean's instance variable. This second, in particular, it seems like there should be an existing package for already, but I haven't managed to find it. I'm thinking each input class will have: 1) getters/setters for String inputs from forms 2) getters for producing Strings appropriate to use in an SQL query. 3) an "isDirty" flag for determining what values where changed from the original values loaded. 4) a collection of InputTest classes that can be run against the value to make sure it's safe to enter. each TestInput would have a isValid() and getErrorMessage() Ultimately/eventually I can see that the forms and the beans and the tables should be more separated. Ideally I'd generate databeans that the forms populate, and have a separate bean-to-database-mapping mechanism. But for now I'm just trying to build a tool to build a simple solution to a specific problem. -- Steven J. Owens [EMAIL PROTECTED] "I'm going to make broad, sweeping generalizations and strong, declarative statements, because otherwise I'll be here all night and this document will be four times longer and much less fun to read. Take it all with a grain of salt." - Me at http://darksleep.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]