Why is learning WebObjects so hard?

"WebObjects has a very steep learning curve" – at least according to conventional wisdom (as Steve Hayman is famously quoted as saying: "That’s OK, it just means you learn a lot in a short period of time").

However, I’m not so sure that is really the case. I’m begining to think that maybe Malcomm Crawford is closer to the truth with his view that WebObjects itself is fairly straightforward to master – but – it comes with a heavy set of prerequisites.

The WebObjects architecture is fairly deep – but its APIs are all consistent and logical. The problem for the novice developer is the healthy set of prerequisites and at least one common misconception.

The Misconception

  • WebObjects is not the iTunes/iPhoto/iMovie/iDVD of web development environments – Yes, WebObjects is an Apple product, but it is an enterprise class development environment. You’re experience is not going to be point, click, done.

The Prerequisites

  • Database design, ER modeling – You will need to understand how databases work, how to design them, and how to normalize them. You will also have to know how to mentally abstract the database schema into objects – because more than anything, WebObjects is about objects.
  • Object Oriented programming and Java – More importantly than knowing how to program in Java – you need to think OO. The WebObjects frameworks are very consistant, they use the same design patterns over an over again. When you can begin to think in those patterns, you will find your time with WebObjects much more productive. You need to be able to answer these questions: What is MVC? Why is MVC so valuable? Why should I sacrifice my children to conform to MVC? 😉
  • HTML – Assuming you are developing for the Web, you will need to be conversant with HTML and CSS at least. It also helps if you understand the nature of HTTP and your web-server (Apache).

Are you telling me I should just give up?

No, if you are novice developer, or approaching from a scripting background, don’t give up. Yes there is a lot to learn, but you don’t need to learn it all at once – and there is a huge upside, once you begin to get it you will wonder how you ever developed with anything else.

So:

  • Read the EOModeler documentation – if you still have questions about databases and ER modeling check out Database Design for Mere Mortals.
  • Read the WebObjects overview, and at least browse the other Apple WebObjects documentation.
  • Get yourself a good book on Java (as a bare minimum try Apple’s Java for WebObjects, if that’s not enough try Thinking in Java, you might find a good book on Java patterns helpful too).
  • Work through the Apple Web Applications tutorial – also try reading the source for the WebObjects examples in /Developer/Examples/JavaWebObjects/. Revisit the examples periodically as your knowledge progresses.
  • Follow up the Apple tutorial with Joshua Marker’s WebObjects 5 for Mac OS X: Visual QuickPro Guide. Definitely get a copy of Charles Hill and Sacha Mallais’s Practical WebObjects.
  • Finally, subscribe to the Apple and Omni WebObjects lists – read them religiously, even if you don’t understand them right away – there is a wealth of information there – eventually it will sink in.

When I signed the contract to write my first WebObjects app I had no development experience beyond AppleScript, FileMaker, and RealBasic. Luckily, George Ruzek had just published his WebObjects web application construction kit. That book along with the Apple’s (at that time, newly updated) Web Applications tutorial and the reading I’d done on database design was enough to get me started. Yes the first couple of months were rough, but, well, the pain fades quickly 😉

Good Luck!