background preloader

JavaScript

Facebook Twitter

A faster tuenti. Lessons Learned in Client Side Scalability. A faster tuenti. Lessons Learned in Client Side Scalability Posted on 9/07/2012 by Alberto Gragera, Frontend Framework Tech Lead, and Nuria Ruiz, Principal Engineer We have been busy at work building a new Tuenti that we wanted to be much faster. In the process of renewing ourselves we needed to shake out the older client architecture and start afresh. More than doing code changes we found a new philosophy of doing things in which performance was part of the main criteria on how to architect the website. Load Javascript on Demand The most important shift we made was loading javascript on demand. Loading javascript eagerly lead us to a situation in which at some point we had about ~1.5MB of JS code for the browser to parse and execute (minimized and gzipped) much of which the user wouldn’t use at all.

Once we added the ability to download javascript on demand we extended it to client side translations and client side templates. Measure Everything Optimize the first Page Load. CSS matters. Dart : Structured web programming. Google Dart to “ultimately ... replace JavaScript” The following keynote will be held at the GOTO Aarhus 2011 Conference on Monday, Oct. 10, 2011: “Dart, a new programming language for structured web programming” This post explains what Dart is all about and how it relates to JavaScript. Google’s strategy for JavaScript Unless another source is mentioned, all of the following quotes come from a Google email that was written in November 2010.

It summarized a Google-internal discussion: On November 10th and 11th, a number of Google teams representing a variety of viewpoints on client-side languages met to agree on a common vision for the future of Javascript. The agreed-upon “common vision” was to develop a new programming language called “Dash” (which was later renamed to “Dart”). The goal of the Dash effort is ultimately to replace JavaScript as the lingua franca of web development on the open web platform. In order to minimize the risk of failure, Google will hedge its bets: Dart (originally Dash) What does it all mean? Will everyone adopt it?

GWT

Java Non-blocking Servers, and What I Expect node.js to do if it is to Become Mature. Node.js is getting a lot of attention at the moment. It's goal is to provide an easy way to build scalable network programs, e.g. build web servers. It's different, in two ways. First of all, it brings Javacript to the server. But more importantly, it's event based, rather than thread based, so relies on the OS to send it events when say a connection to the server is made, so that it can handle that request.

The argument goes, that a typical web server "handles each request using a thread, which is relatively inefficient and very difficult to use. " They go on to state that "users of Node are free from worries of dead-locking the process — there are no locks. Well, reading those statements makes me think that I have problems in my world which need addressing! The second reason I don't have threading problems is because I work with Java EE. So when do I need to solve those problems which lots of threads introduce, namely memory problems?

1.var net = require('net'); 5. socket.pipe(socket); Javascript PC Emulator. Jsmin-ant-task - A custom task for Apache Ant which acts as an interface to the JSMin program. A custom task for Apache Ant which acts as an interface to the JSMin program. About JSMin "JSMin is a filter which removes comments and unnecessary whitespace from javascript files.

It typically reduces filesize by half, resulting in faster downloads. It also encourages a more expressive programming style because it eliminates the download cost of clean, literate self-documentation. " Excerpt from Douglas Crockford's JSMin page Description The JSMin Ant task acts as an interface to the JSMin Java class. Specify destination directory option. Parameters Examples Define the task in your build file: Using the task on a single file, with the .min suffix added to the file extension: Using the task with a fileset, and an output directory specified: Prepending a copyright notice to the minified file: Will add the following to the top of the file: /* (c) 2008 whoever.com */ Support If you have any issues then please let us know, I will see what I can do.

Project Stats. JPEGclub.org. Jpegoptim | freshmeat.net. OptiPNG Home Page. Minify using an ANT target « Dave’s Blogs. Manually minify files is doable when the files are not changed frequently and you do not have many files to minify. If you have JavaScripts that change frequently due to active development or have a large number of files, you might want to consider to automate it. One way to do so is to use ant target for YUI Compressor. Here is the configuration that I used to setup the minify.

You may wish to change directory/file location and file names to match your environment. Like this: Like Loading... jQuery: The Write Less, Do More, JavaScript Library. The “joy” of asynchronous programming - TheServerSide.com. One of the reasons Java became popular was the introduction of primitives in the language itself for the management of threads such as the synchronized keyword. Everyone knows that concurrent programming and management of threads in general are necessary because the world of web programming is essentially concurrent because multiple clients can access in the time, is necessary but in turn is complicated.

In addition to the inherent complexity of the synchronization of shared resources, everyone knows that thread management is very costly for the operating system and resource-intensive and rarely many more than 100 threads are used, for example Tomcat 6 by default limits the maximum number of threads to 200. The problem is the standard Java servlet which bounds a thread to only one request, so that until the request terminates the thread is not free to be used to execute another request.

Node.js code example (note the callback registration) fs. As you can see this strategy is JUST GREAT! Top 10 Client-Side Performance Problems in Web 2.0 Application Performance. Inspired by the Top 10 Performance Problems post which focuses on Server-Side performance problems taken from companies such as Zappos, Thomson, Monster and Novell I came up with the Top 10 Client-Side performance problems in Web 2.0 applications I’ve seen when working with our dynaTrace AJAX Edition users.

Symptom: JavaScript blocking resource downloads and slowing page load time JavaScript opened the door for Web 2.0 applications. Since JavaScript is used on almost every web site traditional methods to analyze web site performance don’t always give you all the answers for a slow running page. Looking at a network waterfall diagram is the typical way to start analyzing a page and all its requests.

Most browser performance tools support a network waterfall diagram. It shows which resources got downloaded and how much time the browser had to wait for all these resources to be downloaded. Network Waterfall Diagram with blank spots that can be explained with JavaScript execution #6: Large DOM.

Framebusting

Cross-domain. Google Web Toolkit vs. Smart GWT: Which Should You Choose? - The. Andreu you've gone from merely misleading to just absurd. Yes, there are 3 standard SmartGWT editions and one custom license package (Enterprise). Likewise, for Ext, there are GPL, commercial, OEM and custom licenses for ExtGWT, and some other licenses for related tools. The difference is, we at Isomorphic go out of our way to clearly answer every possible license question: And we have made a public commitment to continue to have an LGPL version of the product: Whereas in contrast, Ext made a surprise LGPL to GPL license change on a minor version change, pulling the rug out from under many projects.

There is no question whose licenses are clearer and which company is the ethical one. I am the CTO of Isomorphic and this is a widely known fact, not a secret.