Sunday, February 21, 2010

A Breath of Fresh Air in my WO World

I have actually found a paying gig at a company in the SF Bay Area doing WebObjects application work. It is DynEd, a company that sells client software for people learning English. Or, as someone said, Rosetta Stone in reverse. The WO applications track the student meta-data, things you would expect, such as quiz results, what has been done, etc.

It will be interesting to see, over the long run, how I can evolve the site. Of course the possibility of using something other than WO has occurred to management. But a lot can be done to rationalize their system with WebObjects now, and it does not make sense to replace a working legacy system without re-factoring and re-forming the old system.

We'll see. And it is nice to be working for a company with a bit of an educational mission and not a company making yet another fancy jeejaw. Hey! Has anyone claimed the name "iJeejaw" yet? Opportunity strikes!

Tuesday, October 30, 2007

coexisting installs of WO 5.3/5.4 on Tiger/Leopard?

I am wondering what people think about these (very random) ideas.

I have to admit I have not jumped onto using a Leopard system yet. For one thing, I have midterms, and for another, I am tempted to wait until I can get hardware with Leopard on it (which I probably cannot yet) and get a new laptop with Leopard on it. Then I will be able to transition things over from my current laptop as I desire, and not try to upgrade my somewhat beat-up laptop.

I am pretty sure of some things, some of which are represent competing viewpoints:

1) WO 5.3 is not and will not be supported on Leopard.

2) WO 5.3 works with Java 1.4, which is on Leopard, and so the WO 5.3 runtime should work on Leopard.

3) It has been possible, for quite a while, to have more than one version of WO on a machine, but Apple will never support this. Essentially, the theoretical cost of supporting configuration goes up exponentially, not linearly, with the number of versions on a system. There will never be a reason for Apple to take on the job of supporting a machine that has two different versions of WO. But....

Having no tool support, it should be a lot easier to configure runtimes for multiple versions. Things like soft-linked directory branches work a lot better when they do not have to deal with the ObjC bridge and all its associated noise. Project Wonder, for instance, could include scripts for configuring this. A script could even check the integrity of deployment installs. While at Apple, I wrote a "verify your versions" direct action. Too support-ish and not enough aqua, so not shippable.

4) EOModeler and WebObjects Builder may work on Leopard, but one would have to get the apps and many of their private frameworks over by hand and Apple may have done something to make these apps not launch, or they will launch but be crashy in the extreme. I still use them on Tiger, but I will have to give up on them for Leopard. :-(

Has Apple announced a public API for plugins in Xcode? Probably not. The amusing thing is, Xcode being an ObjC app, there are lots of APIs used by the plugins that Apple has written. That's actually the crux of the biscuit. Each group of people doing a plugin or two has created a new internal API....

I know I should take the time to get comfortable with Eclipse. I just have had other things to do. Like creating WO apps. Sorry.

6) I am willing to bet I can take Xcode templates for WebObjects projects and make them work in Leopard. It should not even be difficult. Project templates are, after all, just a resource. I cannot decide if this is worth any time.

I am sure I will come up with other ideas, some even more useless than some of these, when I actually have a Leopard system. We'll see. I am open to suggestions, question, jibes, innuendoes, catcalls, or anything short of insults. No, insults are ok, too. :-)

happy halloween - ray

Thursday, August 02, 2007

Torwards a Re-usable Object-Category Pattern?

I just built an application. The idea behind it is very simple. The implementation turned out to be surprisingly not so. Some of this reflects my own blind spots, which are legion, and some of it reflects some messiness inside WebObjects. It feels as though there should be a way to create an EO that captures some of what I am seeing here.

The application keeps track of a thing. In this case, I am keeping track of URLs, but it could be anything. The base EO has a primary key and a string for a name, and that is all. So, storing two of these, I would have (1001, '') and (1002, ''), for instance. Then there is a many-to-many relationship between this and another object. This other object is a Category and looks like (2001, 'color', 'green'), (2002, 'priority', 'highest'), (2003, 'arfblat', 'Wednesday'). Then I implemented handleQueryForUnboundKey and handleTakeValueForUnboundKey in the URL object from the NSKeyValueCoding.ErrorHandling interface.

Essentially, what I am doing is taking this from the database:

URL: (1001, '')
URL: (1002, '')
cat: (2001, 'color', 'green')
cat: (2002, 'priority', 'highest')
cat: (2003, 'arfblat', 'Wednesday')
join: (1001, 2001)
join: (1001, 2003)
join: (1002, 2002)
join: (1002, 2003)

and turning these into EOs which look like this:

{ pk: 1001, url: '', color: 'green', arfblat: 'Wednesday' }

{ pk: 1002, url: '', priority: 'highest', arfblat: 'Wednesday' }

Simple? Well, probably not. But if you think about what Key Value Coding actually allows you to do, it makes sense.

If you use KVC to ask a URL object for an arfblat, it looks in the base EO and does not find anything. I implemented the handleQueryForUnboundKey method in the URL object to get the categories and see if any of them has a category name of 'arfblat'. If there is such a category, I get the category value, 'Wednesday', and return that.


url.valueForKey("arfblat") -> "Wednesday"

Well, it was surprising to me how difficult it was to get this application to work right. It is still not quite working. I had to remove the ability to add new categories. If you create a new category and add objects to it, they look wrong, even though they are stored correctly in the database. Restart the app and all the objects behave correctly. There are a bunch of these kinds of quirks in dealing with this application.

I am going to have to think about this some more. If anyone has ideas or suggestions, please comment.

Sunday, June 10, 2007

Coolness at WOWWDC

It's a conference. It is all about WebObjects. It is from Apple, NOT!

A conference has been put together by dedicated WebObjects user who wanted to get it together and decided not to wait for Apple to, you know, get it together!

These notes are going to be rough. It is a long day....

Key to Names:
PR = Pascal Robert
CH = Chuck Hill
AC = Alex Cone
MS = Mike Schrag
?? = presented web svcs with AC

PR: intro, PF is not here, Scott Keith is here. Sponsors, etc.

CH: What is this Eclipse?
- open source, java tools
- WOLips extends eclipse with specific knowledge about WO
- WOProject - ant-based command-line tool

- you can do a lot more a lot faster than eclipse
- What does your IDE do? code completion? debugging? error reporting?
- is it slightly slow? on new hardware, not a problem...
- GUI is not OS X.
- no GUI component editor
- custom build steps? compatible?
- used WOPetStore for example....

AC - from CodeFab

web services preso

"SOAP is the C++ of web services...."
REST - HTTP POST to get XML back
very cool demo of GoogleWoCheckout, from CodeFab, for using Google WS API in a WO app

?? -
girlfriend has a hat shop and needed credit card, with no hassle....

Ajax preso:

AC: page executes JavaScript which creates XMLHttpRequest (XHR)
XMLHttpRequest messages Server
Server responds:
MS: watch out for stateful components

how does WO work?

- backtrack cache
- one page ~ one context
- limited depth

cache gets blown out easily in a Ajax-ified page - "Who will save the day?"

3 most important things to work with....


See AjaxExample.


- totally revamped
- deterministic property and framework init
- properties usable for staic vars
- classpath munging
- extend ERXFrameworkPrincipal
- report problems!


much cooler localization

- value-GID cache
- replaces SEC

ERXConstant class - POJO singletons


Prototypes -
- now stackable
- ERPrototypes now loaded first
- works only with EntityModeler
- Prototype flattening


Wednesday, April 25, 2007

Nothing Serious To Say

For some reason, I find myself unable to work on anything serious. I have lots of application ideas and databases to build and interfaces to work out and I am just not wanting to jump in the pool right this minute. I'm unemployed and darned proud of it. Say it once and say it loud! :-)

So, I'm just going to sit in this lounge chair and do something silly.

I have made various versions of Memory games over the years. Memory is the card game where you lay out cards and try to flip them over in pairs. I did the first version after someone, several years ago, put up a Memory game based on pictures of Cindy Crawford and the page became, briefly, insanely popular in the way these things get popular to 30 seconds on the Internet. I am putting this one up today. It is just an amusement. I am dynamically pulling photos from the "Interesting Photos" bucket of a certain web site. That is why the session start up is slow. I thought, before I started the series of inevitable re-designs and fixes, that I would just put it up first.

Is it possible to build an application so small that there are no obvious design enhancements? I think not.

To Do:
- document design of said silly game
- fix app to get pictures for session more quickly
- could WOHTTPConnection be any more lame? Probably not.
- various clever things, etc, etc, etc, and so on.

Wednesday, March 28, 2007

RSLD? A Really Simple Linux Deployment for WebObjects

I was expecting this to be much harder than it was. I read some of the pages out there on getting WebObjects installed onto Linux systems and looking at them just made my eyes cross. WebObjects is just java, isn't it?

I think the hardest part of this whole process was getting the right version of java onto the Linux box. I started with a RedHat-based system with java 1.4 as the default. Getting 1.5 onto it was a bit of a chore. Mac OS X just, you know, has stuff on it already. The Darwin ports stuff is there for other things. But a lot of things are just not that hard. Ok, working 15+ years at Apple may have given me a bit too much familiarity with it, but I doubt it.

Linux is just quirky. It can be nice. But it can also be deeply frustrating.

But, surprisingly, getting WebObjects to work on Linux was not hard.

First, I went to the /System/Library/Frameworks directory on my Mac. Then I just tarred up the Java* frameworks (sans JavaVM and such). Then I ftp-ed them over, created a /System/Library/Frameworks directory on the Linux system and slammed them down.

Then there was the question of what to do about a WOAdaptor. I tend to delete my /Developer/Examples contents on my various systems, so I could not put my hands on the adaptor sources. But then I realized I might not need them. I am not deploying huge apps. Not building a business on it yet. I just wanted to stop trying to deploy WO apps from my laptop.

I had started up my app by doing:
./myApp -WOPort 55555 &

So, I added some lines to the /etc/httpd/conf/httpf.conf file:

ProxyRequests Off
ProxyPass /cgi-bin/WebObjects/myApp.woa http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPass /WebObjects/myApp.woa http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPass /WebObjects/myApp/ http://myHost:55555/cgi-bin/WebObjects/myApp.woa
ProxyPassReverse /cgi-bin/WebObjects/myApp.woa/ http://myHost:55555/cgi-bin/WebObjects/myApp.woa/

And it just worked! Sweet. Wait. Hold on a second. I know what you are going to ask. "Does Apple support this?" OMG, I had not thought of that! Do they? Well, you know what. I do not care whether they support it or not! So, do not ask!


Friday, February 23, 2007

WebObjects 5.3.3 A Quick First Look

Well, I just wanted to see if there was something other than the DST stuff in here. There does not seem to be much. But that is to be expected.

I did notice that, even though this is an update, it looks pretty much like a complete install. I did not do a thorough check yet and your system may be different than mine, but it looks to me as though the changes are:





I am not worried about any of these removals. The JavaPlaybackManager still works in command-line mode, so it may be a good idea to put a copy aside before the install deletes it. Unless you have other tools for recording and testing sessions against your apps.

What systems could this go on? I would only point out two things.

First, it looks like a complete install to me. I have not finished checking, but that is my initial guess.

Second, you can get the pkg from Software Update by using the softwareupdate command-line tool. See the man page for details. Then, in the .pkg, there is a file: /Library/Packages/WebObjects5.3.3Update.pkg/Contents/WebObjects5.3.3Update.dist
There are javascript functions in there with names like checkIfTiger(), checkNotAlreadyInstalled(), and so on. Those functions check things and return true or false. The file could be modified so it returns, for example, true. Then, if you asked if you would be able to do an install, the answer would be yes.