ON HOLD

This book has been put on hand will not be published as an Xcode focused book. Ignore what Amazon says, it is not forthcoming. We still plan on writing such a book, but with an Eclipse / WOLips focus instead. That said, we are not currently doing any writing so there is no schedule for release.

 

Well, we're doing it again. We swore not to after Practical WebObjects. We must be crazy. We must. But we are writing another WebObjects book anyway! This time it's a book for beginners, Beginning Xcode and WebObjects: From Novice to Professional. The book is still in it's early stages and we can't say much about it, not even the real title. But it's coming, and should be book stores by Christmas. The information below is a draft and subject to change and will certainly get better. If you have suggestions, comments, flames, or even hate mail, we'd love to hear from you.

Possible Additional Topics

In addition to the topics below, we are considering working these into the book:
  • Modeling and implementing lookup tables
  • Acceptance testing using jwebunit, httpunit, and WOUnitTest. How to set up acceptance testing in a WebObjects application to encourage test-first development.
  • Implementing WOLongResponsePage
  • Sending Emails (text and component-based)
  • Basic integration of Project Wonder
More to come as you suggest them or we think of them...

Chuck and Sacha

Intended Audience

Developers who are new to Web Applications, WebObjects, and OS X development with the Xcode 2 IDE. In addition to demonstrating effective development practices it will lead developers from a SQL centric / scripting background into how to think and develop effectively using WebObjects. Basic Java and HTML knowledge is assumed.

Abstract

This book guides the novice developer in developing a robust web application from initial concept though deployment. The application is developed and deployed iteratively, with the new concepts in each chapter used to enhance and improve on the previous iteration. The book features the use of Xcode, the new WebObjects tools (WOBuilder and EOModeler), and third party tools to craft a powerful web application development environment.

Unique Features

  • This book will show how to make a real, production quality application from design through final deployment. The resulting application will form a solid base on which to build future applications
  • Coverage of new WebObjects tools and newest WebObjects version
  • Incremental development of real application rather than disjointed samples
  • Focus on how to “Think the “WebObjects Way” rather that a “click this, type this” approach
  • Treatment of common problem encountered in web applications
  • Using Web Services
  • Written by the authors of Practical WebObjects who are well known in the WebObjects community for writing, teaching and training

Contents

Introduction

It's been a good, long time since we learned WebObjects; more years in fact than we'd care to admit. We still recall our early struggles and we have helped many people learn it over the years. Our intentions, writing this book, are twofold. The first is to introduce you to the power that is WebObjects. The second is to help you to think "The WebObjects Way" so that you are working with the tool instead of fighting it. We want to demonstrate WO Done Right. Our ultimate goal is to get you productive in developing real, deployable WebObjects applications, not to run you through a series of demonstration applications. To achieve this, we are sometimes going to ask you to just accept that something works rather than explain how it works. When you are ready, our Practical WebObjects book will explain the how and why.

If you have some programming or scripting experience, this book is for you. Our approach does not assume you are familiar with developing web applications, nor familiar with the Mac. However, we aren't going to attempt to teach you about SQL databases, programming, Java, or HTML. You can get by with not knowing much SQL; WebObjects will handle most of that aspect for you. As for Java and HTML, you are going to need to know those and, eventually, know them well. You need more knowledge on those topics than can be packed into this book. Buy a book on Java and one on HTML - you will use them.

The topics in this book follow an intentional, yet perhaps peculiar, progression. We did this intentionally, to show by example the flow that we think you should follow developing an application. We make mistakes in the book, the sort of mistakes that you might make when starting out. Then we show why these are mistakes and a better way of doing things. In the end you will have a complete web application, ready for real deployment, and a solid understanding of how you achieved it.

1. History and Introduction

  • Overview of WebObjects and EOF (what is it)
  • WebObjects and it’s place in the Mac, Java, and Web development landscapes
  • History of WebObjects and EOF (NeXT, Objective-C, Java)
  • History of Xcode / Project Builder
  • Alternate IDEs and Ant
  • Getting to Know Xcode
  • Your First Application

2. Planning for a Maintainable Application

  • Design Patterns in WebObjects (MVC, Observer, Factory Method, Delegate, Singleton, Template Method)
  • Unit Testing WebObjects with Xcode
  • Using Custom Xcode Build Targets and Executables
  • Using Design by Contract in WebObjects with Xcode
  • Logging from the Start, Using log4j
  • An Xcode Project Structure to Support Third Party Tools
  • Using Apache: Develop Like you Deploy
  • Using Frameworks for Organization and Code Reuse
  • The Hello World Scaffold Application
  • RAD: Rapid Turnaround and Hot Code Replace

3. Deployment

  • Why Deployment at the Beginning?
  • Structure of .framework and .woa Build Products
  • WebObjects and Classpaths
  • Organizing Deployments
  • Apache Configuration
  • SSL Configuration
  • Setting up OS X Services
  • Editing spawnofwotaskd.sh
  • Deployment Components: JavaMonitor, Wotaskd and javawoservice
  • Setting up JavaMonitor
  • Configuring an Application
  • Logging and Permissions
  • Optimization: Adjusting Timeouts, Memory Usage, and Number of Instances
  • Trouble Shooting: Where to look when things go wrong

4. Thinking About Design with WebObjects

  • How a WebObjects Developer Thinks
  • Relationships not Queries
  • Qualifiers
  • Fetch Specifications
  • Business Logic for Business Objects
  • Components are for View Not Process
  • Object Design
  • The Request – Response Loop
  • Why Defer Optimization Concerns
  • Key Value Coding and WOGNL Extensions
  • Description of the Application to be Built (blog)

5. The EOModel

  • Entities
  • Attributes
  • Value Types
  • Prototypes
  • To 1 Relations
  • To Many Relations
  • Many to Many Join Tables
  • Flattened Relations
  • Using Multiple Models
  • Relationships Across Models
  • Fetch Specs in Model
  • EO Inheritance
  • EOGenerator
  • Handling Blob Data
  • Connection Dictionary
  • Runtime Selection of the Connection Dictionary and Prototypes
  • Debugging JDBC Connections and Jdbc2info

6. Leveraging the Power of EOF

  • Fetching Objects
  • Locking and Patterns of Editing Context Use (peer, nested)
  • Data Freshness
  • Using SQL when needed
  • Raw Rows
  • Fetch Efficiency (pre and batch fetching)
  • Optimistic Locking Failures
  • Constraint Failures

7. Basics of Page Construction

  • Strings and Formatting
  • Loops
  • Conditionals
  • Forms
  • Switch Component
  • Action methods
  • Bindings
  • Localization and encoding for internationalization

8. Advanced Page Construction

  • Localization
  • WOComponentContent
  • CSS
  • JavaScript
  • Returning to Previous Page
  • RR Loop and Phases
  • Common Super Class

9. Authentication and Authorization

  • Handling Transitions between http and https
  • Modeling Users
  • Handling Login
  • Modeling Groups, Permissions, Operations
  • Handling Permission Checks in UI

10. Creating and Using Reusable Components

  • Design
  • Caret Notation
  • Synchronization
  • Stateless
  • Refactoring Pages into Reusable Components

11. Validation

  • Basics from Practical WebObjects
  • Using Page to Store exceptions
  • Using form inputs which handle their own validation
  • JavaScript Client Side Validation (maybe with components)
  • Handling exceptions from saveChanges() (validation failures, EOGeneralAdaptorException, etc.)

12. Web Services and WebObjects

  • Using Direct2WebServices (works great with other apple apps as clients/servers, has many caveats when doing non-apple on the other end)
  • Using WebServices Directly (similar to above, but a bit easier to control to code around specific issues with other technology)
  • The Lower Levels (using the Axis and Sax classes - what you have to do before 5.3 to talk to non-Apple technologies, "what is really happening under the covers")