Re: SimpleORM Download Form
[email protected] Mon, 14 Jun 2010 19:04:16 +1000
| Newsgroups | gmane.comp.java.orm.simpleorm |
|---|---|
| Message-ID | <[email protected]> |
Hello Bruce, As to your concerns. 2. SimpleOrm predates generics, and there could well be opportunities for further improvement. If you like, just create your own class BruceRecordInstance which extends SRecordInstance and then you extend it. You can then play with the Generics there, and make a firm proposal. We cannot change existing methods and break compatibility, but we can extend. Note that SimpleOrm follows JDBC in that if a column is declared Int, say, getString will still return a String representation. But a generic get<T> could be useful. <rant>I have been using .Net recently, and the fact that generic types are real parameters and not extinquished is very handy. Java should have done this! Would help SimpleOrm in several places.</rant> 3. addPropertyChangeListener might be a good thing to add. There are already hooks for you to add it to BruceRecordInstance. Proposals welcome. 4. Dirty is there, as is the actual initial values which are used for optimistic locking. 5. Dirty session could be easily added, it is essentially there anyway. 1. The "S" is partially historical, early versions had classes very similar to JDBC. I certainly did not want the mess of java.util.Date vs java.sql.Date. Now the S just avoids an potential namespace issues, makes it very clear when reading code. I personally like a one letter prefix, costs very little. Would seem to be a minor point one way or the other. (I have CCed this to the list. Please subscribe.) Anthony At 01:37 AM 12/06/2010, [email protected] wrote: >name: Bruce Alspaugh > >goodpart: I like that SimpleORM is very lightweight with minimal dependencies compared to Hibernate. I like that fact that SimpleORM does not do bytecode manipulation on my objects, and I'm willing to have my persistent domain objects extend a common base class to achieve that. I like describing the Object-Table mapping using java rather than XML or annotations. > >concerns: 1. I don't like the naming conventions that have the "S" in front of the names. For example, "SRecordMeta" should be just "RecordMeta", SSession should be just "Session", etc.2. I think SimpleORM could make better use of generics for type safety and eliminate the unchecked cast compiler warnings. For example, a column description should be generic on the data type of the column. A record description should be generic on the type of the record. Instead of having all the getString, getInteger, etc. methods for every data type, replace all that with a single getValue method with a generic return type.3. I need SimpleORM to support bound properties on the records according to the JavaBeans convention so a client can call an addPropertyChangeListener method on a record and rec eive PropertyChangeEvents whenever a persistent property changes. This is useful for data-binding purposes in Swing applications.4. I could use a bound property "dirty" that indicates that a record has current values that are different from the initial values.5. I could use a bound property "dirty" on a session that indicates that there are changes that could be flushed to the database. > >organisation: Ideal Source Quality Assurance > >city: Columbia, Missouri USA > >orgdesc: I developing an in-house database client application to maintain inventory and quality control records. I'm developing Java Swing/Java Webstart database client application (NOT an AJAX/web client) so the download size needs to be minimized, and Hibernate is too heavy-weight for that purpose. > >nrprogrammers: 1 > >howknown: Google search Spreadsheet Detective, Southern Cross Software Queensland Pty Limited 54 Gerler Street Bardon, Queensland 4065, Australia. Email: [email protected] www.SpreadsheetDetective.com Ph: +61 427 830248 (Australian Eastern Standard Time) "If the model seems correct only because the numbers look right, then why build the model in the first place?" ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/SimpleORM/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/SimpleORM/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/