Archive for the 'AJAX' Category

How AJAX Works: 10 Practical Uses For AJAX

June 13th, 2009 by tevaslurnaste

AJAX has gotten more and more popular over the years, and has allowed web applications to act more and more like desktop applications. AJAX can provide a lot of additional functionality that could not be accomplished any other way

Go here to see the original: 
How AJAX Works: 10 Practical Uses For AJAX

Give your Web Interface a Great Look

April 24th, 2009 by admin

Every designer has a set of controls they rely on to communicate an effective UI. This is my library of essential controls.

30_essential_controls

Unfortunately, no single RIA framework offers all 30 of these. So I included a checklist of which frameworks provide each control. If you have an addition or correction, please e-mail me, and I will post an updated framework/control matrix.

ria_frameworks

The frameworks reviewed include: Flex, Laszlo, Silverlight and 12 Ajax frameworks and toolkits: ExtJS, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, SproutCore, LivePipeUI,IT Mill, Backbase.

01. Auto Suggest

auto_recomend

Google’s Auto-Complete

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, IT Mill, Backbase, Silverlight.

02. Carousel (variation as Coverflow)

carousel_ex

Carousel Prototype carousel widget

Supported by: YUI, Prototype/script.aculo.us, JQuery, ITMill, Backbase, iCarousel

coverflow_ex1

Coverflow MediaEvent Service’s Slideflow

Supported by: Flex, Prototype/script.aculo.us, JQuery, MooTools, RadControls for Silverlight

03. Charts & Graphs

graphchart_wesabe

Charts Advanced charting features like hover details, drill down, rolling windows, toggle views…

Supported by: Flex, Laszlo, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery (SWF/Chart), MooTools, MochaUI, Backbase, SilverLight, AnyChart, Dundas, JPowered, JFreeChart, OpenFlashCharts, Flot, Plotr, PlotKit, WebFX, AjaxMcGraph, Measure Map.

04. Collapsible Panels (accordion, disclosure triangles, slide drawer)

collapsible_accordion

Accordion Mutually exclusive collapsible panels showing status

disclosure_arrows_mint

Disclosure arrows Mint.com uses disclosure arrows for summarizing and displaying accounts

collapsible_sliding_fluxiom

Sliding panel Fluxiom uses a sliding panel instead of a dialog to show the selected photo’s details

Supported by: Flex, Laszlo, ExtJs (called panels), Dojo, Google Web Toolkit (disclosure panel), Prototype/script.aculo.us (accordion), JQuery, MooTools (accordion), MochaUI (split pane), SproutCore (split pane), IT Mill, Backbase (accordion), RadControls for Silverlight (PanelBar and Sliding Panel).

05. Combobox (select multiple, alternate list box UI, editable)

combobox_multiselect_livepipe1

Select multiple LivePipe UI’s control takes less space and is easier to scan than an ocean of checkboxes

combobox_multiselect_ex1

Alternate listbox UI Best alternative for multi select in small spaces, clearly displays all selections, and provides an easy way to edit

Supported by: Alternate Listbox UI, LivePipeUI

combobox_editable1

Editable combobox Editable combobox allows for lookup and/or text entry

Supported by: Flex, Laszlo, ExtJs, Prototype/script.aculo.us, JQuery, MooTools (MUI.ComboBox), IT Mill, Backbase, RadControls for Silverlight.

06. Date Picker/Calendar (select range, date/time combination)

datepicker_jquery

Advanced calendar Select a range, discontinuous dates, or exclude a certain day

date_time_picker_ex3

Date/time picker Select a date and time in a single control

Supported by: Flex, Laszlo, ExtJS, Dojo, YUI, JQuery, Scal built on Prototype, MooTools, MochUI, IT Mill, Backbase, Silverlight, dhtmlxCalendar, keyboard accessible calendar, more examples on Woork

07. Dialogs (modal, light weight, lightbox)

dialog_modal1

Modal dialog Mint offers a modal for adding an account

dialog_modeless

Modeless dialog Google Maps provides a modeless dialog for getting directions

dialog_lightbox_jquery

Lightbox JQuery provides a lightbox plugin, a modal dialog that blacks out the parent screen

Supported by: Flex(modal), Laszlo (modal and modeless), ExtJs (modal), Dojo (modal and lightbox), YUI( listed under Containers: Modal and Overlay), Prototype/script.aculo.us, JQuery (modal, modeless, lightbox) , SproutCore (has a really nice example of each under ‘panes’), MooTools, MochaUI, LivePipe UI, IT Mill, Backbase (modal and modeless window), Silverlight (modal and lightbox).

08. Docking

ria_frameworks

Dockable menu Campaign Manager by eyeblaster offers a pinned/unpinned menu for navigating between campaigns

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI, Backbase, Silverlight.

09. Drag & Drop Manager

drag_drop_extjsdrag_drop_extjs_drop

Drag and drop ExtJS photo organizer demo

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI, Backbase, Silverlight.

10. Dynamic Filter

dynamic_filter_flex

Dynamic table filtering Flex offers a filter feature that dynamically filters the results while the user types, demo

dynamic_filter_rico
Dynamic column filtering Dynamic filtering can be implemented at the column level providing advanced filtering capabilities
Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, JQuery, IT Mill, Backbase, Silverlight, Open Rico

11. Feedback/ Status

ria_frameworks

Feedback Gmail status message

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI, IT Mill, Backbase, Silverlight

12. Fisheye/ Spotlight

fisheye_alpslab

Fisheye Apslab Fish-eye Lense

Apply this concept to a dense chart or map for a truly useful feature.

Supported by: Flex, ExtJs (spotlight), Dojo , Prototype/script.aculo.us, JQuery, MooTools, MochaUI, Silverlight

13. Gauges (and other visual progress or status indicators)

gauge_citibank
ria_frameworks

Gauge Thermometer gauge in RadControls for Silverlight

Gauges provide a concise visual summary in heads-up-display or other goal directed designs

Supported by: Flex (various plug-ins and Flex Charting), ExtJs (combined with GWT), Dojo, Google Web Toolkit, Prototype/script.aculo.us, JQuery (SWF/Gauge), MooTools, MochaUI, Silverlight, AnyChart, Dundas

14. Help Tip/ Quick Tip

help_tip1

Quick Tip Picnik engages new users with some helpful advice

More than just a tooltip, these are fully formatted messages typically presented in a modeless dialog.

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI (use overlay container), Google Web Toolkit (use popup panel), Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI (use window control), IT Mill, Backbase, Silverlight

15. Hot Keys

ria_frameworks

Hot keys Balsamiq Mockups has hot keys for frequent actions

Supported by: Flex, Laszlo, Mochui, LivePipe UI, IT Mill, Backbase, Silverlight

16. Hover Action

ria_frameworks

Hover action Instead of cluttering the screen with redundant actions, Basecamp reveals the edit and delete actions onHover

Supported by: Flex, Laszlo, ExtJs, YUI, JQuery, MooTools, MochaUI, Backbase, Silverlight, good post by Bill on hover actions and missed moments

17. Hover Detail

ria_frameworks

Hover detail Netflix hover details

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI (overlay), Prototype/script.aculo.us, JQuery, MooTools (smart hover box), IT Mill, Silverlight

18. Inline Edit

inline_edit_flickr

Inline edit Instead of showing form fields in pages that are usually read (not edited), Flickr provides inline editing

Supported by: Flex (only in the grid), Laszlo (only in the grid), ExtJs, Dojo, YUI, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, IT Mill, Backbase (only in the grid), Silverlight (only in the grid)

19. Progress Indicator/ Loading

loading_picnik

Progress indicator Picnik loading indicator

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI, IT Mill, Backbase, Silverlight

20. Rating

rating_graffletopia

Star rating Graffletopia offers one-click star ratings for shared stencils

Supported by: ExtJs extension, Dojo widget, Starbox for Prototype/script.aculo.us, JQuery, MooTools , MochaUI

21. Record Locator/ Paginator

record_locator_lls

Record locator Like the control in PDF Viewer, the record locator lets you navigate through records in a dataset or skip to a specific record by name

paginator_yahoo

Paginator Typically used for paging through tables, screens, or other result sets

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, LivePipe UI, Backbase, Silverlight

22. Slider

slider_innography

Slider Innography provides sliders in their quick filter for refining results displayed on a chart

Supported by: Flex, Laszlo, ExtJs, Dojo, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, IT Mill, Backbase, RadControls for Silverlight

23. Scoped Search

scoped_search_vimeo

Scoped search Like iTunes, allows for the optional selection of a category before entering free form search text, example from Vimeo’s help page

Supported by: custom css and js code, example at Janko at warp speed, RadControls for Silverlight

24. Sparklines

sparklines_retailmenot_goodcouponsparklines_google_analytics

Sparklines Great way to show the “shape” or trend of data is a small space, examples from RetailMeNot.com and Google Analytics. Created by Edward Tufte.

Supported by: Nuby on Rails, Any Chart, JQuery plugin, Flex , and two more ones for Flex at Microcharts and Birdeye, Google API, Visifire for Silverlight

25. Table/ Data Grid ( scrolling, editable, grouped)

table_scrolling_extjs1

Scrolling table Endless scrolling, no paging, just like a desktop app, example from ExtJS

table_cell_editing_blist1

Editable table Blist offers inline cell editing in their products. Best practice, highlight the selected row, and only display an editor in the selected cell. Don’t forget to accomodate keyboard navigation.

table_grouping1

Tree table Grouping by row, displays as a tree table, example from ExtJS

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Backbase, Silverlight

26. Toolbar

toolbar_sugarsynctoolbar_flickr1

Toolbar Provide actions in proximity to the object, examples from SugarSync and Flickr

Supported by: Flex, Laszlo, ExtJs, Dojo, YUI, Google Web Toolkit, Prototype/script.aculo.us, JQuery, MooTools, MochaUI, Backbase, RadControls for Silverlight

27. Vertical Browser

vertical_browser_apple

Vertical browser Apple’s vertical browser for exploring Dashboard widgets

Supported by: custom code of multiple list boxes

28. View Toggle (buttons, button bar)

view_toggle2

Toggle buttons Separate buttons for switching between graph and grid views Campaign Manager by eyeblaster

view_toggle_paypal

Toggle button bar Single button bar for capturing binary choices

Supported by: Flex, Laszlo, Dojo, YUI, JQuery, MooTools, MochaUI, Backbase, Silverlight

29. WYSIWYG Editor/ Rich Text Editor

wysiwyg_wordpress

Rich text editor WordPress offers a a WYSIWYG editor for blogging

Supported by: Flex, Laszlo, Dojo, YUI, Google Web Toolkit, JQuery, MooTools, MochaUI, IT Mill, Backbase, Silverlight

30. Zoom

zoom_jqzoom

Zoom Zoom in on a certain spot, example from jQZoom

Supported by: Flex, Laszlo, ExtJs (spotlight), Prototype/script.aculo.us (zOOm), JQuery, MooTools (Joomla), MochaUI, Silverlight (silverZoom)

Bonus- Desktop Style Container

desktop_container_otherinbox

Desktop style app OtherInbox built with SproutCore

A desktop style container isn’t actually a control, but frequently required when developing enterprise software and productivity web applications. Many of the frameworks that offer this feature include built in windows management, split panels, and fluid layout.

Supported by: Flex, Laszlo, ExtJs, YUI, JQuery, MochaUI, Backbase, SproutCore, Silverlight

Send me any corrections and/or additions, and I will upload an updated control/framework matrix.

Thanks to Joonas Lehtinen of IT Mill, Ryan Johnson of LivePipe, and Peter Svensson who is a Dojo expert, and Darren James, co-author of Ajax in Action.

Update* Cody Lindley at jQuery provided a comprehensive list with links to code for jQuery support for all 30 controls.

Tags: , , ,

Ajax Online Examples

April 8th, 2009 by admin

Loading XML into a page with xmlHttpRequest (#)

A cool little blog post and demo that Retrieves an xml atom feed and xsl stylesheet with XMLHttpRequest().

Client Side Validation Using the XMLHTTPRequest Object (#)

An example of using XMLHTTP to perform real time data validation, in this example for validating data entered into a user registration form. The example focusses on Microsoft and ASP.

XMLHttpRequest and innerHTML (#)

XMLHttpRequest is one of modern DHTML’s best kept secrets. - Haha, not anymore! Simon Willison offers up a little code that takes an HTML fragment, fetched via xmlhttp.open, and inserts it into an element with a specified id. Some good links and comments follow the article.

XMLHttpRequest, REST and the Rich User Experience : Paul James (#)

Paul James gives the basics of getting started with XMLHttpRequest and using REST for attaching the client-side to the server.

He builds an example where, upon entering a postal code and pushing a button, a form queries the server for the rest of the address information and fills in the appropriate fields when the data is returned.

Using the XML HTTP Request object (#)

Jim Ley provides his overview of the XML HTTP request object, getting into some browser details and detection before providing some examples and getting into using XMLHTTP with google’s SOAP API.

Very Dynamic Web Interfaces - XMLHttpRequest (#)

Drew McLellan provides an excellent overview of the basics of using XMLHttpRequest offering up a simple, well documented example used for checking if a username is available (similar to g-mail).

XMLHttpRequest Demo (#)

Three examples of XMLHttpRequest in use: autocomplete, live search, and live action.

To Do with Ta-da List: Simple sharable to-do lists. (#)

A free web based to-do list application provided by 37Signals, makers of Basecamp. Sign-up and try it out; XMLHttpRequest in action.

XHConn - A Simple XMLHTTP Interface (#)

From the site: This library is meant to simplify and unify the code necessary to successfully send and receive simple data via XMLHTTP.

XMLHttpRequest API madness (#)

Two scripts that use XMLHttpRequest: 1 - a javaScript interface to the languid.cantbedone.org API and 2 - a javaScript interface to the del.icio.us API.

Dynamic HTML and XML: The XMLHttpRequest Object (#)

Apples page on the the XMLHttpRequest object, covering object creation, methods and properties in addition to security issues. They build an example for reading XML data, by retrieving iTunes RSS feeds that you select from a dropdown menu.

LiveSearch - Bitflux Blog Wiki (#)

The wiki page for the livesearch function. From the page: On the client side, we use XMLHttpRequest for sending the request to the server. There we have a little PHP script, which returns a small HTML file (http://blog.bitflux.ch/livesearch.php?s=PHP ) . This is then inserted into the page with some DOM manipulation.

Google Suggest feature with ASP.NET 2.0 (#)

This article provides an ASP.NET 2.0 angle of Google Suggest along with a short little look at the history of javascript, frames, remote scripting and XmlHttp + XMLHttpRequest.

A nice overview of the history and a good breakdown how the Suggest feature works.

SAJAX - Simple Ajax / xmlHTTPRequest Toolkit for PHP (#)

From the site: Sajax makes it easy to call PHP functions from your webpages via JavaScript without performing a browser refresh. Worth checking out and having a play with.

Amazon Zuggest (#)

From the site: This is my take on Google Suggest only with Amazon so I’ve called it “Amazon Zuggest”. Head on over and give this a try.

Francis writes “The Javascript runs in the browser and fires every so often, looks for something to search on, it shoots a request using XMLHttp to my webserver, which in turn creates a SOAP message that gets sent to Amazon. They send back the content and it’s formatted on the server, then streamed to the browser. All in the blink of an eye.

This is a cool little app. When you are done searching, have a hover over the “History” list in the left hand column… The site comes up a little messy in Firefox…

Instant Edit (#)

Manolo Guerrero sets up a little app that allows you to click on a form field and edit the text, which is automatically saved to the server via xmlHttpRequest. Worth a look, though the commented Javascript is in Spanish.

AJaX for weblogs (#)

A neat little script to play with (not sure what it has to do with weblogs especially tho). From the site: It uses Javascript to get data from a remote source and then loads that into a specified target. Whatever content you like to wherever you like on the page.

AJAX Login System Demo (#)

A proof of concept, Ajax based login script that, in this case, uses a php/mysql backend. The author provides all of the scripts involved and lists some advantages and dis-advantages of his method.

Usable XMLHttpRequest in Practice (#)

Thomas Baekdal gets back into accessibility and Ajax. From the site: Let’s look at what we can do to turn an otherwise user-hostile XMLHttpRequest application - into a usable one…. An excellent write-up.

XHTML live Chat via XMLHttpRequest (#)

An excellent proof of concept and something I was waiting for someone to code up ;-). This XHTML live Chat uses XMLHttpRequest to post chat messages and to periodically check the server for new messages and update your chat window.

This is simply a proof of concept, and would work really well in a blog commenting setting or for forums when those fast threads start happening.

Ripped Tickets - Live Search (#)

Here’s an excellent application of the livesearch idea that has been seen around the web. Type in your search (a band name) and the results show up in a nice table below the search box.

Running XMLHttpRequest with Java on Google’s API (#)

Similar to other livesearch functions out there, only this one plugs into Google’s API and has a Java backend, returning a list of results and descriptions for your query.

SproutLiner (#)

From the site: Sproutliner is a free web service that helps you manage your projects and ideas. This tool looks to be very promising, and to be honest you have to try it out to ‘get it’. It is a sort of Ta-da list on steroids, so to speak, in that it is very simple yet a user can add to it and tailor it to their needs.

Very cool…

forgetfoo - HoverSmack() and Webservices (#)

Whenever I came across forgetfoo I was always amazed at the scripting being done on that site. This blog post outlines some very cool tricks using xmlHttpRequest. Be sure also to click on the comments (bottom) and the calendar (top).

The Fonz uses XmlHttpRequest and AJAX to spy on you. (#)

While makaing some excellent points in the article, the little adventure game “The Search For Fonzie’s Treasure” built using Ajax technologies is pretty cool. The author discusses user profiling as an “evil use” of Ajax. I’m not so sure that I would say that it is evil…

Backbase - Rich Internet Applications (#)

A very impressive piece of Ajax work, with some context provided here. Have a click thru the site and try out that back-button. Also be sure to head in and check out the demo section.

20 Websites To Learn and Master CSS & stylesheet Tutorials

April 4th, 2009 by admin

CSS can be both a tricky and easy to learn. The syntax itself is easy, but some concepts can be difficult to understand.

This article features 20 excellent websites to help you “grok” CSS. There’s a wide range of websites included – from blogs to directory-style lists and websites that focus on one particular topic related to CSS.

click here

1. A List Apart CSS Topics

A List Apart CSS Topics - screen shot.

A List Apart, the premier site to read articles about web design and best practices, has a collection of articles on the topic of CSS dating back to 1999. Most articles are geared towards intermediate to advanced developers who put a strong emphasize on standards-compliant designs.

click here

2. CSS Help Pile

CSS Help Pile - screen shot.

CSS Help Pile is an aggregate of CSS resources, tips, and how-to’s. The site is well-organized and a wonderful resource for any level of expertise. There’s a category for beginners, browser bugs, and short reviews of CSS books.

click here

3. CSS Basics

CSS Basics - screen shot.

CSS Basics is formatted like a book with 18 chapters dedicated to educating readers about fundamental CSS concepts. The writing is clear and succinct - making it a great resource for those just starting out. All 18 chapters can be printed or downloaded in PDF format.

click here

4. Holy CSS Zeldman!

Holy CSS Zeldman! - screen shot.

Holy CSS Zeldman (not a site by Jeffrey Zeldman) is a useful collection of resources that link to standards-based CSS tutorials, tools, and layouts.

click here

5. Eric Meyer: CSS

Eric Meyer: CSS - screen shot.

Here’s a collection of works by Eric Meyer (acclaimed web professional and author). Some resources you’ll find on this page are css/edge (Eric Meyers experiments on CSS) and CSS reference.

click here

6. 456 Berea Street – CSS category

456 Berea Street – CSS category - screen shot.

Roger Johansson’s 456 Berea Street has over 300 posts under the CSS category. Some posts talk choosing an image replacement method while others teach you CSS techniques.

click here

7. /* Position Is Everything */

/* Position Is Everything */ - screen shot.

Those just getting their hands around authoring CSS code will quickly realize that a significant chunk of time (and frustration) stems from getting rid of browser bugs. Position Is Everything discusses known browser bugs and shares CSS methods that work across browsers. Here, you can read about the one true layout or learn what happens when you nest absolutely-positioned div’s.

click here

8. HTML Dog CSS Tutorials

HTML Dog CSS Tutorials - screen shot.

HTML Dog is a tutorial website dedicated to teaching XHTML and CSS best practices. There’s three CSS tutorial sections: Beginner, Intermediate, and Advanced.

click here

9. Learn CSS Positioning in Ten Steps

Learn CSS Positioning in Ten Steps - screen shot.

Positioning elements using CSS can be a tricky concept at first. If you’re having a hard time understanding the fundamentals of CSS positioning, check out this 10-step tutorial to get you positioning stuff in no time!

click here

10. Andy Budd CSS/Web Standards Links

Andy Budd CSS/Web Standards Links - screen shot.

Andy Budd (directory of Clearleft, CSS guru, and author of one of my favorite books – CSS Mastery) has a set of CSS/web standards links to help you find reliable, useful information about CSS.

click here

11. W3CSchools CSS Tutorial

W3CSchools CSS Tutorial - screen shot.

W3CSchools has a CSS section that covers the very basics of CSS up to more advanced topics.

click here

12. css Zen Garden

css Zen Garden - screen shot.

css Zen Garden is a showcase of the things you can do CSS. Most importantly, it highlights the concept of separating content from presentation. Using the same HTML file, designers submit external stylesheets to style the HTML file. I suggest using the Web Developer Tool to inspect how the layouts work and what styles affect certain elements of the page.

click here

13. CSS at MaxDesign

CSS at MaxDesign - screen shot.

At MaxDesign, you can find Russ Weakley’s brilliant set of CSS-related tutorials. Some things to expect here are: Listmatic – which shows you a variety of ways you can use CSS to style lists, and Floatutorial – which goes through the fundamentals of floating elements.

click here

14. CSSeasy.com

CSSeasy.com - screen shot.

CSSEasy.com’s slogan is “learn CSS the modern way”. The site promotes learning by experience, with the idea that if you inspect the source code and see how things fit together as a whole, you’ll gain a better understanding of CSS. The Web Developer Tool will also come in handy on this website.

click here

15. CSS-Discuss

CSS-Discuss - screen shot.

CSS-Discuss is a community of CSS enthusiasts. The CSS-Discuss Wiki is a comprehensive collection of real-world usage of CSS.

click here

16. Web Design from Scratch: CSS

Web Design from Scratch: CSS - screen shot.

Ben Hunt’s Web Design from Scratch has an excellent section on CSS that covers basic concepts about CSS. I highly recommend beginners start off with Introduction to CSS, a quick but very informative starting point to getting your hands dirty with CSS.

click here

17.CSS-Tricks

CSS-Tricks - screen shot.

CSS-Tricks is a blog dedicated to the topic of CSS. You’ll find helpful posts such as what CSS Sprites are (in a nut shell), techniques for image replacements, and even screencasts on topics like conditional stylesheets.

click here

18.CSS on Delicious

CSS on Delicious - screen shot.

The CSS tag on Delicious is a great way to find popular links that relate to CSS. It allows you to see what people are currently reading.

click here

19. SitePoint CSS Reference

SitePoint CSS Reference - screen shot.

SitePoint has a CSS reference section that discusses introductory level CSS topics. You can get a crash course on general CSS syntax and nomenclature onto slightly more advanced topics such as CSS hacks and filters.

click here

20. CSSDog

CSSDog - screen shot.

CSSDog has a section for both beginners and more advanced developers. Aside from CSS lessons, their CSS Reference section - which lists quick guides and color references - are very helpful.

click here

Tags: , , , ,

AJAX and Database PHP

April 4th, 2009 by admin

To clearly illustrate how easy it is to access information from a database using Ajax, we are going to build MySQL queries on the fly and display the results on “ajax.html”. But before we proceed, lets do ground work. Create a table using the following command.

NOTE: We are asuing you have sufficient privilege to perform following MySQL operations

CREATE TABLE `ajax_example` (
  `name` varchar(50) NOT NULL,
  `age` int(11) NOT NULL,
  `sex` varchar(1) NOT NULL,
  `wpm` int(11) NOT NULL,
  PRIMARY KEY  (`name`)
)

Now dump the following data into this table using the following SQL statements

INSERT INTO `ajax_example` VALUES ('Jerry', 120, 'm', 20);
INSERT INTO `ajax_example` VALUES ('Regis', 75, 'm', 44);
INSERT INTO `ajax_example` VALUES ('Frank', 45, 'm', 87);
INSERT INTO `ajax_example` VALUES ('Jill', 22, 'f', 72);
INSERT INTO `ajax_example` VALUES ('Tracy', 27, 'f', 0);
INSERT INTO `ajax_example` VALUES ('Julie', 35, 'f', 90);

Client Side HTML file

Now lets have our client side HTML file which is ajax.html and it will have following code

<html>
<body>
<script language="javascript" type="text/javascript">
<!-- 

function ajaxFunction(){
 var ajaxRequest;  // The variable that makes Ajax possible!

 try{
   // Opera 8.0+, Firefox, Safari
   ajaxRequest = new XMLHttpRequest();
 }catch (e){
   // Internet Explorer Browsers
   try{
      ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
   }catch (e) {
      try{
         ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
      }catch (e){
         // Something went wrong
         alert("Your browser broke!");
         return false;
      }
   }
 }
 // Create a function that will receive data
 // sent from the server and will update
 // div section in the same page.
 ajaxRequest.onreadystatechange = function(){
   if(ajaxRequest.readyState == 4){
      var ajaxDisplay = document.getElementById('ajaxDiv');
      ajaxDisplay.value = ajaxRequest.responseText;
   }
 }
 // Now get the value from user and pass it to
 // server script.
 var age = document.getElementById('age').value;
 var wpm = document.getElementById('wpm').value;
 var sex = document.getElementById('sex').value;
 var queryString = "?age=" + age ;
 queryString +=  "&wpm=" + wpm + "&sex=" + sex;
 ajaxRequest.open("GET", "ajax-example.php" +
                              queryString, true);
 ajaxRequest.send(null);
}
//-->
</script>
<form name='myForm'>
Max Age: <input type='text' id='age' /> <br />
Max WPM: <input type='text' id='wpm' />
<br />
Sex: <select id='sex'>
<option value="m">m</option>
<option value="f">f</option>
</select>
<input type='button' onclick='ajaxFunction()'
                              value='Query MySQL'/>
</form>
<div id='ajaxDiv'>Your result will display here</div>
</body>
</html>

NOTE: The way of passing variables in the Query is according to HTTP standard and the have formA

URL?variable1=value1;&variable2=value2;

Now the above code will give you a screen as given below


NOTE: This is dummy screen and would not work

Max Age:

Max WPM:

Sex:

Your result will display here

Server Side PHP file

So now your client side script is ready. Now we have to write our server side script which will fetch age, wpm and sex from the database and will send it back to the client. Put the following code into “ajax-example.php” file

<?php
$dbhost = "localhost";
$dbuser = "dbusername";
$dbpass = "dbpassword";
$dbname = "dbname";
	//Connect to MySQL Server
mysql_connect($dbhost, $dbuser, $dbpass);
	//Select Database
mysql_select_db($dbname) or die(mysql_error());
	// Retrieve data from Query String
$age = $_GET['age'];
$sex = $_GET['sex'];
$wpm = $_GET['wpm'];
	// Escape User Input to help prevent SQL Injection
$age = mysql_real_escape_string($age);
$sex = mysql_real_escape_string($sex);
$wpm = mysql_real_escape_string($wpm);
	//build query
$query = "SELECT * FROM ajax_example WHERE sex = '$sex'";
if(is_numeric($age))
	$query .= " AND age <= $age";
if(is_numeric($wpm))
	$query .= " AND wpm <= $wpm";
	//Execute query
$qry_result = mysql_query($query) or die(mysql_error());

	//Build Result String
$display_string = "<table>";
$display_string .= "<tr>";
$display_string .= "<th>Name</th>";
$display_string .= "<th>Age</th>";
$display_string .= "<th>Sex</th>";
$display_string .= "<th>WPM</th>";
$display_string .= "</tr>";

// Insert a new row in the table for each person returned
while($row = mysql_fetch_array($qry_result)){
	$display_string .= "<tr>";
	$display_string .= "<td>$row[name]</td>";
	$display_string .= "<td>$row[age]</td>";
	$display_string .= "<td>$row[sex]</td>";
	$display_string .= "<td>$row[wpm]</td>";
	$display_string .= "</tr>";

}
echo "Query: " . $query . "<br />";
$display_string .= "</table>";
echo $display_string;
?>

If you have successfully completed this lesson then you know how to use MySQL, PHP, HTML, and Javascript in tandem to write Ajax applications.

Tags: , , ,

Which is the best JavaScript and Ajax Framework ?

April 4th, 2009 by admin

Last time, I had published a poll asking which is the best PHP framework and in that poll Zend Framework stand out itself to be the most popular PHP frameworkamong the PHP developers. This time ,I’ve come up with another Poll and I would you to participate in this POLL “Which is the best JavaScript and Ajax Framework?”.

There are many JavaScript and Ajax framework available in the web and I think a lot of Web developers are confused which one to begin with. Today, I would like to hear from you which is the best JavaScript Framework among the popular JavaScript framework jquery, prototype.js, mootools, Dojo and YUI.

First let’s see some facts about these framework.If you look at the google trendof these JavaScript and Ajax framework Dojo seems to be dominant in the year 2007 but jQuery seems to be popular these days.

And if you look at this Slick speed selecter test , it seems that Mootools is providing better performance than the other JavaScript frameworks. Prototype.js is one of the oldest JavaScript and Ajax framework which is widely used in many high profile websites over the Internet. Furthermore, YUI which is supported by yahoo and is another strong framework in the list.

If you ask me which one is best JavaScript framework?, My personal favorite is jQuery as you can see lots of examples in this blog with jQuery. One plus point of jQuery is that it is supported by large community and have a very gooddocumentaion with example in jquery.com.

But I would like to hear from you which JavaScript and Ajax Framework you recommend for other to use in their project.

Which is the best JavaScript and Ajax framework?

  • jQuery (52%, 356 Votes)
  • Dojo (14%, 99 Votes)
  • Prototype.js (13%, 91 Votes)
  • Ext.js (9%, 62 Votes)
  • Mootools (7%, 47 Votes)
  • YUI (Yahoo User Interface) (7%, 45 Votes)

Total Voters: 690

posted by: http://expertzweb.com

Tags: , ,

Ext JS at The Ajax Experience

April 4th, 2009 by admin

September 15, 2008 by Aaron Conran

Come join Jack Slocum and I for two developer focused sessions, “Hands On Ext” and “Advanced CSS and Theming of Ext JS” at The Ajax Experience at the end of this month. Feel free to follow along with your laptop or watch as we build an application and demonstrate how to create a custom theme in each hour long session. The Ajax Experience is a three day conference with many interesting sessions on Ajax, Web 2.0 technologies and JavaScript frameworks targeted at developers. This year’s conference will be held in Boston, MA from September 29th to October 1st. Registration is still open and we are hoping to see you there!

Session: Hands on Ext

Speaker: Aaron Conran
Duration: 1 hour
Hands On Ext will be a fast-paced session in which we will build an Ext application in less than an hour. This session will demonstrate how to get started using Ext JS and show how quickly you can put together a simple application from scratch. Learn how to utilize Ext’s high-level UI widgets like GridPanel, TabPanel and FormPanel instead of re-inventing the wheel.

Session: Advanced CSS And Theming of Ext

Speaker: Jack Slocum
Duration: 1 hour
Join Jack as he demonstrates how to manipulate the look and feel of Ext to integrate seamlessly with your application or company’s style guide. As you probably know, all Ext widgets can be transformed to look radically different simply by adding an additional CSS theme file. Learn how to create a custom theme for your Ext application step by step in this hands-on demonstration.

Meet Up

Jack and I are hoping to meet with members of the Ext community to discuss our plans and the future of Ext. We’d also like to find out more about what you guys are creating with Ext. We are planning on having a meet-up after the conference on the 2nd day (Sept. 29th). If you’d like to meetup please send your contact information to meetup@extjs.com. Feel free to suggest a location if you know of a good spot to meet.

We’re Growing

Ext is a growing company and we are looking for talented developers to join our team. Please take a look at jobs.extjs.com if you have the skill set, drive and desire to join our team and grow with us. If you will be at The Ajax Experience, make an additional note so that we can be sure to meet you. The Ajax Experience should be a very exciting conference with many different frameworks and technologies represented. Please be sure to stop by our sessions and the meet-up if you are already an Ext developer or want to know more about Ext. Finally, we’d like to thank the Ajaxians for inviting us to present at The Ajax Experience.

Tags: , , ,

The Dojo Toolkit in Practice

April 4th, 2009 by admin

The article discusses a piece of a project that uses Ajax to create a responsive itinerary viewer. The article was just updated for the latest Dojo 0.3 release.

Introduction

When you start to build an Ajax application, you quickly run into situations where you feel like you are reinventing the wheel. The XMLHttpRequest object is what a lot of developers jump on when they think about Ajax, but that is just the start, and is the easy part.

There are lots of annoyances when you build JavaScript rich applications. Browser compatibility and degradation, messing with the DOM, and dealing with bleeding edge hacks such as offline storage all come up.

This article is going to introduce you to a toolkit that is much more than an XHR wrapper. It is the type of toolkit that everyone should be using if they are developing a rich Ajax application. Without it, you are a crippled developer.

Rather than listing out the APIs available in The Dojo Toolkit, we will look at a simple slice of an application, to see parts and pieces of the library in action.

We will discuss:

* What this Dojo thing is?
* Setting up Dojo
* DOM and HTML Effects in practice
* Ajax remote calls via dojo.io.bind()
* Drag and Drop operations

posted by: http://expertzweb.com

Tags: , , ,

Which is the best JavaScript and Ajax Framework?

April 4th, 2009 by admin

Last time, I had published a poll asking which is the best PHP framework and in that poll Zend Framework stand out itself to be the most popular PHP frameworkamong the PHP developers. This time ,I’ve come up with another Poll and I would you to participate in this POLL “Which is the best JavaScript and Ajax Framework?”.

There are many JavaScript and Ajax framework available in the web and I think a lot of Web developers are confused which one to begin with. Today, I would like to hear from you which is the best JavaScript Framework among the popular JavaScript framework jquery, prototype.js, mootools, Dojo and YUI.

First let’s see some facts about these framework.If you look at the google trendof these JavaScript and Ajax framework Dojo seems to be dominant in the year 2007 but jQuery seems to be popular these days.

And if you look at this Slick speed selecter test , it seems that Mootools is providing better performance than the other JavaScript frameworks. Prototype.js is one of the oldest JavaScript and Ajax framework which is widely used in many high profile websites over the Internet. Furthermore, YUI which is supported by yahoo and is another strong framework in the list.

If you ask me which one is best JavaScript framework?, My personal favorite is jQuery as you can see lots of examples in this blog with jQuery. One plus point of jQuery is that it is supported by large community and have a very gooddocumentaion with example in jquery.com.

But I would like to hear from you which JavaScript and Ajax Framework you recommend for other to use in their project.

Which is the best JavaScript and Ajax framework?

* jQuery (52%, 356 Votes)
* Dojo (14%, 99 Votes)
* Prototype.js (13%, 91 Votes)
* Ext.js (9%, 62 Votes)
* Mootools (7%, 47 Votes)
* YUI (Yahoo User Interface) (7%, 45 Votes)

posted by: http://expertzweb.com

Tags: , , , ,

Ext JavaScript at The Ajax Experience

April 4th, 2009 by admin

Come join Jack Slocum and I for two developer focused sessions, “Hands On Ext” and “Advanced CSS and Theming of Ext JS” at The Ajax Experience at the end of this month. Feel free to follow along with your laptop or watch as we build an application and demonstrate how to create a custom theme in each hour long session. The Ajax Experience is a three day conference with many interesting sessions on Ajax, Web 2.0 technologies and JavaScript frameworks targeted at developers. This year’s conference will be held in Boston, MA from September 29th to October 1st. Registration is still open and we are hoping to see you there!
Session: Hands on Ext

Speaker: Aaron Conran
Duration: 1 hour
Hands On Ext will be a fast-paced session in which we will build an Ext application in less than an hour. This session will demonstrate how to get started using Ext JS and show how quickly you can put together a simple application from scratch. Learn how to utilize Ext’s high-level UI widgets like GridPanel, TabPanel and FormPanel instead of re-inventing the wheel.
Session: Advanced CSS And Theming of Ext

Speaker: Jack Slocum
Duration: 1 hour
Join Jack as he demonstrates how to manipulate the look and feel of Ext to integrate seamlessly with your application or company’s style guide. As you probably know, all Ext widgets can be transformed to look radically different simply by adding an additional CSS theme file. Learn how to create a custom theme for your Ext application step by step in this hands-on demonstration.
Meet Up

Jack and I are hoping to meet with members of the Ext community to discuss our plans and the future of Ext. We’d also like to find out more about what you guys are creating with Ext. We are planning on having a meet-up after the conference on the 2nd day (Sept. 29th). If you’d like to meetup please send your contact information to meetup@extjs.com. Feel free to suggest a location if you know of a good spot to meet.
We’re Growing

Ext is a growing company and we are looking for talented developers to join our team. Please take a look at jobs.extjs.com if you have the skill set, drive and desire to join our team and grow with us. If you will be at The Ajax Experience, make an additional note so that we can be sure to meet you. The Ajax Experience should be a very exciting conference with many different frameworks and technologies represented. Please be sure to stop by our sessions and the meet-up if you are already an Ext developer or want to know more about Ext. Finally, we’d like to thank the Ajaxians for inviting us to present at The Ajax Experience.


posted by: http://expertzweb.com

Tags: , , ,