Re: Work on Release 2.6: Maven Archetype and Tutorial Examples
Karl Wettin <[email protected]> Fri, 18 Jan 2013 15:07:37 +0100
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
10 jan 2013 kl. 04:16 skrev Klaus Wuestefeld: > Klaus Wuestefeld: e101 is too abstract > Klaus Wuestefeld: People might think they have to use an "Entity" class or extend Entity or something like that. > Klaus Wuestefeld: "Entity" is a kind of class you would expect in an implementation of a persistence framework. Not in app code. That will confuse people. > Klaus Wuestefeld: Please take a look at 2.2 Storing Objects, for example: http://community.versant.com/Documentation/Reference/db4o-7.12/java/tutorial/ I renamed Entity to Person in e101, but left it as Entity in all other packages. Also switched package of e103 and e104 so all non deterministic stuff "came in order". > Klaus Wuestefeld: "that your transactions shouldn't contain actual business objects, only their identities." > Klaus Wuestefeld: "identities" is bad wording. Identity (as opposed to equality) often refers to the object itself. Lets change it to "...only a way to query for them, such as an id for example." I rephrased it like this: Transactions shouldn't contain actual business objects, instead they should contain information about the business object so they can be found in the prevalent system root using a query, a unique identity for example. > Klaus Wuestefeld: "an aggregate of an business object to another business object" is too abstract. Lets choose a metaphor and run with it: "a pilot to a car", "a pet to the petstore", for example. I didn't get around to do this. I actually like the abstractness of "aggregate", but I'll try to come up with something better that's easy enough to demonstrate with as few lines of code as possible. > Klaus Wuestefeld: Please, lets change the wording from "baptism problem" to "initiation problem". It's more religion-neutral. > Klaus Wuestefeld: user is baptised -> user is initiated Done. There's a bit of references to baptism all over the repo, we should be consistent and change it all over. > > Klaus Wuestefeld: 7) https://github.com/karlwettin/prevayler-examples/blob/master/src/test/java/org/prevayler/examples/e104/E104Test.java Do we need AbstractTest as a class? Cant it just be a method receiving the BaptismProblemUpdateEntityAggregate and UpdateEntityAggregate transaction objects? I'm afraid not, the transactions depends on firstEntity and secondEntity in the constructor in order to share the same code surrounding the test. But feel free to clean it up if you feel like it. > Klaus Wuestefeld: 10) finally: please delete E105. It is too alarming. In the end, it is the same as E101: You have to use transactions. Simply add a line of text to the description of E101: "If you change business objects directly without using transactions, those changes will not be persistent. You could, in theory, take a snapshot after every change but that is much slower." I argue raison d'etre for e105. It clearly demonstrate what happens if you attempt to do changes to the prevalent system outside of transactions. And the third test within it that makes changes outside of transactions and then make a snapshot is a feature I've used it a lot when bulk importing information to initialize a root, for example when importing data from a previous version of my software after major refactoring. Perhaps a bit more text in there to explain this makes sense though. > Klaus Wuestefeld: 11) Lets delete Prevayler demo1 (prime numbers) if it still exists. It does indeed still exist. I did not yet remove it. > Klaus Wuestefeld: 12) Lets incorporate Prevayler demo2 (Bank Demo) in your examples project somehow, maybe in the main folder (instead of tests) > Klaus Wuestefeld: 13) Lets remove javamatch from demo2 (Bank Demo) if we have not already done so. Demo2 does not exist, it was hard coupled to the javamatch which was removed back in 2.3 or so, i.e. "git checkout v2.3" would bring it back if you want to take a look. (use "git tag" to list all tags) I do however like the bank as an example domain and I could re-implement it. How about we draw a class diagram first so we all agree on the design? karl ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org