Re: Split build dataset/session/examples

Anthony Berglas <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Hello Franck,

OK, I have renamed SSession to SSessionJdbc, 
SSessionDatabase to SSessionJdbcHelper.  Plus 
associated packages, source tree etc.  This 
allows for a future SSessionXml etc.

I don't think that it is useful to try to 
abstract away the difference between a Jdbc 
session and an XML one, say.  They can have 
different APIs, just work on the same DataSet 
structure.  Eg. XML does not have 
transactions.  Otherwise we start go down the 
provider mess that I tried before.

I also don't think that the tiny bit of code 
dealing with the thread local is worth abstracting, certainly not now.

(There is currently an interface 
dataset.SSessionI, but that is for logging and findReference.)


I  have also created begin(dataset), and 
deprecated all the attach methods.  See 
LongTransactionTest.    Is this OK?  Can we just 
get rid of the record attach entirely?  This 
means that a record cannot be moved directly from 
one dataset to another (but the values can always 
be moved).  I don't think this restriction matters.  Do you?


Also, have you had a think about my earlier remarks about joins vs subselects?

Regards,

Anthony

At 01:12 AM 26/07/2008, Franck Routier wrote:

>Hi Anthony,
>
>the last thing that puzzles me is I'd rather have a better decoupling
>between SSession and SSessionDatabase.
>Ideally, SSession should be persistence-agnostic, and SSessionDatabase
>provide the logic to do jdbc.
>
>Put it other way, maybe we could make ISSession an interface, put here
>the methods any SSession should implement, and let SSession(Database) be
>the jdbc implementation.
>
>Or maybe we could rename simpleorm.session to simpleorm.database (or
>jdbc).
>
>This would give a ground for future extensions, like offline dataset
>queries and so on.
>
>I'm not saying we should implement any of these now. I adhere to the
>objective of having a working Sorm3 soon. But breaking the API must be
>the occasion the prepare the future...
>
>I think this would only mean making the API contract clear by specifying
>what is in the ISSession interface and what is not.
>
>For example:
>
>public Connection getJdbcConnection() { return jdbcConnection;}
>
>is convinient for benchmarks, but we should make clear it is not in the
>interface. Same for getDriver(), and maybe others ?
>
>What do you think ? Should we clearly state what is in the contract of a
>session, and what is not ? And let user know simpleorm.session.SSession
>is actualy a jdbc implementation of a session, so rename it or rename
>the whole package to simpeorm.database ?
>
>I hope this makes sense.
>
>Franck
>
>Le jeudi 24 juillet 2008 à 17:49 +1000, Anthony Berglas a écrit :
> > I have (finally) split the build into three separate compiles. This
> > means that any reference from dataset to session will simply not
> > compile.
> >
> > I had to move SGenerator* to SSession, and introduce
> > SGeneratorMode. SGenerator could be reexamined in general.
> >
> > Moved a lot of files around with svn. There are now three top level
> > source folders: dataset, session and examples.
> >
> > Two jars are built, simpleorm-dataset.jar and simpleorm-session.jar.
> >
> > There are still some foggy public methods in dataset. But it is
> > looking quite good.
> >
> > Opinions welcome.
> >
> > Anthony
> >
> > Dr Anthony Berglas, 
> <mailto:anthony%40berglas.org>[email protected] Mobile: +61 4 4838 8874
> > Just because it is possible to push twigs along the ground with ones
> > nose
> > does not necessarily mean that is the best way to collect firewood.
> >
> >
> >
> >
> >
>
>

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.


------------------------------------

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:
    mailto:[email protected] 
    mailto:[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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.