Monthly Archives: July 2007 - Page 2

Dojo 0.9 lands softly

logo Dojo 0.9 lands softly
Can’t miss that one also, few days ago the guys from Dojo Foundation released new version. Check out their post here:
The Dojo Foundation is proud to release version 0.9beta of The Dojo Toolkit. Though still in Beta, 0.9 is a better, faster, and more cohesive way to incrementally upgrade the Open Web and make your applications shine.

The Toolkit has undergone a massive transition: countless numbers of community man-hours, seemingly endless questioning of sacred cows and assumptions, and hard work towards a unified goal have gone into producing this milestone release. There are warts in this beta, and you can help us even them out by filing patches and bugs, add comments and content to the Porting Guide, and start pushing the components to the edge.

While the 0.4.x branch helped us build great applications and learn a lot, 0.9 is a fresh start. Over the next couple of weeks we’ll be talking more about what decisions went into 0.9 and why we feel it’s the best Dojo ever, but some points bear emphasis:

SPEED: Stripped of all ‘excessive’, redundant, and backwards-compatible code, the new Dojo core is a speed-demon. It consists of a streamlined, compact Base (aka: dojo.js) which provides a plethora of reliable features for you and your application to expand upon. Our goal was to keep the new Base under 50K on disk and we’re happy to say that even with the many improvements to it since M2, Dojo Base still clocks in under the wire and gzipped it’s even smaller: 24K. The base of the new widget system (dijit.js) is even lighter, weighing in at 21K on disk and 11K on the wire.

Accessibility: one of the main goals of Dojo’s 1.0 release is accessibility. We want to put the power to build great web applications in everyone’s hands, and that means applications that are also great for everyone. Dijit (the dojo widget system) is striving to make all aspects of the Dojo Toolkit accessible via keyboard navigation, accommodate screen readers, and work in high-contrast mode for visually impared users, while still maintaining its elegant and customizable structure. Much of that work is already done as of Beta and it shows. Try tabbing around the examples on IE or FF and you’ll see how a focus on a11y makes the components we provide better. Again, our heartfelt thanks to Mozilla and IBM as well as David, Simon and Becka11y (the a11y team) for their continued efforts on everyone’s behalf.

Theming: Dijit is entirely customizable. Shipping with a default theme named ‘Tundra’, a structure has been established with which to create your own personalized sytle of Dojo, on a per-page or per-node or per-widget basis. All dijit look and feel is CSS-based, and easily extendable. Look at any of the Dijit examples and you’ll see that there’s no magic about how the CSS gets loaded or applied. Want to provide your own theme? Just create an allegory to tundra.css and you’re off to the races!

Documentation: a new version of our venerable web-based/html API tool is is in the works. Following a strict style guide, and documentation standards, we’re working hard to make Toolkit code nearly self-explanitory. Where it’s not, the new API system supports in-place updates of the documentation via the web interface and comments on any node so that you can share your experiences, common usage patterns, and frustrations about any API with yourself and your fellow Dojo developers. We expect this new tool to be integrated with the main Dojotoolkit.org site very soon.

While a few of the public API’s may change before 1.0, those changes will be minimal, and we are confident Dojo is stable enough to being building apps with. And though we’ve been working hard these last months, like any open source project, it is almost entirely community supported. We need your help and feedback to pick out all of the world problems that occur. Whether you file bugs, contribute to the book, help flesh out the porting guide, or answer questions in the forums, everything you contribute helps and is greatly appreciated.

We would like to thank everyone involved in making this milestone beta release a reality. Without tremendous personal effort and organizational fortitude and support, 0.9 would not be happening. We’ve taken a great risk and it has only come this far because the Dojo Team pushed it this hard. In particular, Eugene, Adam, Scott, Owen, Becky, Craig, Bill, Tom, Torrey, Doug, Jared, the rest of the new committers, and the old hands who have so deftly guided the process all deserve hearty, well-earned thanks. Salud.
read original

LINQ to SQL (Part 3 – Querying our Database)

The third part from Scott Guthrie’s series LINQ to SQL:

Last month I started a blog post series covering LINQ to SQL. LINQ to SQL is a built-in O/RM (object relational mapping) framework that ships in the .NET Framework 3.5 release, and which enables you to easily model relational databases using .NET classes. You can then use LINQ expressions to query the database with them, as well as update/insert/delete data from it.

Below are the first two parts of my LINQ to SQL series:

In today’s blog post I’ll be going into more detail on how to use the data model we created in the Part 2 post, and show how to use it to query data within an ASP.NET project.


Northwind Database Modeled using LINQ to SQL

In Part 2 of this series I walked through how to create a LINQ to SQL class model using the LINQ to SQL designer that is built-into VS 2008. Below is the class model that we created for the Northwind sample database:

step1 LINQ to SQL (Part 3   Querying our Database)


Retrieving Products

Once we have defined our data model classes above, we can easily query and retrieve data from our database. LINQ to SQL enables you to do this by writing LINQ syntax queries against the NorthwindDataContext class that we created using the LINQ to SQL designer above.

For example, to retrieve and iterate over a sequence of Product objects I could write code like below:

step1 LINQ to SQL (Part 3   Querying our Database)

In the query above I have used a “where” clause in my LINQ syntax query to only return those products within a specific category. I am using the CategoryID of the Product to perform the filter.

One of the nice things above LINQ to SQL is that I have a lot of flexibility in how I query my data, and I can take advantage of the associations I’ve setup when modeling my LINQ to SQL data classes to perform richer and more natural queries against the database. For example, I could modify the query to filter by the product’s CategoryName instead of its CategoryID by writing my LINQ query like so:

step2 LINQ to SQL (Part 3   Querying our Database)

Notice above how I’m using the “Category” property that is on each of the Product objects to filter by the CategoryName of the Category that the Product belongs to. This property was automatically created for us by LINQ to SQL because we modeled the Category and Product classes as having a many to one relationship with each other in the database.

read original

jQuery 1.1.3: 800%+ Faster, still 20KB

jquery jQuery 1.1.3: 800%+ Faster, still 20KB

Today jQuery team released a speedy version 1.1.3 of the jQuery JavaScript library. The new release come with more than 80 bugfixes and 800%+ of speed improvements, in addition to some new features and enhancements. Highlights include:

  • Improved speeds, with DOM traversal over 800% faster than in 1.1.2.
  • A re-written event system, with more graceful handling of keyboard events.
  • A re-written effects system (with an accompanying fx test suite), featuring faster execution and better cross-platform support.

There are more enhancements planned for the next releases of jQuery. jQuery 1.1.4 is already planned for the end of July, and it will be the last release of the jQuery 1.1 branch. The next generation of jQuery will begin with the 1.2 release, planned for late August, and it will include more new features and enhancements as you can read in the 1.2 Roadmap.

Browser jQuery 1.1.2 jQuery 1.1.3 % Improvement
IE 6 4890ms 661ms 740%
Firefox 2 5629ms 567ms 993%
Safari 2 3575ms 475ms 753%
Opera 9.1 3196ms 326ms 980%
Average improvement: 867%

Additionally, we tested the improved code base against some of the other popular selector libraries, again with the SlickSpeed test suite.

Browser Prototype jQuery Mootools Ext Dojo
IE 6 1476ms 661ms 1238ms 672ms 738ms
Firefox 2 219ms 567ms 220ms 951ms 440ms
Safari 2 1568ms 475ms 909ms 417ms 527ms
Opera 9.1 220ms 326ms 217ms 296ms 220ms

A couple things to notice when looking at the speed suite results are that:

  • We’re over 800% faster than we were in jQuery 1.1.2.
  • We’re the fastest framework in the most popular browser, Internet Explorer 6.
  • We’re the only framework that doesn’t give incorrect results.
  • And all of this comes at no expense to you — jQuery is still the same 20KB that you’ve come to expect and enjoy.

read original