FireworksColdFusionDreamweaverFreehandFlashMXHome
Past Week's New Content

Latest Free Content
View All
Free Content
Accessibility
CMX Learning Guides
Hosted by enterhost

Reusing Code with AJAX.NET

By: Joel Martinez on Friday, October 7, 2005
Reader Level: Reader Level

Primary Category: ASP.NETAsynchronous Javascript using XMLHttpRequest (AJAX) allows your client side code (i.e., Javascript) to make HTTP requests to the server. This opens up many opportunities to develop your software not only faster, but smarter. Code reuse has long been a tenet of Object Oriented programming. With AJAX, you can reuse code that you have written on the server-side which allows you to:

  1. Have less bugs since you only have to write the code once.
  2. Provide your users with more complex functionality.
  3. Access resources otherwise unavailable to your Javascript code

This article will show one such example of code-reuse. We will build a front-end to a fictional Paid Time Off (PTO) system. This system will have server-side code that takes two dates and figures out how many work hours are between the two dates -- taking into account holidays and weekends. We will then incorporate this into a client-side "hours preview" function that allows the employee to see how many work hours their request will span.

ASP.NET code will be written in C# and you will not need a compiler to run the samples.

Related Articles:

Purchase this item
You can purchase this piece of content separately for $3.00

Want more?
Community MX members get unlimited access to daily articles, tutorials, extensions and support. The most comprehensive resource for Macromedia designers and developers today. Take a tour of what we offer, and discover the benefits of subscribing.

Already a member?
Simply log in using the form in the top right area of the site.

Member's Sign In

Remember Me

Retrieve Password

Current Articles
and Tutorials

3354

Most Recent JumpStarts

Newsletter

View the archive

CMX Suite

New every Tuesday!CMX Weekly Cartoon
View the archive

RSS Feed

Syndicate CMX

Our feeds