You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rick Reumann <st...@reumann.net> on 2005/05/02 16:41:56 UTC

Use of Javascript [was] Re: AJAX: Whoa, Nellie!

Jesse Alexander (KBSA 21) wrote the following on 4/19/2005 5:30 AM:

> I also think that a well-designed web-UI does not need JS at all...

Sorry to jump on the train late, but the above is completely BS. If you 
want to use standard HTML, then there will be some things you will HAVE 
to do with Javascript or else without its use, just the opposite would 
be true, you'd have a totally CRAPPY-designed UI.

I'll give you an example. In quick summary, this application has to have 
the user select various checkboxes in a tree-list structure and as they 
select various checkboxes different lines need to change color (turn to 
gray for example to show that inheritance is implied). Not only that, 
but based on whether a certain checkbox is selected in a row a date div 
box needs to become enabled and visible. The bottom line is if you do 
not use javascript you'd have to go to the server for everything 
creating a completely unsatisfactory user experience. The users should 
be able to click all over the place without having to wait for the 
server to respond each time. Even if you wanted to go to the server for 
every single possible checkbox click, how could you even do that without 
some javascript? Tell me how you can design a good UI that does not 
involve javascript for this application (other than saying use Flash or 
some other font end presentation). Bottom line is any somewhat complex 
UI for a company will have to involve the use of some javascript.

If you disgree than I'll send screen shots of various internal 
applications I have to code and you tell me how you can get around not 
using Javascript?  I could just look around on the web and give examples 
where you'd need javascript. Think of cases where on a form you select 
one option from a drop down and the other list needs to change. Even if 
you go to the server to repopulate the other list (which I like to do), 
it still requires and onChange event on the initial drop down list to 
fire off the submit.  How do you do this without javascript? - create a 
walk-through UI design? That would be completely unacceptable under a 
lot of circumstances.

-- 
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Use of Javascript [was] Re: AJAX: Whoa, Nellie!

Posted by Craig McClanahan <cr...@gmail.com>.
On 5/2/05, Sergey Livanov <Se...@ukrpost.net> wrote:
> 
> I liked the smartclient technology very much! It's great!
> Just wondering if there will be a similar possibility in
> Java Server Faces?
> Can I combine the capabilities of JSF and AJAX ?

Yes.

The general idea is that you encapsulate the creation of your
Javascript and template code (or links to corresponding resource
files) into a JavaServer Faces component, which the developer can
incorporate on their page just like any other component.  On the
client side, the rendered code would do XmlHttpRequest transactions
with the host, using whatever your favorite binding technology is
(dojo, dwr, ...).

I know of several commercial libraries that already do this sort of
thing (jsfcentral.com is a good starting place for pointers).

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Use of Javascript [was] Re: AJAX: Whoa, Nellie!

Posted by Sergey Livanov <Se...@ukrpost.net>.
I liked the smartclient technology very much! It's great!
Just wondering if there will be a similar possibility in
Java Server Faces?
Can I combine the capabilities of JSF and AJAX ?


RR> Jesse Alexander (KBSA 21) wrote the following on 4/19/2005 5:30 AM:

>> I also think that a well-designed web-UI does not need JS at all...

RR> Sorry to jump on the train late, but the above is completely BS. If you 
RR> want to use standard HTML, then there will be some things you will HAVE 
RR> to do with Javascript or else without its use, just the opposite would 
RR> be true, you'd have a totally CRAPPY-designed UI.

RR> I'll give you an example. In quick summary, this application has to have 
RR> the user select various checkboxes in a tree-list structure and as they 
RR> select various checkboxes different lines need to change color (turn to 
RR> gray for example to show that inheritance is implied). Not only that, 
RR> but based on whether a certain checkbox is selected in a row a date div 
RR> box needs to become enabled and visible. The bottom line is if you do 
RR> not use javascript you'd have to go to the server for everything 
RR> creating a completely unsatisfactory user experience. The users should 
RR> be able to click all over the place without having to wait for the 
RR> server to respond each time. Even if you wanted to go to the server for 
RR> every single possible checkbox click, how could you even do that without 
RR> some javascript? Tell me how you can design a good UI that does not 
RR> involve javascript for this application (other than saying use Flash or 
RR> some other font end presentation). Bottom line is any somewhat complex 
RR> UI for a company will have to involve the use of some javascript.

RR> If you disgree than I'll send screen shots of various internal 
RR> applications I have to code and you tell me how you can get around not 
RR> using Javascript?  I could just look around on the web and give examples 
RR> where you'd need javascript. Think of cases where on a form you select 
RR> one option from a drop down and the other list needs to change. Even if 
RR> you go to the server to repopulate the other list (which I like to do), 
RR> it still requires and onChange event on the initial drop down list to 
RR> fire off the submit.  How do you do this without javascript? - create a 
RR> walk-through UI design? That would be completely unacceptable under a 
RR> lot of circumstances.

-- 
regards,
 Sergey                          mailto:Sergey.Livanov@ukrpost.net


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org