If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

hmmm... not a very compelling argument, really. A framework is just a bunch of helper functions, written in javascript and loaded from an external file. Or are helper functions and external files "improper" too?

I know that but the fact remains that a framework is not javascript programming.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

in russian there exist the rude widly used word (a curse) which has many meanings depending on the context it is used. so, if you say 'i have [Present Perfect Simple of that word] with that code' everybody will understand how hard the work was )) the word is mostly equal to the english 'f*ck' ))))

$() is a function that replaces javascript and is a function that can easily be written using javascript without relying on a tool to get the job done.

.ready() is another function (prototype) that replaces the onload event.

Why not do it in javascript and learn how to script rather than rely on others to program a framework helper tool that is itself prone to bugs.

As for the orchestra / guitar solo comparison, music is music no matter how big your band is, javascript is javascript and not a framework. That is the difference.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

an extremely poor choice of words - we already went over this - jQuery is written in javascript - it doesn't replace it - if anything it just adds to it.

Originally Posted by \\.\

and is a function that can easily be written using javascript without relying on a tool to get the job done.

depends - alot of jQuery functionality has ready parallels to vanilla js. But some of it is very useful, particularly for things like traversing the DOM. I'd like to see a one-line equivalent to this in plain javascript:

Code:

var depth = $(this).parents("div[class='subsections']").length;

Originally Posted by \\.\

.ready() is another function (prototype) that replaces the onload event.

mmm... nope. Actually, .ready() replaces the modern "DOMContentLoaded" and the old-fashioned IE "onreadystatechange", but even then it's not that simple. You can google, or look at the jQuery source if you really want to understand how it works

Originally Posted by \\.\

Why not do it in javascript and learn how to script rather than rely on others to program a framework helper tool that is itself prone to bugs.

do you advise carpenters to throw out all their tools except for a hammer and a screwdriver because they are "real" and everything else is derivative? You choose the best tools for the job - programming is science after all, and dogma has no place in science.

One of the benefits of jQuery is that it was created pretty much as a whole, taking into account the flaws of javascript (of which there are many) and the differences in browser implementation (ditto). Javascript on the other hand has evolved messily over the years, and adheres to its own "standards" (which browser manufacturers are free to ignore, and they do - and we're not just talking IE here, either)

Should people not learn the basics of javascript and rely only on jQuery? No, that would be stupid. But should they ignore all the possibilities that jQuery offers just because it's "improper"? That would be equally stupid...

Sorry but unless you know what came before, having a framework will not be a substitute for programming.

How many rails programmers understand the underlying code that it uses? Same goes for all these frameworks, unless you know the underlying methods, a framework programmer will be lost if they are faced with swathes of script that they have no idea what it does.

As for var depth = $(this).parents("div[class='subsections']").length; is not about putting things in one line, its about construction code to do jobs that are needed and only when needed on that particular page. With a framework you have the problem of adding weight to a page when you find that the majority of that code in the framework is not needed but is loaded.

What may be a cost benefit to the programmer using the tool is not to the web browser / user loading it.

STOP using $ prefix on JavaScript variable names...
Please remember to wrap any code you have in forum tags:- [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]If you can't think outside the box, you will be trapped forever with no escape...

Sorry but unless you know what came before, having a framework will not be a substitute for programming. [etc]

kind of like what I said in the final paragraph of my last post

that argument about frameworks adding weight to page load used to have some substance, but the latest minified version of jQuery comes in at 91kb... just a little over twice the size of the image file for that ad over on the right there, and not really the sort of load that even an older gen smartphone would notice...