Mark Gharibian's blog

A Study of Ajax Performance Issues

Tagged:  

Coach Wei has posted an interesting study of Ajax performance issues, specifically addressing the following issues:

1. Array performance on all browsers in general
2. HTML DOM performance in general
3. Calculating Computed Box Model and Style
4. FireFox: “eval”, Object Creation and “in” Operation
5. “String” Manipulation Performance on IE
6. Safari: “pop” Operation Performance

The article reviews data captured by Robert Buffone at RockStarApps and draws some interesting conclusions.

Visit Couch Wei's blog to read the full study.

Book: The Art & Science of JavaScript

Tagged:  

If you haven't heard, a new JavaScript book is out on the market. The text is published by Sitepoint and is coauthored by James Edwards, Michael Mahemoff, Ara Pehlivanian, Cameron Adams, Dan Webb, Christian Heilmann and Simon Willison.

Who the publisher says the book is for:

This book is targeted at intermediate JavaScript developers who want to take their JavaScript skills to the next level without sacrificing web accessibility or best practice. If you’ve never written a line of JavaScript before, this probably isn’t the right book for you—some of the logic in the later chapters can get a little hairy.

If you have only a small amount of experience with JavaScript, but are comfortable enough programming in another language such as PHP or Java, you’ll be just fine—we’ll hold your hand along the way, and all of the code is available for you to download and experiment with on your own.

And if you’re an experienced JavaScript developer, we would be very, very surprised if you didn’t learn a thing or two. In fact, if you only learn a thing or two, you should contact us here at SitePoint—we may have a book project for you to tackle!

What they say you'll learn:

* Create a slick Google Maps and Flickr mashup.
* Build your own fully accessible 3D maze.
* Have some fun with draggable and sortable table columns.
* Give your site some extra personality with client-side badges.
* Write better code faster using metaprogramming techniques.
* Create stunning vector graphics using the canvas element.
* Become a debugging expert using pro-level Firebug tricks.

What's in the TOC:

Chapter 1: Fun with Tables
Chapter 2: Creating Client-side Badges
Chapter 3: Creating Vector Graphics with canvas
Chapter 4: Debugging and Profiling with Firebug
Chapter 5: Metaprogramming with JavaScript
Chapter 6: Building a 3D Maze with CSS and JavaScript
Chapter 7: Flickr and Google Maps Mashups

Visit the book's homepage at Sitepoint

If you've had a chance to start reading this book, please post your review in the comments.

JavaScript Cheat Sheet

Tagged:  

This one's an oldie, but a goodie. A few years ago the folks over at ilovejackdaniels.com put together a JavaScript Cheat Sheet that is designed to act as a reference sheet for JavaScript functions and methods.

The reference material covers:
* Functions & Methods
* Regular Expressions
* XMLHttpRequest
* JavaScript in HTML
* and last but not least, Event Handlers

Click to download:

Their other cheat sheets include:

If you'd like to get your hands on even more cheat sheets, check out this post on menekali.com that lists a ton of them.

*update*
If you're looking for some UNIX & Perl Cheat Sheets, check out Peteris Krumins blog. Thanks Peteris!

Tatami integrates the Google Web Toolkit and the DOJO framework

The Tatami project is an attempt to integrate the Google Web Toolkit (GWT) and the DOJO JavaScript framework. Tatami pulls in DOJO's rich widgets and utilities (like fisheye, slider, drag and drop functionality) and makes them accessible to the GWT as widgets and helpers. Tatami is compatible with the GWT 1.4 final version.

Check out the demo (may run slowly because files are being served from SVN)

Last month's release of Tatami-1.1 contained some new features, they are:

* DOJO 1.0 wrapped

* DropdownDatePicker and DropdownTimePicker with validation.

* Slider with labels an rule mark.

* The GFX package of DOJO wrapped. (Circle, Rectangle, Path, scaling...)

Visit the Tatami project homepage.

LiveValidation - JavaScript Form Validation

Tagged:  

Another useful validation script to take a look at, named LiveValidation, is a JavaScript Form Validation script that can easily add some slick UI enhancements to your existing forms. This definitely beats rolling your own form validation, especially if you tend to throw in some old school alerts like alert("Please enter your first name");

* Visit the LiveValidation Homepage

* View some Examples

* Download the Script

iGoogle Themes API is Now Available

Tagged:  

You've all used (or heard of) the iGoogle portal and probably have seen its many cool themes. Google has now opened up a Themes API to allow designers to build their own themes.

3 Steps to Building a Theme
1) designing images for the header and footer
2) entering metadata and color information in an XML file
3) and submitting the theme.

To find out more about the API, start with the developer guide.

Also check out these example themes, which, along with themes you submit, will be available in the new themes directory for the millions of iGoogle users:

Earth-light by Yves Behar, founder of the San Francisco design studio fuseproject:

Adventures in Lollipopland by Mark Frauenfelder, writer, illustrator, co-founder of Boing Boing, and editor-in-chief of Make Magazine:

Supermoto Mayhem by Troy Lee, designer and founder of Troy Lee Designs:

Simplicity is Complex by John Maeda, graphic designer, artist, Associate Director of Research at the MIT Media Laboratory, and recently named as the next President of the Rhode Island School of Design (RISD):

Visit the Themes API Homepage

MooTools 1.2 Beta 2 Released

Tagged:  

MooTools has released what will likely be the last beta for version 1.2 of their framework. Here's what you'll find in this new release:

1) Documentation - it's said to be almost 5 times more detailed than version 1.

Every class option has now its description, every method has a complete list of arguments along with description, type, and now every functionality comes with a code example -- sometimes more than one. If you want to see it for yourself, here is the temporary link for the 1.2 beta documentation.

2) Element Accessors

Example - working with the href attribute

$(element).set('href', 'http://mad4milk.net'); //setter
$(element).get('href'); //getter



Example - setting the default morph options

$(element).set('morph', {duration: 100, transition: 'quart:out'});

Now when we call the morph method on the element, the default options will be set.

$(element).morph({height: 200, width: 200});



Example - set method now accepts any Object containing any of the settable properties

$(element).set({
    href: 'http://mad4milk.net',
    text: 'mad4milk website',
    morph: {duration: 200, transition: 'quad:out'},
    events: {
        click: function(){
            document.location.href = this.href;
            return false;
        }
    }
});

Element Accessor Public API - you can create a single "special attribute" that will be able to set a multiple attributes of an element. For more info, check out the documentation.

3) Fully redesigned dimension system - it's now much easier to get window or element dimensions, scrolling offsets, visible height or the full scroll height. For more info, check out the documentation.

Read the full announcement for MooTools 1.2 Beta 2

If you're wondering what changes were in MooTools 1.2 Beta 1, read more about it here.

Initial Draft Specification for "OpenAjax Metadata"

Tagged:  

News from the OpenAjax Alliance! The IDE Working Group and Gadgets Task Force have completed an initial draft of the “OpenAjax Metadata Specification". The Metadata spec represents a standard for interoperability across the Ajax toolkits we know and love. Here are the metadata items defined in this first draft version:

  • Ajax widgets - the spec defines two definitions for "widget"
    • UI controls - Some Ajax libraries provide a set of user interface building block components such as combo boxes, menu bars, or charts
    • Mashup components (aka “widgets” and “gadgets”) - Mashup frameworks allow for pre-packaged mini-applications (sometimes called “widgets” or “gadgets”) to be combined together within a composite application (the “mashup”), where the mashup components react to each other intelligently, such as when the user selects an address in one component which causes a different component to display an updated map that shows the given address.
  • Ajax APIs - the spec provides a set of metadata that describes runtime JavaScript APIs (like classes and methods) available for an Ajax library.
  • Ajax libraries - includes metadata fields similar to entries in the OpenAjax Registry

The primary target consumers of OpenAjax Metadata 1.0 are software products. It is expected that these software products will consume and use the metadata to provide enhanced experience for users who building Ajax-powered solutions. In particular:

* Mashup frameworks will use OpenAjax Metadata to use OpenAjax Metadata for widgets, such as the message types that the widget produces and consumes and the customization parameters that the widget supports

* Ajax IDEs will use OpenAjax Metadata to provide the developer with (presumably automatically-generated) API documentation, intelligent code-assist, widget palettes, and widget property editors

The draft specification can be found here.

Click here to read the announcement from the OpenAjax Alliance

Top 5 GWT Libraries

Tagged:  

GWTSite held a contest asking users to vote for their favorite GWT third-party library, and as a result have compiled their own list of the top five most popular GWT third-party libraries.

Here they are:

5. Hibernate4gwt
Bruno Marchesson
For any Hibernate users out there, Hibernate4gwt allows you to painlessly use your Hibernate POJOs with GWT.

4. Gwittir
Robert Cooper and Charlie Collins
The Gwittir project provides a lot of interesting modules for your GWT projects including data-binding, animation, introspection, and more.

3. GWT-SL
George Georgovassilis
As the name implies, the GWT Server Library is it is a server-side library for GWT that focuses on providing Spring Framework integration by allowing you to expose your Spring beans as RPC services. It also provides integration with the hibernate4gwt library.

2. GWT-Ext
Sanjiv Jivan
GWT-Ext is a really nice looking GWT widget library that is closely integrated with the Ext JS library. Take a look at the GWT-Ext Showcase Demo.

1. MyGWT
Darrell Meyer
mygwt
MyGWT was the overwhelming favorite in the contest with almost half the vote. It is a pure GWT widget library which shares the Ext JS L&F to create a polished set of widgets for use in your GWT applications. Take a look at the MyGWT Explorer Demo.

Honorable mentions: gwt-dnd, gwt-log, gwt-maven, gwtwindowmanager, gwt-math

Click here to read the original post on GWT Site.

Let us know which GWT library you prefer.

Sun acquires MySQL

Tagged:  

It's happened. This morning, Sun Microsystems announced plans to acquire MySQL AB. Reactions have been mixed, including excitement, pride, disbelief and satisfaction, but also anxiety.

Sun has been a leader in the open source community, just look at: Java, OpenSolaris, Open Office / Star Office, GlassFish app server, and the NetBeans IDE for starters. So, it can't be all bad that they've acquired MySQL, right?

The question stirring up some anxiety is: will MySQL’s support for other programming languages and operating systems now be given less attention due to Sun's vested interest in, and success with, Java and Solaris?

Here's the answer from Sun's blog:

Absolutely not. MySQL is still being managed by the same people, and the charter is still the same. There is no need for reducing the set of platforms or languages. It only makes sense for us to continue to support defacto Web development standards like LAMP, as well as emerging ones like Ruby and Eclipse. This deal is about addition, not subtraction.

What does all of this mean for the developer community? Hopefully just some added value to MySQL due to the immediate access to technical, marketing, OSS developer relations it will now have.

Read more about the acquisition over at Kaj Arno's MySQL blog or the press announcement on Sun's website.

Syndicate content