Traversing the world of WO


A chronicle of learning WebObjects

Friday, May 03, 2002

Unlearning the habits of PHP

Man is it a learning curve to get into WO! The old habits from PHP die hard and cause a lot of problems. Before I only had to deal with object for that single page being processed, now I have to manage them for the life of the application. This is a tough thing to get used to and really requires a lot fo patience. I have almost quit and gone back to PHP at least a half dozen times. It does not help that the documentation and reference code for WO is fairly difficult to use for learning WO.

Anyway back to work you loafer! :)

Wednesday, May 01, 2002

Memory Restored

Well thanks to the help of a lot a great people on the Omnigroup WebObjects list and Apple Discussion forums I found out I know little to nothing! ;) Actually, the problem was in my approach (PHP bad habits) being based on what is best described as trying to do session-less direct action type of design with a session.

So the problem was that I kept creating a new page every time someone clicked on a link. Instead of simply creating an saving the page for later use, or destroying it when done. I still have not gotten that whole destroy part down, but I am working on it.

Well this is really simply a difference in methodology, in a standard WO Application everything is persistent, where in PHP things only live until the the output is done. Once again the difference between a sprinter and a long distance runner.

The key elements so far has been removing redundant EOEditing Contexts, Saving the reusable pages in the Session and not creating new ones every time the section is visited, while also reducing the Page Cache from 30 to 2 (not sure about this one) and activating Refresh on Backtracking. Tomorrow I get to go through the entire app and decide what needs to be saved versus what needs to be destroyed and recreated as needed. Ick! Oh well, just another day learning how to wield the power of WO! :)

Monday, April 29, 2002

Damn I seem to remember too much!

Well I am on the hunt now for a big problem in my WO App. It seems that as you move through it form page to page, it remember everything. In other words, the memory is filled until it crashes. I can not find out why or how to stop it from happening. :(