Learn about Tapestry, part 2nd

Source: Internet
Author: User
Tags html page

The first article in this short series is Tapestry's introduction--tapestry is a lightweight framework for building WEB applications. If you've read that article, you should have a basic understanding of how Tapestry works and how to combine its core APIs. You may not be sure how to actually develop the Tapestry application from scratch, but in this article I will address this issue.

I want to start with a simple application planning approach, which is especially important when using Tapestry. Then I'll discuss the role of HTML prototypes in Tapestry development and explain the elements that you need to have before you write Tapestry components. Finally, I'll explain how to develop the Tapestry components and link them to HTML pages. You'll also learn some tricks to make sure your plan adapts to the people who use the application, which is key to successful development, and describes how to plan and develop Tapestry components for reuse.

Planning your Application

If you belong to a class of developers, you may hate the word planning and think you should spend your time doing something practical! However, planning is the best way to start building Tapestry applications (or other types of applications), so I'll start by introducing how to plan as painlessly as possible.

The Tapestry framework uses actual HTML pages as templates and links these templates with Tapestry components. All these are then bundled together by a deployment descriptor to form a tightly coupled and fairly complex set of files. The Tapestry application has the following typical components:

HTML page (Tapestry as template)

Tapestry class

Java Beans and Tool classes

Servlet Deployment Descriptor (Web.xml)

Tapestry Application Descriptor (app.application)

If a opposing goes in and starts to develop application code, it will soon be full of cluttered annotations, bugs that are hard to find, and templates that sometimes have been updated and sometimes not updated. Planning is the only way to really make the most effective use of Tapestry, so try to do the three main points of planning as painlessly as you can.

Start with the problem

The first part of the plan is to ask a simple but very important question: what does the application do? Although it may seem trivial--even stale--this is the most important issue that can be raised by an application. And, surprisingly, it is the most often overlooked. The following is a list of some of the more common issues at the beginning of the development process (sounds familiar?). ):

Trampling on customers and norms!

No, it's not true. Even if you hate planning, if you don't communicate with your application's stakeholders (stakeholder), you're going to fail. No matter how beautiful your code is, you have to work on what your customers expect-even if you disagree with your customers ' expectations. So now please keep your judgment on the plan (ie, how annoying it is) and try the way I demonstrate here. A better application will be formed every time!

What technology do you want to use?

What client (Web browser, mobile phone, PDA) is going to access the application?

On which platform will the application run (Windows, Linux, Mac OS X, Sun Solaris, and so on)?

When does it have to be done?

These are useful questions, but none of this matters if the application actually does the work that the stakeholders expect.

This applies to Tapestry, and if you don't know the basic purpose of your application, you won't write good Tapestry code--No matter how beautiful the technology is. The Tapestry code is used for two basic purposes:

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.