Apple WebObjects 3.5 User Manual

Page 5

Advertising
background image

v

Table of Contents

Introduction 9

About This Book 11

Other Useful Documentation 12

Part I

WebObjects Essentials

What Is a WebObjects Application? 17

The Ingredients of a WebObjects Application 19

Components 20

Template 21

Code or Script File 21

Bindings 22

Application Code 23

Session Code 23

A Note on WebObjects Classes 23

Application Directory 24

Running a WebObjects Application 25

WebObjects Adaptors 26

The WebObjects Application Executable 27

Dynamic Elements 29

Server-Side Dynamic Elements 31

How Server-Side Dynamic Elements Work 33

Binding Values to Dynamic Elements 35

Declarations File Syntax 36

Client-Side Java Components 37

Deciding When to Use Client-Side Components 37

How Client-Side Components Work 38

Common Methods 41

Action Methods 43

Initialization and Deallocation Methods 46

The Structures of init and awake 46

Application Initialization 47

Session Initialization 48

Component Initialization 49

Request-Handling Methods 50

Taking Input Values From a Request 51

Invoking an Action 52

Limitations on Direct Requests 53

Generating a Response 53

Debugging a WebObjects Application 55

Launching an Application for Debugging 57

Debugging WebScript 57

Debugging Java 57

Debugging Objective-C 58

Debugging Mixed Applications 58

Debugging Techniques 58

Writing Debug Messages 58

Using Trace Methods 59

Isolating Portions of a Page 60

Programming Pitfalls to Avoid 60

WebScript Programming Pitfalls 60

Java Programming Pitfalls 61

WebObjects Viewed Through Its Classes 63

The Classes in the Request-Response Loop 65

Server and Application Level 65

Session Level 66

Request Level 68

Page Level 69

Database Integration Level 71

Advertising