Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Transparent Database backing?

Take a look at hibernate. (www.hibernate.org)
ORM class of tools will do the job for you.
No need for reinventing wheels here.

On 9/18/06, Malcolm Ross Kinsella Ryan <malcolmr@xxxxxxxxxxxxxxx> wrote:

I'm an experience Java programmer who has never used AsjectJ (or any other
aspect-oriented langage). The idea is intriguing and I was wondering whether
it would help me with a problem I am currently working oun.

I want to build a system in which certain Java objects are backed by a
database.  I'd like to make it so that database references are an
transparent as possible, so that objects exist in memory as stubs until
such time as their fields are required, at which point they are loaded
from the database. Later they may be garbage collected, written back into
the database and removed from memory.

This isn't intrinsicly difficult, but I'd like to make it so that the process
was as transparent to the end programmer as possible. Ideally, I would
like to allow them to forget that the objects were at all special and
just write them as normal, with something 'behind the scenes' loading and
saving them as necessary.

At first glance, it seems that AspectJ might allow me to do something
like that. Can you add aspects to the reading and writing of fields? Would
it be possible to have an object which loaded fields from the database
as they were read? How much could be hidden from the end developer?

Malcolm

--
Malcolm Ryan - malcolmr@xxxxxxxxxxxxxxx - http://malcolmr.web.cse.unsw.edu.au

     "Progress should mean that we are always changing the world to fit
      the vision, instead we are always changing the vision."
               - G.K.Chesterton, Orthodoxy
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



--
Thanks,
Alex.


Back to the top