Friday, 23 September 2016

stroy toto

Next, you need to decide what you want to do after you receive the server response to your request. At this stage, you just need to tell the HTTP request object which JavaScript function will handle processing the response. This is done by setting the onreadystatechange property of the object to the name of the JavaScript function that should be called when the state of the request changes, like this:
httpRequest.onreadystatechange = nameOfTheFunction;
Note that there are no parentheses after the function name and no parameters passed, because you're simply assigning a reference to the function, rather than actually calling it. Al

Ajax

What's AJAX?

AJAX stands for Asynchronous JavaScript and XML. In a nutshell, it is the use of the XMLHttpRequest object to communicate with server-side scripts. It can send as well as receive information in a variety of formats, including JSON, XML, HTML, and even text files. AJAX’s most appealing characteristic, however, is its "asynchronous" nature, which means it can do all of this without having to refresh the page. This lets you update portions of a page based upon user events.
The two major features of AJAX allow you to do the following:
  • Make requests to the server without reloading the page
  • Receive and work with data from the server

Step 1 – How to make an HTTP request

In order to make an HTTP request to the server using JavaScript, you need an instance of a class that provides this functionality. This is where XMLHttpRequest comes in. Such a class was originally introduced in Internet Explorer as an ActiveX object called XMLHTTP. Then, Mozilla, Safari and other browsers followed, implementing an XMLHttpRequest class that supports the methods and properties of Microsoft's original ActiveX object. Meanwhile Microsoft has implemented XMLHttpRequest as well.
Page Title

This is a Heading

This is a paragraph.

Ant - Introduction

ANT stands for Another Neat Tool. It is a Java-based build tool from Apache. Before going into the details of Apache Ant, let us first understand why we need a build tool in the first place.

Need for a Build Tool

On an average, a developer spends a substantial amount of time doing mundane tasks like build and deployment that include:
  • Compiling the code
  • Packaging the binaries
  • Deploying the binaries to the test server
  • Testing the changes
  • Copying the code from one location to another
To automate and simplify the above tasks, Apache Ant is useful. It is an Operating System build and deployment tool that can be executed from the command line.

History of Apache Ant

  • Ant was created by James Duncan Davidson (the original author of Tomcat).
  • It was originally used to build Tomcat, and was bundled as a part of Tomcat distribution.
  • Ant was born out of the problems and complexities associated with the Apache Make tool.
  • Ant was promoted as an independent project in Apache in the year 2000. The latest version of Apache Ant as on May 2014 is 1.9.4.

Features of Apache Ant

  • Ant is the most complete Java build and deployment tool available.
  • Ant is platform neutral and can handle platform specific properties such as file separators.
  • Ant can be used to perform platform specific tasks such as modifying the modified time of a file using 'touch' command.
  • Ant scripts are written using plain XML. If you are already familiar with XML, you can learn Ant pretty quickly.
  • Ant is good at automating complicated repetitive tasks.
  • Ant comes with a big list of predefined tasks.
  • Ant provides an interface to develop custom tasks.
  • Ant can be easily invoked from the command line and it can integrate with free and commercial IDEs.

Apache

Apache Ant is a Java based build tool from Apache Software Foundation. Apache Ant's build files are written in XML and they take advantage of being open standard, portable and easy to understand.
This tutorial should show you how to use Apache ANT to automate the build and deployment process in simple and easy steps. After completing this tutorial, you should find yourself at a moderate level of expertise in using Apache Ant from where you may take yourself to next levels.

Audience

This tutorial has been prepared for the beginners to help them understand the basic functionality of Apache ANT to automate the build and deployment process.

Prerequisites

For this tutorial, it is assumed that the readers have prior knowledge of basic software development using java or any other programming language. This should help if you had some exposure to the software build and deployment process.