Re: Prevalence and Web Applications
Naveen Chawla <[email protected]> Sun, 16 Dec 2012 03:07:24 +0000
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAGs7EcU2wsDcLOPPHHQvX7eiCCMOmOq0_TtoE+BG_6xeCum+9A@mail.gmail.com> |
This might be a stupid question but why do you need to "update" anything on the server-side "continuously" *before* saving the object? Why wouldn't you just let the user manipulate the temp data on the client side & when they want the persistent object to have it, just send it across & make it so? Sorry if this sounds ignorant. But if you need whatever they type to be saved while they type it, on the server-side, for later retrieval (maybe in case they want to log off and come back again after a few days and see it?), just not in the "main" data, you'd still put it in the prevalent object, just on a "side" variable, with your own custom "commit()" method, for example, to transfer it to the "main" bit when they want it there instead. If you're talking about simple data UI binding with server-side Java objects itself, there are frameworks like Vaadin that offer that if you haven't already committed to a platform. Although this is super-elegant, it isn't really needed if you already have. I'm not using it (because I want client-side flexibility). I've probably missed what you're asking but whatever you want to accomplish is most probably easy-peasy with Prevayler. Most things are. On 16 December 2012 00:13, Elmar Weber <[email protected]> wrote: > Hi, > > I've a question how people use Prevalence or prevayler in web > applications. Here is a simple scenario and then the question where my > problem is: > > A simple multi user application to edit a shared data pool, e.g. a > customer management system where users can search for customers and then > edit single objects in a multi page form. > > How do you handle modifications to customer objects in the UI part of > the web application? Your typical Java web framework binds the UI fields > to your object and updates it continuously (e.g. via ajax requests) > until the user saves the changes and persists the object. > > The way I see it, it is not possible to do this with prevalence, i.e. I > cannot use the object I received from a query for a customer in the UI > because any changes would be saved in a snapshot since it is the same > instance. I either have to create a copy of the persisted object or have > a different set of objects for my UI. Both solutions seem like a > workaround to me. > > When solving this with classical ORM persistance, e.g. Hibernate and a > database, its easy to use the same objects and don't worry about > modifications until an explicit commit on the transaction. > > How do you solve this with web applications using prevalence? > > Thanks & ciao, > elm > > > ------------------------------------------------------------------------------ > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > _______________________________________________ > To unsubscribe go to the end of this page: > http://lists.sourceforge.net/lists/listinfo/prevayler-discussion > _______________________________________________ > "Databases in Memoriam" -- http://www.prevayler.org > ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org