From: Marek Janukowicz Date: 2003-06-07T18:51:12+09:00 Subject: Re: [ANN] sql-serialize 0.0.3 (was: [ANN] VAPOR 0.06, Transparent Persistence to PostgreSQL) On Fri, 06 Jun 2003 13:44:43 +0200, Anders Borch wrote: > This shounds like a great idea! I will go right ahead and see if you > made something I can steal and use in my own object persistence library :) > > As it seems everyone and his sister is making this we might compare > notes. There is no need for us all to make the same mistakes... sadly I > won't have time to look at your library 'till tuesday, but until then: > please look at my take at this: > > sql-serialize (presently in ver. 0.0.3): > sdfhttps://sf.net/rpojects/rsqlserial - project page > http://rsqlserial.sf.net - documentation > > my goals are: > * no xml metadata > * almost transparent to persistent classes > * database independent (I started out with mysql but postgresql is > comming next week) I'm writing such a library too ;) It's not yet released, but hopefully will be soon. It is modelled basing on Enterprise Objects Framework (Java), so it aims to be bigger and more complete than yours, I think :) Features: - totally database independence: no sql is used in application - sql queries are created using "qualifiers" and converted to sql using adaptors - all you need to do is to write database-specific adaptor (which is trivial and sometimes even not necessary, if the generic adaptor works well with the database). My goal is to make it as db independent as EOF is - switching to another RDBMS will require only changing one line in config file and generating new schema in database. - support for transactions - XML metadata (database independence again) - support for relationships transparent for developer (I'm not sure if any of existing libraries has this feature) - eg. if you have Employee->Department relationship you only need to write employee.add_to_relationship ( "department",department ) and when saving to database proper foreign and primary key values will be generated. Then you can eg. delete department object and all its employees will be deleted recursively (or their department will be set to null - you can set this behavour in config file). Features not implemented and required before release: - writing documentation :) - some more testing - minor changes to the adaptor I write this library (called SDS) because I need it for my second project (called in turn SWS :), which is a web application library similar to Apple WebObjects (Java). Anyone who used WO can confirm it is extremally powerful and easy to use framework, so maybe (hopefully:) SWS will be good enough to write Ruby businnes applications in it - people are definitely lacking good web development library. SWS has a lot of advantages over traditional CGI/FCGI/mod_ruby applications because it uses MVC approach. It also has some key advantages over HTML template libraries (such as Amrita) - eg. you can bind a String with a HTML textfield and its value will be displayed in the textfield when rendering the page, but additionally after submitting the form the value of the String object will be set to the value entered in text field, with no additional work by developer! Another example - you can make a HTML table with a header row and second row wrapped in something called "repetition", bind some object_array and object_iterator with the repetition and you will get table with displayed attributes of object in the table. If you place a button in the repetition row, you can bind an action (basically a Ruby method) with it - when it will be called, before invoking a method object_iterator will be set to object in the row in which you clicked the button! There is already one library based on WebObject - CGIKit, but it is much simpler than mine and has some WO features lacking: it runs as a CGI script - SWS runs as a standalone application and is connected with WWW server through adaptors (CGI/FCGI/mod_ruby/whatever - they are not written yet :), has no persistent Application object, Session support is lacking a bit. It is very good as a simple library with most of fundamental WO features implemented, but I wanted something much more complete. If anobody is interested in SDS and/or SWS please email me at marek at janukowicz dot net - I can send you the sources in current state (almost no documentation :). I think a lot of people would appreciate making some libraries thay could write SERIOUS applications with (just joking :). Phew... I think this post is much longer than all my previous ones together :) -- Marek Janukowicz