reBeLog - WebObjects thoughts.

David just published a great post on developing with WebObjects. He really boils down the WebObjects development experience into a few bullet points, which I will copy/paste here for searchability...

The last point is really the best one - I've come across this so many times on CAREO and Pachyderm. We'll be building away and I'll just stop and say something lame like "Wait - this is getting too complicated. There has to be an easier way..."

  1. Don’t fight the tool - WebObjects and EOF are very flexible and rich in capablilites. Get to know the way they work and work with them. Don’t fight them - they will win. Read the sample code from Apple and the source for Project WONDER. When you write your code emulate their style. The really good stuff is just below the surface (Key Value Coding for example). That’s where the power lives, dig a little, you will be rewarded.
  2. Follow the commandments - A few simple rules that will prevent a world of hurt.
  3. Let someone else write the code - I’ve mentioned a number of sources of WebObjects frameworks in my posts (Project WONDER, SwitchableStrings, WOCode ), they provide an amazing amount of functionality that you don’t need to implement yourself, that’s the entire point of OO design isn’t it? Also, when you build something useful, factor it out into your own reusable framework - why would you want to write something twice? Finally, use EOGenerator - no really - use it. There is no excuse not to.
  4. Model it right the first time - Every time I’ve been tempted to cut corners on my model, it’s come back to bite me. A strong Model will allow your App to almost write itself. My general rule of thumb: If I can’t get from one object to a “related” one via KVC, I’m going to be grumpy.
  5. If it is getting complicated, you’re probably doing it wrong
    • You’re fighting the tool aren’t you?
    • Maybe WebObjects is the wrong tool.

    Please, don’t try to hack around the WebObjects architecture. i.e. If you really need multiple concurrent access to your database everywhere in your application - use something other than EOF.


See Also

comments powered by Disqus
Last updated: March 01, 2024