SlideShare a Scribd company logo
Getting Started with Wonder
                     Kieran Kelleher               WOWODC 2010 Montreal
                     Green Island Consulting LLC
                     SmartleadsUSA LLC
                     SmartMix Technologies LLC




Friday, September 3, 2010
Getting Started with Wonder
                            •   Get you started using Wonder

                                •   Wonder installation and upgrade - Binaries and Source

                                •   Create a Wonder Application

                                •   Convert existing non-Wonder to a Wonder Application

                            •   Review a few useful features of Wonder

                                •   ERXProperties, Properties files usage, ERXEC usage

                                •   ERPrototypes and Overriding prototypes


Friday, September 3, 2010
What Is It?
                            •      World’s largest Open Source WebObjects project

                            •      Umbrella Project for

                                 •       Patches and Bug Fixes to WebObjects

                                 •       Very Useful Extensions to Standard WebObjects Functionality

                                 •       Reusable WOComponents

                                 •       Powerful Reusable Frameworks

                                 •       Example Applications
  * Some verbiage reproduced from Jonathon “Wolf” Rentzsch’s 2002 CAWUG Presentation



Friday, September 3, 2010
Brief History Snippet
                            •   A long long time ago in a galaxy far far away...

                                •   dotcom: “eResource” (“ER*”), then became NetStruxr

                                •   WOnder is acronym for

                                    •   WebObjects Nodes for Distributing E-Resources

                                •   NetStruxr closed

                                    •   SourceForge project named WONDER was created (~2002)



Friday, September 3, 2010
What’s in It

         GoogleChart           ERChronic       ... and much more!   (db *)PlugIn     ERModernLook



            ERTaggable         ERCaptcha          ERProfiling        ERIndexing     ERModernDefaultSkin



        ERAttachment         ExcelGenerator    ERPDFGeneration        ERRest         ERModernD.T.W.



                 Ajax       JavaWOExtensions       WOOgnl           WOJRebel         ERNeutralLook



         ERExtensions            ERJars          ERPrototypes       ERJavaMail       ERDirectToWeb



Friday, September 3, 2010
Why Should You Use It?
                            •   Bug fixes to standard WebObjects frameworks

                            •   Even Apple uses Wonder (Branch 2_0_0?)

                            •   Improved and Replaced Functionality

                            •   Extended and Additional Functionality

                            •   The source code has an educational benefit

                            •   Why reinvent and debug the wheel?



Friday, September 3, 2010
How Do You Get It?

        “Semi-Pro” Way*                                                      “Pro” Way*




                            Binaries                                                      Source



 * Terms coined by David Holt on wonder-disc mailing list on May 12, 2010

Friday, September 3, 2010
Binary Frameworks Initial Installation
   $ mkdir WonderBinaries54


   $ cd WonderBinaries54


   $ curl -O http://webobjects.mdimension.com/hudson/job/Wonder54/lastSuccessfulBuild/artifact/dist/Wonder-Frameworks.tar.gz


   $ tar -xzvf Wonder-Frameworks.tar.gz


   $ sudo cp -Rvf *.framework /Library/Frameworks




         For WebObjects 5.3, replace “54” above with “53”
Friday, September 3, 2010
Binary Frameworks Upgrade Installation
   $ cd WonderBinaries54


   $ for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done


   $ rm -r *


   $ curl -O http://webobjects.mdimension.com/hudson/job/Wonder54/lastSuccessfulBuild/artifact/dist/Wonder-Frameworks.tar.gz


   $ tar -xzvf Wonder-Frameworks.tar.gz


   $ sudo cp -Rvf *.framework /Library/Frameworks




         For WebObjects 5.3, replace “54” above with “53”
Friday, September 3, 2010
Source Frameworks Initial Installation
   $ svn co http://wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder --revision <ARG> WonderSource



   $ cd WonderSource



   $ ant -Dwonder.patch=54 frameworks; sudo ant -Dwonder.patch=54 frameworks.install     [WO 5.4]



                            OR



   $ ant frameworks; sudo ant frameworks.install      [WO 5.3]




         <ARG> = HEAD to get latest version. Type svn --help checkout for more.
Friday, September 3, 2010
Source Frameworks Upgrade Installation
   $ cd ~/Roots/



   $ for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done



   $ cd /path/to/WonderSource



   $ svn update --force --accept theirs-full --revision <ARG>



   $ ant -Dwonder.patch=54 clean; ant -Dwonder.patch=54 frameworks; sudo ant -Dwonder.patch=54 frameworks.install   [WO 5.4]



                        OR



   $ ant clean; ant frameworks; sudo ant frameworks.install         [WO 5.3]




Friday, September 3, 2010
Working with Wonder Source

                            •   Some Advantages of working with Source over Binaries:

                                •   Learn much about WebObjects and EOF (and java dev styles?)

                                •   Easily browse and search the source

                                •   Work with a specific svn version (teams, quality control)

                                •   Discover the Hidden Treasures (Don’t miss Chuck Hill later)

                            •   Note ERXExtensions classpath file contents for 5.3 vs 5.4 .....


Friday, September 3, 2010
Demo


                            •   Linking Wonder Source projects to your Workspace

                            •   Creating a Wonder app

                            •   What is different between a Wonder app and a Standard app




Friday, September 3, 2010
Integrating Wonder into Your
                                     Existing Application
                            •   Add Frameworks

                            •   Adjust Application, Session and DirectAction superclasses

                            •   Use ERXGenericRecord instead of EOGenericRecord

                            •   Configure Wonder-specific Properties

                                •   copy/paste from a new temp Wonder app as a starting point



Friday, September 3, 2010
Integrating Wonder into an
                                     Existing Application


                            •   DEMO




Friday, September 3, 2010
Configuring Wonder’s Features
                            •   Wonder is configured, more or less, using Properties files.

                                •   Check comments and contents of each framework’s
                                    Properties file

                            •   Where to find Documentation

                                •   Java API

                                •   Framework “Documentation” directory

                                •   http://wiki.objectstyle.org/confluence/display/WONDER/Home

                                •   Examine Source code

Friday, September 3, 2010
Select Features

                            •   ERXProperties

                            •   EOModel Connection Dictionary using Properties

                            •   ERXEC usage

                            •   ERPrototypes

                            •   Over-riding Prototypes via ERXModel and ERXModelGroup



Friday, September 3, 2010
ERXProperties

                            •   A variety of ways to organize Properties

                            •   ERXProperties replaces and extends deprecated NSProperties

                                •   many convenient utility methods including property coercion

                            •   log4j configured via Properties

                            •   Understanding how ERXProperties works can facilitate better
                                team organization, app administration and general happiness :-)



Friday, September 3, 2010
The Standard WebObjects Way

 Override

                            Properties                    Framework Resources
                             Properties
                              Properties


                            Properties                    Application Resources


                            WebObjects.properties         [user.home] dir


                        -DpropertyName=propertyValue      Command Line arguments
                        -DpropertyName=”property Value”




Friday, September 3, 2010
Properties: The Wonder Way
          Properties
           Properties
            Properties
          Properties.<username>
                                              Framework Resources                                                          Override
           Properties.<username>
            Properties.<username>

          Properties                          Application Resources
          WebObjects.properties               [user.home] dir

          ( file1, file2, file3 )                [er.extensions.ERXProperties.OptionalConfigurationFiles]
                                                 (absolute filepaths AND/OR application Resource filenames)
          Properties OR                       [er.extensions.ERXProperties.machinePropertiesPath]
          /<appName>/Properties                  (absolute filepath, default “/etc/WebObjects”)

          Properties.dev                       [er.extensions.ERXProperties.devPropertiesName]
                                                  (file extension, App Resource, default “dev”)
          Properties.<username>                Application Resources
          -DpropertyName=propertyValue         Command Line arguments
          -DpropertyName=”property Value”


          @see er.extensions.foundation.ERXProperties.pathsForUserAndBundleProperties(boolean)
          Note: [propertyname] denotes a system property (so properties are determining the loading of more properties!)
Friday, September 3, 2010
Examples of Properties fiddling...
   ## We always want to use @@ as the delimiter and NOT a single @
   er.extensions.ERXSimpleTemplateParser.useOldDelimiter=false

   app.directActionPassword=passw0rd
   er.extensions.ERXJUnitPassword = @@app.directActionPassword@@
   er.extensions.ERXLog4JPassword = @@app.directActionPassword@@
   er.extensions.ERXGCPassword = @@app.directActionPassword@@
   er.extensions.ERXDirectAction.ChangeSystemPropertyPassword = @@app.directActionPassword@@

   app.smtpserver=192.168.3.142
   WOSMTPHost=@@app.smtpserver@@
   log4j.appender.myMail.SMTPHost=@@app.smtpserver@@


                                                                                               Automatically generated into Resources by build




   ## Optional properties to load
   er.extensions.ERXProperties.OptionalConfigurationFiles=deploy.properties

   log4j.appender.A2.file=/var/log/webobjects_apps/@@build.app.bundle.name@@-@@WOPort@@.log

   log4j.appender.myMail.Subject=Log4jError (@@build.app.bundle.name@@ @@host@@ @@WOPort@@)




Friday, September 3, 2010
Common Dev/Deploy Properties Strategy




Friday, September 3, 2010
EOModel Connection Dictionary
       WebObjects Way




Friday, September 3, 2010
EOModel Connection Dictionary
     Wonder Way - Properties File:
                            # For individual eomodels
                            model.URL = jdbc:mysql://hostname/firstdatabase
                            model.DBUser = firstuser
                            model.DBPassword = firstpassword
                            model.DBDriver =
                            model.DBPlugin =



                            # Global, or default where model entry not specified
                            dbConnectURLGLOBAL = jdbc:mysql://hostname/nextdatabase
                            dbConnectUserGLOBAL = nextuser
                            dbConnectPasswordGLOBAL = nextpassword
                            dbConnectDriverGLOBAL =
                            dbConnectPluginGLOBAL =



     Wonder Way - WOMonitor Launch Arguments:
                            -Dmodel.URL=”jdbc:mysql://localhost/database?useUnicode=true&characterEncoding=UTF-8”
                            -Dmodel.DBUser=firstuser
                            -Dmodel.DBPassword=firstpassword




Friday, September 3, 2010
ERXEC
                            •   EOEditingContext subclass
                                •   EOEditingContext ec = ERXEC.newEditingContext();


                            •   supports automatic lock/unlock in R-R cycle
                                •   er.extensions.ERXEC.safeLocking=true


                                •   enabled by default for new Wonder projects

                            •   Calls ERXEnterpriseObject state transition will*/did* methods

                                •   Implemented by ERXGenericRecord


Friday, September 3, 2010
ERXEC Auto Lock/Unlock

                            •   Implicitly supported in Request-Response threads
                                •   ERXApplication._endRequest()    ... which calls ...

                                    •   ERXEC.unlockAllContextsForCurrentThread();


                            •   Background threads are your responsibility!

                                •   Here is how to do it ...




Friday, September 3, 2010
Runnable lock handling
   public class MyTask implements Runnable {

   	       public void run() {
   	       	    ERXApplication._startRequest();
   	       	    try {
   	       	    	     performTask();
   	       	    } finally {
   	       	    	     ERXApplication._endRequest();
   	       	    }
   	       }
   	
   	       private void performTask() {
   	       	    EOEditingContext ec = ERXEC.newEditingContext();

   	       	      ec.lock();
   	       	      try {

   	       	      	         // Do some EOF stuff with the ec.

   	       	      } catch (Exception e) {
   	       	      	    // handle exception
   	       	      } finally {
   	       	      	    ec.unlock();
   	       	      }
   	       }
   }

Friday, September 3, 2010
Callable lock handling
   public class MyTask implements Callable<MyResultClass> {

   	       public MyResultClass call() {
   	       	    ERXApplication._startRequest();
   	       	    try {
   	       	    	     return performTask();
   	       	    } finally {
   	       	    	     ERXApplication._endRequest();
   	       	    }
   	       }
   	
   	       private MyResultClass performTask() {
   	       	    EOEditingContext ec = ERXEC.newEditingContext();
   	       	    ec.lock();
   	       	    try {
   	       	    	     // Do some EOF stuff with the ec.

   	       	      } catch (Exception e) {
   	       	      	    // handle exception
   	       	      } finally {
   	       	      	    ec.unlock();
   	       	      }
   	       	      return myResult;
   	       }
   }


Friday, September 3, 2010
Passing Objects to a Thread
   	       public WOActionResults shuffleStudioAction() {
   	       	   Studio studio = selectedStudio();
   	       	
   	       	   EOGlobalID studioGid = (EOGlobalID) ERXEOControlUtilities.convertEOtoGID(studio);
   	       	
   	       	   ProcessStudioTask task = new ProcessStudioTask(studioGid);
   	       	
   	       	   MyExecutorServices.executorService().execute(task);
   	       	
   	       	   return null;
   	       }




Friday, September 3, 2010
Thread Hydrates EO
   public class ProcessStudioTask extends ERXRunnable {
   	
   	    private final EOGlobalID _studioGlobalID;

   	       public ProcessStudioTask(EOGlobalID studioGlobalID) {
   	       	    _studioGlobalID = studioGlobalID;
   	       }
   	
   	       @Override
   	       public void _run() {
   	       	    EOEditingContext ec = ERXEC.newEditingContext();
   	       	    ec.lock();
   	       	    try {
   	
   	       	      	         Studio studio = (Studio) ERXEOControlUtilities.convertGIDtoEO(ec, _studioGlobalID);

   	       	      } catch (Exception e) {
   	       	      	    // Handle error
   	       	      } finally {
   	       	      	    ec.unlock();
   	       	      }
   	       }

   }




Friday, September 3, 2010
ERPrototypes



                            •   DEMO




Friday, September 3, 2010
Overriding Prototypes
                       •      ERXModel and ERXModelGroup

                       •      Allow “over-riding” of prototypes based on prototype entity naming
                              conventions

                       •      Feature configured in system Properties:


                            er.extensions.ERXModelGroup.modelClassName = com.webobjects.eoaccess.ERXModel
                            er.extensions.ERXModel.useExtendedPrototypes = true
                            er.extensions.ERXModelGroup.flattenPrototypes = false




Friday, September 3, 2010
Prototypes Over-ride Order
                       •    From lowest to highest priority:

                            •   EOPrototypes

                            •   EO<adaptorName>Prototypes (Wonder has ‘Memory’ and ‘REST’ adaptor protypes)

                            •   EOJDBC<pluginName>Prototypes (Wonder database prototype names)

                            •   EOCustomPrototypes

                            •   EO<adaptorName>CustomPrototypes

                            •   EOJDBC<pluginName>CustomPrototypes

                            •   EO<modelName>Prototypes

                            •   EO<adaptorName><modelName>Prototypes

                            •   EOJDBC<pluginName><modelName>Prototypes



Friday, September 3, 2010
Override Prototypes



                            •   DEMO




Friday, September 3, 2010
Resources
                            •   http://wiki.objectstyle.org/confluence/display/WONDER/Home

                            •   http://projectwonder.blogspot.com/

                            •   http://webobjects.mdimension.com/hudson/

                                •   JavaDoc and Binaries

                                •   “Wonder53” = Wonder for WebObjects 5.3.3

                                •   “Wonder54” = Wonder for WebObjects 5.4.3

                            •   Mailing Lists

                                •   https://lists.sourceforge.net/lists/listinfo/wonder-disc

                                •   https://lists.sourceforge.net/lists/listinfo/wonder-cvs


Friday, September 3, 2010
Q&A
                     Getting Start with Wonder
                     WOWODC 2010




Friday, September 3, 2010

More Related Content

Similar to Getting Started with Wonder

02 Objective C
02 Objective C02 Objective C
02 Objective C
Mahmoud
 
Otago vre-overview
Otago vre-overviewOtago vre-overview
Otago vre-overview
University of Otago
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
Istvan Rath
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
Pharo
 
Making Fedora easier to implement with Fez
Making Fedora easier to implement with FezMaking Fedora easier to implement with Fez
Making Fedora easier to implement with Fez
mrangryfish
 
Building OBO Foundry ontology using semantic web tools
Building OBO Foundry ontology using semantic web toolsBuilding OBO Foundry ontology using semantic web tools
Building OBO Foundry ontology using semantic web tools
Melanie Courtot
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
John Azariah
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
Chris Aniszczyk
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
PyCon Italia
 
Semantic web assignment 3
Semantic web assignment 3Semantic web assignment 3
Semantic web assignment 3
BarryK88
 
OER for repository managers
OER for repository managersOER for repository managers
OER for repository managers
Nick Sheppard
 
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
OpenSource Connections
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
Julie Lerman
 
Django in enterprise world
Django in enterprise worldDjango in enterprise world
Django in enterprise world
Simone Federici
 
Architecting Smarter Apps with Entity Framework
Architecting Smarter Apps with Entity FrameworkArchitecting Smarter Apps with Entity Framework
Architecting Smarter Apps with Entity Framework
Saltmarch Media
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
Eric Bottard
 
Design patterns
Design patternsDesign patterns
Design patterns
Alok Guha
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
Jonas Brømsø
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
John Woodell
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
Troy Miles
 

Similar to Getting Started with Wonder (20)

02 Objective C
02 Objective C02 Objective C
02 Objective C
 
Otago vre-overview
Otago vre-overviewOtago vre-overview
Otago vre-overview
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
 
Pharo Status ESUG 2014
Pharo Status ESUG 2014Pharo Status ESUG 2014
Pharo Status ESUG 2014
 
Making Fedora easier to implement with Fez
Making Fedora easier to implement with FezMaking Fedora easier to implement with Fez
Making Fedora easier to implement with Fez
 
Building OBO Foundry ontology using semantic web tools
Building OBO Foundry ontology using semantic web toolsBuilding OBO Foundry ontology using semantic web tools
Building OBO Foundry ontology using semantic web tools
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
Eclipse e4
Eclipse e4Eclipse e4
Eclipse e4
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
Semantic web assignment 3
Semantic web assignment 3Semantic web assignment 3
Semantic web assignment 3
 
OER for repository managers
OER for repository managersOER for repository managers
OER for repository managers
 
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 
Django in enterprise world
Django in enterprise worldDjango in enterprise world
Django in enterprise world
 
Architecting Smarter Apps with Entity Framework
Architecting Smarter Apps with Entity FrameworkArchitecting Smarter Apps with Entity Framework
Architecting Smarter Apps with Entity Framework
 
Devoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best PracticesDevoxx France 2013 Cloud Best Practices
Devoxx France 2013 Cloud Best Practices
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Red Dirt Ruby Conference
Red Dirt Ruby ConferenceRed Dirt Ruby Conference
Red Dirt Ruby Conference
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 

More from WO Community

KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
WO Community
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
WO Community
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
WO Community
 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
WO Community
 
High availability
High availabilityHigh availability
High availability
WO Community
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
WO Community
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
WO Community
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
WO Community
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
WO Community
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
WO Community
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
WO Community
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
WO Community
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
WO Community
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
WO Community
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
WO Community
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
WO Community
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
WO Community
 
WOver
WOverWOver
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
WO Community
 
WOdka
WOdkaWOdka

More from WO Community (20)

KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
 
High availability
High availabilityHigh availability
High availability
 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
 
Life outside WO
Life outside WOLife outside WO
Life outside WO
 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
 
"Framework Principal" pattern
"Framework Principal" pattern"Framework Principal" pattern
"Framework Principal" pattern
 
WOver
WOverWOver
WOver
 
Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
 
WOdka
WOdkaWOdka
WOdka
 

Recently uploaded

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 

Recently uploaded (20)

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 

Getting Started with Wonder

  • 1. Getting Started with Wonder Kieran Kelleher WOWODC 2010 Montreal Green Island Consulting LLC SmartleadsUSA LLC SmartMix Technologies LLC Friday, September 3, 2010
  • 2. Getting Started with Wonder • Get you started using Wonder • Wonder installation and upgrade - Binaries and Source • Create a Wonder Application • Convert existing non-Wonder to a Wonder Application • Review a few useful features of Wonder • ERXProperties, Properties files usage, ERXEC usage • ERPrototypes and Overriding prototypes Friday, September 3, 2010
  • 3. What Is It? • World’s largest Open Source WebObjects project • Umbrella Project for • Patches and Bug Fixes to WebObjects • Very Useful Extensions to Standard WebObjects Functionality • Reusable WOComponents • Powerful Reusable Frameworks • Example Applications * Some verbiage reproduced from Jonathon “Wolf” Rentzsch’s 2002 CAWUG Presentation Friday, September 3, 2010
  • 4. Brief History Snippet • A long long time ago in a galaxy far far away... • dotcom: “eResource” (“ER*”), then became NetStruxr • WOnder is acronym for • WebObjects Nodes for Distributing E-Resources • NetStruxr closed • SourceForge project named WONDER was created (~2002) Friday, September 3, 2010
  • 5. What’s in It GoogleChart ERChronic ... and much more! (db *)PlugIn ERModernLook ERTaggable ERCaptcha ERProfiling ERIndexing ERModernDefaultSkin ERAttachment ExcelGenerator ERPDFGeneration ERRest ERModernD.T.W. Ajax JavaWOExtensions WOOgnl WOJRebel ERNeutralLook ERExtensions ERJars ERPrototypes ERJavaMail ERDirectToWeb Friday, September 3, 2010
  • 6. Why Should You Use It? • Bug fixes to standard WebObjects frameworks • Even Apple uses Wonder (Branch 2_0_0?) • Improved and Replaced Functionality • Extended and Additional Functionality • The source code has an educational benefit • Why reinvent and debug the wheel? Friday, September 3, 2010
  • 7. How Do You Get It? “Semi-Pro” Way* “Pro” Way* Binaries Source * Terms coined by David Holt on wonder-disc mailing list on May 12, 2010 Friday, September 3, 2010
  • 8. Binary Frameworks Initial Installation $ mkdir WonderBinaries54 $ cd WonderBinaries54 $ curl -O http://webobjects.mdimension.com/hudson/job/Wonder54/lastSuccessfulBuild/artifact/dist/Wonder-Frameworks.tar.gz $ tar -xzvf Wonder-Frameworks.tar.gz $ sudo cp -Rvf *.framework /Library/Frameworks For WebObjects 5.3, replace “54” above with “53” Friday, September 3, 2010
  • 9. Binary Frameworks Upgrade Installation $ cd WonderBinaries54 $ for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done $ rm -r * $ curl -O http://webobjects.mdimension.com/hudson/job/Wonder54/lastSuccessfulBuild/artifact/dist/Wonder-Frameworks.tar.gz $ tar -xzvf Wonder-Frameworks.tar.gz $ sudo cp -Rvf *.framework /Library/Frameworks For WebObjects 5.3, replace “54” above with “53” Friday, September 3, 2010
  • 10. Source Frameworks Initial Installation $ svn co http://wonder.svn.sourceforge.net/svnroot/wonder/trunk/Wonder --revision <ARG> WonderSource $ cd WonderSource $ ant -Dwonder.patch=54 frameworks; sudo ant -Dwonder.patch=54 frameworks.install [WO 5.4] OR $ ant frameworks; sudo ant frameworks.install [WO 5.3] <ARG> = HEAD to get latest version. Type svn --help checkout for more. Friday, September 3, 2010
  • 11. Source Frameworks Upgrade Installation $ cd ~/Roots/ $ for FRAMEWORK in `echo *.framework`; do sudo rm -r /Library/Frameworks/${FRAMEWORK}; done $ cd /path/to/WonderSource $ svn update --force --accept theirs-full --revision <ARG> $ ant -Dwonder.patch=54 clean; ant -Dwonder.patch=54 frameworks; sudo ant -Dwonder.patch=54 frameworks.install [WO 5.4] OR $ ant clean; ant frameworks; sudo ant frameworks.install [WO 5.3] Friday, September 3, 2010
  • 12. Working with Wonder Source • Some Advantages of working with Source over Binaries: • Learn much about WebObjects and EOF (and java dev styles?) • Easily browse and search the source • Work with a specific svn version (teams, quality control) • Discover the Hidden Treasures (Don’t miss Chuck Hill later) • Note ERXExtensions classpath file contents for 5.3 vs 5.4 ..... Friday, September 3, 2010
  • 13. Demo • Linking Wonder Source projects to your Workspace • Creating a Wonder app • What is different between a Wonder app and a Standard app Friday, September 3, 2010
  • 14. Integrating Wonder into Your Existing Application • Add Frameworks • Adjust Application, Session and DirectAction superclasses • Use ERXGenericRecord instead of EOGenericRecord • Configure Wonder-specific Properties • copy/paste from a new temp Wonder app as a starting point Friday, September 3, 2010
  • 15. Integrating Wonder into an Existing Application • DEMO Friday, September 3, 2010
  • 16. Configuring Wonder’s Features • Wonder is configured, more or less, using Properties files. • Check comments and contents of each framework’s Properties file • Where to find Documentation • Java API • Framework “Documentation” directory • http://wiki.objectstyle.org/confluence/display/WONDER/Home • Examine Source code Friday, September 3, 2010
  • 17. Select Features • ERXProperties • EOModel Connection Dictionary using Properties • ERXEC usage • ERPrototypes • Over-riding Prototypes via ERXModel and ERXModelGroup Friday, September 3, 2010
  • 18. ERXProperties • A variety of ways to organize Properties • ERXProperties replaces and extends deprecated NSProperties • many convenient utility methods including property coercion • log4j configured via Properties • Understanding how ERXProperties works can facilitate better team organization, app administration and general happiness :-) Friday, September 3, 2010
  • 19. The Standard WebObjects Way Override Properties Framework Resources Properties Properties Properties Application Resources WebObjects.properties [user.home] dir -DpropertyName=propertyValue Command Line arguments -DpropertyName=”property Value” Friday, September 3, 2010
  • 20. Properties: The Wonder Way Properties Properties Properties Properties.<username> Framework Resources Override Properties.<username> Properties.<username> Properties Application Resources WebObjects.properties [user.home] dir ( file1, file2, file3 ) [er.extensions.ERXProperties.OptionalConfigurationFiles] (absolute filepaths AND/OR application Resource filenames) Properties OR [er.extensions.ERXProperties.machinePropertiesPath] /<appName>/Properties (absolute filepath, default “/etc/WebObjects”) Properties.dev [er.extensions.ERXProperties.devPropertiesName] (file extension, App Resource, default “dev”) Properties.<username> Application Resources -DpropertyName=propertyValue Command Line arguments -DpropertyName=”property Value” @see er.extensions.foundation.ERXProperties.pathsForUserAndBundleProperties(boolean) Note: [propertyname] denotes a system property (so properties are determining the loading of more properties!) Friday, September 3, 2010
  • 21. Examples of Properties fiddling... ## We always want to use @@ as the delimiter and NOT a single @ er.extensions.ERXSimpleTemplateParser.useOldDelimiter=false app.directActionPassword=passw0rd er.extensions.ERXJUnitPassword = @@app.directActionPassword@@ er.extensions.ERXLog4JPassword = @@app.directActionPassword@@ er.extensions.ERXGCPassword = @@app.directActionPassword@@ er.extensions.ERXDirectAction.ChangeSystemPropertyPassword = @@app.directActionPassword@@ app.smtpserver=192.168.3.142 WOSMTPHost=@@app.smtpserver@@ log4j.appender.myMail.SMTPHost=@@app.smtpserver@@ Automatically generated into Resources by build ## Optional properties to load er.extensions.ERXProperties.OptionalConfigurationFiles=deploy.properties log4j.appender.A2.file=/var/log/webobjects_apps/@@build.app.bundle.name@@-@@WOPort@@.log log4j.appender.myMail.Subject=Log4jError (@@build.app.bundle.name@@ @@host@@ @@WOPort@@) Friday, September 3, 2010
  • 22. Common Dev/Deploy Properties Strategy Friday, September 3, 2010
  • 23. EOModel Connection Dictionary WebObjects Way Friday, September 3, 2010
  • 24. EOModel Connection Dictionary Wonder Way - Properties File: # For individual eomodels model.URL = jdbc:mysql://hostname/firstdatabase model.DBUser = firstuser model.DBPassword = firstpassword model.DBDriver = model.DBPlugin = # Global, or default where model entry not specified dbConnectURLGLOBAL = jdbc:mysql://hostname/nextdatabase dbConnectUserGLOBAL = nextuser dbConnectPasswordGLOBAL = nextpassword dbConnectDriverGLOBAL = dbConnectPluginGLOBAL = Wonder Way - WOMonitor Launch Arguments: -Dmodel.URL=”jdbc:mysql://localhost/database?useUnicode=true&characterEncoding=UTF-8” -Dmodel.DBUser=firstuser -Dmodel.DBPassword=firstpassword Friday, September 3, 2010
  • 25. ERXEC • EOEditingContext subclass • EOEditingContext ec = ERXEC.newEditingContext(); • supports automatic lock/unlock in R-R cycle • er.extensions.ERXEC.safeLocking=true • enabled by default for new Wonder projects • Calls ERXEnterpriseObject state transition will*/did* methods • Implemented by ERXGenericRecord Friday, September 3, 2010
  • 26. ERXEC Auto Lock/Unlock • Implicitly supported in Request-Response threads • ERXApplication._endRequest() ... which calls ... • ERXEC.unlockAllContextsForCurrentThread(); • Background threads are your responsibility! • Here is how to do it ... Friday, September 3, 2010
  • 27. Runnable lock handling public class MyTask implements Runnable { public void run() { ERXApplication._startRequest(); try { performTask(); } finally { ERXApplication._endRequest(); } } private void performTask() { EOEditingContext ec = ERXEC.newEditingContext(); ec.lock(); try { // Do some EOF stuff with the ec. } catch (Exception e) { // handle exception } finally { ec.unlock(); } } } Friday, September 3, 2010
  • 28. Callable lock handling public class MyTask implements Callable<MyResultClass> { public MyResultClass call() { ERXApplication._startRequest(); try { return performTask(); } finally { ERXApplication._endRequest(); } } private MyResultClass performTask() { EOEditingContext ec = ERXEC.newEditingContext(); ec.lock(); try { // Do some EOF stuff with the ec. } catch (Exception e) { // handle exception } finally { ec.unlock(); } return myResult; } } Friday, September 3, 2010
  • 29. Passing Objects to a Thread public WOActionResults shuffleStudioAction() { Studio studio = selectedStudio(); EOGlobalID studioGid = (EOGlobalID) ERXEOControlUtilities.convertEOtoGID(studio); ProcessStudioTask task = new ProcessStudioTask(studioGid); MyExecutorServices.executorService().execute(task); return null; } Friday, September 3, 2010
  • 30. Thread Hydrates EO public class ProcessStudioTask extends ERXRunnable { private final EOGlobalID _studioGlobalID; public ProcessStudioTask(EOGlobalID studioGlobalID) { _studioGlobalID = studioGlobalID; } @Override public void _run() { EOEditingContext ec = ERXEC.newEditingContext(); ec.lock(); try { Studio studio = (Studio) ERXEOControlUtilities.convertGIDtoEO(ec, _studioGlobalID); } catch (Exception e) { // Handle error } finally { ec.unlock(); } } } Friday, September 3, 2010
  • 31. ERPrototypes • DEMO Friday, September 3, 2010
  • 32. Overriding Prototypes • ERXModel and ERXModelGroup • Allow “over-riding” of prototypes based on prototype entity naming conventions • Feature configured in system Properties: er.extensions.ERXModelGroup.modelClassName = com.webobjects.eoaccess.ERXModel er.extensions.ERXModel.useExtendedPrototypes = true er.extensions.ERXModelGroup.flattenPrototypes = false Friday, September 3, 2010
  • 33. Prototypes Over-ride Order • From lowest to highest priority: • EOPrototypes • EO<adaptorName>Prototypes (Wonder has ‘Memory’ and ‘REST’ adaptor protypes) • EOJDBC<pluginName>Prototypes (Wonder database prototype names) • EOCustomPrototypes • EO<adaptorName>CustomPrototypes • EOJDBC<pluginName>CustomPrototypes • EO<modelName>Prototypes • EO<adaptorName><modelName>Prototypes • EOJDBC<pluginName><modelName>Prototypes Friday, September 3, 2010
  • 34. Override Prototypes • DEMO Friday, September 3, 2010
  • 35. Resources • http://wiki.objectstyle.org/confluence/display/WONDER/Home • http://projectwonder.blogspot.com/ • http://webobjects.mdimension.com/hudson/ • JavaDoc and Binaries • “Wonder53” = Wonder for WebObjects 5.3.3 • “Wonder54” = Wonder for WebObjects 5.4.3 • Mailing Lists • https://lists.sourceforge.net/lists/listinfo/wonder-disc • https://lists.sourceforge.net/lists/listinfo/wonder-cvs Friday, September 3, 2010
  • 36. Q&A Getting Start with Wonder WOWODC 2010 Friday, September 3, 2010