Wednesday, February 10, 2010

This Three Months in Wonder

An H2PlugIn has been added to Wonder to support the H2 Database Engine (

The ERReCaptcha component was added to ERCaptcha.framework -- this adds support for in a way that is API-compatible with ERXSimpleSpamCheck.

ERAkismet has been added to ERCatpcha.framework. ERAkismet adds support for the Akismet spam identification service that is API-compatible with ERXSimpleSpamCheck.

ERPOFCChart has been added to the ERPlot framework. This component adds a simple wrapper around the OpenFlashCharts2 flash charting tool.

ERRest now supports JSR-311-style annotations if you prefer that approach:
routeController.addRoutes(Person.ENTITY_NAME, PersonController.class);
@GET @Path("/person/{person:Person}")
public WOActionResults view(@PathParm("person") Person person) {

Basic migrations will run against MemoryAdaptor now (or .. appear to), which helps when running test cases.

BugTracker app can now run with MemoryAdaptor, which requires zero setup. This should make it much easier to fire up the example app to see what Wonder can do. To run with memory adaptor, you can launch from eclipse with the VM Arguments "-Xmx512M".

The new ERComponentTour example app shows some components with some example uses.

RuleModeler now supports adding documentation to rules.

ERD2WGraphVizPage in ERD2W can spit out a graphviz file that represents your EOModel.

JavaRebel is now JRebel, so WOJavaRebel is now WOJRebel (and updated to the latest-and-greatest). Q's done a bunch of work on this and now supports EOModel reloading. He says JRebel is much faster in the new versions, too. I hate myself for not using this. In fact, I'm going to hook this up right after I finish writing all this up.

ERProfiling is a cool new framework for profiling your WO apps in a way that actually understands WO. For more information, read more here.

Anjo started work on an Apache Mina-based WOAdaptor ( I believe this is still experimental.

Ravi pushed up a new look into Wonder -- "ERDivaliteLook" as well as the ERDivaliteExample example app to show it off.

"It's intended as a transitionary point to migrate WO/D2W apps to Diva look.
As such it's:

1. HTML4 table-less markup.
2. CSS and Selenium tests are interchangeable with a full Diva look app.
3. No Ajax.
4. WO 5.3+ compatible."

Ray has been doing all kinds of great work making the documentation for Wonder more accessible and useful. This has included adding a new doclet for showing components along with their component bindings (see here) as well as a doclet for showing the available d2wkeys for D2W components (here)

Ray has also done a lot of work on the test cases and getting them to run properly from ant. You can also run all the test cases from within Eclipse in the JUnit runner.

ERMovies now has Selenium test scripts.

ERSelenium now has support for taking screenshots in the standalone runner.

The SproutCore framework and example app have been removed. It was an interesting experiment, but ultimately would have been too labor-intensive to keep it maintained alongside the official SproutCore framework.

Thursday, November 5, 2009

What's Old in Wonder

It's been a long time since the last What's New in Wonder -- almost 8 months. We've been busy, quietly making your life cooler :) There's actually been quite a bit of activity in Wonder, including contributions from lots of people outside the regulars. We've had a lot of Jiras filed (many with patches! thank you).

Thanks to everyone who contributed bugs, patches, tests, and features over the 8 months -- Anjo, Chuck, Quinton, Timo, Lachlan, Henrique, Ravi, Denis, Ray, Ramsey, Kieran, Travis(es), Michael, and anyone else I might be forgetting.

The synopsis below doesn't do justice to any of the items listed -- I encourage you to read the docs on each of them for more information, but it should at least give you a starting point for finding more information. As always, my own stuff is disproportionately weighted in the synopses :)

New Components

  • ERXSwitchComponent - patched in, hides the component name
  • ERXResponseComponent - lets you wrap a WOActionResults in a WOComponent implementation
  • ERXBooleanSelector - Yes/No/Blank picker
  • ERXClippy - wrapper around the Clippy flash clipboard access layer
  • ERXPodcastRssPage


  • Bunch of enhancements to AjaxModalDialog
  • iBox updated to 2.2
  • AjaxModalContainer tweaked to support dynamic resizing
  • Updated to Prototype 1.6.1 and Scriptaculous 1.8.3
  • New experimental support for returning components from Ajax action methods (when used with replaceID binding)
  • New experimental push/keep-alive support


  • New D2W page/component metrics
  • Cleanup on the 47 different boolean picker components
  • ERDEditableList brought over from Diva


  • bunch of new tools for tracking down editing context lock problems
  • support for tracking locks on ERXDatabaseContext
  • bunch of tweaks and fixes and new bugs but then more new fixes for autolocking (in particular, support for sharing an autolocked ec across threads)
  • support for bind variables with FrontBase
  • migration fixes for SQLServer and Derby
  • automatic batch faulting - basically Wonder watching your back about prefetching, preventing scenarios where you would have gotten a million individual fetches before
  • ERXPrefixQualifierTraversal - walks a qualifier and prepends a keypath to every key of the qualifier


  • supports non-EO's using EOClassDescriptions (via a new BeanInfoClassDescription)
  • supports non-model relationships on EO's (via a new class description factory that can handle EOEntityCD's and BeanInfoCD's for the same class)
  • format delegates for remapping commons keys (like id and type)
  • ERXKeyFilter now has a security delegate for implementation fancier rules
  • ERXRestFetchSpecification - makes it really easy to fetch based on query params with security filters
  • ERXFilteredQualifierTraversal - provides support for filtering a qualifier with an ERXKeyFilter (so people can't fetch on salary > x if they're not allowed to see salary)
  • support for deferring the generation of rest responses, so you can pass requests between controllers (this provides support for having compound controllers, like what would be needed for a Gianduia fetching controller)
  • easier support for generating html responses with rest controllers
  • ERXRouteLink - generate links to route controllers


  • new framework for exploring the snapshots that are currently loaded into memory in your application

Diva Look Framework

  • ERDivaLook/ERPrototaculous/ERDivaLookExample frameworks are a new D2W look focused on XHTML div content styled with css rather than the older table-based looks. Additionally it has its own Ajax framework (not to be confused with Wonder's existing Ajax.framework) based on WO 5.4's ajax request handler.


  • Movies example moved into Wonder


  • Patched to match trunk of chronic


  • Support for resizing attachments on upload
  • SipsImageProcessor - uses sips commandline tool to thumbnail (not as fast as ImageIO JNI imp, but less to build)


  • huge performance improvements
  • support for model reloading
  • updated to new JavaRebel version


  • ERPDFGeneration provides both a utility class and a wrapper component for generating
    PDF documents from XHTML markup. Two PDF generation engines are currently supported,
    FlyingSaucer (xhtmlrenderer) [1] and Useful Java Application Components (UJAC) [2],
    however additional parser based engines like FOP could be added fairly easily.


  • i guess it runs now? it got a bunch of build-related fixes at least


  • all cleaned up and shiny
  • split into memory store and entity store, which can be a basis for other custom adaptors
  • support for flattened attributes


  • Sandbox support


  • build scripts now support running test cases
  • bunch of test cases added


  • ERXSignalHandler - "multicast" signal handler
  • ERXProperties/Configuration cleaned up dramatically
  • ERXComponentUtilities.inheritTemplateFrom - make one component inherit the template of another component
  • ERIUIExample made fancier

Build Server

  • Moved entire to Hudson -
  • Rebuilds immediately on commit
  • All applications and examples are built fully embedded (= easy to download and run now)

Sunday, April 19, 2009

Need More Rest

Note: This is all brand new and to be considered experimental right now, but I thought I'd give you guys a heads-up:

ERXRest can do a lot of various things, but I was never happy with the API and the complexity of the interfaces you have to implement to use it. Anjo did some work with ERD2REST, which is cool, but I still have a bunch of cases where I just want something like what Rails offers -- a very easy way to map annotated URLs onto (direct) action methods. When you just want to quickly make a json interface to your app (especially CRUD interfaces), but with support for additional custom actions (which ERXRest doesn't address), the rails approach makes a lot of sense ... So here are some new API's to try to make that easier:

in your Application constructor:

ERXRouteRequestHandler routeRequestHandler = new ERXRouteRequestHandler();

(you can also add custom routes -- i.e. "/people/{person:Person}/company/{company:Company}/{something:String}" -- but the one above defines all the default routes that rails supports ... check out the javadoc for ERXRestRequestHandler for more info).

then you can make a controller class:

public class PeopleController extends ERXRouteController {
public PeopleController(WORequest request) {

public Person person() {
Person person = (Person) objects().objectForKey("person");
return person;

public ERXKeyFilter personFilter() {
ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();
return filter;

public WOActionResults createAction() throws Exception {
ERXKeyFilter personFilter = personFilter();
Person person = (Person) create(Person.ENTITY_NAME, personFilter);
return response(personFilter(), person);

public WOActionResults updateAction() throws Exception {
Person person = person();
update(person, personFilter());
return response(personFilter(), person);

public WOActionResults showAction() {
Person person = person();
return response(personFilter(), person);

public WOActionResults indexAction() throws Exception {
NSArray people = Person.fetchPersons(editingContext(), null, Person.LAST_NAME.asc().then(Person.FIRST_NAME.asc()));
return response(personFilter(), editingContext(), Person.ENTITY_NAME, people);

This is basically a DirectAction class, but it has a bunch of tools to make it easy to do the rest creates, updates, and lookups ... there is no security by default (just like rails), so you have to enforce security however makes sense, but it handles xml, json, and plist requests and for the cases where you're just doing relatively straightforward things, this is way easier than the other ERXRest stuff, though you trade off some optimized fetching and automatic security filtering that ERXRest does in exchange for the simplicity.

The determination of what to include/exclude both in rendering and in parsing is done with ERXKeyFilters, which allow hierarchical definitions of include/exclude filters for keypaths (so you say things like: start with an "include all attributes" base, but exclude "password", then include the "tasks" relationship, but don't show any attributes for that (so you just get task ids)). The code for that would be:

ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes();

As an example of actually hitting the API, btw:

curl -X PUT -d '{ lastName="SchragTestAlso"; preferenceGroups=( {id=1000012; name="SomeName2"; } ); }' http://vdoop.local:51915/cgi-bin/WebObjects/MDTask.woa/ra/person/1000008.plist

this updates the person with id 1000008 with plist format, sets the last name to "SchragTestAlso", and replaces their preference groups with a single existing preference group id 1000012 and also updates the name of that group to be "SomeName2".

curl -X PUT -d '{ lastName:"SchragTestAlso"; preferenceGroups:[ {id:1000012; name:"SomeName2"; } ]; }' http://vdoop.local:51915/cgi-bin/WebObjects/MDTask.woa/ra/person/1000008.json

is the same thing in JSON, and

curl -X PUT -d '<Person><lastName>SchragTestAlso</lastName><preferenceGroups><PreferenceGroup id="1000012"><name>SomeName2</name></PreferenceGroup></preferenceGroups></Person>' http://vdoop.local:51915/cgi-bin/WebObjects/MDTask.woa/ra/person/1000008.xml

is the same thing in XML ... notice that just by changing the extension it automagically does request and response filtering for you with the right parser/writer.

Saturday, March 21, 2009

The "I Have A Day Job" Edition

support for plist and json responses

support for simple qualifiers and sort orderings in query params

lots of API's for programmatically generating responses

initial pass at a D2W version of the ERRest framework

Updated to latest JFreeChart

ERXExistsQualifier - creates a query clause based on the SQL exists keyword and a subquery

Support for custom prototype overrides in ERXModelGroup.

ERXEnterpriseObjectCache substantially overhauled to .. well .. not break.

TickTockMan - example app that performs various time-related tasks. Hopefully, this can become a resource for people trying to understand the use of time, time intervals, time zones and associated objects in WebObjects applications.

Über - Wonder testing app designed for automated testing against new versions of WebObjects.

Ajax scripts are compressed during the build process.

AjaxUtils.updateDomElement - appends JavaScript code to the given AjaxResponse that updates the content of the DOM Element with the given ID to the specified value. Useful if you want to update multiple small regions on a page with a single request, e.g. when an AjaxObserveField triggers an action.

AjaxModalDialog - LOTS of enhancements. Check the javadoc for better converage.

ERImageProcessors - Support for image processing with several variants (Java2D, ImageMagick, and JNI-based CoreImage/ImageIO). This will ultimately be used to support automatic thumbnailing.

BUILD.txt updated with latest maven build instructions

Utilities/WOInstall - source of WOInstaller.jar

ERXValueUtilities and related ERXProperties methods were rewritten to be much more consistent and more forward compatible with future version of WO + actually has test cases

Updated for JavaRebel 2.0

Updated to match (roughly) Ruby Chronic's 0.3.0 version

refactored the confirm pages to use just one page

added 'stop all' for selected instances

added 'delete all' for selected instances

more directactions controls

/admin/ action added (will allow for rest-like urls) returning JSON compatible output on info

added bounce action

ERXLanguageMenu - generic picker for selecting your current language

... and a gazillion bug fixes

Sunday, December 14, 2008

This Week in Wonder

AjaxModalDialogOpener lets you separate the opening of a modal dialog from the dialog itself.

Updated to Scriptaculous 1.8.2

AjaxSortOrder is an ajax version of ERXSortOrder.

Support for quicktime attachments in ERAttachment.

ERXSimpleSpamCheck is an implementation of Hugi's simple spam blocker, which will cause forms to fail validation unless a particular block of javascript has been executed by the client.

Wonder Migrations can now be used without using ERXEC.

New, better, implementation of SQL parsing (for executing SQL scripts).

Migrations now support SQLServer (well, more than they did).

New Frameworks
WOJavaRebel framework provides support for easily running WO apps with JavaRebel for modifying classes on-the-fly without restarting.

New warnings when you are possibly misusing ERXThreadStorage.

ERXEOControlUtilities. validateUniquenessOf provides a utility method for validating unique EO attribute values.

You can now set a low memory threshold separate from a memory starvation threshold, and both now fire notifications that you can respond to.

Support for making ERXResourceManager generate complete resource URLs by setting context. _setGenerateCompleteResourceURLs.

Simple resource rewriting -- Set er.extensions.ERXResponseRewriter.resource.frameworkName.filePath = newFrameworkName.newFilePath

Support for forcing the removal of instance numbers from context urls via the er.extensions.ERXWOContext.forceRemoveApplicationNumber property. You should only use this if you know what you're doing, as this can't always be used in WO.

Support for SSL with DirectConnect. Here's the pertinent docs from Properties:
# SSL DirectConnect
## You should probably not enable any of these settings in a normal Apache webserver deployment,
## in particular the ssl port property, as this is used by ERX to generate https URLs, which must
## match your Apache config.
## To enable SSL support with DirectConnect, you must do the following:
## * In your Resources folder, run "keytool -genkey -alias WebObjects -keyalg RSA -keystore adaptorssl.key". Select a
## password for your keystore (i.e. "changeit"), and set the "your first name and last name" field to match the hostname
## that you will be running your directconnect app off of.
## * In your Resources folder, create an executable script (it MUST BE EXECUTABLE) named "adaptorsslpassphrase" with the
## contents:
## echo changeit
## where you should replace "changeit" for whatever password you selected in the previous step.
## * Set the following property to true

## (optional) To specify an SSL host name other than what is returned from a call to
##, you can override it below

## (optional) To select an SSL port other than 443, uncomment the following. If you are already running Apache with SSL,
## you probably want to set this. If the port number is 0, the SSL port will be automatically assigned (using the same
## mechanism that WO uses to set the regular port)

New click-to-debug feature. When ognl.debugSupport=true, the WOLips Toolbar has a new Click to Debug option that will turn on binding debug information for any component that you click on. This is really useful if you're trying to track down a rogue binding.

Friday, November 21, 2008

These 49 Days in Wonder

All Project Wonder projects were switched to the WOLips Nightly's new hotness build path system. This means that to checkout the Wonder source now requires that you use a WOLips Nightly build, though these are pretty likely to turn into stable pretty soon.

We cleared a lot of the backlog of patches in Jira ... Sorry it took us so long.

Ajax framework was updated to Prototype

AjaxSocialNetwork and AjaxSocialNetworkLink provides support for submitting URLs to a heap of social linking sites using their recommended icons

ERXEmbeddedPage and ERXSwitchEmbeddedPage allow you to wrap a section of your page and treat return values from invokeAction as a replacement only for the this element and not for the entire page. This allows you to write components that operate like a sequence of top level elements, yet actually they live within a larger page.

ERXAccessibleSubmitButton provides support for defining hot keys for submit buttons.

ERXJSToManyRelationshipEditor provides a nice javascript-based to-many relationship editor

ERXBooleanPopUpButton provides a simple Yes/No/All (labels configurable) three-state popup button that binds out a Boolean value, which is handy for boolean search filters

ERXRedirect supports redirecting to a stateful component (in addition to several other variants).

New "javaEnum" prototype ... Select it and just set the valueClassName to point to your java Enum class.

Lots of fixes for Oracle in the EROraclePlugin including many fixes to make Wonder's ERXMigration API work properly. The Oracle plugin also has a new delegate that allows you to provide a custom constraint name generator (to provide custom truncation rules).

FrontBase, Postgresql, and Oracle plugins now automatically correct the EOF bug with generating "not null" columns for attributes that only appear in subclasses of single table inheritance tables.

Added ERXSession support for requiring secure session cookies to prevent session hijacking.

ERXEnterpriseObjectCache now supports optionally caching EO's rather than just their GID's, lazily filling the cache rather than preloading the entire set of objects, and caching with a qualifier (i.e. only cache objects where published=true)

ERXYahooContentAnalysisService connects to Yahoo's term extraction service (for use with auto-tagging)

Lots of fixes to ERRest framework, including many changes necessary to be able to generate a validating schema for a rest document (the schema generator is not yet committed). Lots of additional enhancements to run ERRest documents without a request, which makes it easier to use for data loading.

WOOgnl no longer requires a different source path for 5.3 and 5.4, though it does require a different binary framework.

Lots of fixes to SproutCore framework to bring it more in line with the latest SproutCore releases.

Friday, October 3, 2008

This Belated Week in Wonder

Yeah. It's been a few weeks. I know .... Better late than never:

AjaxExpansion - If you've ever tried to make a component that has a triangle (or whatever) that you can turn down to show additional information, you know it's actually a little tricky to build that component and make it animate nicely with a slide down effect. AjaxExpansion makes this easy to do and there is an addition to the AjaxExample2 ToggleDetails example that shows how to use it.

By popular demand, AjaxTabbedPanel can now hide tabs.

AjaxUpdateLink, AjaxSubmitButton, and AjaxObserveField now support updateContainerID="_parent", which will update the nearest ancestor component AjaxUpdateContainer. This makes it so you don't have to pass id's around in the common case that you're just updating your parent container.

There's a new example of using AjaxModalContainer in AjaxExample2.

Chuck fixed tons of weird little border cases.

AjaxModalDialog is now in ... It's a competitor to AjaxModalContainer based on the modalbox Javascript library, but is designed to have a slightly nicer component backend that can track the open state on the server side (which allows for fancier component content). There's a new AjaxExample that shows this in action.

ERXExceptionUtilities provides a bunch of handle methods for printing and handling stack traces, including stack trace filtering that tries to hide all those nasty looking WO/EOF stack frames. See the javadoc for more info. Also, you can set your log appender to er.extensions.logging.ERXConsoleAppender to get stack trace filtering wired into all of your log4j output. Check out StackTraceSkipPatterns-Normal.plist in ERExtensions/Resources to see how you can provide your own stack trace filtering extensions.

ERXApplication can now load Properties from inside of jar frameworks.

multipleSubmit=true is now defaulted on for all WOForms. Rest in peace stupid binding.

ERXLazyValue provides a way to model lazy-loaded values that invalidate with different methods. This is very useful for storing expensive values that are returned from bound component methods as well as values that are cached that are influenced by different areas of a single page (i.e. ajax operations on one part of the page that need to invalidate a cache on another part of the page).

ERXDisplayGroup now uses generics.

ERXKey now uses generics in all of the .is(..) etc methods.

ERXWOComponentContent is now a little bit slicker and supports the concept of a "default" template. If you define an ERXWOComponentContent with no template name, it will find all of the component content children that are not contained inside of an ERXWOTemplate and treat them as if they were in a default component content.

There's an NSBundle replacement in Wonder now. This fixes a bug with jar loading in embedded frameworks that would end up loading in the application bundle, which causes the very common bug of getting a Session class that isn't your Session. This is also provides some support for making launching non-WOApplication WO things (like EOF main methods) in WOLips a little smarter.

ERXFetchSpecification has a new setIncludeEditingContextChanges(boolean) option. When true, fetching with this fetch spec will call through ERXEOControlUtilities.objectsWithQualifier and also process the new (uncommitted) changes from your EC. For instance, if you have inserted EO's into your EC, includeEditingContextChanges = true will cause those new EO's to be included in the results of the fetch. Likewise, updated, deleted, and parent EC objects will be processed accordingly.

New IP Address prototype (along with new migration methods to support it).

New byte24 prototype for generating guid PKs.

Both the 5.3 and 5.4 version of Wonder can be now be built with Maven. Talk to Henrique for more info :)

You can now register a custom delegate onto your ERAttachmentProcessors to be notified of various events in the attachment lifecycle. This allows your application to perform additional operations in response to those events.