Granted I don’t have any inside information, but I was at the Yorkdale Shopping Centre for lunch today and they had a big sign that said "40 New Stores – Spring 2005". The area that used to be occupied by Sears (which has now moved to a new location at the other end of the mall), the old cinemas, and the little bit of parking lot in between is being turned into a new corridor of shopping. So, if the reports of a Toronto Apple Store are true, I guess that’s where it will be.
Month: November 2004
WebObjects thoughts.
- 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.
- Follow the commandments – A few simple rules that will prevent a world of hurt.
- 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.
- 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.
- 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.
Toronto Apple Store?
According to Apple Insider, there is an Apple Retail Store coming to the Yorkdale Shopping Centre. We’ll see, we’ll see…
Using EOGenerator with WOLips/Eclipse 3.0
I use EOGenerator extensively when working with WebObjects. In WOLips/Eclipse 2.0 I had a GenerateEOs task in my build.xml file (I copied it from a post by Chuck Hill to the WOProject mail list). Unfortunately, it no longer works in WOLips/Eclipse 3.0. There is a WOGen Ant task that should be able to duplicate what EOGenerator does, but well, I’m just stuck in my ways.
As suggested on the WOProject list, I configured EOGenerator to run as a Builder for my project using the following steps:
- Select the appropriate Project/Framework in the Eclipse Package Explorer
- Select Properties from the Project menu and then select Builders
- Click the New button
- Configure the fields in the the window as follows:
- Name: EOGenerator
- Location: /Developer/Applications/eogenerator/eogenerator
- Arguments: (shown on separate lines for clarity only)
- -model ${project_loc}/superduperproject.eomodeld
- -destination ${project_loc}/src/ca/codebase/substrate/
- -subclassDestination ${project_loc}/src/ca/codebase/substrate/
- -templatedir /Developer/Applications/eogenerator/
- -javaTemplate CBJavaSourceEOF5.eotemplate
- -subclassJavaTemplate CBJavaSubclassSourceEOF5.eotemplate
- -define-copyrightYear “2003 – 2004”
- -define-copyrightBy “Codebase Software Systems”
- -verbose
- -java
- Click Apply
Notes:
- ${project_loc} is an Eclipse variable (it contains the path to the project).
- I keep eogenerator and it’s templates in a folder in /Developer/Applications/ and my EO’s are in the ca.codebase.substrate package, change the paths above to reflect your environment.
- In Build Options for the Builder, select when you want to Run the builder. I find the defaults (After a “Clean” and During Manual Builds) are fine for my needs.
WOLips RC1 Released
RC 1 of the WOLips plugin for Eclipse 3.0 was released today. WOLips provides WebObjects support in Eclipse, and I’ve been using it with Eclipse 2.1.3 for several months. I’ve been holding off moving to Eclipse 3.0 because of some annoying bugs but this release is supposed to resolve most of them. Time to give it a try.