Google Groups Home
Help | Sign in
Prototype + lowpro vs. JQuery
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  23 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Tom Locke  
View profile
 More options 21 Jan, 13:57
From: Tom Locke <tabla...@googlemail.com>
Date: Mon, 21 Jan 2008 05:57:19 -0800 (PST)
Local: Mon 21 Jan 2008 13:57
Subject: Prototype + lowpro vs. JQuery
I hate to risk starting a my-framework-is-better-than-your-framework
thread, but I'd really like to here people's opinions on / experiences
with the merits of prototype + lowpro over other frameworks such as
JQuery that seem to be gaining some mind-share.

We've been bundling lowpro with Hobo for a while and are intending to
move towards "lowpro style" for all the client-side behaviour that
comes with Hobo.

At the same time I've always got half an eye on JQuery, and have been
getting increasingly tempted to at least give that option a try.

One thing that occurs to me is that I'd miss the nice rubyisms that I
get with prototype (e.g. little things like String#gsub)

Tom


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Burcham  
View profile
 More options 21 Jan, 19:26
From: "Bill Burcham" <bill.burc...@gmail.com>
Date: Mon, 21 Jan 2008 11:26:02 -0800
Local: Mon 21 Jan 2008 19:26
Subject: Re: Prototype + lowpro vs. JQuery

Well I respect PJ Hyatt (errtheblog.com) a lot and here's his experience w/
JQuery on a new app (famspam)
http://errtheblog.com/posts/73-the-jskinny-on-jquery

Here's my take from September:
http://meme-rocket.com/2007/09/07/agnostic-unobtrusive-javascript/ Short of
it is you need the livequery plugin if you want to do UJS on dynamic
content. And it is of course possible to use both prototype and JQuery
together.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile
 More options 21 Jan, 21:58
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Mon, 21 Jan 2008 13:58:04 -0800
Local: Mon 21 Jan 2008 21:58
Subject: Re: Prototype + lowpro vs. JQuery

It would be awesome to port the low pro syntax to JQuery. Now the thing is,
low pro is just a tiny abstraction layer above proto, in theory we should be
able to port the same layer to JQuery.

-Matt

--
            --------
http://railsontherun.com

On 1/21/08, Bill Burcham <bill.burc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Webb  
View profile
 More options 26 Jan, 03:22
From: "Dan Webb" <d...@danwebb.net>
Date: Sat, 26 Jan 2008 03:22:23 +0000
Local: Sat 26 Jan 2008 03:22
Subject: Re: Prototype + lowpro vs. JQuery
On 1/21/08, Matt Aimonetti <mattaimone...@gmail.com> wrote:

> It would be awesome to port the low pro syntax to JQuery. Now the thing is,
> low pro is just a tiny abstraction layer above proto, in theory we should be
> able to port the same layer to JQuery.

I've considered doing this myself.  Ive used both jquery and prototype
heavily in the past.  The reason I like prototype over jquery is that
prototype offers more general programming tools where as jquery is
just about dealing with the DOM.  Secondarily, in my experience, the
chaining idiom in jquery tempts people into writing some pretty
unreadable code.

However, jquery is really compact, very well documented and does its
job well so I can see the attraction so 10 minutes spend writing
behaviours on top of it would be well spent.  Ill see what I can come
up with.  Something like:

$('.date').attach(DatePicker, { opt1: 34 });

Would do the job, I can even bring over the inheritance stuff...and
the DOM builder.  I'll do it tomorrow morning if I have time.

Cheers for bringing this up...

--
Dan Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matt Aimonetti  
View profile
 More options 26 Jan, 03:38
From: "Matt Aimonetti" <mattaimone...@gmail.com>
Date: Fri, 25 Jan 2008 19:38:47 -0800
Local: Sat 26 Jan 2008 03:38
Subject: Re: Prototype + lowpro vs. JQuery

Wow, that would be awesome, I can't wait to give it a try. JQuery already
has livequery but it ain't as good as lowpro!

-Matt

On 1/25/08, Dan Webb <d...@danwebb.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Webb  
View profile
 More options 26 Jan, 10:04
From: "Dan Webb" <d...@danwebb.net>
Date: Sat, 26 Jan 2008 10:04:29 +0000
Local: Sat 26 Jan 2008 10:04
Subject: Re: Prototype + lowpro vs. JQuery
That's a point.  I'll make it use livequery if its present although
these days I don't really favour those kinds of solutions.  If I need
to work with a changing DOM I use event delegation.

I'll see what I can put together.

On 1/26/08, Matt Aimonetti <mattaimone...@gmail.com> wrote:

--
Dan Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Webb  
View profile
 More options 26 Jan, 14:30
From: "Dan Webb" <d...@danwebb.net>
Date: Sat, 26 Jan 2008 14:30:11 +0000
Local: Sat 26 Jan 2008 14:30
Subject: Re: Prototype + lowpro vs. JQuery
On 1/26/08, Dan Webb <d...@danwebb.net> wrote:

> I'll see what I can put together.

We'll I've made a start and I must stay it works really nicely with jQuery.

http://svn.danwebb.net/external/lowpro-jq/trunk

Warning:  I've literally just bashed this out so its not ready for
usage but you can get an idea of how it goes together by looking at:

http://svn.danwebb.net/external/lowpro-jq/trunk/test/test.html

But the rundown is...

Create a behavior as a class:

Testy = $.klass({
  initialize: function(arg) {
    alert('ive just been attached with the arg ' + arg);
  },
  onclick: function() {
    alert('ive been clicked');
  }

});

Btw, $.klass is a full port of the Prototype Class.create stuff so you
get that as a bonus and can use all the inheritance stuff in the same
way.

Then attach it on ready in the jQuery way:

jQuery(function($) {
  $('p').attach(Testy, 'My arg');

});

And that's it.  Works the same for this point on.

Another little bonus is that if you are running livequery it does some
magic and automagically attaches new instances of the behaviour
whenever the DOM is changed so for the above example if you
$(document.body).append('<p>Another para</p>') then it gets its own
behavior instance as well.

So, I think it needs some more bashing (and some unit tests) and I
think it would be good to ship with some behaviors like normal Low Pro
does.  Probably Remote and Observed...

What do ya'll think?  After sitting and coding it Im actually really
pleased with how it turned out.  It's much simpler than the Prototype
implementation and fits jquery's style a lot more.  I might defect :)

Cheers,

Dan

--
Dan Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Burcham  
View profile
 More options 26 Jan, 18:33
From: "Bill Burcham" <bill.burc...@gmail.com>
Date: Sat, 26 Jan 2008 10:33:20 -0800
Local: Sat 26 Jan 2008 18:33
Subject: Re: Prototype + lowpro vs. JQuery

I think it's awesome Dan. The last thing keeping me on the prototype stack
was lowpro. I'll probably miss prototype but JQuery documentation is so much
better and the add-ons are compelling enough. I'm moving. I'll write when I
get there…


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Ashton  
View profile
 More options 27 Jan, 00:09
From: "Graham Ashton" <graham.ash...@gmail.com>
Date: Sun, 27 Jan 2008 04:09:04 +0400
Local: Sun 27 Jan 2008 00:09
Subject: Re: Prototype + lowpro vs. JQuery
On 26/01/2008, Dan Webb <d...@danwebb.net> wrote:

>  What do ya'll think?  After sitting and coding it Im actually really
>  pleased with how it turned out.  It's much simpler than the Prototype
>  implementation and fits jquery's style a lot more.  I might defect :)

Oh feck. I've only just got to grips with prototype... ;-)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter  
View profile
 More options 28 Jan, 03:46
From: Peter <peter.kielt...@gmail.com>
Date: Sun, 27 Jan 2008 19:46:46 -0800 (PST)
Local: Mon 28 Jan 2008 03:46
Subject: Re: Prototype + lowpro vs. JQuery
Dan,

I tried the implementation and its great! Kudos on whipping it out so
quickly.

Now, another question I have with all this framework talk.. and dare I
say it.. but Mootools 1.2 is always something that has caught my eye
with its efficiency, speed, clarity of code, and code/framework
philosophy. Any thoughts?

Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Webb  
View profile
 More options 28 Jan, 10:53
From: "Dan Webb" <d...@danwebb.net>
Date: Mon, 28 Jan 2008 10:53:43 +0000
Local: Mon 28 Jan 2008 10:53
Subject: Re: Prototype + lowpro vs. JQuery

> Now, another question I have with all this framework talk.. and dare I
> say it.. but Mootools 1.2 is always something that has caught my eye
> with its efficiency, speed, clarity of code, and code/framework
> philosophy. Any thoughts?

Heh...at this time, no.  I don't think I want to support loads of
versions of Low Pro and peronally I've never seen where Mootools fits
into the puzzle as far as JS libraries are concerned.  In my opinion,
it doesn't really offer anything that Prototype or jQuery haven't got
so I've never thought to use it myself.  However, Im by no means
saying it's not a good library.

I'd be totally happy for someone to do the port though.  After using
Low Pro's behavior classes quite heavily over the past year or so I'm
really convinced that its the best way of writing components and
managing the complexity of Ajax applications in general and the idea
is totally transferable between libraries.  I even considered trying
to write Low Pro in a library independent way but after investigating
it it definitely felt like it would end up very over-engineered.

To be honest, Low Pro has become quite a compact piece of code so it
would only take me another 30 mins or so but I'm not sure I'd be
qualified to support code that I wouldn't use myself and it would be
better ran by someone from the Mootools camp.

Cheers,

--
Dan Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Peter  
View profile
 More options 28 Jan, 15:12
From: Peter <peter.kielt...@gmail.com>
Date: Mon, 28 Jan 2008 07:12:51 -0800 (PST)
Local: Mon 28 Jan 2008 15:12
Subject: Re: Prototype + lowpro vs. JQuery

> To be honest, Low Pro has become quite a compact piece of code so it
> would only take me another 30 mins or so but I'm not sure I'd be
> qualified to support code that I wouldn't use myself and it would be
> better ran by someone from the Mootools camp.

Right, that is understandable. However, my underlining objectives in
my applications are to achieve efficiency and performance, especially
over a browser executing JS where there are varying computers and
browsers. That usually lends itself to the people in charge of a
framework. Once I begin to adopt a framework and my applications
consume it, I hate having to port my code, so I always spend a lot of
time making a decision.. the hard part is to look ahead and consider
which framework will last.

Mootools has an interesting test suite comparing the various
frameworks: prototype, mootools and jquery right in your browser.
http://mootools.net/slickspeed/

These are older versions so I copied the test code and posted it on my
server with the latest versions of each framework: http://nulayer.com/~peter/jstest/

... I like jQuery, and I'd prefer to use it because of its adoption
and support, but from this small subset of a test, it does not perform
well at all. Reading the jQuery blog, they've taken on a developer to
optimize their code, I'm looking forward to seeing what they come up
with.

Regards,

Peter


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dan Webb