Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript Library

Reply
Thread Tools

Javascript Library

 
 
shapper
Guest
Posts: n/a
 
      10-29-2007
Hello,

I would like to use a javascript library to simplify my coding
process.
I know a few: JQuery, Dojo, Yahoo UI, ...

Which one do you advice me to use?

Thanks,
Miguel

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      10-29-2007
shapper wrote:
> I would like to use a javascript library to simplify my coding
> process. I know a few: JQuery, Dojo, Yahoo UI, ...
>
> Which one do you advice me to use?


Until further notice: yours.


PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
 
Reply With Quote
 
 
 
 
Peter Michaux
Guest
Posts: n/a
 
      10-29-2007
On Oct 28, 5:48 pm, shapper <(E-Mail Removed)> wrote:
> Hello,
>
> I would like to use a javascript library to simplify my coding
> process.
> I know a few: JQuery, Dojo, Yahoo UI, ...
>
> Which one do you advice me to use?


This question comes up frequently on comp.lang.javascript. There is
currently a thread that shows the feeling of many of the regulars here
that none of these libraries will do...

<URL: http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/0939ea42f3f7647f/7913289a7a41be97#7913289a7a41be97>

Peter

 
Reply With Quote
 
Brian Adkins
Guest
Posts: n/a
 
      10-29-2007
On Oct 28, 8:50 pm, Thomas 'PointedEars' Lahn <(E-Mail Removed)>
wrote:
> shapper wrote:
> > I would like to use a javascript library to simplify my coding
> > process. I know a few: JQuery, Dojo, Yahoo UI, ...

>
> > Which one do you advice me to use?

>
> Until further notice: yours.


Richard, do you still assert that no one is saying "write it all
yourself"?

 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      10-29-2007
On Oct 29, 11:26 am, Brian Adkins <(E-Mail Removed)> wrote:
> On Oct 28, 8:50 pm, Thomas 'PointedEars' Lahn <(E-Mail Removed)>
> wrote:
>
> > shapper wrote:
> > > I would like to use a javascript library to simplify my coding
> > > process. I know a few: JQuery, Dojo, Yahoo UI, ...

>
> > > Which one do you advice me to use?

>
> > Until further notice: yours.

>
> Richard, do you still assert that no one is saying "write it all
> yourself"?


I don't see Richard in this thread. Regardless, your library does not
have to be 100% self-written. IIRC, Richard stated something to that
effect in the other "please recommend a library" thread.


 
Reply With Quote
 
Matt Kruse
Guest
Posts: n/a
 
      10-29-2007
On Oct 28, 7:48 pm, shapper <(E-Mail Removed)> wrote:
> I would like to use a javascript library to simplify my coding
> process.
> I know a few: JQuery, Dojo, Yahoo UI, ...
> Which one do you advice me to use?


There are pros and cons to each, but I recommend jQuery. It is
powerful, compact, easy to understand, and has an active support
community.

Matt Kruse

 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      10-29-2007
On Oct 29, 12:01 pm, Matt Kruse <(E-Mail Removed)> wrote:
> On Oct 28, 7:48 pm, shapper <(E-Mail Removed)> wrote:
>
> > I would like to use a javascript library to simplify my coding
> > process.
> > I know a few: JQuery, Dojo, Yahoo UI, ...
> > Which one do you advice me to use?

>
> There are pros and cons to each, but I recommend jQuery. It is


The first two are right out. Why take the time to learn an API that
has terrible code behind it. People would be better off spending time
writing their own terrible code. At least they would learn something
worthwhile in the process.

> powerful, compact, easy to understand, and has an active support
> community.


Powerful perhaps, but the copy I have here is 82K. Perhaps it would
lose 30K or so minified.

Having recently looked over the code, I can tell you it is poorly
written and full of mistakes. Any time saved coding will come back to
you in maintenance and trouble-shooting.

 
Reply With Quote
 
Matt Kruse
Guest
Posts: n/a
 
      10-29-2007
On Oct 29, 11:25 am, David Mark <(E-Mail Removed)> wrote:
> The first two are right out. Why take the time to learn an API that
> has terrible code behind it. People would be better off spending time
> writing their own terrible code.


Learning the API takes, perhaps, a few hours. Even if it does have
terrible code behind it (it does not), the improvement in end result
will still be beneficial to most, because most are already writing
terrible code that doesn't even have the benefit of working most of
the time.

> Powerful perhaps, but the copy I have here is 82K. Perhaps it would
> lose 30K or so minified.


There is a minified download option. Check it out.

> Having recently looked over the code, I can tell you it is poorly
> written and full of mistakes.


Without any examples or real critiques to back up that broad
statement, it's worthless.

I've been writing javascript for over 10 years, and I've seen poorly
written code. jQuery is not poorly written. Nor is it "full of
mistakes".

I can see things in the code that I would change and improve, and a
number of them are actually already in as tickets for changes in
future versions. No free collaborative effort is without its problems.

Would you also throw out the Wikipedia as "junk" because you find an
article with technical errors?

> Any time saved coding will come back to
> you in maintenance and trouble-shooting.


My real-world experience differs from your hypothesis. I can measure
the _huge_ benefits of using jQuery in real dollars, and it is
significant.

I'd love to hear about your experience with jQuery and the maintenance
and trouble-shooting that you were required to do.

Matt Kruse

 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      10-29-2007
On Oct 29, 12:47 pm, Matt Kruse <(E-Mail Removed)> wrote:
> On Oct 29, 11:25 am, David Mark <(E-Mail Removed)> wrote:
>
> > The first two are right out. Why take the time to learn an API that
> > has terrible code behind it. People would be better off spending time
> > writing their own terrible code.

>
> Learning the API takes, perhaps, a few hours. Even if it does have
> terrible code behind it (it does not), the improvement in end result


Run it through JSLint. Then search it for "userAgent." Then look at
the logic that tests for a function. That's three strikes right
there.

> will still be beneficial to most, because most are already writing
> terrible code that doesn't even have the benefit of working most of
> the time.


How is it beneficial to swap one's own terrible code for the terrible
code of another. Is it easier to debug somebody else's code?

>
> > Powerful perhaps, but the copy I have here is 82K. Perhaps it would
> > lose 30K or so minified.

>
> There is a minified download option. Check it out.


Isn't that what I said? Running it through a minifier will lose about
30K. I just tried it here and my estimation was almost exactly right.

>
> > Having recently looked over the code, I can tell you it is poorly
> > written and full of mistakes.

>
> Without any examples or real critiques to back up that broad
> statement, it's worthless.


Try searching this very newsgroup for jQuery. You will find lots of
examples.

>
> I've been writing javascript for over 10 years, and I've seen poorly


Lots of people can make that claim. How many of them are competent to
script browsers?

> written code. jQuery is not poorly written. Nor is it "full of
> mistakes".


Then despite your vast experience with JavaScript, you still don't get
it.

>
> I can see things in the code that I would change and improve, and a
> number of them are actually already in as tickets for changes in


That's comforting.

> future versions. No free collaborative effort is without its problems.
>
> Would you also throw out the Wikipedia as "junk" because you find an
> article with technical errors?


That is an odd comparison.

>
> > Any time saved coding will come back to
> > you in maintenance and trouble-shooting.

>
> My real-world experience differs from your hypothesis. I can measure
> the _huge_ benefits of using jQuery in real dollars, and it is
> significant.


And how would you quantify the benefits of "using jQuery" in dollars?

>
> I'd love to hear about your experience with jQuery and the maintenance


Having read the script, I concluded it was worthless. Therefore, I do
not use it.

> and trouble-shooting that you were required to do.
>


By the same token, I do not have to trouble-shoot it.

 
Reply With Quote
 
Matt Kruse
Guest
Posts: n/a
 
      10-29-2007
On Oct 29, 12:42 pm, David Mark <(E-Mail Removed)> wrote:
> Run it through JSLint.


Which is about as useful as validating HTML. Great for academic
purposes, perhaps it will catch a few errors, etc.
But in the end it doesn't matter if code passes analytics, just if it
accomplishes the goal or not. My goal never includes "pass
validation". Validation is merely a tool to reach my goal, when
needed.

> Then search it for "userAgent."


Browser sniffing is not encouraged, and in some cases in jQuery it is
really unnecessary. There are cases where it is beneficial.
Rather than writing lengthy logic to solve for every possible case,
you can write shorter logic to solve for a subset of cases you care
about.
It's not ideal, but it is a strategy. The amount of browser sniffing
in jQuery is minimal.

> Then look at the logic that tests for a function.


It may not be perfect, but have you ever come across a real-world case
where it has failed for you?

Me neither.

> How is it beneficial to swap one's own terrible code for the terrible
> code of another. Is it easier to debug somebody else's code?


jQuery's code is not terrible. It is a substantial improvement over
most javascript code written by average developers. In my experience.

> > There is a minified download option. Check it out.

> Isn't that what I said? Running it through a minifier will lose about
> 30K. I just tried it here and my estimation was almost exactly right.


The packed version is 26kb. Plenty small.

> > > Having recently looked over the code, I can tell you it is poorly
> > > written and full of mistakes.

> > Without any examples or real critiques to back up that broad
> > statement, it's worthless.

> Try searching this very newsgroup for jQuery. You will find lots of
> examples.


But why should I look up past examples? You said you recently looked
over the code and found that it was poorly written and full of
mistakes.
Surely you could provide some examples from your recent investigation?

> > I've been writing javascript for over 10 years, and I've seen poorly

> Lots of people can make that claim. How many of them are competent to
> script browsers?


I'm not sure "lots of people can make that claim". I consider myself
to be very knowledgeable about Javascript development, and I disagree
with your conclusions. Surely not everyone who disagrees with you is
categorically an amateur?

> > written code. jQuery is not poorly written. Nor is it "full of
> > mistakes".

> Then despite your vast experience with JavaScript, you still don't get
> it.


What don't I get? You are not providing any actual arguments. You
might as well just say "You're stupid!" and stick your tongue out.

Further, have you considered that perhaps it is you who just doesn't
get it?

> > Would you also throw out the Wikipedia as "junk" because you find an
> > article with technical errors?

> That is an odd comparison.


Perhaps. The point is, just because you notice a few flaws in
something does not mean it is worthless. It merely means it has flaws.
Which means it was probably developed by humans. If your goal is
perfection, you'll never find it.

> > My real-world experience differs from your hypothesis. I can measure
> > the _huge_ benefits of using jQuery in real dollars, and it is
> > significant.

> And how would you quantify the benefits of "using jQuery" in dollars?


#1:
(Previous time to develop functionality) - (current time to develop
similar functionality) = Time Savings
Time Savings * Pay Rate = Money Saved

#2:
(Number of JS bugs before) - (Number of JS bugs now) = Bug Savings
(Bug Savings) * (Avg Time to Fix JS Bugs) * Pay Rate = Money Saved

Consider the effects of introducing jquery to a large development
team:
1) Reduced time implementing similar functionality as before
2) Reduced number of bugs
3) Improvement of UI because developers have access to pre-made
plugins
4) Less time needed to write functionality from scratch and research
browser quirks
5) No problem reports from any end users

Now, how are you arguing that using jquery is not a huge benefit?

You would recommend that we stop using it and start coding from
scratch?

> > I'd love to hear about your experience with jQuery and the maintenance

> Having read the script, I concluded it was worthless. Therefore, I do
> not use it.


Then how would you know anything about an increase in maintenance
caused by using jQuery?
Can you quote the experience of anyone else who has used it and found
it to be a maintenance problem?
Or hell, can you quote anyone who has used it and found it to be a bad
decision for any reason?
Do you have any real-world experience with it?
If not, how do you possibly feel justified in criticizing it?

Matt Kruse

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static library Vs. Dynamic library iceColdFire C++ 3 05-17-2005 06:16 AM
Dynamic Library or Static Library under Linux gouqizi.lvcha@gmail.com C++ 6 05-10-2005 03:16 PM
Re: Difference between Web Control Library and Class Library Alan Ferrandiz [MCT] ASP .Net 0 09-11-2004 01:51 PM
Re: Difference between Web Control Library and Class Library Mythran ASP .Net 0 08-24-2004 05:53 PM
Library in library... Sweep C++ 1 12-09-2003 04:12 AM



Advertisments