POSTS ARCHIVED ON "SEPTEMBER 2011"

How to display dates and times in clients timezone

Dates and times are very important in any online application. If you are making an online transaction it is important to record the date and time you are making the payment. Usually those values are recorded by the payment processing system and stored in a database. This payment processing system can be built using different server-side technologies like Java, ASP.NET, PHP etc. Most of these languages provides a built-in data-type to store date and time. The nice thing about web is the payment processing system and all the data associated with it is stored in a server that can be located in any part of the world and the users from all over the world can access the system for making payments through a browser.

Since different parts of the world have different timezones the same event can be represented by different date-times depending upon the timezone. In this article I’m going to explain you how we can display the date-time in clients timezone.

Continue Reading

Returning JSON from WCF Web API

WCF Web API is Microsoft's answer for creating RESTful services. Currently it is in preview state and you can download the binaries from here. For the people who are not aware of RESTful services, a RESTful service is a simple web service implemented using HTTP and that can be communicated using the normal GET, POST and other HTTP methods. Exposing a class as a RESTful service makes it easily accessible by wide variety of browsers and devices. In WCF Web API the REST service class is typically called as a resource and the format in which they exchange data is called as media type (ex. XML, JSON etc).

The WCF Web API uses the same routing module used in ASP.NET MVC to route the incoming requests to particular service class methods. In this small article I’m going to tell you how we can make the service to return data in JSON media-type.

Continue Reading

Interesting things from jQuery

jQuery is the most popular JavaScript library in use today. It is released by John Resig in January 2006 under the MIT and GNU General Public licenses. It is the library that is beloved by most of the web developers for scripting. It is very easy to learn, have a good documentation and a big community.

In this article I'm going to share you some of the interesting things from that library. If you do like jQuery and know some interesting things please post a comment.

Continue Reading