On 24-10-2008 at 20:07, Marcus wrote:
>
> The next great feature I'm thinking about in Stripes is ability to make site
> work with or without ajax, without the need to change templates. Different
> methods inside action bean is ok, just be sure that no changes in templates
> are
> needed for it.
>
> If browser doesn't supports AJAX, then pressing submit button will show naked
>
> form page with errors or just naked People page. Naked means without included
> into layout. Or if Form page was called directly
> (http://localhost:8080/DemoSite/form/)
> then display not "naked" form page, but form page included into some layout
>
> I'm not sure if it is possible, but it would be really great.
In one way it's possible: design your pages using progressive enhancement.
http://en.wikipedia.org/wiki/Progressive_enhancement
Pro:
- The site works with and without AJAX, flash, applets, images, etc.
It will even work in lynx.
Con:
- No full-AJAX input validation unless it's both in AJAX and upon submit
(but as a hacker can override the AJAX-verified results, you'll want this
anyway).
- Tricky to do the first time, just like correctly separating content and
layout via CSS.
One way to use progressive enhancement is this:
To start, design your pages without any concern for layout, scripts, images,
colors, etc. Just the bare bones HTML functionality as is was before images
came around. This will give you a fully functional application, even if it
looks like [...].
After that, add CSS to get your preferred layout, colors, etc.
Then, add flash, applets or other embedded objects, and display an image
(with alt text) for browsers that don't support it. This yields your
preferred content, or an image if not supported, or text if even that is not
supported.
Your application now looks (a lot) better but is still fully functional.
Last, you can add scripts. For example the AJAX dropdowns, etc. that make
using your application easier. Be sure though, not to add functionality: once
you do that, AJAX is required to make your application work.
Oscar
--
,-_ Progress is made by lazy men looking for easier ways to do
/() ) things.
(__ (
=/ () -- Robert Heinlein
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users