At WOWODC there was a lot of interest in migrating from EOF to Cayenne, and
even entirely rebasing Wonder to run on top of Cayenne instead of EOF.

*Why would anyone want to do this?  *

   1. Cayenne is open-source and is actively being developed
   2. Cayenne has great concurrency support which is in stark contrast to
   EOF single-threaded architecture
   3. Cayenne is conceptually very similar to EOF so the transition is
   fairly straightforward

For those reasons it is a much better long term solution than EOF, which is
now frozen in time.  Cayenne can be used inside a WO application as an EOF
replacement while continuing to use the rest of WebObjects.

*I'm interested. Now what?*

   - Learn about Cayenne. The best source of information for comparing EOF
   and Cayenne is on the
wiki<http://wiki.wocommunity.org/display/WO/Alternative+Technologies-Cayenne>.
   In addition, you can look at the
documentation<http://cayenne.apache.org/>for Cayenne.
   - Use Cayenne in your new projects.  Cayenne runs just fine inside a
   WebObjects application.  Wonder has the ERCayenne framework and
   ERCayenneExample to help you get started. I suggest working with the trunk
   of the Cayenne source (and Wonder too) since some things are just being
   added to make this easier.
   - Help work on easing and automating the migration from EOF to Cayenne.
   It is possible to automate a large part of the work involved in moving from
   EOF to Cayenne. But it requires effort. ERCayenne in Wonder has a class
   that will convert an EOModel to a Cayenne model (the class is
   CayenneConverter). This works well, but could be improved. I've started
   working on an Eclipse refactoring script that will convert from one API to
   the other. Yes, you may not have known (I didn't) that Eclipse can record a
   series of refactorings and save it as a script. The bulk of the migration
   work is creating refactoring scripts in Eclipse by performing refactorings
   on a stubbed out version of the EOF API to convert the API into the
   equivalent Cayenne API. After performing the refactorings, a script can be
   exported using Refactor->"Create Script". For EOF methods that do not have
   a direct Cayenne equivalent, helper methods (or classes) will need to be
   written that can serve as a direct replacement.

*How can I help specifically with the migration effort?*

   - CayenneConverter in ERCayenne (for converting the model) does not
   convert the connection dictionaries in the EOModel yet.
   - CayenneConverter does a poor job converting fetch specs defined in the
   model currently.
   - We need to create new subclasses of Cayenne's DbAdapter that use the
   Wonder naming convention for primary key generators/sequences. This is done
   by subclassing classes like PostgresPkGenerator and overriding
   sequenceName.  This is necessary to support existing databases created with
   EOF.
   - An Wonder-like entity template is already in ERCayenneExample. This
   needs to be examined and any missing functions from WonderEntity need to be
   added.  For example, I know some the .deleteAllXXXXRelationships and
   .createXXXX(…) methods are missing.
   - More refactorings need to created. For example, a refactoring script
   should be made that changes NSArray and NSDictionary methods to the
   equivalent List or Map APIs (since Cayenne doesn't use these classes for
   relationships or fetch results you probably want to minimize the places you
   need them).
   - Submit code to Cayenne or create
Jira<https://issues.apache.org/jira/browse/CAY>issues

Any questions?  :-)

John
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to