Skip to main content

Posts

Showing posts with the label JavaScript

GWT Amazing Toolkit from Google

When GWT was first launched, I read some articles and followed some basic(very basic) tutorials of GWT but left it after a few days as didn't get the time to follow it. Now after a long break I again got the chance to learn and use it again. After following first few tutorials and after watching the demo applications which I built using GWT, I have became the fan of it. It's an awesome toolkit from Google. The most amazing feature of it is that you write the code in Java and it will convert it into highly optimized JavaScript which will run on almost all the browsers!!

Form Validation, double check always!!

Validation is one of the most important tasks while creating any form on a web site. Almost every website you visit you will find at least one form. As JavaScript is now a days supported by all browsers and many websites rely on the JavaScript completely and does not work if JavaScript is not supported. Also as the browsers evolved, they started offering various developer friendly tools with their browsers such as Google Chrome provides a console where you can execute JavaScript. Now the important question is when you have a form on your website you should always have both Client side form validation as well as server side validation. Now many people think why do we require server side validation?? 1. Well because even though JavaScript is supported by all browsers, people forget that browsers also provide various developer friendly tools using which we can change the entire JavaScript code. Let's say, I just change validation function to return true in all the cases.. Your ...

Client Side MVC

The current project on which I am working in my company, I have been introduced to a new concept(at least its new for me :) ) Client side MVC by one of my colleague and its actually very good technique. Why to have client side MVC- 1. It allows you to manage your data on client side. 2. It allows you to customize your views with Modularized JavaScript code. 3. It allows you to create complex views. In our application we are using Backbone.js to design Client side MVC. Even though I am not an expert in Backbone.js but I liked it, because of the features which are provided by it and how easy it makes to create layouts, view and loads of other things. Backbone.js provides Model, View, Collection and Router(Controller) to create a MVC model. Backbone has a main dependency - Underscore.js, which is a JavaScript library(Of course!!). Creating models using Backbone.js is very easy- var Book = Backbone.Model.extend({      defaults : {       ...

Simple Drop Down Menu Using JQuery

Recently in my project we needed a dynamic menu to be generated, so I started working on drop down menu using javascript. In my last post I discussed about jQuery, and yes jQuery is a great javascript library. For following drop down menu I used jQuery effect. slideDown is the effect which I used in following simple drop down menu. If you want to use this menu in your project just add following code in your html file

JQuery Effects

Yesterday when I was designing a simple drop down menu using javascript and css, well I am not an expert in javascript but as it needed so I was designing. First it took a lot of time for me to design it using javascript but after when I googled for some of the simple drop down menus then I found about JQuery Effects, and those are awesome. I was aware of jquery effects but never thought about them to use them in my project. But as the slogan of the jquery "The Write less, Do more" and its true. jQuery made my half of the code for drop down and also added some of the nice effects to my drop down. jQuery