Version 10.1 by Kieran Kelleher on 2007/10/01 21: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.
Kieran Kelleher 10.1 4 In this short article, we itemize the absolute minimum to add Wonder to your project and avoid problems.
Kieran Kelleher 6.1 5
6 == Minimum Wonder Integration ==
7
Kieran Kelleher 10.1 8 * Add ERJars, ERExtensions and Wonder's JavaWOExtensions frameworks to your project's framework references
Kieran Kelleher 6.1 9 * Remove existing log4j jar if your project had that.
10 * Make it so your Application class subclasses ERXApplication
11 * Make it so your Session class subclasses ERXSession
12 * Make it so your DirectAction classes extend ERXDirectAction
Kieran Kelleher 10.1 13 * Your Application class' main static method __**must**+ call ERXApplication.main(...) instead of WOApplication.main(...). Your application will fail to initialize and launch otherwise.__
Kieran Kelleher 6.1 14 * Use ERXEC.newEditingContext() to create new editing contexts in your application
15 * 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.
16
17 {{warning title="Remember"}}
Kieran Kelleher 10.1 18
Kieran Kelleher 6.1 19 All of these steps are important. Failing to integrate properly may lead to errors during runtime or your application will fail to launch successfully
20
21 {{/warning}}
22
23 {{code title="Application main method"}}
24
Kieran Kelleher 10.1 25 public static void main(String argv[]) {
Kieran Kelleher 6.1 26 ERXApplication.main(argv, Application.class);
27 }
28
29 {{/code}}
30
Kieran Kelleher 10.1 31 == Easy Recommended Extras ==
Kieran Kelleher 6.1 32
Kieran Kelleher 10.1 33 If you got the minimum Wonder integration done and your app is working, then adding these harmless but useful extra frameworks are definitely worthwhile:
Kieran Kelleher 6.1 34
35 * ERPrototypes - save yourself lots of manhours fiddling with EOModel attributes by using convenient prototypes. This is considered best practice.
Kieran Kelleher 10.1 36 * ERJavaMail - send all kinds of emails - plain text, html, multi-part, attachments, etc. HTML can be generated form a WOComponent or be set using a HTML String.
Kieran Kelleher 6.1 37 * ERSelenium - functional testing that simulates user interaction with your app's web pages.
38
39 {{tip value=" Link To Wonder Source in your Workspace"}}
Kieran Kelleher 10.1 40
Kieran Kelleher 6.1 41 Wonder source is in itself a very useful reference and gives insight into the inner workings of the WebObjects frameworks, so having the source directly linked to your project in your workspace has many advantages. See other tutorials on this wiki that show how to set that up.
42
43 {{/tip}}