Hi sam, > AFAIK prototype require more code than jquery and is generally not > unobtrusive, I may be > wrong about this
Prototype maybe or maybe not obstrusive. The same with jquery. Cake's implementation is a little obtrusive, but i heard something about 1.2 being totally different. > and now that jquery 1.1.1 is out its more compact than before and faster than > it was > also there is the interface lib for jquery which is I think fully featured. Total lie :) it's bigger than before (8KB more, in the compressed version, going 20KB) interface 1.1.2 is 100KB uncompressed , but it's pretty modular (you might use only 4 or five modules: to use sortables, for instance, it's 20KB). If you use the very same compressor to Prototype, it goes to 30KB, and scriptaculous lib , if I remember correctly, 40KB, complete (it has bigger modules, though) About speed, it's harder to tell, but i'm having a VERY hard time to optimize Interface's sortable, drop for a very complex layout with many items to be sorted: it was taking about 12 seconds to START a drag. After messing around, it went to less than one second. And the sortables DO NOT work with tables, If you need, you must go to scriptaculous (don't know about dojo, yui) > It much easier to learn and code than prototype (IMHO) - and the jquery list > is very active. Yes, there was a big difference here. But now, prototype crew woke up and set a docs site, started writing stuff for non-hardcore programmers, a better release cycle, but i'm not sure about the prototype mailing list. And it's faster to learn prototype, indeed, although it's not as powerful as prototype. But we never need that power, do we ? :D > For instance in cakePHP 1.2 I am finding some issues with using the paginator > helper > since it has code for prototype built in. With jquery this is not needed Since it's not even a DEV release, cake 1.2 , and you found a bug (an issue ? :) , please report it :] > as you attach events to elements via classname or ids foreinstance. I have a > jLink class > which I use to change the content of a page. Below is the jQuery code that > attaches the > binds the code to anchors with prototype works in the same way even before jquery's first release. the code maybe a little more verbose, but just a few lines. // <a id="clicker" href="http://foo.com">Click me</a> Event.observe('clicker', 'click', functionName); if you are not using IDs, you may do it this way $$('div#page a.jLink').each( Event.observe(this, 'click', functionName); ); http://ajaxian.com/archives/prototype-adds-css-selector-function-divpage-psummary-img (january 18th, 2006) I'm a big fan of jquery's pragmatism, but it's not a medicine for everything, be aware of that ;) And question everything you hear. always. Spark On 2/8/07, Sam Sherlock <[EMAIL PROTECTED]> wrote: > Hi fredBH, > > I find jquery much easier to use and code than prototype (actually I never > did make > any real progress with prototype) > > Having said that the use of prototype is more widespread than jquery, and so > there are more tutorials for prototype. > > heres some tutorials that I have found useful in the past > http://docs.jquery.com/Tutorials > http://15daysofjquery.com/category/tutorials/ > http://dzone.com/rsslinks/the_10_minute_jquery_tutorial.html > > AFAIK prototype require more code than jquery and is generally not > unobtrusive, I may be wrong about this > > and now that jquery 1.1.1 is out its more compact than before and faster > than it was > also there is the interface lib for jquery which is I think fully featured. > > It much easier to learn and code than prototype (IMHO) - and the jquery list > is very active. > > For instance in cakePHP 1.2 I am finding some issues with using the > paginator helper since it has code for prototype built in. With jquery this > is not needed > > as you attach events to elements via classname or ids foreinstance. I have > a jLink class which I use to change the content of a page. Below is the > jQuery code that attaches the binds the code to anchors with > > // jLink - now add events > $("a.jLink").click(function(event) { > > event.stopPropagation (); > > event.preventDefault(); > > > jLinkCall(this.href); > }); > // ### Begin jLink Events ### > > function jLinkCall(jHref) > { > > // extract the id from this.href > var htmlDoc = new String(jHref); > > // CODE TO PROCESS THE HREF {WHATEVER YOU NEED TO DO} > ... > > // SLIDE UP THE MAIN DIV > $("div#main").slideUp("fast").empty(); > > // REQUEST JSON CONTENT > $.getJSON("/articles/data/" + htmlDoc,params,function(json) { > // debug in firebug > console.debug(json); > ); > } // END jLinkCall() > > in the time it has taken me to prepare this others have shed some light. > > I will be looking in to this information which I will be looking into > myself. > > bake on !! > > > On 08/02/07, fredBH <[EMAIL PROTECTED]> wrote: > > > > hi everyone! > > > > im going to start develop and im see some guys using jquery... others > > using normal ajax cake prototype... and i just wanna know what the > > diference of them... > > I had searched about jquery but i dont understand how can it change > > about ajax call from Prototype... > > > > Can someone help showing me what do some uses jquery e some uses > > Prototype ? > > Articles... Tutorials... anything helpfull... > > > > Thx a lot guys > > bye -- [web] http://synapsisdi.com.br [livesets] http://djspark.com.br/mp3 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
