25 Excellent Ajax Techniques and Examples

Ajax allows for rich-internet applications that mimic the responsiveness and complex user interfaces typically associated with desktop applications. Moving applications to the web browser opens many possibilities, including the ability to save user data, connecting with other users for collaboration and sharing, and making deployment and using the application easier since web browsers are standard-issue with most computers regardless of operating system.

If you’re interested in expanding your understanding of Ajax techniques and practices, check out these 25 hand-picked Ajax articles and tutorials that outline various methods and concepts involved in the development of Ajax-based applications. Though most are geared for budding and intermediate developers, veterans might find a trick or two they haven’t encountered before.

 

1. Ajax RSS reader

Ajax RSS reader - Screenshot

Build a simple RSS reader that takes remote XML data from RSS feeds using Ajax, PHP, and MySQL. This example allows users to view feed content from multiple sources in one page. At the bottom of the article, you’ll find an animated demonstration of the RSS reader.

2. Ajax Desktop Tutorial

Ajax Desktop Tutorial - Screenshot

This tutorial is a step-by-step guide on how to create a desktop/homepage similar to Pageflake and Netvibes. The goal of this tutorial is to showcase some common techiques involved in developing web-based applications like manipulating the Document Object Model (DOM), listening to events (i.e. certain mouse movements), and working with remote data.

3. Ajax for Chat

Learn to build a simple web-based chat client using asynchronous JavaScript, XML, and PHP. The tutorial’s example utilizes the Prototype JS framework, MySQL, and PHP.

4. Create your own information space with Ajax and del.icio.us

This article outlines the basic foundations of using Ajax alongside an API service. It uses the del.icio.us API, but the methods and concepts can be adapted to other popular services such as Digg’s or Flickr’s. It’s an essential resource for those contemplating on creating web applications that use remote XML data - a couple of live examples are popurls and SocialBlade, which obtains information from social media sites using available API services. This tutorial requires you to register (for free).

5. Ultra-lightweight Charts For AJAX

Ultra-lightweight Charts For AJAX - Screenshot

See how to create a super-lightweight (1.78 KB) charting component using Flash with Ajax. The example allows you to generate visual graphs using dynamically-loaded data. The solution involves ActionScript-JavaScript communication, and covers the use of the setData and setStyle ActionScript methods for generating and styling the charts.

6. Quick Calendar Using AJAX and PHP

Quick Calendar Using AJAX and PHP - Screenshot

Learn how to create a calendar component using Ajax and PHP. Ajax is used for navigating through the calendar months without refreshing the page.

7. How to integrate Google Calendar in your website using AJAX

How to integrate Google Calendar in your website using AJAX - Screenshot

This tutorial shows you how to create a web page component that calls a publicly available Google calendar. Google Calendar allows you to easily create, share, and manage events and is an excellent feature for community websites.

8. Edit In Place with AJAX Using jQuery

Edit In Place with AJAX Using jQuery - Screenshot

In this example, users are given the ability to edit the XHTML of the web page they’re currently viewing. The example is a proof-of-concept – presenting how this functionality can be achieved using jQuery. Normally, you’d want to send the user’s edits to server-side code to perform processes such as validation or saving the changes in a database.

9. Creating an AJAX Rating Widget

Creating an AJAX Rating Widget - Screenshot

Learn the concepts of creating a rating system without prompting the user to click a submit button or refreshing the page. The tutorial showcases how you can do this in a variety of ways by including examples for the following four JavaScript frameworks/libraries: Dojo, jQuery, mootools, and Prototype JS.

10. AJAX file upload tutorial

AJAX File Uploader - Screenshot

In this tutorial, you’re shown how to create a file uploader. The tutorial uses JavaScript and PHP.

11. Use AJAX and PHP to Build your Mailing List

This tutorial from SitePoint walks you through the development of a mailing list form that accepts submissions asynchronously. It uses MySQL for storing the data inputted by the user and Prototype JS for simplifying Ajax requests and binding event handlers.

12. Safer Contact Forms Without CAPTCHAs

Safer Contact Forms Without CAPTCHAs - Screenshot

One way to reduce spam from public web forms is to implement a system to verify if the submitter is human by using image CAPTCHAs. Problems arise with accessibility when individuals using visual assistive technologies are presented with the test (and thus cannot continue on). This simple technique uses an Ajax call to a server-side script to drop a cookie on the user’s computer.

13. Using AJAX with CAPTCHA

Using AJAX with CAPTCHA - Screenshot

Avoiding the use of image-based CAPTCHAs is a good idea. With that said, many sites still prefer using this technique to distinguish between humans and computers. If forgoing web accessibility is appropriate for your situation, this article outlines a unique method for administering CAPTCHA tests. The user is presented with a sequence of descriptions (i.e. Animal, Costume, Boy), and asked to click on a set of images in sequential order. The clicks are recorded and validated, returning the appropriate status message. Though probably not an ideal solution to CAPTCHAs, it does outline a fundamental technique for developing responsive user interfaces - use it for inspiration.

14. Ajax-based login form

Ajax-based login form demo - Screenshot

Create a basic login form that asynchronously validates the inputted data. The example uses the jQuery form plugin and PHP to process the request.

15. Nice Ajax effect for message box using Mootools

Nice Ajax Effects for messages - Screenshot

In this example, a message box that fades after a specified duration is displayed when the user clicks on the "save" button. This is a model for supplying users with the status of their request, and an real Ajax request should typically happen when the user clicks on the "save" button.

16. AutoCompleter Tutorial

AutoCompleter Tutorial - Screenshot

The AutoCompleter tutorial teaches you how auto completion of input fields can be accomplished. The example uses jQuery, PHP, and MySQL.

17. Auto-populating Select Boxes using jQuery & AJAX

Auto-populating Select Boxes using jQuery & AJAX - Screenshot

A key technique in Ajax applications is to populate content without a page refresh. In this tutorial, you’ll witness how this is done with a PHP and JavaScript (jQuery to make it easier).

18. Build an Ajax Dropdown Menu

Here’s a basic example of working with external data to load content into a drop-down menu - from our beloved Webmonkey. Though the example uses a text file, you can use your own data source when applying the technique to your own purposes.

19. Ajax/PHP Shoutbox Tutorial

Ajax Shoutbox - Screenshot

Make an Ajax-powered shoutbox using PHP and JavaScript. This tutorial walks you through the server-side and client-side requirements of creating a shoutbox, which can be adapted to other functions such as a commenting system.

20. Building Tabbed Content

Building Tabbed Content - Screenshot

Learn how to build a tabbed content component with the data populated via Ajax. The tutorial uses PHP and Prototype JS.

21. How to Load In and Animate Content with jQuery

Load In and Animate Content - Screenshot

This step-by-step tutorial shows you how to load data into a web page using jQuery to handle the Ajax request and manipulation of the DOM.

Best practices and workaround techniques to common issues
22. The Hows and Whys of Degradable Ajax

The Hows and Whys of Degradable Ajax - Screenshot

This article discusses the concept of creating Ajax-based applications that degrades effectively when JavaScript is not detected, providing increased accessibility and bulletproof-ness. Completely successful degradation means that an application is still usable and information is still accessible without reliance to JavaScript or CSS.

23. Avoid unnecessary Ajax traffic with session state

This article presents a method for minimizing unneeded database/computational processes and avoiding large status updates if no changes have occurred. By using client cookies to keep track of the session’s state, you can cut down on processes that may be redundant. Though the article presents an example using Python for server code – the model remains the same in virtually any language you use.

24. A Better Ajax Back Button Solution

Here’s a workaround to issues pertaining to Ajax-loaded content breaking web browser controls and bookmarking capabilities. The solution involves firing off a function at a set interval that checks the #value of the URL, and then presenting the correct content. It restores the ability to bookmark the content. In Part 2 of the article, you’ll see a working example and additional discussion of this method.

25. Making Ajax Work with Screen Readers

Making Ajax Work with Screen Readers - demonstration Screenshot

One of the biggest drawbacks of loading content via Ajax is that it fails to indicate an update of the content to users who are reliant on screen readers. For people who are not visually-impaired – messages and status indicators can be visual queues that the content is changing; this isn’t effective for users with visual impairments. This article draws out the underlying issues and proposes techniques to make Ajax-based applications work with screen readers.

There we have it… some brilliant Ajax techniques and examples. I hope you’ve found some links of interest that will help you in a future project or in advancing your command of Ajax.




Source: sixrevisions.com
Posted By: IndoSourceCode

Technorati Tags: ,,
| Continue Reading..

Microsoft Makes Data First-Class for Developers

ORLANDO, Fla. - As Microsoft moves into a new era of developer enablement with its .Net platform, data becomes a first class citizen in how developers create and work with appplications.

Indeed, Jonathan Perera, general manager of Microsoft's application platform division, said part of what Microsoft is trying to do is "take a developer that knows .Net and empower them to use that tool set in new and interesting ways." One of those ways is to better integrate data into the applications they build on the platform.

"The story is about how Microsoft is helping developers of all shapes and sizes without causing them to learn new skills," said S. "Soma" Somasegar, senior vice president of Microsoft's Developer Division. "We are a platform company at heart, and we expect developers to be able to build on our platform. The developer audience is our most important audience, and we continue to deliver products and tools for developers to build on our platform," Somasegar said at the Microsoft TechEd Developer 2008 conference here.

However, "as much as we've expanded the tools and services, the one thing we continue to have is the commitment to a single programming model," Somasegar said. "The saying used to be write once, run anywhere, well we say 'learn once, run anywhere,' because once you learn the Microsoft programming model you can use it to build applications anywhere" on the platform, he said.

Moreover, "data has become an integral part of an application," Somasegar said. "A data enabled application is becoming more core to application development. LINQ[Language Integrated Query] allows us to bring together programming and data," he said. "And with SQL Server, the .Net framework and Visual Studio we think we have a fantastic platform where you can store, model, query and sync your data, and also be able to visualize and understand your data,"

As one of the core announcements at Microsoft's TechEd event, the company is also announcing a new Community Technology Preview (CTP) of its Microsoft Sync Framework, a synchronization platform that enables collaboration and offline scenarios for applications, services and devices.

"And with SQL Server 2008 coming later this summer we enable you to manage any type pf data -- structured data, images, spatial data" and more. Microsoft supports SQL Server for devices as well as large enterprise systems , "and we now have SQL Server data services to take advantage of cloud storage, so you see scale like you've never seen before."

Meanwhile, from the framework side, with support for Microsoft's ADO.Net, a developer can model databases, Somasegar said. And with SQL Server 2008, the .Net Framework 3.5 and Visual Studio 2008, "we let you query data from within your program using the same language constructs," he said. Moreover, "one of the reasons we get excited about Team Foundation Server (TFS) is we can store everything in TFS. All the stuff from your software development experience. The more we can do to enable you to store your data we feel like we are doing a great services." TFS is Microsoft's offering for source control, data collection, reporting, and project tracking, and is intended for collaborative software development projects.

Meanwhile, David Campbell, a Microsoft Technical Fellow working in the Data Storage Platform division, said he has specialized in how developers work with data, having been with the SQL Server team for 14 years after coming from Digital Equipment Corp. "We've extended SQL Server down to devices and scaled up to large servers and now are building a cloud service. And we support all types of data from just relational to BLOB [Binary Large Objects] to now integrated Campbell said

In SQL Server 2008 two new things appear, support for spatial data and file stream support, he said. The new release also support a broader array of operations over the data, including the ability to integrate, analyze, visualize, report on and synchronize the data, he said.

"The thing with SQL Server is it's a database product, but what's in the box is a BI [business intelligence] platform as well," Campbell said. "There are reporting services in the box. We're making BI be more real-time and embedding it in applications."

Meanwhile, at TechEd, Microsoft is announcing Velocity, a distributed explicit, coherent cache, "to place a cache above the database and the application," which can be integrated with ASP.Net as a session cache, Campbell said.

Velocity is most like Oracle's Tangosol technology, Campbell said. Oracle acquired Tangosol last year. Tangosol's Coherence product, now subsumed into Oracle simply as Tangosol, provides a proven reliable in-memory data grid technology designed to meet the new demands for real-time data analytics, compute intensive middleware and high performance transactions—often referred to as Extreme Transaction Processing (XTP). Memcached is a similar solution in the open source world, Campbell said.

"Tangosol is probably the closest in terms of what it'll [Velocity] look like," Campbell said. "And if you know .Net, you'll know Velocity," he said noting that it will be integrated into the platform.

"The issues is the reduction of latency and getting data from one place to another," Campbell said. "We have to design as if the cost of storage has gone to zero, he said.

Primarily, "it's a matter of getting the right data in the right form at the right time," Campbell said. That is what Microsoft is delivering. And customers such as NewsGator are buying. NewsGator is using SQL Server 2008 to manage 2.5 billion articles, Microsoft officials said.




Source: eweek.com
Posted By: IndoSourceCode

Technorati Tags: ,
| Continue Reading..

New Windows Live Writer CTP and SDK Available

A new Community Technology Preview of Windows Live Writer and a fresh release of the Windows Live Writer Software Development Kit are available for download. Both products have been updated, according to Microsoft and, in this context, their release in tandem is by no means coincidental. As far as the Windows Live Writer is concerned, end users should take note that the CTP build is aimed more at developers, since it failed to qualify for a Beta version.

"This release is largely about updates to the Writer SDK, which now includes hooks

for pre- and post-publish events. These updates are still experimental and these APIs are not stable--we may make changes based on your feedback that break plug-ins that use these new methods. However, we’re really excited about the new set of scenarios that have been unlocked and look forward to hearing feedback from all of you Writer plug-in developers out there," revealed a member of the Windows Live Writer Team.

Still, the new CTP of Windows Live Writer does manage to deliver a collection of features and enhancements spanning across various areas of the software including video and image publishing, editing and the user interface. The CTP Build will permit users to enjoy a revamped toolbar, tabbed view switching and advanced category control. Windows Live Writer now counts words, and permits videos to be uploaded to Soapbox, also delivering basic photo editing capabilities such as cropping and tilting.

The Windows Live Writer SDK has also evolved, with Microsoft emphasizing the plugin types which have been added in the new release. Publish notification hooks and header/footer content sources are the new items featured in the SDK, addressed directly at plugin developers.

"Publish notification hook plugins allow you to execute code before and after Writer posts content to a weblog. They can examine the contents of the post and have the option to cancel the publish operation. Header/footer source plugins insert headers or footers during publishing. Headers and footers are not directly editable by Writer users and do not appear in Writer’s editing views, but are visible in the Preview view (and of course, on the published blog post)," the Windows Live Writer Team added.

Windows Live Writer 2008 Technical Preview is available for download here.
The Windows Live Writer SDK can be downloaded from here.




Source: news.softpedia.com
Posted By: IndoSourceCode

Technorati Tags: ,,
| Continue Reading..

Microsoft Urges Users Stop Using Safari In Windows Platform

Microsoft's security team is advising users to stop using Apple's Safari browser pending investigation into a quirk that allows miscreants to litter their desktop with hundreds of executable files.

Windows users who visit a booby-trapped site with Safari could be forced to download and execute malicious files with no prompting, Microsoft says. The "blended threat" is a result of the default download location in Safari and the way the Windows desktop handles executable files.

This Microsoft advisory suggests users "restrict use of Safari as a web browser until an appropriate update is available from Microsoft and/or Apple."

The recommendation comes a week after researcher Nitesh Dhanjani reported that Apple's browser doesn't seek user permission before downloading certain types of files. Even when encountering malicious iframes - a common occurrence these days even on the most trustworthy of sites - Safari obediently does what it's told to do, including downloading a file hundreds of times.

Apple's security pros, upon learning of the so-called carpet bombing vulnerability, said they didn't see it as a significant threat. A researcher in Cupertino wrote to Dhanjani that it may get fixed at some point down the road as "a further measure to raise the bar against unwanted downloads," but said it could take a quite a while, if ever, for that to happen.

Apple's unfortunate refusal probably explains why Microsoft's security arm has resorted to the unusual recommendation. We can't remember the last time Redmond counseled users to avoid installing a mainstream product for security reasons. Apple representatives didn't respond to a request to comment for this story.

And before any Mac users decide this is an issue they can safely ignore, remember this: While Microsoft's recommendation obviously is limited to Windows users, Dhanjani says the carpet bombing scenario can play out on OS X, too. ®




Source: channelregister.co.uk
Posted By: IndoSourceCode

Technorati Tags: ,
| Continue Reading..

Microsoft Wins Deal For Live Search To Be Default On HP Computers

For all the excitement about Microsoft Live Search Cashback, I think a new announcement out today is far more important to Live Search's potential growth. It will be the default search engine on Hewlett-Packard computers sold in North America beginning in January 2009, winning the deal from Yahoo. HP is currently the world's largest PC manufacturer and second largest in the United States. Below, more about the deal plus a review of all major computer-search deals.

HP computers will have a special HP-edition toolbar as part of the Internet Explorer browser they ship with. Aside from providing links to key HP services, the toolbar will include a search box set to use Live Search by default.

Microsoft says the distribution deal is the most "significant" that they've ever done. While many assume that Microsoft already has a natural advantage in the browser since it makes Internet Explorer, it is not the default choice for a "clean" computer. Instead, to please the US anti-trust authorities, consumers must select from one of several choices.

The exception is when the PC maker itself has cut a deal for the default option. Until now, I'd say Google had been the leader in arranging such deals. Probably most well-known is Google's deal with Dell that was cut in 2006 and which produced some controversy last year because of how Dell pointed people hitting errors to pages dominated with Google ads (see Google & Dell's Revenue-Generating URL Error Pages Drawing Fire for more).

Microsoft has said the price of fighting Google for Dell was too high. It's not disclosing how much the HP deal cost. But given the billions it was prepared to spend on acquiring Yahoo, I'd assume it's willing to pay much more for distribution these days.




More : searchengineland.com
Posted By: IndoSourceCode

Technorati Tags: ,
| Continue Reading..

Revolutionising The User Interface (Introducing MenuKiller for WPF)

I don't fancy myself a frontend guy, getting controls and tables and other things to align is usually not my idea of fun, but way back in the days I was a Flash developer (Flash 3, 4 and even 5 for a bit) because Flash and possibilities that could be achieved with vector graphics animation (together with media like music and videos) fascinated me. It opened up my mind to alternative ways of designing User Interface and just like that I was hooked, well not for too long.

Then WPF came out and slowly but surely I started playing with it within the concepts of OBAs and Office System by enriching already boring office interface with cool embedded WPF controls, I talked about a nice example of it from MS in this blog post (http://dotnet.org.za/zlatan/archive/2008/02/07/building-obas-with-wpf-wcf-and-linq.aspx).

Microsoft has been progressively working on reviewing the UI for most of their product, mostly Operating Systems but they haven't yet changed the fundamental way in which the UI is being used, as that would require quite a bit of "Change Control", mostly they've just modernised the UI that hasn't fundamentally changed since Windows 95. Mac has on the other hand spent quite a bit of time and effort on justifying the stupidity of using only one mouse button in favour of ever more popular "right click" button, which has resulted in different thinking when approaching the UI enigma, but not enough to fundamentally change the approach.

There has been some bold challenges in this retrospect, some of you might remember my post "Imagine the User Interface that requires no clicks?!?" (http://dotnet.org.za/zlatan/archive/2008/02/18/imagine-the-user-interface-that-requires-no-clicks.aspx). This has served as an inspiration to many WPF Gurus, like our very own Rudi Grobler (http://dotnet.org.za/rudi/) who has also pushed the boundaries with introducing his own way of navigating through WPF with Nintendo Wii (Having a Wii bit of fun... - http://dotnet.org.za/rudi/archive/2008/02/13/having-a-wii-bit-of-fun.aspx).

Well my friend Schalk pointed out an excellent article titled A MenuKiller Control - Draft (http://www.emphess.net/2008/05/04/a-menukiller-control-draft/), which introduces another excellent concept, and personally, I can't wait to see how this plays out.

Here's the quote of the intro:

"In an effort to take user experience to the next level, designers have come up with ideas on how to solve old problems in a new way. In the last few months, the term "Differentiated User Experience" or simply "Differentiated UX" has come up to describe these efforts.

One of the beforementioned UI designers is Dax Pandhi, who published an article "Rethinking the Button" on his blog which introduced a new control he calls MenuKiller. This control is certainly more than a replacement for the Menu and ContextMenu, as it can be used in ways that are quite different. However, it turns out that changing the way things are typically done is indeed not so easy.

This article gives an overview of my implementation of the MenuKiller and presents a small sample application. It's written in C# using .NET 3.5 and Visual Studio 2008. What is presented here is not a full-fledged control, since there are quite a number of open todos. Yet, I hope that this motivates the use of different controls and serves as a good starting point for other WPF control development."

You can download the source code there as well.




Source: dotnet.org.za
Posted By: IndoSourceCode

Technorati Tags: ,
| Continue Reading..

Go back to your websites and prepare for IE8

Microsoft is warning webmasters to get their sites ready for Internet Explorer 8, with a second beta due later this year.

The company says the second beta of the new browser will arrive this summer, and has issued a "call to action" to developers to make sure their websites will display properly when the beta is launched.

The problem stems, ironically, from Microsoft's new-found fondness for open standards. IE8 renders websites in Standards-Compliant mode by default, meaning that site that have been specifically tailored for previous versions of IE might not show properly.

"As such, we have provided a meta-tag usable on a per-page or per-site level to maintain backwards compatibility with Internet Explorer 7," Microsoft's senior technical account manager, Nick MacKechnie, in a in a blog post. "Adding this tag instructs Internet Explorer 8 to render content like it did in Internet Explorer 7, without requiring any additional changes."

"We are encouraging site administrators to get their sites ready now for broad adoption of Internet Explorer 8, as there will be a beta release in the third quarter of this year targeted for all consumers," MacKechnie adds.

The first beta of IE8 has an "Emulate IE7" button, allowing users to effectively revert to the old browser on pages that don't render properly.

Microsoft makes it plea just as Mozilla nears its completion of Firefox 3. Mozilla will launch a second Release Candidate of Firefox 3 this week, with the browser due for a full launch before the end of the month.




Source: pcpro.co.uk
Posted By: IndoSourceCode

Technorati Tags: ,
| Continue Reading..

Enter your email address:

Delivered by FeedBurner

Followers