Child pages
  • Alternative Technologies-Ruby on Rails

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Pierce T. Wetter III

Myth: Rails is a better framework for Ajax than WO.

Reality: WebObjects is actually a better framework for use with Ajax libraries than Rails because it has a better component system than Rails. You spend a lot of time coding little tiny XML and HTML generators when doing Ajax and WO's component system makes that very DRY (Don't Repeat Yourself).

Myth: WebObjects is hard to use with Ajax.

Reality: WebObjects is easy to use with Ajax, it's just that there is only one known library for Ajax-WO support, and its not well documented. Even then the library only goes so far in that it just provides new components to wrap a few tags. I think its more of a documentation gap, not a code gap.


Which is to say, if you avoid much of the power of WO, and don't use component actions, ajax will be easier. If you do use component actions - and I have yet to work on a project that doesn't - then ajax use seems like it will blow your page cache, as described below. So it really is easy to use AJAX in WO. Really easy. It's just that it doesn't work.

Wiki Markup
_\[mschrag: While I agree with the above commenter that component actions provide a huge amount of power in WO, it is NOT true that Ajax and component actions are incompatible._ _[_Project Wonder's Ajax components_|Programming__WebObjects-Project_WONDER-Frameworks-Ajax]_ _directly addresses the use of component actions with Ajax in a way that does NOT blow the page cache.  While it is true that the implementation of these capabilities inside of Wonder was non-trivial, it demonstrates that it is, in fact, possible, and if you use the PW components along with ERXSession, you will get this capability for free.\]_

Myth: You can't assign the name or id value of tags in WebObjects.

I'm mentioning this one explicitly, because I had someone ask me about this recently, because they were trying to assign a WYSIWYG JavaScript editor to a text area.


in your .wod file and you can use id with your Javascript just fine.

Myth: WebObjects generates HTML

Reality: Just because the components of your .wo file are .html and .wod doesn't mean WebObjects can only generate HTML. WebObjects is really at heart, a very, very, very, complicated printf. The result of a component can be HTML, XML, JavaScript, or even binary data. You can actually put whatever you want in the .HTML and treat WebObjects like a giant merge engine. For instance, you could generate PDF files using WebObjects; they're just text, and you could substitute text into the middle of the PDF boilerplate pretty easily.


We haven't used a lot of JavaScript at, for a very simple reason: We don't have the testing staff to fire up 10 different browser variations to test the site. And lets face it, programming in JavaScript sucks.


Which means I can make the site much easier to use and more interactive. Huzzah!


So the first thing I did was that I'd heard that Rails was cool and made Ajax easy. I'd heard that before, but that was when the version number was 0.13... So I went out and bought the Rails books and you know what I found?


I also think, that from this example, dojo is a bit weak as a Javascript toolkit. You'll spend a lot of time wiring stuff up in Javascript with Dojo compared to Prototype. Or contrast dojo with the Yahoo UI library: Removed

The whole "Dialog" thing in yui is cool: Removed

And would lend itself quite readily to the model WO has of building pages out of pieces.


So exactly what problems are you having with dojo/wo? Consider that the problem may be dojo, not WO in particular. You could easily create a WODynamicElement for every new dojo tag, collect them in components, and have something much easier to use than straight dojo.Category:WebObjects