Re: Transparent Object Persistence
Naveen Chawla <[email protected]> Tue, 26 Nov 2013 18:25:52 +0000
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAGs7EcWsjOgMwze51PzBP3ZnBFyXSWWfMHTYf6c-Ng3_A1t6-Q@mail.gmail.com> |
Existing Prevayler is already a "facade mosaic", where each transaction is
a piece of it. The bubble is, if I'm not mistaken, a way to unify all
transactions in a single class, reducing verbosity. However, I still
maintain that the least verbose solution is:
MyObject prevalentObject = Prevayler.<MyObject>connect("name");
Where all subsequent db actions (journalling changes to all non-transient
fields, synchronization over reads/writes etc.) is automatic, achieved via
Prevayler bytecode instrumentation. No transaction classes, no bubble
classes, nothing else needed.
Then all patterns for object manipulation (facade(s), builders, adapters or
none at all) are up to the app programmer, as per any perceived need at any
time.
On 26 November 2013 17:41, Felipe Cruz <[email protected]> wrote:
> There is no "external entity or server". A facade is just a class. The
> whole point is: there are plenty of business logic composed by many steps,
> that may involve real external services or queries on other models and
> complex validations that can be seen as 1 transaction. This one transaction
> has to deal with 4 different classes and could contain more than 5 steps. A
> Facade is a way to encapsulate this transaction semantic and make your code
> more decoupled.
>
> From wikipedia, about Facades:
>
>
> - make a software library<http://en.wikipedia.org/wiki/Software_library> easier
> to use, understand and test, since the facade has convenient methods for
> common tasks;
> - make the library more readable, for the same reason;
> - reduce dependencies<http://en.wikipedia.org/wiki/Coupling_(computer_programming)> of
> outside code on the inner workings of a library, since most code uses the
> facade, thus allowing more flexibility in developing the system;
> - wrap a poorly designed collection of APIs<http://en.wikipedia.org/wiki/Application_programming_interface> with
> a single well-designed API (as per task needs).
>
>
>
> Attribute-level persistence through setters is cool but requires some good
> amount of work and I'm not sure if the benefit worth it. You already have
> transparent persistence using a Facade like the Bubble.
>
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> To unsubscribe go to the end of this page:
> http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
> _______________________________________________
> "Databases in Memoriam" -- http://www.prevayler.org
>
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org