Version 25.1 by Klaus Berkling on 2023/11/13 11:58

Hide last authors
Kieran Kelleher 6.1 1 == Introduction ==
2
3 So you have decided to take the plunge and take advantage of the many useful features of Project Wonder. The most common usage of Project Wonder is to simply integrate the Wonder foundation frameworks of ERJars, ERExtensions and JavaWOExtensions into your project. Doing this fixes many problems with the standard WebObjects frameworks and provides easy access to many configurable features that most typical WebObjects applications need.
Klaus Berkling 23.1 4 In this short article, we itemize the absolute minimum to add Wonder to your project and avoid initial integration stumbles.
Kieran Kelleher 6.1 5
6 == Minimum Wonder Integration ==
7
kiberkli 20.1 8 * Add ERJars, ERExtensions, WOOgnl and Wonder's JavaWOExtensions frameworks to your project's framework references
9 * Add ERPrototypes if your EO model uses/will use prototypes
Kieran Kelleher 6.1 10 * Remove existing log4j jar if your project had that.
11 * Make it so your Application class subclasses ERXApplication
12 * Make it so your Session class subclasses ERXSession
13 * Make it so your DirectAction classes extend ERXDirectAction
kiberkli 20.1 14 * Make it so your Enterprise Objects extend ERXGenericRecord instead of EOGenericRecord. If you use EOGenerator, simply change your superclass template class declaration and import statements.
Klaus Berkling 23.1 15 * Your Application class' main static method (% style="text-decoration: underline;" %)**must**(%%) call ERXApplication.main(...) instead of WOApplication.main(...). Your application will fail to initialize and launch otherwise.
Kieran Kelleher 6.1 16 * Use ERXEC.newEditingContext() to create new editing contexts in your application
Klaus Berkling 23.1 17 * Add minimal content to Properties file. To get minimal content, create a temporary empty project using the WOnderApplication WOLips project template and copy/paste the contents from that template's Properties file.
Kieran Kelleher 6.1 18
19 {{code title="Application main method"}}
20
Kieran Kelleher 12.1 21 public static void main(String argv[]) {
Kieran Kelleher 6.1 22 ERXApplication.main(argv, Application.class);
23 }
24
25 {{/code}}
26
Kieran Kelleher 14.1 27 == Easy Extras ==
Kieran Kelleher 6.1 28
Kieran Kelleher 14.1 29 If you got the minimum Wonder integration done and your app is working, then adding these extra fundamental useful frameworks are definitely worthwhile from the start:
Kieran Kelleher 6.1 30
kiberkli 20.1 31 * Ajax - Just what it says - easy Ajax in your WO apps
Klaus Berkling 22.1 32 * ERPrototypes - save yourself lots of manhours fiddling with EOModel attributes by using convenient prototypes. This is considered best practice. (Don't forget to select a prototype in your database config in Entity Modeler, otherwise the prototype won't show up when adding/editing an attribute.)
Kieran Kelleher 14.1 33 * ERJavaMail - send all kinds of emails - plain text, html, multi-part, attachments, etc. HTML can be generated from a WOComponent or be set using a HTML String.
Klaus Berkling 23.1 34 * ERSelenium - functional testing that simulates user interaction with your app's web pages.
Kieran Kelleher 6.1 35
Klaus Berkling 23.1 36 {{info 0="Start Your Next Project on the Right Foot"}}
Kieran Kelleher 16.1 37 For your next project, simply select the WOnderApplication project template instead of the WOApplication template and all the minimum integration tasks itemized above are already done for you. Besides, the WOnder Application project template is so neatly organized that some have commented on how it is a better overall project template for WebObjects projects even if you are not using Wonder.
Klaus Berkling 23.1 38 [[image:attach:Picture 9.jpg]]
Kieran Kelleher 16.1 39 {{/info}}