Favorite tech links of the week : 27 Dec 2010 – 02 Jan 2011

This post contains some of the useful and interesting tech links I found during this week. To keep up to date with the latest information, subscribe to the feed or follow me on twitter  @v08i

How to Create a jQuery Confirm Dialog Replacement – http://goo.gl/IwXQt

jQuery-Confirm

35 Inspiring Examples of Websites Using HTML5 – http://goo.gl/pOjxY

html5

Debugging JavaScript Behind the Scenes – http://goo.gl/mTd4h

jsDebug

Multiple virtual hosts in WAMP – http://goo.gl/hg59a

wampserver

geoPlugin – http://goo.gl/iviYz

geoPlugin

ControlJS – http://goo.gl/SpR5s

controlJS

The Road to jQuery 1.5 – http://goo.gl/g0NbR

jQuery1.5

The Top 150 Web Development Highlights from 2010 – http://goo.gl/3Fs5n

web_development

290+ Social Media Resources From 2010 – http://goo.gl/xmf79

Why you MUST use client side validation

validation

Client side validation is checking the values against the desired format before sending them to server side for further processing. Javascript is used for validations on browser. Lately, with the popularity of jQuery, a large number of validation plugins are available which make it even more easy to implement validations on forms.

A word of caution before beginning. Though client side validation is very useful and simple to implement, it should NEVER be thought of as a replacement for server side validations. If the javascript is turned off on the browser or user bypasses it and no server side validation is placed, your application then is at the mercy of users solely.

Read Why you must use server side validation?

So, here is why you should use client side validation.

Easy to implement

Although you can write your own validation for forms, there are multiple javascript and jQuery plugins available that require developers to write minimal amount of code to implement validation. These plugins also provide several options for customized validation like strings, numbers, dates, email addresses etc.

No waiting time for users

Since javascript executes on users browser itself, client side validation provides instant feedback. Plugins like live validation provide helpful messages to users as they type. Besides saving time, this pattern makes data entry less error prone.

Less server trips

Without javascript validation, each time a value needs to be checked, the form should be submitted and server would then process it and show the result. Take for example a text box which asks for email. Possible validations for it could be blank value and a valid email address. With javascript validations in place we can save these trips to server.

Interactive and Fun

Have a look at jQuery inline formValidator. Gone are the days of ugly alert boxes (those were really irritating). With javascript running in browser, you can unleash your creativity and make validation an interactive and fun process by combining html and css with javascript. You can use tooltips and fancy effects to guide your users.

Users love it

Waiting for full page load only to see one error message is no good. Users like instant feedback and helpful error messages. Javascript allows you to create a rich visual experience that is a major trait of rich internet applications.

That’s it for now.

It is worth mentioning again that alone client side validation is no good. Always, I repeat, always use server side validation along with client side validation. This way, in case the javascript validation fails, you can always rely on the server.

Click here to read more about best practices of form validation

Favorite tech links of the week : 20Dec – 26Dec, 2010

This post contains some of the useful and interesting tech links I found during this week. To keep up to date with the latest information, subscribe to the feed or  follow me on twitter @v08i

jQuery 1.4.3 Offline Learning Kit – http://goo.gl/zoAb5

jqkit

What features would you like to have in PHP? – http://goo.gl/Q84B9

php

35 Useful and Time saving Firefox Add-Ons – http://goo.gl/ZQQhF

firefox-wallpaper

Continue reading

Using Twitter API and jQuery to display recent tweets

In this article I will show you how you can display your (or any other user’s) recent tweets with some jQuery magic. We will create a widget (sort of) that will fetch n number of latest tweets from public timeline of a user using Twitter API and then we will display them in a nice list.

End result will look like the following.

tweets

Have a look at a live example.

View Demo

Let us start creating it now. First write some HTML. Define some css styles in the head section which will control the display of list. In the body section, there is a select box with id layout which will be used to select either a wide or a narrow layout for displaying the tweets. Then create a div with id tweets. We will create a ul inside this div which will have tweets as list items.

Continue reading