InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Microsoft Gets More Involved with jQuery

Posted by Abel Avram on Apr 02, 2010

Sections
Development
Topics
Ruby ,
Javascript ,
Java ,
.NET
Tags
Templating ,
jQuery ,
Microsoft

Microsoft has reconfirmed their commitment to help with jQuery development and will start by adding support for templating and is allocating resources including full time developers. John Resig, JQuery creator, declared that jQuery will remained an independent open source project and will not be moved to CodePlex.

jQuery was first released by John Resig back in 2006, and Microsoft announced their support of the JavaScript library in 2008. During MIX 2010 Microsoft reconfirmed their commitment to advance jQuery, and they will contribute in three areas: templating, script loading and data binding. An unspecified number of ASP.NET developers are already working full time on jQuery.

The planned jQuery additions are going to be platform and language independent, i.e. they are not going to be tied up to ASP although Microsoft intends to use it in ASP.NET for client-side development. Actually, jQuery 1.4.2 is included with Visual Studio 2010 and ASP.NET MVC. John Resig declared that there are no plans to move jQuery to CodePlex, and the library will remain an independent project.

The first feature to be added is a templating engine useful to render data in a flexible way through templates. Stephen Walther, a Senior PM focused on ASP.NET MVC at Microsoft, has submitted a template proposal which is supposed to go through the usual validation process set up for jQuery based on community’s feedback which can accept or reject any proposal.

The proposed API mentions the following new methods:

  • jQuery.fn.render – rendering DOM elements
  • jQuery.fn.append("#template", arrayOrObject, options) – support for DOM manipulation by specifying a template
  • jQuery.templates – add compiled templates to the templates settings object
  • jQuery.tmplFn – useful to extend the built-in functions with new ones

The proposal contains a rendering example:

<script type="text/javascript">

jQuery(function(){
  var products = [
        { name: "Product 1", price: 12.99},
        { name: "Product 2", price: 9.99},
        { name: "Product 3", price: 35.59}
  ];

  $("#template")
     .render(products) 
     .appendTo("ul");
});
</script>

<script id="template" type="text/html">
	<li>{%= name %} - {%= price %}</li>
</script>


<ul></ul>

The above code is meant to produce the following result:

  • Product 1 – 12.99
  • Product 2 – 9.99
  • Product 3 – 35.59

An experimental plug-in is available, demonstrating how the templating engine is supposed to work. 

Microsoft Embrace, extend and extinguish by Frank Martinez Posted
  1. Back to top

    Microsoft Embrace, extend and extinguish

    by Frank Martinez

    "Embrace, extend and extinguish,"[1] also known as "Embrace, extend, and exterminate,"[2] is a phrase that the U.S. Department of Justice found[3] was used internally by Microsoft[4] to describe its strategy for entering product categories involving widely used standards, extending those standards with proprietary capabilities, and then using those differences to disadvantage its competitors.
    Wikipedia.

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.