Over a million developers have joined DZone.

Interview: Matt Taylor on jQuery

· Web Dev Zone

The Strange Loop conference is a unique software developer conference in St. Louis featuring excellent speakers and a wide variety of languages and technologies. This interview with Matt Taylor discusses his Strange Loop talk "jQuery: The JavaScript Library of the Future"Matt Taylor (@rhyolight) is a St. Louis area developer with a diverse array of experiences. He enjoys a main course of dynamic languages like Groovy and Javascript with a side of agile, washed down by the quenching taste of the web.

Strange Loop: Why is Javascript so important in web programming today?

Matt Taylor: JavaScript is the first and most widely used choice for building Rich Internet Application UIs today. It is currently competing with other UI technologies like Flex, JavaFX, and Silverlight. JavaScript has advantages over these other technologies because it is supported by default in every major web browser and very tightly integrated with the Document Object Model (DOM) at the core of these browsers. While other Rich UI technologies carve a hole in the DOM to place their rich content through plugins within the browser, JavaScript creates a Rich UI within the browser's native environment by manipulating the DOM itself.

Strange Loop: How does jQuery depart from other Javascript libraries like Prototype? Why will it lead us to the future?

Matt Taylor: Like most backend programmers, I am very comfortable with Object-Oriented Programming. When I started working with JavaScript and looking into older libraries like Prototype and Script.aculo.us, I was confused by the way they tried to shoehorn JavaScript into a classical inheritance model. JavaScript is object-oriented, but it has prototypal inheritance, not the classical inheritance of most popular OO languages. When using these frameworks, including YUI, I felt like I was using a half-baked OO model.

jQuery does not pretend to present an classical object-oriented API to users. Its approach is very functional and pragmatic. In other framworks, you might create an object instance of a class called DataGrid that transforms HTML, XML, or JSON data into a JavaScript object, which is then rendered into a rich HTML component within the browser. But jQuery was created to work with existing markup, so it is easy to mark data up in HTML in a way that can be transformed into rich components in a piecemeal fashion by calling functions of the global jQuery object.

As programming language enthusiasts migrate toward functional and dynamic languages, jQuery is becoming more popular because if its functional nature. jQuery is not a purely functional framework, because its usage is driven almost entirely by the side effects of calling these functions, but the way in which work gets done is by calling functions, not necessarily by creating or extending objects.

Another advantage jQuery has over other AJAX frameworks is its very extensible nature and rich library of plugins. This pluggable disposition is very popular among developers today, as seen in web frameworks like Rails and Grails.

Strange Loop: What do you find to be the most impressive uses of Javascript and jQuery out on the web today?

Matt Taylor: I was a Netflix user before I ever heard of jQuery, and I've always been impressed with the usability and features of the site. I was not surprised to find that Netflix uses jQuery. I also have a Wordpress blog at dangertree.net. Wordpress has a very rich admin control panel behind it that uses many jQuery features and animations. If you look into the JavaScript behind the admin screens, there is a lot of jQuery going on there, especially taking advantage of jQuery's rich DOM selection techniques, implicit collections, and iterative functions. I also have some projects hosted on Google Code, which uses jQuery as well.

Strange Loop: It seems that there is an arms race of sorts these days between the browser vendors improving Javascript performance and developers continually pushing the boundary and needing more performance. Who's the driving force here? Is there an end in sight or are we just getting started in the building of complex high-performance web-based applications?

Matt Taylor: I think you are talking about BROWSER WAR! And I say bring it on! Browser innovation stagnated after Microsoft and Internet Explorer 4 won the first browser war against Netscape back in 1997. Microsoft sat on their laurels for years while web developers lamented because web standards were ignored. Today, we have a rich browser environment with multiple competitors all attempting to create and adhere to proper web standards. With the rise in popularity of Mozilla's Firefox and Google Chrome, Microsoft is finally feeling enough pressure to work on their game as well.

We are just getting started in this new Browser War, and Google always has a trick or two up their sleeves. And let's not forget that jQuery's creator, John Resig, works for Mozilla of FireFox fame. These browsers all have a lot invested in JavaScript and AJAX.

Strange Loop: Will there ever be a client-side web language that rises to the level of ubiquity that Javascript enjoys today? Why haven't other languages made greater in-roads to the client-side web? Is Javascript uniquely capable for this role or was it a matter of happenstance?

Matt Taylor: Java was supposed to be the "language of the web". Unfortunately (or fortunately, depending on your view), the rise of applets never really occurred. JavaScript was created by Netscape in the mid-nineties, and it was focused at web designers and developers who needed to tie into the browser object model (this was before the Document Object Model). These users needed a language without a bytecode compiler that could be used without knowledge of object-oriented software.

One of the primary reasons JavaScript has persisted to this day is that it has always been very tightly integrated with the Document Object Model. The DOM is what browsers interpret to render their views to users. Microsoft did have a competing language (VBScript), but it didn't get very far during the first browser war before converting IE to use JavaScript. Adobe has ActionScript, which is used by Flash and Flex. It is no accident that it has a very similar syntax to JavaScript, but it does not integrate with the DOM.

Will JavaScript and AJAX ever be usurped by another technology? Of course it will. I'm always on the lookout for indicators of "Web 3.0". But until that new paradigm shift starts occurring, JavaScript will continue to be a major powerhouse as libraries and programming techniques evolve with the web. And jQuery is a formidable power tool in any AJAX developer's toolbox.

Strange Loop: Thanks Matt, can't wait to see your talk!

Find out more about Strange Loop:

Topics:

Published at DZone with permission of Alex Miller. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}