[Cialug] java web toolkits
Matthew Nuzum
newz at bearfruit.org
Wed Dec 12 10:10:24 CST 2007
On Dec 12, 2007 9:37 AM, <carl-olsen at mchsi.com> wrote:
> I would not use a framework for this unless I had other reasons for using
> a framework. I'm playing with symfony right now, but it will not run inside
> the CMS I have to integrate it with. I'm using the ORM part of symfony to
> create my PHP objects, which is definitely a big advantage.
>
> Carl
>
Well, there are js only frameworks too. For Ubuntu.com I use mootools, but
jquery is similar (and more data focused, where moo is more visual/effect
focused). These libraries are relatively lightweight if you don't include
all the bells and whistles. They make loading json (or whatever) extremely
simple. Other benefits include simplifying your usual JS code. In moo I do
something like this to track external links:
$$("a[href^='http://']").each(function(link) {
link.addEvent('click', [code to do onclick])
}
That gets all the "A" tags that have an href that matches the regex ^http://
and *adds* (not replaces) an onclick function to them.
Ajax is as simple as:
window.addEvent('domready', function() {
xhr.request().chain(selectmirror);
})
var selectmirror = function () {
[deal with the json/xml]
}
However, learning the framework is a chore that you have to accomplish in
order to get the maximum benefit. So the upfront cost is high but the payoff
is long term.
--
Matthew Nuzum
newz2000 on freenode
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20071212/1a3a4383/attachment.htm
More information about the Cialug
mailing list