IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: WebObjects Answers
The main loop looks like:
Right... I knew all that. What I was asking was what are the best practices for outputting XML one time, and maybe HTML the next, from the same set of objects. Or is it just best to use a different page/set of components against the same business objects?

We developed components that automatically internationalized stuff.
OK, this sounds very, very similar to what I did with J2EE.

but you don't have session information (obviously) in a direct action.
That's the issue. I'm not sure why they didn't just store a single session/context ID in a cookie and map everything back at the beginning of the response loop, instead of those goofy URLs. Usually URLs like that are used only as a fallback if cookies aren't enabled.

I guess I could write the entire thing as direct actions, store my own session info by user ID in the application, and go from there. Seems to me that I'd be losing a good deal of the benefits of using the framework in the first place, though.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New DirectActions
What you could do is write *one* direct action that pulls out your own sessionId from the cookie, then forwards the request to the right session - basically taking over Application's job of looking up the session in the direct action. Certainly doable.

I tend to only keep a session for a logical unit of work/transaction. So you start with a direct action - pick what you want to do - use the session to manage state while you build up your unit of work, on commit I return a directAction which essentially abandons their old session (you can call sesssion terminate to kill it right away) and gets them out of stateful mode. This seems to work the best.




I think that it's extraordinarily important that we in computer science keep fun in computing. When it started out, it was an awful lot of fun. Of course, the paying customer got shafted every now and then, and after a while we began to take their complaints seriously. We began to feel as if we really were responsible for the successful, error-free perfect use of these machines. I don't think we are. I think we're responsible for stretching them, setting them off in new directions, and keeping fun in the house. I hope the field of computer science never loses its sense of fun. Above all, I hope we don't become missionaries. Don't feel as if you're Bible salesmen. The world has too many of those already. What you know about computing other people will learn. Don't feel as if the key to successful computing is only in your hands. What's in your hands, I think and hope, is intelligence: the ability to see the machine as more than when you were first led up to it, that you can make it more.

--Alan Perlis
Expand Edited by tuberculosis Aug. 21, 2007, 05:39:54 AM EDT
New That makes more sense.
Thanks.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     WebObjects questions - (admin) - (4)
         WebObjects Answers - (tuberculosis) - (3)
             Re: WebObjects Answers - (admin) - (2)
                 DirectActions - (tuberculosis) - (1)
                     That makes more sense. - (admin)

And so on, and so forth.
87 ms