Ajax

Upcoming Ajax Conferences

Tagged:  

Here are a couple upcoming Ajax conferences for your consideration:


The Ajax Experience 2008
Location: Boston, MA
Dates: September 29th-October 1st, 2008
Cost: $1495
Site: www.theajaxexperience.com
Conference Agenda



AJAX World 2008
Location: San Jose, CA
Dates: October 20-22, 2008
Cost: $1,595 before August 29th [early bird]
$1,695 before September 12th [discounted]
$1,895 onsite price [full price]
Site: http://ajaxworld.com/
Conference Agenda

Leave a comment if you've been to either of these conferences before, letting us know what you thought. Also leave a comment if you plan on attending one or both conferences this year.

Firebug 1.2 Released

Tagged:  

Firebug, the latest version of the indispensable debugging utility for Firefox, has released version 1.2 of the plugin for Firefox 3.0.

What's New?

  • Selective Panel Enablement: You can now choose to enable any combination of Console (logging), Script (JavaScript debugging) and Net (Network monitoring).
  • Automatic activation of HTML, CSS, and DOM views when Firebug UI is visible/activated (since they require minimal overhead).
  • Ability to suspend/resume Firebug.
  • A new tooltip telling you which tab/page in Firefox has enabled Firebug.

John Resig, creator of jQuery and now lead on the Firebug team, gives an excellent overview on his blog. Resig points out the currently rather global nature of enabling certain Firebug features, the overhead of enabling them (especially Script, which slows down all JavaScript running in Firefox about 25%), and states that all of these issues are targets for the 1.3 release.

Use the Add-ons panel in Firefox to update your plugin or get it now.

The release notes are here.

Faster JavaScript in Firefox 3.1

Tagged:  

Mozilla plans to give some relief to web developers struggling to create a "desktop-like" experience for web applications: relief in the form of huge increases in speed. On Friday, the father of JavaScript, Brendan Eich, announced the launch of a new JIT (Just In Time) JavaScript compiler called TraceMonkey that will be included in Firefox 3.1.

Depending on the benchmark, TraceMonkey currently improves JavaScript performance in Firefox 3.1 by about 2 to 37 times over Firefox 3.0. The average performance improvement is predicted to be about 4.6 times faster.

TraceMonkey is an evolution of Mozilla's current JavaScript engine, SpiderMonkey, that also draws from the Adobe-contributed Tamarin Tracing project. It is based on the concept of tracing (or trace-based compilation), which takes the approach of monitoring bytecode interpretation, following frequently-executed backwards branches to a "loop start point", analyzing the linear sequence of instructions in what is called a "trace" (using data structures called Trace Trees), and natively compiling these code paths. This has the advantage over more traditional JIT compilers--that keep track of which methods get called most frequently, and do whole-method analysis and compilation--of having to analyze and natively compile only the performance-critical parts of the code. It also has the advantage of being more mobile-friendly as this translates to a much lighter memory footprint. Andreas Gal, the principal architect of the TraceMonkey project, discusses the technique in his blog.

According to Gal, Firefox now has the "fastest JavaScript engine in the world". So what can you do when your browser's JavaScript is that fast? How about online photo editing...

ECMAScript Harmony

Tagged:  

Big news for the future of the Web: JavaScript 2 (ECMAScript 4) is dead, though pieces of it will live on in the new ECMAScript 3.1-based (informally dubbed "Harmony") specification. The members of the ECMA Technical Committee 39 (Adobe, Mozilla, Opera, and Google in favor of ECMAScript 4 and Microsoft, Yahoo in favor of the less ambitious ECMAScript 3.1), which had been at odds over the future direction of the JavaScript language for some time, finally agreed upon the new direction. Brendan Eich, the original creator of JavaScript, broke the news on Wednesday (8/13).

The details of what the new unified specification will look like are far from finalized at this point, but clearly it will be a very scaled back version from the ambitious ECMAScript 4 proposal. Some early results:

  • Packages, namespaces, and early binding from ES 4 are off the table for good.
  • ES 4 classes are being "rephrased": they will now be syntactic sugar for lambda-coding and Object.freeze() (which was proposed in ES 3.1)
  • JavaScript getters and setters are being fast-tracked as part of the new specification.
  • ES 4 let expressions seem to have some general agreement among committee members.

The announcement has sent ripples across the Web. Adobe, which had built ActionScript 3 to closely match anticipated ECMAScript 4 features, has maintained that they will not change AS 3 at all in response to the new direction. Some have speculated that Microsoft's motivation in bucking the ECMAScript 4 standard--and certainly the main factor in why it was abandoned--was political.

Whatever the reasons for abandoning ECMAScript 4, it is certainly clear that JavaScript will now evolve at a much slower pace than some had hoped or anticipated.

YUI 3.0 Preview Release 1

The Yahoo! User Interface development team has released the first preview version of YUI 3.0. According to the team blog, there are 5 goals for the new release: lighter code (in kb), faster code (fewer HTTP requests, more compact code), greater API consistency, more powerful API capability, and more securable code.

What's New?

  • Sandboxing: each YUI instance can now be separated from other instances via YUI.use()
  • Modularity: YUI 3.0 is architected to use smaller, more re-usable modules.
  • Self-completing: With the seed file in place, you can tell YUI what modules you want to use, and it will download them in a single HTTP request.
  • Selectors: Elements can be targeted via CSS selector idioms (much like jQuery)
  • Enhanced Custom Events: Custom Events in YUI 3.0 have been enhanced with support for bubbling, stopping propagation, assigning/preventing default behaviors, among other things.
  • Nodes and NodeLists: You can now reference elements via Node and NodeList facades, allowing a more fluid API.
  • Chaining: YUI is adopting a fluent interface style, using method chaining to achieve greater expressiveness (and compactness)

For those who don't like the jQuery-style fluent interfaces in YUI 3.0, a more explicit/verbose API is still available. YUI 3.0 will not be completely backward compatible with YUI 2.0, but there will be a limited compatibility layer.

You can download the preview release here. A final release is not anticipated until next year.

Different Types of Poker Games

Tagged:  

Knowing the basic rules is as important knowing the different types of Poker games around. You may know the rules but not unless you know the type of game you are playing your chances to win will be lessen. As Poker gains its popularity amongst the crowd thus the creation of different version or types of poker depending on the location it generated.

Poker games ranges from the very famous Texas Hold’em, Omaha Hold’em, Stud and Five Card Draw. As you read along rules and versions for the above mentioned games would be discussed

The very famous Texas Hold’em game is played with a minimum of two to a maximum of ten players. It can be played in several versions such as Limit, Pot Limit or No Limit. The player will be given two faced-down cards in their hand and there would be five faced-up common cards that would be shared by the players to complete their five hand card. The player with the highest card on hand on the end of a round wins the game.

The next game is Omaha Hold’em. This game same as the Texas Hold’em can be played in different versions, Omaha hi and Omaha Hi Lo. The game start with the players having four cards on their hands and five community cards faced-up where the player can use to combine with their cards. The players can use any two of the four cards in their hand and combine it to any three from the five community cards. Depending on the version of the game, having the highest hand possible may give you a win for Omaha hi. While winning in Omaha Hi Lo would require you to have either the highest and/or lowest hand combination possible to be considered a winner.

Stud, another type of game in poker also has different variations. In here we have the Seven Card Stud, Seven Card High-Low, Mexican Stud and Caribbean Stud Poker. In Seven Card Stud and Seven Card High-Low is played with two to eight players. Each player would have three faced-down cards and four faced-up cards. From their set of cards the player can choose five from their seven cards and form the best combination. As for the Seven Card High-Low same as the Omaha Hi Lo, they would need to form either the highest and/or lowest hand combination possible to be considered a winner. On the other hand, Mexican Stud Poker is also the well known strip poker. Then we have the Caribbean Stud Poker that is very different from the previously discussed poker games. In this game all players plays against the dealer or banker any player who beats the dealer wins the pot money.

And last but not least is the Five Card Draw. This is the least famous game among poker players since this requires high level of skills and losing in this game is easy. It is played with a maximum of five players and a minimum of two. Each player is given five faced-down card and from this the player may chose to change his cards or start to bet and wish to have the highest hand amongst the player in order to win the game.

Continuous scrolling pattern using JavaScript and ASP.NET

Tagged:  

You have probably seen some of the search engines where you can keep scrolling through your search results and they load as you scroll without clicking a next button. Well if you have been looking for a good example the Janko at Warp Speed blog has put together a good example using .Net and JavaScript.

Below is an excerpt from the post.

Implementation

continuous scrollingTypically, user is notified that new content is being loaded by showing indicator in the bottom right angle of a content (as you can see on the screenshot on the left).

Generally, it looks like this: Initial content is loaded on the start. When user scrolls down to the end of the content, JavaScript function calls local WebService and a set of new items is sent back to the client.

Let's make an example. Since I use Google Reader every day, let's make something that looks like it. Ok, I admit, I stole colors for this example :)

This is going to be very simple. I have a list of countries stored in SQL database. Each country has ID, Name and number of Internet users. I would like to show the complete list in a div, and to enable continuous scrolling. Image on the left shows our example.

So, I will define CountryWS that will get the data from the database. This is the first catch and might be tricky. Since new data have to be loaded on request (precisely on scroll) I have to do paging in the database. I do that by sending two parameters to my stored procedure: PageIndex and PageSize. PageIndex will tell my stored procedure which page to query, and PageSize - how many items to retrieve.

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
public class CountryWS : System.Web.Services.WebService
{
    [WebMethod]
    [ScriptMethod]
    public List<Country> GetMoreCountries(int pageIndex, int pageSize)
    {
        System.Threading.Thread.Sleep(1000);

        SampleDAO sampleDAO = new SampleDAO();
        List<Country> countries = sampleDAO.GetCountriesPaged(pageIndex, pageSize);
        return countries;
    } 
}

That is "the server" part. Let's see what will happen on the client. All items will be rendered in a div that has onscroll handler defined.

<div id="content" runat="server" onscroll="OnDivScroll()">
    <%--Items will be rendered here--%>
</div>

OnDivScroll function will do a simple job - it will determine if the user scrolled down to the near bottom of the content. Then it will call CountryWS and pass the result to HandleRetrievedData function.

function OnDivScroll()

    var content = document.getElementById('<%=content.ClientID %>');
    if(content.scrollTop < content.scrollHeight - 500)
        return;

    CountryWS.GetMoreCountriesObject(pageIndex, pageSize, HandleRetrievedData );
}

This is a second catch. Why near? The answer is simple - if you want your user to read smoothly, you'll have to load a new content BEFORE he/she reaches the end of the content. Ok?

And for the end, HandleRetrievedData function will parse the result and render new content.

function HandleRetrievedData(result)
{
    var content = document.getElementById('<%=content.ClientID %>');

    for (var i = 0; i <= result.length - 1; i++)
    {
        content.innerHTML += "<div class='entry'><b>" +
            result[i].CountryName + "</b> (" + result[i].Symbol + ") - " +
            result[i].InternetUsers + " internet user(s)</div>";
    }
}

You will notice that sample code is more complex than this example, but I will let you sweat a little bit ;)

You can read the full post here.

Web Based Document Viewer

Tagged:  

AJAX Document Viewer www.ajaxdocumentviewer.com
Ajax Document Viewer is a web based online document viewer and can embedded into any web page or linked from any page. It is fast, customizable and FREE.
Are you having problems displaying documents, pdf's, images, word documents? Do your customers have to download a reader to view a file? Do you need a fast pdf reader? Do you need a universal viewer for any kind of documents?

All these problems go away by using Ajax Document Viewer.

For most companies, getting software products to market on time, on budget, and with the right features and functionality is always a challenge. But it doesn't have to be.

Tibco General Interface 3.6.0 Released

Tagged:  

General Interface (GI) 3.6.0 has been released. This new version promises JSON data mapping (a very good thing as JSON is being highly used by Web 2.0 sites) and template custom control among other things.

Below are some of the key features highlighted on the GI website.

Make Richer Ajax Applications. Faster.

TIBCO General Interface™ 3.6.0
Professional Edition

100+ ready made Ajax controls

Unparalleled visual tools

Extensive docs

Open source BSD licensed


General Interface 3.6.0 brings you:

Template custom control

CDF form mapping

JSON data mapping and JSONP protocol support

One of the main issues that I have had with GI in the past is that it is very heavy on the front end load. Tibco has addressed this issue by allowing you to use different deployment types that allow you to fine tune what is loaded. This really helps the performance and makes the possible use of GI on public facing sites closer to a reality (there are still some browser compatibility issues that will keep the tool from major adoption on public facing sites).

You can learn more about GI (including downloading of the application) here.

The new version of GI is a good tool for developing Ajax applications for internal corporation use. While it is getting closer to possibly being useful in public facing applications, there is still some work to be done before I can see this happening.

Ext GWT 1.0 Released

The Ext JS team has released version 1.0 of its SDK for developing GWT applications with the Ext JS library. Despite some controversy around Ext's licensing strategy (namely the switch from LGPL to GPL), Ext GWT is currently one of the better integrations between a Java web application framework and a JavaScript framework.

Ext GWT 1.0 has been compiled and tested against GWT 1.5 RC1. Downloads are located here.

Syndicate content