Ajax tutorial
December 6, 2008
AJAX is not a new programming language, but a technique for creating better, faster, and more interactive web applications.
With AJAX, your JavaScript can communicate directly with the server, using the JavaScript XMLHttpRequest object. With this object, your JavaScript can trade data with a web server, without reloading the page.
AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.
The AJAX technique makes Internet applications smaller, faster and more user-friendly.AJAX is a browser technology independent of web server software.
AJAX is based on the following web standards:
* JavaScript
* XML
* HTML
* CSS
The web standards used in AJAX are well defined, and supported by all major browsers. AJAX applications are browser and platform independent.Web applications have many benefits over desktop applications; they can reach a larger audience, they are easier to install and support, and easier to develop.
However, Internet applications are not always as “rich” and user-friendly as traditional desktop applications.
With AJAX, Internet applications can be made richer and more user-friendly.
AJAX validation with Django, newforms and MochiKit
December 6, 2008
This weblog of mine presents the example code for using Django, newforms and MochiKit to do AJAX validation.
Before we get going, some context: the Christian Camps in Wales web site has a forum system which allows people to create polls. I rewrote this recently to use newforms, mainly to keep up to date with Django, and also to try out some AJAX.
I first had to write a ‘Form’ subclass which encapsulates the logic for validating and processing the form. As it happens, the form is based on a model ‘Poll’, but it requires more fields. In particular, this single form is used to create all the PollOption objects that are attached to the Poll. This is handled by a simple textarea field, into which all the options are entered on separate lines. In Django, we implement this using a custom ‘Field’ that uses the ‘Textarea’ widget and adds the relevant validation.Unlike classic web pages, which must load in their entirety if content changes, AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes
FBJS and Ajax to acheive Facebook profile link tracking
December 6, 2008
This weblog shows how to create a short script that will track and log the user activity.
In interactive application development we love our ability to track and analyze the behavior of our users. Through tools like Google analytics and Urchin, web sites can monitor and analyze where their users are going, and more importantly how those users are getting there.
As our company delves deeper into creating applications for the Facebook platform, we have realized that analysis of users behavior is extremely important. It is no secret that very few companies have mastered how to create a success Facebook application. Those that have seen moderate success do one thing consistently, they all leverage the social graph, but outside of that there is no clear blue print to success. Using techniques such as user tracking we can begin to tune the way a Facebook applications evolves as a way to change its presentation based on the behaviors of its users.
Merits of Ajax
December 6, 2008
In many cases, the pages on a website consist of much content that is common between them. Using traditional methods, that content would have to be reloaded on every request. However, using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage and load time.
The use of asynchronous requests allows the client’s Web browser UI to be more interactive and to respond quickly to inputs, and sections of pages can also be reloaded individually. Users may perceive the application to be faster or more responsive, even if the application has not changed on the server side.
The use of Ajax can reduce connections to the server, since scripts and style sheets only have to be requested once.
Though Ajax has got some demerits too,It has raised it’s own importance in new technologies.
JavaScript is not the only client-side scripting language that can be used for implementing an Ajax application. Other languages such as VBScript are also capable of the required functionality.
XML is not required for data interchange and therefore XSLT is not required for the manipulation of data. JavaScript Object Notation (JSON) is often used as an alternative format for data interchange,although other formats such as preformatted HTML or plain text can also be used.
Ajax
December 6, 2008
Ajax (asynchronous JavaScript and XML), or AJAX, is a group of interrelated web development techniques used for creating interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. Data is retrieved using the XML Http Request object or through the use of Remote Scripting in browsers that do not support it. Despite the name, the use of JavaScript and XML is not required, and they do not have to be used asynchronously.
While the term Ajax was coined in 2005, techniques for the asynchronous loading of content date back to 1996, when Internet Explorer introduced the IFrame element. Microsoft’s Remote Scripting, introduced in 1998, acted as a more elegant replacement for these techniques, with data being pulled in by a Java applet with which the client side could communicate using JavaScript. In 1999, Microsoft created the XML Http Request object as an ActiveX control in Internet Explorer 5, and developers of Mozilla and Safari followed soon after with native versions of the object. On April 5, 2006 the World Wide Web Consortium (W3C) released the first draft specification for the object in an attempt to create an official web standard.The term Ajax has come to represent a broad group of web technologies that can be used to implement a web application that communicates with a server in the background, without interfering with the current state of the page.
Establishing a Employee Wellness Program
December 1, 2008
The workplace environment is a effective, but often overlooked, element in managing staff member health. Here we will identify some of the best-practices in starting a Employee Wellness Program that supports your organization’s employee health strategy and allows staff members to take charge of their own health. For example, a Employee Wellness Program that includes a tobacco-free workplace policy increases the likelihood that staff members will try to quit smoking and will quit using tobacco successfully. Similarly, a Employee Wellness Program that includes discounting healthy foods in your cafeteria and vending machines helps increase staff members’ consumption of healthy foods which supports your investment in disease management programs for staff members with diabetes, heart disease or hypertension. The following will guide you through the ten key steps in starting a Employee Wellness Program and workplace environment that encourages staff member health.
In an era of ever-increasing health care costs and intense competition, corporations have a vested interest in the health of their staff members. Research has found that, on average, staff members with healthy behaviors (such as not using tobacco or being active for 30 minutes a day) incur lower health care expenses, are absent from work less often, and are more productive when at work (higher presenteeism) than staff members with unhealthy behaviors.
Ajax for Expression Web
October 17, 2008
If you are using Expression Web for your site in ASP.NET, may be you encounter with one of those problems, it doesnt work with custom controls in the toolbox or custom controls dont display and you get an error like unknown server tag ajaxtoolkit error message !!!
To solve this issue, you have to install the assembly in the GAC by typing this following command in the NET console : gacutil –i nom_assembly.dll
After go to the ajaxcontroltoolkit properties to get the version and the public key token and in the aspx pages, you have to make a reference of both information by using the full name of the tool like :
Assembly=”AjaxControlToolkit, Version=XXXX, Culture=neutral, PublicKeyToken=XXXX”
Namespace=”AjaxControlToolkit”
TagPrefix=”ajaxToolkit”
And now it should work
Securing ajax request
September 30, 2008
Secure your request is very important since it will prevent someone to steal or to get in your datas. Following a way to do it.
You have to be able to generate a secure key from the server and after to affect the key the following code : $_SESSION['Env_UserSession']['AjaxKey'] = $key_sec
From the customer side, the key should be available via javascript and it can be a source of an hidden string. During the ajax request, get back the key and to transmit it to the ajax parameters. When the request is launched, you have to control from the server that the key exists and to verify it with the one saved in the session (this one should be verify before to generate the ajax content to the customer).
When you have to control the server, you have to verify very well POST or GET exists because if it is empty, it can be someone try to steal the content. If all are ok, you can deliver the content without any danger.
How to create a form in a simple click
September 9, 2008
It is very difficult to create a form, at least for people who have no knowledge about programming. There is a web site which proposes for those people to create a form in a very easy way.
You just have to go to this site http://www.jotform.com , create an account (it s free totally) and after log in just choose one of the assistants to create your own form. You can configure totally your form and the application is very simple and easy to use.
The bad point is that the generated code is not very clean for some form but what is the most important point, that we get the good result.
Ajax Alternatives?
July 16, 2008
Its difficult to claim perfection in anything, even Ajax. While Ajax has enhanced the web experience for many users, and there is not shortage of people constantly praising its merits, it is perhaps no longer the newest standard. Sure, it allows relatively easy integration of interactive elements in web pages, but is it really all that powerful and versatile as is often claimed?
There are three major standards for the development of Rich Internet Applications: Ajax, Java, and Flash. None of these are perfect solutions, but each has its own advantages over the others.
This is where the choice comes in. Ajax is at its strongest for such applications as information submission, but weaker when applied as a true asynchronus system.
On the other hand, Ajax is probably the most versatile of the options available. While not always the most efficient, it can get the job done. Many of its disadvantages can be blamed on web browsers not following standards and not being optimized for the desired degree of interactivity.



