News for hackers. Stuff that matters.
Re:Javascript and CSS best practices for better performance by kls on Tuesday June 15, 2010 @12:56PM (#1433226)
Always fall back to core JavaScript whenever possible. Limit framework usage.

Why, frameworks exist for a reason and keeps us from reinventing the wheel. Many times a contributor to a framework has labored to make his routine as efficient as possible on the broadest array of platforms. Many times we can forgo a lot of optimization work by using the framework rather than rolling our own.

Re:Javascript and CSS best practices for better performance by mrduncan on Tuesday June 15, 2010 @02:16PM (#1433407)
In other words: Do you really think that you can write this piece of javascript better than John Resig? (substitute authors as necessary)

In some cases, yes, but I'd argue that in most cases probably not.

Re:Javascript and CSS best practices for better performance by kls on Tuesday June 15, 2010 @03:46PM (#1433660)
Thanks, you made my point better than I did.
Re:Javascript and CSS best practices for better performance by CoryMathews on Tuesday June 15, 2010 @01:28PM (#1433293)
This article is about performance not ease of development.

Frameworks are made to make development quicker and easier, but its at the cost of performance.

Re:Javascript and CSS best practices for better performance by boucher on Tuesday June 15, 2010 @01:31PM (#1433301)
Gross generalization alert. True ever? Probably. True always? Absolutely certainly not.
Re:Javascript and CSS best practices for better performance by alexyim on Tuesday June 15, 2010 @01:41PM (#1433323)
Right. It depends on the framework too, jQuery is probably a good bet whereas a plugin built on top of them might not be.

In any case, if you're concerned about performance, you should examine the source code of the framework anyways to see if it's doing anything unnecessary from what's required of your application.

Re:Javascript and CSS best practices for better performance by daleharvey on Tuesday June 15, 2010 @01:27PM (#1433290)
frameworks provide generic interfaces, a lot of the times they support wildly varying uses while you know exactly what you want to do

$("#myid") vs document.getElementById("myid")

for example, $() supports a vast amount of functionality.

Re:Javascript and CSS best practices for better performance by Kilimanjaro on Tuesday June 15, 2010 @01:30PM (#1433299)
And they are cached all over the web, try using google cdn whenever possible.
Re:Javascript and CSS best practices for better performance by synnik on Tuesday June 15, 2010 @01:46PM (#1433335)
True, for external sites.

But for internal sites, storing my framework with my app lets my local web server cache it, instead of forcing users to traverse the network and go outside our firewall to Google's CDN.

Re:Javascript and CSS best practices for better performance by weixiyen on Tuesday June 15, 2010 @02:21PM (#1433427)
Perhaps he means why use $.each over native javascript equivalent.