Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Brand new app seeks to do AJAX GUI! Which tool today?

by sundialsvc4 (Abbot)
on Dec 19, 2008 at 20:30 UTC ( [id://731654]=perlquestion: print w/replies, xml ) Need Help??

sundialsvc4 has asked for the wisdom of the Perl Monks concerning the following question:

Wow! I get to do something that oh-so rarely happens:   I get to design a new application entirely from scratch.

But I have well less than a month to do it.

I would strongly like to use JavaScript form-tools such as extjs through its corresponding support in Perl's (Catalyst's) FormFu support. I think this would be the most reasonable and most frequently used front-end, especially for the inward-facing-only administrative interface.

Questions (and humble petitions to those possessed of Wisdom and Experience ... “show me your scars!”):

  1. Is there a better library that I should be using?
  2. Are there rugged examples within CPAN that demonstrate this?
  3. How does one best handle the possibility of (a school having...) an older browser and/or JavaScript turned off)?

In my case, for your kind responses you can assume that I have strong familiarity with both Catalyst and JavaScript...

Replies are listed 'Best First'.
Re: Brand new app seeks to do AJAX GUI! Which tool today?
by ww (Archbishop) on Dec 19, 2008 at 22:20 UTC

    Scars?

    Gaping, open, unhealing wounds!

    Build a second ap of equal capabilities without using js, and ensure that the first emphatically refers the JavaScript-less user to the second.

    If, as your question three acknowledges, there is any class of customers/clients who may not be able to use your js version, then hard reality is likely to ensure that the members of that class will be the make-or-break demographic for the ap.

    That said, you haven't given us much to go on about the target audience, nor about the required capabilities of the ap, nor clear rationale for using js. Have you satisfied yourself that these and other parameters actually dictate use of a technology tarred by widespread misunderstanding of its hazards? Have you satisfied yourself that using js is really necessary or desireable.

    Just as it's said that "Hope is not a plan" so it might be said that "'I wanna' do it that way' is not sufficient justification for doing so" ...at least, not when a job, profit or the utility of the product is compromised.

      Goverment regulations mandate accessibility, javascript is not part of that spec.
Re: Brand new app seeks to do AJAX GUI! Which tool today?
by jeffa (Bishop) on Dec 19, 2008 at 21:01 UTC

    I can give some insight into #1. Prototype is certainly the JS library of choice when putting together AJAX driven GUI's ... but don't overlook Yahoo's YUI ... especially their Browser History Manager. Also, watch out for using $() and GetElementById() in IE -- they can be painfully slow. As for #3 -- i either say Javascript all the way or not at all. You need to understand your audience and give them the best choice. Otherwise you might end up making 2 sites (apps, etc.).

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      I agree with jeffa almost wholeheartedly. My only other suggestion would be to try out the dojo family of tools. They provide a really comfortable level of abstraction which encourages reuse and fast prototyping, however I think that to get the full benefit you need to "drink the kool-aid" and honestly, it can be a lot of kool-aid. :)
Re: Brand new app seeks to do AJAX GUI! Which tool today?
by agent00013 (Pilgrim) on Dec 20, 2008 at 02:56 UTC
    As for JavaScript, I agree with jeffa: Prototype + Scriptaculous is the way to go. I've been using it to build the front-end on a Perl site and it can do a lot.

    Prototype handles Ajax requests well and you can provide a lot of useful functionality by using its utility methods such as $(). Scriptaculous helps with visual effects (i.e. drag & drop.) The documentation isn't as full as I'd like, but you can find most of what you need by searching the web.

    As for browser support, Prototype is compatible with IE6+, Firefox, Chrome, Opera, and Safari. I haven't had trouble with any of the Ajax calls. The only situation where it would be a problem is if somebody has JavaScript turned completely off.

    On the Perl side, the JSON module works quite well for parsing JSON parameters passed through by the client, and you can create and return a JSON response.


    "I'm in love with love and lousy poetry." - The Weakerthans
Re: Brand new app seeks to do AJAX GUI! Which tool today? (Just saying...)
by Your Mother (Archbishop) on Dec 20, 2008 at 08:45 UTC

    Results 1 - 13 of 13 for "mootools sucks". (0.22 seconds)

    Results 1 - 42 of 42 for "jquery sucks". (0.19 seconds)

    Results 1 - 40 of 40 for "ext sucks". (0.25 seconds) + Results 1 - 3 of 3 for "ext js sucks". (0.21 seconds)

    Results 1 - 47 of 47 for "dojo sucks". (0.23 seconds)

    Results 1 - 59 of 59 for "yui sucks". (0.18 seconds)

    Results 1 - 100 of about 326 for "prototype sucks". (0.12 seconds)

    jQuery is *extremely* sweet in syntax, simplicity, power, and "fit" for XHTML/CSS/DOM. That said, its UI suite is not mature and it has missing pieces like combo boxes. For my own part I still pick it because it's so easy to do things yourself, like combo boxes; which I've done and forgotten already because it was a two hour exercise.

    Ext is awfully powerful and pretty out of the box. It's also *huge* and many of its pieces are not designed with degradability in mind; its form objects do not plug-into existing forms; they write forms. Not cool. Though the FormFu plugin might be able to do both which could be really neat. YUI is a lot like Ext which is a fork from it but not as powerful or well designed.

    I've never used Prototype but I've heard it's not so hot from devs I respect. Earlier versions of dojo were dog barf and had zero documentation. dragonchild has pointed out that the current version is quite nice but I have scars from a legacy app built with an early version (which version was a mystery for quite awhile as the devs didn't even think it was necessary to include a version number anywhere in the code; sigh) and I haven't forgiven the kit yet.

    Update: Ext has dual licensing. If your code is OS, it's free. If your code is closed, you have to buy dev licenses.

Re: Brand new app seeks to do AJAX GUI! Which tool today?
by /dev/urandom (Beadle) on Dec 21, 2008 at 17:18 UTC
    I was in the same situation about 2 years ago, when I had to build a new component for a massive(ly old) web app. Instead of keeping with current practice (of placing thousands upon thousands of html as strings inside the perl code), I made a toolkit-like library (think gtk+ but for html), which used the popular (and then only) prototypejs.

    I don't know if it's better than Catalyst, but it's certainly different, and you are more than welcome to take a quick look at it on CPAN.

    I've also put it to use on my page, though it only a 30min job, if you want to see it in action.
      Any opinions or recommendations about mootools? Would you recommend to use it together with the catalyst framework? Or use it at all?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://731654]
Approved by ikegami
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-03-28 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found