Michael Jouravlev wrote:
If this "not caring about any of that" is anything like ASP.NET
coding, that this is not exactly true. Like, in ASP.NET there is a
well-defined lifecycle. But if you (well, me) wants to get rid of
POSTDATA situation, you need to call Response.redirect explicitly from
event handler. And in this case you (ahem, me) cannot use default
viewstate management. Of course, one could care less about that stuff
as many do and think that the framework indeed allows you "not care
about any of that".
I think your right about the POSTDATA situation... although I'm not
sure, WW might handle that too... I'm just learning, same as you :)
Take a look at page 103... note that when you call
ActionContext.getContext().getSession(), what you get back is a Map, not
an HttpSession. That's really all I was referring to, the fact that
your abstracted away from the servlet API. Also look at:
http://www.opensymphony.com/webwork/api/com/opensymphony/xwork/ActionContext.html
Note that the same is true of getParameters()... again, not tied to the
servlet API.
Expand your
view though and the benefit becomes fairly obvious... a company that can
change from a web-based application to a fat client, or vice versa,
quickly and easily, without touching the "core" of the application, is
highly agile, and more likely to succeed.
>
Come on, how many companies do that? Nothing is more eternal than
temporary, or how do they say. In my friend's company they still use
Dbase 3 for DOS applications just because stuff works.
I think a lot more do than you realize. I know that I have some friends
in larger organizations where it's very prevalent (even though it isn't
yet in my company... although, we have been moving towards it over
time). Bigger organizations tend to do it more, as you might logically
expect.
But, put that question aside for a moment... even if not many at all did
it, most people these days agree it's better that way because you get
people with certain domains of expertise working in the areas they are
best at. I think you would agree that most coders aren't the best
graphics artist, right? I know there's exceptions, and maybe your even
one of them!, but I think its a fair generality. Why shouldn't it be
true? We went to school to learn algorithms and data structures, not
content flow, layout balance and color motifs! Let those folks do their
jobs, and let us do ours. In that regard, the framework we use to build
our applications should encourage that, no?
Do you mean by building DispatchCommand or DialogCommand? And then
slapping this command onto the chain... but I can replace Action as
well. Oh I see, Action is not an interface, but Command is. Always
keep forgetting this. I will think about it. Thanks!
Pretty much, yes (although I don't know the precise details of how you'd
implement your work in the chain, I just very much suspect it's almost
trivial). It's less about a Command being an interface though and more
about the fact that there is an infrastructure that allows you to add
steps to the processing chain with ease. You used to have to do this by
either subclassing the RP or Action, or maybe other things. Now, you
just write a simple Command and modify the chain. It's one of those
incredibly simple and obvious things that leads to great power :)
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]