Thursday, April 17, 2008

This Week in Wonder

This Week in Wonder's schedule is all thrown off, but to finally catch us back up:

ERXFetchSpecification
This is still new and under development, but ERXFetchSpecification extends the concepts of a fetch spec and adds:

  • support for caching
  • type safety via generics
  • user info for tracking additional information as you pass a fetch spec around
  • support for grouping results by keypaths

One of the primary features here is caching. In EOF, if you traverse a to-many relationship, the GIDs of the members of that relationship are cached, which ensures that you don't have to do a db roundtrip every time you want to traverse your relationship. Unfortunately, if you use a fetch spec, there is no such cache provided and you always hit the database. ERXFetchSpecification allows fetch spec results to be cached to avoid repeatedly hitting the database. Again, this is still being developed, but Anjo has some very cool ideas for integrating fetch caching with memcached.

WOOGNL
The WOOGNL template parser now supports registering custom association prefixes. You can now set WOOgnl.setAssociationClassForPrefix(associationClass, prefix). This allows you to implement associations like i18n:value="title", which could load the "title" key from your localized strings. We haven't yet provided any out-of-the-box association classes yet, but we have several ideas (happily stolen from other frameworks :) ) that we will be implementing.

JNDI/LDAP
ERXModelGroup has always allowed replacing connection dictionaries on a model based on Properties values, but it only supported JDBC adaptor models. JNDI models are now supported with the properties:


[modelName].serverUrl the per-model server URL to set
[modelName].user the per-model username to set
[modelName].password the per-model password to set
[modelName].authenticationModel the per-model authenticationMethod to set
JNDI.global.serverUrl the global JNDI serverUrl to use by default
JNDI.global.username the global JNDI username to use by default
JNDI.global.password the global JNDI password to use by default
JNDI.global.authenticationMethod the global JNDI authenticationMethod to use by default


Misc
The new ERXModelDoc component provides a convenient way to display model documentation for a model, entity, attribute, and relationship.

ERXStyleSheet is more versatile now and supports optionally inlining the stylesheet vs injecting into the head tag.

You can now provide a custom subclass of the WOOGNL template parser by setting the property "ognl.parserClassName" to your custom subclass.

Response compression now supports stream-based responses.

ERXInOrQualifier is no longer on by default. We had to remove it as the default in 5.4, anyway, because of compatibility problems. If you want to re-enable it in your application, add EOQualifierSQLGeneration.Support.setSupportForClass(new ERXInOrQualifierSupport(), EOOrQualifier._CLASS); to your Application constructor.

ERXQualifierTraversal provides an implementation of the visitor pattern on qualifiers.

ERXProxyAssociation allows you to wrap an existing WOAssociation and inject a fixed prefix or suffix to the existing value.

ERXExpiringCache now supports timeouts per-key rather than just a global timeout for all cache entries.

ERDLinkToEditObject can link to to-one's now.

ERXEnterpriseObjectChangeListener provides a base class for implementing cache invalidation or other classes that need to be notified of changes to specific entities.

2 comments:

  1. Cool stuff, congrats!

    In particular, the WOOGNL association prefix stuff is awesome :-)!!!!

    Can't wait to see what you have in store for the association classes.

    And I get a warm feeling from thinking that my naive question on the wonder list *may* have had something to do with initiating a discusion about this feature ;-).

    = tmk =

    ReplyDelete
  2. As of today, we have the ERXLocalizerAssociation, which does what Mike outlined. As ERX doesn't link to WOOngl, you need to set it up yourself, though.

    ReplyDelete