Re: Any tutorials on using direct actions and/or component actions with AJAX
Re: Any tutorials on using direct actions and/or component actions with AJAX
- Subject: Re: Any tutorials on using direct actions and/or component actions with AJAX
- From: Chuck Hill <email@hidden>
- Date: Thu, 3 Jan 2008 13:42:38 -0800
On Jan 3, 2008, at 1:15 PM, David den Boer wrote:
I for one would never use the Wonder Ajax framework, even though I
think it is excellent. My reasons are twofold :
- Wonder
- Prototype/Scriptaculous
We won't use Wonder because we have an excellent base of frameworks
we developed over the years which has much functionality not in
Wonder.
I am curious about that statement. We (GVC) also have an excellent
base of frameworks we developed over the years which has much
functionality not in Wonder. We use them _and_ we use Wonder. In
the same applications and frameworks. While there is some functional
duplication and alternative implementations, Wonder has much
functionality not in our frameworks. This is not the old, invasive,
Wonder. Anjo taught it some manners and there is very little scope
for conflicts with other frameworks now.
We will never use Prototype/Scriptaculous because they are massive,
even gzipped and minimized. We still have users on slower
connections, on machines with no proxy or cache, and downloading
200k+ of javascript is not acceptable. Our page sizes are all under
80k, with most under 30k. Our javascript tops out at 32k.
I won't dispute that problem.
So, if you wish to do WO/Ajax with direct actions, it is quite easy
as was previously stated.
If you want to use component actions, it gets more difficult, and
requires a little digging into WO internals to understand it all,
but it is possible, and we are using it heavily in one of our apps.
What we have done is create our own WODynamicElement subclasses for
ajax. We have ajax hyperlinks, forms, data-tables, etc. The key
piece of this is that instead of using the component action request
handler you use the ajaxRequestHandler
protected void appendAjaxActionURLToResponse(WOResponse iResponse,
WOContext iContext, boolean iEscapeHTML) {
String aUrl = iContext.componentActionURL
(WOApplication.application().ajaxRequestHandlerKey());
iResponse.appendContentString(aUrl);
}
Hope this helps a bit.
I think you would find that the AjaxRequestHandler and supporting
code in WO 5.4 bears a strong resemblance to the code in Wonder.... ;-)
Chuck
On Dec 27, 2007, at 4:48 PM, Christopher Roach wrote:
Hi Chuck,
Thanks for the input, but I thought I should clarify my reasons
for wanting to learn Ajax and WO sans libraries and for not using
Project Wonder in my apps. My reason for wanting to learn how to
do the Ajax and WO stuff by hand is that I am brand new to both
and I like to learn how things work before I feel comforable using
them. I agree that to get things done I need to be using a well
tested/established set of libraries and I will be doing so in my
professional work, but in my spare time I want to learn how it all
ticks behind the magic. Just like when I learned to program, I
learned my first language and used it for two years while I worked
my way through a pair of undergrad and grad classes in compiler
construction and language design. Once I had written my first
language I felt like I understood programming in general better,
so I would like to do the same with MVC based web frameworks and
Ajax.
Now, as for why I'm not using Project Wonder, well that's not
really my choice. The company I work for has a very mature library
for Ajax that they are using for all of their projects and I have
to use that in my day-to-day development.
So, I hope that clears up why I'm not using Wonder (I would if I
could) and why I want to learn everything at the lowest level.
Again, thanks for all your input, it has been very helpful.
Christopher Roach
On Dec 27, 2007, at 2:25 PM, Chuck Hill <email@hidden>
wrote:
On Dec 27, 2007, at 7:58 AM, Christopher Roach wrote:
Hi Jean Pierre,
I looked into Project Wonder at one time, but we can't use it in-
house for our work
I will point out that this is probably the worst possible
decision you can make with respect to using WO. Given the very,
very liberal license (use whatever you want, however you want)
and the availability of source, there is no sane reason to not
use Wonder. Without Wonder you condemn your project to unfixed
bugs in WO and a MASSIVE amount of code that will need to be
written. Wonder saves time and produces better code each and
every day that you use it.
, so I've mainly stayed away from it for that reason. Also,
what I'm really looking for are some simple examples that would
show me how to do everything from scratch (I.e., no Javascript
libraries or WO libraries) so that I can get a good feel for how
these technologies work together before using a library for my
day-to-day work.
While I applaud your desire to know how things work, just use the
Ajax framework from Wonder. It makes Ajax work the WO way. Mike
et al put a TON of "under the covers" work into this. You really
don't want to have to duplicate that level of knowledge and
understanding. And if you don't, what you come up with will be
substandard. I don't see any business value in that. You can
learn how things works gradually, later as you need to integrate
third party Ajax things into your project (and hopefully into
Wonder).
Chuck
You wouldn't happen to know of any good resources that would fit
that bill would you?
Thanks for the suggestion though, I really appreciate it.
Christopher Roach
On Dec 27, 2007, at 8:11 AM, Jean Pierre Malrieu
<email@hidden> wrote:
Project Wonder provides a very good integration of AJAX
(scriptaculous + prototype) with WebObjects.
To get started, see what is available:
http://www.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa
Then download source code for the Ajax examples from mdimension
site and take a look at how the examples are implemented.
That should get you started.
JPM
Hey all,
I was wondering if anyone knew of any tutorials or simple
examples of
how to use AJAX with WebObjects. From what I've read so far,
it looks
like direct actions will be used if you want to do any type of
AJAX
work, but I've also seen mention of project Wonder using
component
actions to implement its AJAX components and I would love it if I
could find a simple tutorial that showed how to do this.
Thanks for any input you can give me.
Cheers,
Christoper
--
Christopher Roach
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden