Re: Prevalence and Web Applications

Klaus Wuestefeld <[email protected]> Sun, 16 Dec 2012 14:26:55 -0200
Newsgroups gmane.comp.java.prevayler
Message-ID <CAMAooZFLwXcbZpdkqZGLssK8u1UBG57Au_R+3_DehkyUBhY2=A@mail.gmail.com>
Hi,

I used Vaadin recently and it keeps everything on the server side,
only rendering the UI on the client side, as you describe.

I found it a perfect match for Prevayler since I could forget all
about client-side marshalling and versioning issues.

I did not bind the UI widgets directly to objects, though. I just did
traditional MVC and had my own event handling code.

Your UI widgets wherever they are (client or server side) are your
"temp copy" already. You might just need to expose a few data
validation queries on your objects if you want to alert your users
early, before commit.

Klaus


On Sun, Dec 16, 2012 at 11:35 AM, Elmar Weber <[email protected]> wrote:
> On 16.12.2012 04:07, Naveen Chawla wrote:
>> 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.
>
> That depends on the framework in use. This is possible when the state is
> kept client side by using a 100% client side framework like GWT or
> programming the UI yourself in JavaScript. Other frameworks like JSF or
> Wicket keep part of the state on the server side when working with Ajax
> or multi page forms. My question concerned itself with the later type of
> framework.
>
>> 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.
>
> So basically create a working copy of the object for an edit form? Since
> there are potentially multiple users woking on the same prevalent object
> one (transient) working copy of the values would not be enough.
>
>> 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).
>
> AFAIK Vaading also keeps the state on the server side? Although I do not
> know if it updates the objects on Ajax requests like JSF does.
>
> 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



-- 
Valeu, Klaus.

------------------------------------------------------------------------------
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