Welcome Guest, Not a member yet? Register   Sign In
jQuery class
#3

[eluser]Aken[/eluser]
I don't agree with a Javascript class, for a few reasons:

1) Separation. Javascript should be in separate files and loaded appropriately. The class forces script output into the HTML (and even recommends putting it in the <head> of the document, which is not good).

2) Performance. Elaborating on #1, script directly in the HTML cannot be cached. At most it can be gzipped with the HTML.

3) Learning curve. If you want to get involved with Javascript, start learning basic JS. Then start learning the library of your choice. I don't understand the need for a PHP library with its own unique functions and methods to output a JS library with its own unique functions and methods.

Javascript is an extension of the View part of MVC, in my opinion. It should be kept out of the rest.


Messages In This Thread
jQuery class - by El Forum - 06-20-2011, 11:55 AM
jQuery class - by El Forum - 06-20-2011, 12:13 PM
jQuery class - by El Forum - 06-20-2011, 04:02 PM
jQuery class - by El Forum - 06-20-2011, 04:28 PM
jQuery class - by El Forum - 06-20-2011, 04:43 PM
jQuery class - by El Forum - 06-20-2011, 07:11 PM
jQuery class - by El Forum - 06-20-2011, 07:26 PM
jQuery class - by El Forum - 06-20-2011, 09:49 PM
jQuery class - by El Forum - 06-21-2011, 02:49 AM
jQuery class - by El Forum - 06-21-2011, 11:42 PM
jQuery class - by El Forum - 06-22-2011, 09:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB