I'll bring pre-print evaluation copies to WOWODC13. One more reason to come to Montréal!! Be the first to actually see and browse and read the new book about WebObjects and Wonder.
Table of Contents
Part A - The Environment 8
1 Introduction 9
1.1 A bit of history 9
1.2 Where do we stand today? 10
1.3 What do you need to create great Project Wonder applications? 10
1.4 Hi-level overview of the frameworks 10
1.4.1 What is a Framework? 11
1.4.2 WebObjects Frameworks 11
1.4.3 Project Wonder Frameworks 11
2 Setting up your development environment 13
2.1 What do you need? 13
2.1.1 Hardware suitable for Project Wonder development 13
2.1.2 Software needed for Project Wonder development 13
2.2 Where goes what? 14
2.3 Installing the tools 16
2.3.1 Automatic installation of Eclipse and WOLips 16
2.3.2 Manual installation of Eclipse and WOLips 17
2.4 Installing the frameworks 20
2.4.1 Installing WebObjects 20
2.4.2 Installing Project Wonder 21
2.4.3 Final test if everything is installed properly 30
3 Where to get help 34
Part B - Basic Concepts and Classes 36
4 Our first application 37
4.1 Overview of the request-response-loop 37
4.2 Direct connect during development 37
4.3 Layout of the BasicConcepts Project 37
4.4 Editing and working with Components 40
5 Design patterns 47
5.1 Model View Controller 47
5.2 Key Value Coding 49
5.2.1 Let’s play a bit with key-value-coding 49
5.2.2 For the Curious: The NSKeyValueCoding Interface 52
5.3 Summary 52
6 Request Response Loop 53
6.1 The WOAdaptor 54
6.2 The classes WORequest and ERXRequest 55
6.3 The classes WOResponse and ERXResponse 56
6.4 The classes WOContext and ERXWOContext 56
6.5 Summary 57
7 Application, Session, and Component Classes 58
7.1 The Application class ERXApplication 58
7.1.1 Playing with the application class 59
7.2 The Session class ERXSession 60
7.2.1 Session mechanics in Wonder 61
7.2.2 Session id with cookies 62
7.2.3 Lifetime of a session 64
7.3 The view/controller combo WOComponent and the controller class ERXComponent 66
7.3.1 What is a (WO)component? 66
7.3.2 Layout of a component 66
7.3.3 Creating a new component object 67
7.3.4 The view part of a component 68
7.3.5 Other parts of a component 69
7.4 Summary 70
8 Flow of control 71
8.1 awake() and sleep() methods 71
8.2 Processing the request 73
8.2.1 Phase 1, getting input data from the request 73
8.2.2 Phase 2, acting upon the request, processing the data 74
8.2.3 Phase 3, generating the response 74
8.3 Handling of navigation 74
8.4 The page cache and backtracking 77
8.5 Summary 79
9 Wonder has its own advanced collection classes 80
9.1 Array-like classes NSArray and NSMutableArray 80
9.2 Playing with NSArray and NSMutableArray 80
9.3 HashMap-like classes NSDictionary and NSMutableDictionary 81
9.4 Playing with NSDictionary and NSMutableDictionary 81
9.5 Summary 82
10 Repeating and Conditional HTML 83
10.1 Repeating Data in a Web Page with WORepetiton 83
10.2 Conditional HTML 86
10.3 Summary 88
11 HTML forms and gathering user input 89
11.1 The WOForm element 89
11.2 Text input fields 89
11.2.1 WOTextField 90
11.2.2 WOText 91
11.2.3 WOPasswordField 91
11.3 Checkboxes and Radio Buttons 91
11.4 Popup Buttons and Selection Lists 94
11.5 Arbitrary Dynamic html Elements? WOGenericElement and WOGenericContainer to the rescue 96
11.6 Actions make Things happen – Elements that can trigger Actions 96
11.7 Summary 99
12 Custom Components 100
12.1 Creating a custom component 100
12.2 The WOComponentContent Component 108
Part C - Enterprise Objects 111
13 Enterprise Objects 112
13.1 What are Enterprise Objects? 112
13.2 Enterprise Objects have Behavior 112
13.3 The Technical Side of Enterprise Objects 112
14 The Editing Context 114
14.1 The classes ERXEC and EOEditingContext 114
14.2 Accessing the editing context 114
14.3 Working with your own editing context 115
15 Objects and the Relational World – The Data Model 116
15.1 Entities, Classes, and Relational Tables 116
15.2 Creating the EOModel 117
15.3 Creating entities 122
15.4 Creating attributes and other entities 124
15.4.1 Attribute Settings 126
15.5 Adding simple relationships 128
15.6 Adding a many-to-many relationship 129
15.7 Add the JDBC driver for your database to the project 132
15.8 Generating the database structure 133
15.9 Generating the Java class files 134
15.9.1 How Java class files are being generated 135
16 Fetching Enterprise Objects 139
16.1 Qualifying – How To Build Qualifiers 139
16.1.1 Testing for equality 139
16.1.2 Wildcard qualifying 139
16.1.3 Qualifying across a key path 139
16.1.4 Building an SQL like qualifying string 139
16.1.5 Qualifying for NULL values 140
16.1.6 In-Memory Filtering of an Array 140
16.2 What Order Do You Like Your Objects? – Sorting 140
16.2.1 In-Memory Sorting of an Array 141
16.3 The Fetch Specification ERXFetchSpecification 141
16.3.1 Building a Fetch Specification Manually in Code 141
16.4 FetchSpecification in the Model 142
16.5 Putting it all together 146
16.6 Using the Wonder Convenience Methods for Fetching 146
16.7 Using EOUtilities Convenience Methods 147
16.8 A Complete Fetch Example 147
17 Editing Enterprise Objects 152
17.1 The Editing Context revisited 152
17.2 Creating New Enterprise Objects 153
17.3 Deleting Enterprise Objects 153
17.4 Saving Changes, Reverting Enterprise Objects to Previous State 153
18 Working with Relationships 155
18.1 Adding an Object to a Relationship 156
18.2 Breaking the Relationship between Objects 156
18.3 WOToOneRelationship and WOToManyRelationship Components 157
Part D - More Useful Things 159
19 Working with Cookies 160
19.1 Sending cookies in the response 160
19.2 Receiving cookies in the request 161
19.3 A cookie example 161
19.4 Issues with cookies 165
20 Display Groups and Batch Navigation 166
20.1 What is a display group? 166
20.2 Using a display group 166
20.3 Defining and Initializing a Display Group with the Graphical Editor 169
20.4 Batch Navigation with Display Groups 172
20.5 How does a display group work under the hood? 175
20.6 “To DisplayGroup” or not “To DisplayGroup”, that’s the Question! 176
20.7 Initializing a Display Group in Code 176
21 Direct Actions 177
21.1 Direct Actions – a Lightweight Request-Response-Loop 177
21.2 There are different request handlers to a Wonder application 177
21.3 Setting the Default Request Handler 178
21.4 Direct Actions in Action 178
21.4.1 The Main component 179
21.4.2 Direct Action Methods 181
21.4.3 Accessing Form Values 181
21.4.4 Accessing the Database and the Editing Context 182
21.5 Direct Actions and Sessions 182
21.6 Creating direct action URLs 183
21.7 When would you use direct actions? 183
21.8 Example: Using a direct action to generate a CSV file 184
22 Debugging and Logging 186
22.1 Generating log output to the console 186
22.1.1 Using NSLog 186
22.1.2 Logging with Log4j 187
22.1.3 Logging SQL statements 188
Part E - Deployment 191
23 Introduction to Deployment 192
23.1 Requirements 192
23.2 The Big Picture 193
23.3 Deployment Architecture 194
23.4 Split install 194
23.5 The Role of wotaskd 194
23.6 The Role of JavaMonitor 195
24 Setting up the Server 197
24.1 Preparing the Directory Structure 197
24.2 Installing JavaMonitor and wotaskd 197
24.3 Setting up the Web Server and WOAdaptor 200
24.4 Creating Symbolic Links for Convenience 203
24.5 Setting up the Server in JavaMonitor 204
25 Building Your Application for Deployment 209
26 Deploying Your Application 216
26.1 Bring the Application over to the Server 216
26.2 Making the Application known to JavaMonitor and wotaskd 217
26.3 Managing the application with JavaMonitor 221
26.3.1 Configuring the Site 221
26.3.2 Application Settings 226
Table of Pictures and Graphics 230
Index 233