From: Avi Bryant Date: 2001-05-08T09:48:16+09:00 Subject: [ruby-talk:14834] Re: Ruby and Web Applications On 08 May 2001 00:39:30 +0100 MJ Ray wrote: > Avi Bryant writes: > > > No, it's not, and no, that's not how IOWA works. [...] > > IOWA doesn't work. At least, not here with an old stable ruby and no > Apache. I don't know what the differences are between ruby 1.4 and the current stable snapshot, but if upgrading to something more recent is impossible for you I'm happy to try to figure out what's necessary to make it work, including working without Apache... > > More accurate might be: > > Data Objects Formatting Data > > | ^ | ^ > > v | v | > > Logic object <----> Layout objects ---> Response ---> Browser > > ^ | > > | v > > Logic object <---- Layout objects <---- Request <--- User > > How many times are the objects created? Once per page read or once > per user-page call? The layout objects are created once per page read. They are recreated if the template changes. The "logic objects", in your terminology, are created roughly once per user session, although they may be snapshotted to aid backtracking. > What's the internal state like? Each session keeps a cache of page components (logic objects) which contain the state for a particular page, and may have references to other data objects. A request (ie, a form submit) is processed by the same object that originated it (ie, created the form). > Shouldn't that > lower one be "request handler" rather than "layout objects"? No... the communication between the data and the layout is two-way - if I bind a piece of data to a text input, changes to either one will affect the other, so the request is processed by the layout objects, which in turn modify the data. This is pretty crucial - requests and response need to be processed by the same objects to keep things flexible and loosely coupled. > How > pluggable are the objects and what format does the data move around > internally in? Hmm... not sure exactly how to answer either of these questions. If you're interested in the architecture, it was strongly influenced by Apple's WebObjects - you might look at the documentation for that (eg, http://developer.apple.com/techpubs/webobjects/System/Documentation/Developer/WebObjects/DevGuide/DevGuideTOC.html).