[Plugin] explore eclipse's Ajax Toolkit framework

Source: Internet
Author: User
Tags dojo toolkit apache tomcat
Explore eclipse's Ajax Toolkit framework

Text Selection


Others: Moderate

Tim McIntire, problem, freelance writer

January 22, 2007

Ajax Toolkit framework (ATF) is the core part of the new open Ajax initiative. It aims to improve the accessibility of web programming technologies with large functions through the eclipse Foundation. By adding Asynchronous JavaScript and XML (Ajax) to various open-source Ajax sdks (including dojo, zimbra, And Rico, ATF provides eclipse web tools platform (WTP ). This article includes a helloworld example in which you will install and configure ATF, and then use eclipse and dojo to compile the basic web application.

This article is my article on introducing open Ajax initiative in May 2006 titled "bringing Ajax into two tools of Eclipse's Ajax Toolkit framework" and the recent ATF (please refer to the following example) information). From that time to now, the project has been released from the initial release to the alphaWorks version and then to the current version of v0.1 In the Eclipse project.

ATF is based on the Development Department of eclipse WTP. WTP is widely used in the Web development community. WTP extends eclipse by adding tools for developing Java 2 platform and Enterprise Edition (J2EE) web applications.

ATF added the Ajax Development Environment Development Kit (including dojo, zimbra, And Rico) for various development sources through WTP. It adds the Javascript Syntax Function and provides the edit-time representation method for image search and text representation Object Model (DOM) and the Cascading Style Sheet (CSS) inspector and the integrated Mozilla compiler. ATF allows developers to use eclipse to integrate the development environment (IDE) for enterprises required to develop the source toolkit ). The goal of open Ajax initiative after ATF is to improve the accessibility to Ajax. Ajax is rapidly becoming popular, however, the concept of new developers is still very obscure.

In this article, we use eclipse, ATF, and dojo to integrate ATF's security step libraries with the example Ajax application program plug-ins. 「 Bring Ajax into two tools of Eclipse's Ajax Toolkit framework 」 introduced dojo and zimbra and provided "Hello world!" first !」 Example. Then, you can use ATF to integrate dojo into eclipse. This article uses v0.1 to compile similar categories and is more simple.

Anqiatf

Before making an update, please provide a quick description of the security statement under Microsoft R windowsr. (For more information, see references ). If you have not used eclipse, go to the release of the J2EE packages, including core eclipse v3.2.1 and eclipse WTP (WTP is required when you use ATF ). If you have not installed and used eclipse, This is the simplest method to meet the basic requirements of ATF.

To start using ATF, perform the following operations:

  1. From the latest version of ATF under eclipse.org. This article is based on v0.1 (0.1-20060912 ). Do not install any of the following components before installing them.
  2. Java Runtime Environment (JRE) v1.4.2 is required in earlier v0.1. Sun Microsystems or ibmr can be used.
  3. Use Apache Tomcat V5 as the local web server and xulrunner to help eclipse establish interfaces with Mozilla ).
  4. Install xulrunner and JRE, and then install Tomcat V5.

    Labels:Tomcat v5 is more similar to JRE V5, so you may need to renew it to avoid special tomcat security measures.

  5. Install eclipse (if there is no security in the system ).

After installing eclipse, you can install ATF. For the security questions related to the website, please submit your examination materials.

To install ATF in eclipse, open eclipse and then clickHelp> Software Updates> Find and install> search for new features to install> New archived site. Then, select the zookeeper file that contains ATF. The prompt on the installation screen indicates that you have completed the installation, and all ATF components must be selected. Check whether the Taipa contains the ATF download information. Some ATF versions (including v0.1) contain special security instructions, which refer to how to install and append files.



First reply

Create a dojo application in ATF

Now you have built the first dojo application. First, create a new project. The transcript contains a link pointing to the flash drive, which will demonstrate the initial steps of the process, however, the more you go through this process, the more you will build an interactive helloworld application. After the new category is opened, complete the following steps:

  1. Open eclipse, and then simply releaseFile> New> Project.
  2. TicketWeb> static Web projectAnd then simply renewNext.

    Option 1. Select category type

  3. InProject nameFieldHelloworldAnd then simply renewTarget RuntimeBelowNew. This token will be the name of the entire batch. It can include subfiles with the same name as the selected batch and Web applications.

    Category 2. Name the category

  4. TicketHTTP> HTTP ServerAnd then simply renewNext. In this step, you will tell eclipse to use the local HTTP server as the runtime goal. This is why Tomcat V5 (or other servers that support HTTP) must be installed during the security step, allows you to analyze eclipse applications locally.

    3. Set the Access Point pointing to the local HTTP Server

  5. Enter the correct port (which may be 80 or 8080) for the local HTTP server, and then enter the name of the target region that you want to use the application.
  6. OptionalPublish projects to this serverAnd then simply renewBrowseTo select a local web project. In this example, the path in my system is c: \ Program Files \ Apache Software Foundation \ Tomcat 5.5 \ webapps \ Root \ helloworld. You may need to create a helloworld project, but the parent project may already exist.
  7. TicketFinish.

    4. Set the local HTTP Contents

  8. TicketNextAnd then simply renewATF> dojo.
  9. Canceling SelectionRicoSelection box, and then clickFinish. In this step, the intent will be set according to all the necessary requirements for developing an Ajax application using the dojo toolkit.

    5. Using the dojo Toolkit

In the above step, the idea will build the dojo idea object skeleton in eclipse. Now you must start building an application.

Producer Application

In navigator, helloworld is created. Next, right clickWebcontentAnd then simply renewNew> Other.

6. Creating a new Web Content

Now, develop dojo and perform simple operationsDojo Application> next. In the preceding steps, the framework of the application will be set. However, in this step, a file will be created on the website, used to compile and construct the process of a single dojo application in the program. You can create multiple applications in a single region.

7. Configure the dojo Application

InNameFieldhelloworldappAnd then simply renewFinish. Each application name should at least be slightly different from the category name, in order to distinguish the content represented by this group file.

8. Name the dojo Application

In this step, helloworldapp.html is added to the eclipse central framework. In this framework, Zookeeper helloworldapp.html changes it from a skeleton-only application to a workable helloworld application.

9. Navigation Pane

Generate the helloworld application for the Transportation Line

First, change the topicHello World. This is a regular HTML file that supports scripting and HTML that you are familiar with. It also includes JavaScript code generation using the dojo and dojo controls. You can handle basic HTML elements like any other web faces.

10. Modify the HTML to include the corresponding metric name.

Now, add the proxy for the helloworld application. These generation snippets are also used in the previous helloworld example, but in this example, the framework of the application is set using eclipse. Insert this notebook into helloworldapp.htmlheadThe end of the part. Use this generation of parts to create a notebook. Use notebook to press the button to change "Hello world !」 Merge into the merge tables window.

Lifecycle 11. Add a button control to the delegate role

FinallybodyAdd a token to display the code on the screen. Because you have already installed the dojo button control, you can reference it in the HTML main body now. Note: This is slightly higher than a typical helloworld application that only prints Hello World sentences without interaction, but the message is pushed out to the response window.

12. Add a real-time listener to the content domain

Save, renew, and run applications

Now you need to save, compile, and run the helloworld application you created:

  1. TicketFile> Save.
  2. Helloworld, webcontent, and helloworldapp are available in the eclipse navigator framework.
  3. Right-side ticketHelloworldapp.htmlAnd then simply renewRun as> run in Mozilla.
  4. TicketFinishThe integration of the helloworld application into the Mozilla compiler will be enabled.

    13. Compile export of the dojo Application

TicketPress meThen you will see "Hello World !」 The role is displayed on the zookeeper console. If the message is displayed normally and no other message exists, you can confirm that the operation of ATF security and category proxy is normal.

14. Use

Extends the functions of applications

Now that you have a basic operation application, you can use the generation snippet with the ATF to demonstrate the function. If the snippets pane does not exist in the eclipse development environment, clickWindow> show View> Other. General, simple releaseSnippetsAnd then simply renewOK. The snippets pane should appear in the right pane of the eclipse window.

Token 15. Token-based segment

Expand the dojo in the snippets pane, and then drag the dojo. Require into the Javascript libraries in the helloworldapp.html coding pane. The system will display a dialog box asking you to upload the component package name. For this example, please referDojo. widget. Tree. In this way, a row of tokens will be added for the ingress tree control, which allows you to use controls in the internal region of the hierarchy.

Lifecycle 16. Tree Control

Move down to the main part of helloworldapp.html andTreeDrag the snippet pane to the overview pane. Eclipse will check whether the sample data is included. Deselect this selection box and add the envelope tree generation sequence from the parent node. Then, drag the tree node fragment from the snippet pane into the tree tag of the worker pane, and name the vertexHello. Then, add three more Tree nodes in the hello vertex.

17. Use helloworld to create a tree Vertex

You need to save the helloworld application that has been created by zookeeper and the runtime again. TicketFile> Save. Then, the helloworld, webcontent, and helloworldapp will be developed in the eclipse navigator framework. InHelloworldapp.htmlClick the Mouse icon on the left side, and then clickRun as> run in Mozilla. TicketFinishThe integration of the helloworld application into the Mozilla compiler will be enabled. You should be able to simply expand and collect the hello nodes, which can show or hide its subnodes.



First reply

End

Now, you have learned how to use ATF idea in eclipse to create a dojo topology. To improve the usage of the SDK, you need to understand how to use all the content of the selected Ajax toolkit in eclipse. In addition, you need to study the high-definition functions used in eclipse ATF, such as Dom inspector, CSS inspector, and JavaScript render handler programs. Using dojo to create a simple helloworld application greatly simplifies the process of using eclipse, the architecture of a complete Web application program will become more and more complex in the future. In the next article, we will update the new version and functions, and further discuss more complex information about ATF and other support kits (such as zimbra and Rico.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.