This is a small project which I have been tinkering with on and off for
a few months. Recently, I re-wrote portions of it to be based upon the
new DynaBean.

Simper came out of my rather large experience with EJB -- specifically,
CMP. I thought I could build a framework which provides the important
parts (in my opinion) of EJB/CMP, without all the huge framework. What I
came up with is Simper, which I think packs a good punch terms of
providing the user some real usefulness, and yet comes in at around
1,000 lines of code.

Some highlights:

Design Principles:
        - Should be simple as possible, yet provide real value to coders.
        - Source code should be easily readable and understandable, in its
entirety. No black holes of 100's of classes (e.g. EJB).
        - The bean mechanism should be useful both at the Business Tier level,
and the Presentation Tier level - the same beans, no "copies" or Value
Objects. 
 - Should never grow significantly greater than it's current size (~1000
lines of code); for something more complex, go with Torque or EJB.

Simper is:
        - Simple table encapsulation - just name the table, and DynaBeans will
be created to wrap each row.
        - Automatic transaction demarcation using Servlet 2.3 Filters
        - Automatic change detection (trapping your "set" calls), with changes
written to the DB at the end of the Servlet request automatically
        - Simple means of defining queries, which return single beans or Lists
of beans.
        - Simple means of creating new rows
        - Simple means of deleting rows
        - Tied to JDBC/SQL - does not attempt to abstract away your SQL
        - Don't have to declare specific columns, much less getters and setters
- just name the tables, and Simper will take care of everything
(including database introspection to find all the column names/types)

Simper is not:
        - A comprehensive O/R tool
        - No class generation - everything is wrapped up in DynaBeans
        
Weaknesses:
        - Primary Key generation is handled by way of extra round-trip to DB
        - No automatic relationship management (1-1, 1-m, m-m)
        
Future:
        - Support for optimistic concurrency. Some of the plumbing is already
here, but non-functional (versionColumn) 

If this group is interested, I can JAR it up and send it somewhere. It's
not set up as a "standard commons" project with all the various
directories -- I don't want to set all that up until I know there's
interest.

Thanks,

Bryan

Reply via email to