Re: Transparent Object Persistence
Felipe Cruz <[email protected]> Tue, 26 Nov 2013 15:41:16 -0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAEynwxsDTTcWGFf7L8bO=NMONrMFmg29NuMRiruSyppF8=d1Hg@mail.gmail.com> |
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