Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Tapestry 5: Building Web Applications
Tapestry 5: Building Web Applications

Tapestry 5: Building Web Applications: A step-by-step guide to Java Web development with the developer-friendly Apache Tapestry framework

eBook
€22.99 €25.99
Paperback
€32.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Tapestry 5: Building Web Applications

Chapter 1. Introduction to Tapestry

Programming for the Web is very rewarding. Your application, once deployed, becomes available to millions of people, and it doesn't matter which the kind of computers they are using. If they have a reasonably new web browser, they have a good chance of being able to fully appreciate your creation, whether they are running Windows, Linux, Mac OS, or UNIX on their workstation or hand held device.

To become a web developer, one would normally need to be intimately familiar with the strange world of HTTP protocol—requests and responses flying across the globe, special places for storing information like session or application context, and so on. In short, one would have to go to a much lower level of software development.

This change of level is especially striking for those who have had some experience with a Rapid Application Development (RAD) environment, like Borland Delphi or Microsoft Visual Basic. When using such an environment, it seems so natural that when a button is pressed on a form the desktop application is immediately ready to do something in response to the user's action and all you need to do as a programmer is to provide some code that will run in response.

However, when it comes to web development, a developer needs to keep in mind a long chain of low level processes that run before and after he or she is able to do something useful in response to a button press on a web page. Is this a GET or a POST request? How do we extract useful information from the request? How do we store this information? How do we create a response?

Working at that level means a lot of time is spent in solving relatively simple problems. As web applications become more and more popular it becomes obvious that a more efficient, higher level approach to web development is needed.

Nowadays, several solutions are offered to solve this problem on different software development platforms. In the world of Java, the most efficient and elegant solution is presented by Apache Tapestry. Tapestry is an open-source Java web framework, conceived by Howard Lewis Ship and currently developed by a team of devoted Java pundits from around the world.

Why is Tapestry Special?

Tapestry is an example of a framework that was created keeping the developer in mind.

First of all, its paradigm is very close to that of the RAD environment. A button on the Tapestry page has an event handler method associated with it in a declarative way, and the method is invoked when the button is pressed. The Tapestry web developer doesn't need to remember that the button on the page in a user's web browser and the code of the event handler method on the web server can be thousands miles apart, and doesn't need to care about which communication protocol is being used.

This natural approach makes Tapestry significantly easier to learn than any other web development framework, and it makes the process of development much more efficient. However, there are a number of other attractive features, the combination of which makes Tapestry unique.

Tapestry HTML Templates are Free from Obtrusive Instrumentation

Every web application has to deal with HTML in one or another way. No matter what language is used on the server or what intricate logic is employed to produce the page, what actually gets sent to the user's browser is an HTML page. To make that page dynamic, web applications use some kind of HTML template, or specially prepared chunks of HTML markup, and employ some programming logic to fill that template with dynamically generated data, or manipulate HTML in a desired way.

To make this possible, virtually all web frameworks create a tight mixture of HTML markup and some other kind of code, whether it is Java, PHP, VBScript, JSP tags, JSF, ASP.NET components, or something else. Such an approach has a number of significant disadvantages.

First of all, the more complicated the page design and programming logic, the more difficult it is to weave them together. Second, this tight conglomeration of different kinds of code is extremely difficult to maintain and update. Debugging the programming logic of such a page can be quite a challenge.

Contemporary technologies like Sun's JavaServer Faces or Microsoft's ASP.NET rely on specialized development environments to handle the complexities of mixing a dynamic logic with HTML markup, but design capabilities of such specialized environments are unavoidably limited. As a result, the page design remains quite simplistic and less impressive. Code that is automatically generated by these development environments is usually far from being perfect as it has much duplication and is hard to maintain.

For many applications, it often makes sense to have a special team of designers or to use the services of an external team in order to have a professional looking interface. Unfortunately, in most web technologies the conversion of a thoroughly designed page into an HTML template is a one way procedure. The result becomes incomprehensible for any designer not familiar with programming techniques. So when it comes to a significant change in page design, it might be easier to discard the existing page and start from scratch.

Tapestry solves all these problems in the most elegant way. In Tapestry 3 and 4, templates are valid HTML documents that can be easily read and edited by any designer using a common designer's software, without breaking the logic of the page. In Tapestry 5, templates are XML documents, but they are very close to HTML. With minor reservations, all the advantages of the previous versions apply to them too. The main point is that all versions of Tapestry provide the highest possible level of separation between HTML markup and programming logic.

Custom Components are Very Easy to Create

The use of components allows you to significantly increase the productivity of web development—this is why all the new frameworks, including Tapestry, JavaServer Faces, and ASP.NET are component-based.

However, the choice of core components that come with the framework is always limited, and it is important to give developers an opportunity to create their own custom components. Naturally, such an opportunity is provided by all component-based frameworks, but the level of effort required to create a custom component differs from framework to framework quite significantly.

For instance, to create a custom JavaServer Faces component, the developer needs to know the intricate inner structure of the framework quite well, so this is a task for advanced developers only.

In Tapestry, however, creation of custom components does not require any advanced knowledge, and is perfectly possible for beginners. We will be creating non-trivial custom components in Chapter 8 of this book.

AJAX and DHTML, but No JavaScript Coding

Contemporary web applications are unthinkable without attractive and clever features powered by JavaScript and are commonly known as DHTML and AJAX. However, JavaScript has browser incompatibilities. So Tapestry comes up with a number of components that make the miracles of AJAX available to the application, but, fortunately for developers, all JavaScript is thoroughly hidden inside the framework. AJAX-enabled components are as easy to use as any other Tapestry component, so you can make your application Web 2.0-ready without ever seeing a single line of JavaScript code. Well, at least this is true for the previous version of the framework, 4.1. As of this writing, the AJAX features are currently under development (and will likely be in a finalized state by the time you read this), but it is promised that they will be even more powerful and easier to use than in Tapestry 4.1.

User Input Validation Works Like Magic

User input validation is a must for almost every web application, as users are mere mortals and will always try to submit some erroneous data. A friendly application should clearly explain to the user exactly which piece of input is wrong, but creating an input validation and error reporting subsystem can require quite a lot of work.

Tapestry 4 already had a powerful built-in infrastructure for input validation, but in Tapestry 5 it goes much further. You as a developer will have to do very little, usually simply declaring what exactly you want, while your application will not only clearly mark the erroneous fields, but also automatically display an appropriate message in the language preferred by the current user.

Built-In Internationalization Support

A Java platform itself provides substantial support for internationalization and localization but, in Tapestry we do not need to know the details of that support. We just use a few simple hooks provided by the framework to have our application displayed in as many different languages as we wish.

It is actually quite amazing to see how one mouse click totally changes the language of the application. Everything—text, images, different controls, suddenly begin to speak in a foreign language! It is an impressive feature, considering how little we have to do to enable this flexibility.

Inversion of Control Made Easy

Inversion of Control (IoC) and Dependency Injection are amongst the most popular software development paradigms these days, and they deserve their popularity. In simple terms, Inversion of Control allows developers to save effort and time by allowing some other software to take care of different routine things and provide them services whenever needed.

However, to use the benefits of Inversion of Control in an application, one might need to learn and use an additional framework like Spring. Not in Tapestry though.

Tapestry has an Inversion of Control subsystem of its own, and quite a good one. As a result, Tapestry applications contain very little Java code. All you need to write is business logic while all the infrastructure issues are handled automatically. Aditionally, the Tapestry 5 IoC container additionally provides an opportunity to implement and enforce some of the best design patterns, again, with absolute minimum code serving this purpose.

Spring framework is very popular, and working on a large-scale enterprise application, we often need to make use of some sort of back end, implemented in Spring. Thankfully, Tapestry has a special subsystem for integration with Spring. Using this subsystem in my work, I had an impression that it is easier to use Spring beans in Tapestry than in Spring itself.

More or less the same can be said about integration with another very popular framework, Hibernate. There is a special subsystem in Tapestry responsible for this integration and it is very easy to use.

To summarize, Tapestry is a mature contemporary web development framework with all the features that would be expected from such a framework and with all the power of Java platform to support it. But additionally, Tapestry is based on a unique, developer-friendly paradigm, which makes it especially easy to learn and use.

Why is Tapestry Special?


Tapestry is an example of a framework that was created keeping the developer in mind.

First of all, its paradigm is very close to that of the RAD environment. A button on the Tapestry page has an event handler method associated with it in a declarative way, and the method is invoked when the button is pressed. The Tapestry web developer doesn't need to remember that the button on the page in a user's web browser and the code of the event handler method on the web server can be thousands miles apart, and doesn't need to care about which communication protocol is being used.

This natural approach makes Tapestry significantly easier to learn than any other web development framework, and it makes the process of development much more efficient. However, there are a number of other attractive features, the combination of which makes Tapestry unique.

Tapestry HTML Templates are Free from Obtrusive Instrumentation

Every web application has to deal with HTML in one or another way. No matter what language is used on the server or what intricate logic is employed to produce the page, what actually gets sent to the user's browser is an HTML page. To make that page dynamic, web applications use some kind of HTML template, or specially prepared chunks of HTML markup, and employ some programming logic to fill that template with dynamically generated data, or manipulate HTML in a desired way.

To make this possible, virtually all web frameworks create a tight mixture of HTML markup and some other kind of code, whether it is Java, PHP, VBScript, JSP tags, JSF, ASP.NET components, or something else. Such an approach has a number of significant disadvantages.

First of all, the more complicated the page design and programming logic, the more difficult it is to weave them together. Second, this tight conglomeration of different kinds of code is extremely difficult to maintain and update. Debugging the programming logic of such a page can be quite a challenge.

Contemporary technologies like Sun's JavaServer Faces or Microsoft's ASP.NET rely on specialized development environments to handle the complexities of mixing a dynamic logic with HTML markup, but design capabilities of such specialized environments are unavoidably limited. As a result, the page design remains quite simplistic and less impressive. Code that is automatically generated by these development environments is usually far from being perfect as it has much duplication and is hard to maintain.

For many applications, it often makes sense to have a special team of designers or to use the services of an external team in order to have a professional looking interface. Unfortunately, in most web technologies the conversion of a thoroughly designed page into an HTML template is a one way procedure. The result becomes incomprehensible for any designer not familiar with programming techniques. So when it comes to a significant change in page design, it might be easier to discard the existing page and start from scratch.

Tapestry solves all these problems in the most elegant way. In Tapestry 3 and 4, templates are valid HTML documents that can be easily read and edited by any designer using a common designer's software, without breaking the logic of the page. In Tapestry 5, templates are XML documents, but they are very close to HTML. With minor reservations, all the advantages of the previous versions apply to them too. The main point is that all versions of Tapestry provide the highest possible level of separation between HTML markup and programming logic.

Custom Components are Very Easy to Create

The use of components allows you to significantly increase the productivity of web development—this is why all the new frameworks, including Tapestry, JavaServer Faces, and ASP.NET are component-based.

However, the choice of core components that come with the framework is always limited, and it is important to give developers an opportunity to create their own custom components. Naturally, such an opportunity is provided by all component-based frameworks, but the level of effort required to create a custom component differs from framework to framework quite significantly.

For instance, to create a custom JavaServer Faces component, the developer needs to know the intricate inner structure of the framework quite well, so this is a task for advanced developers only.

In Tapestry, however, creation of custom components does not require any advanced knowledge, and is perfectly possible for beginners. We will be creating non-trivial custom components in Chapter 8 of this book.

AJAX and DHTML, but No JavaScript Coding

Contemporary web applications are unthinkable without attractive and clever features powered by JavaScript and are commonly known as DHTML and AJAX. However, JavaScript has browser incompatibilities. So Tapestry comes up with a number of components that make the miracles of AJAX available to the application, but, fortunately for developers, all JavaScript is thoroughly hidden inside the framework. AJAX-enabled components are as easy to use as any other Tapestry component, so you can make your application Web 2.0-ready without ever seeing a single line of JavaScript code. Well, at least this is true for the previous version of the framework, 4.1. As of this writing, the AJAX features are currently under development (and will likely be in a finalized state by the time you read this), but it is promised that they will be even more powerful and easier to use than in Tapestry 4.1.

User Input Validation Works Like Magic

User input validation is a must for almost every web application, as users are mere mortals and will always try to submit some erroneous data. A friendly application should clearly explain to the user exactly which piece of input is wrong, but creating an input validation and error reporting subsystem can require quite a lot of work.

Tapestry 4 already had a powerful built-in infrastructure for input validation, but in Tapestry 5 it goes much further. You as a developer will have to do very little, usually simply declaring what exactly you want, while your application will not only clearly mark the erroneous fields, but also automatically display an appropriate message in the language preferred by the current user.

Built-In Internationalization Support

A Java platform itself provides substantial support for internationalization and localization but, in Tapestry we do not need to know the details of that support. We just use a few simple hooks provided by the framework to have our application displayed in as many different languages as we wish.

It is actually quite amazing to see how one mouse click totally changes the language of the application. Everything—text, images, different controls, suddenly begin to speak in a foreign language! It is an impressive feature, considering how little we have to do to enable this flexibility.

Inversion of Control Made Easy

Inversion of Control (IoC) and Dependency Injection are amongst the most popular software development paradigms these days, and they deserve their popularity. In simple terms, Inversion of Control allows developers to save effort and time by allowing some other software to take care of different routine things and provide them services whenever needed.

However, to use the benefits of Inversion of Control in an application, one might need to learn and use an additional framework like Spring. Not in Tapestry though.

Tapestry has an Inversion of Control subsystem of its own, and quite a good one. As a result, Tapestry applications contain very little Java code. All you need to write is business logic while all the infrastructure issues are handled automatically. Aditionally, the Tapestry 5 IoC container additionally provides an opportunity to implement and enforce some of the best design patterns, again, with absolute minimum code serving this purpose.

Spring framework is very popular, and working on a large-scale enterprise application, we often need to make use of some sort of back end, implemented in Spring. Thankfully, Tapestry has a special subsystem for integration with Spring. Using this subsystem in my work, I had an impression that it is easier to use Spring beans in Tapestry than in Spring itself.

More or less the same can be said about integration with another very popular framework, Hibernate. There is a special subsystem in Tapestry responsible for this integration and it is very easy to use.

To summarize, Tapestry is a mature contemporary web development framework with all the features that would be expected from such a framework and with all the power of Java platform to support it. But additionally, Tapestry is based on a unique, developer-friendly paradigm, which makes it especially easy to learn and use.

Is Tapestry the Savior in the World of Java Web Development?


Java technology is traditionally strong on the server side. However, in the last couple of years one might notice some kind of stagnation in the area of Java web development. To explain what I mean, I will need to show you a brief history of Java web development.

In the first stage of web development, it was typical to have some code that a web server could invoke to produce dynamic content. The traditional solution is to have a program written in Perl or C and to invoke it through a CGI interface. The Java solution was different however, and that solution was rather advanced for its time. Java code was running on the server as a servlet, a kind of plug-in maintained by a servlet container.

The servlet way was superior because it ensured higher scalability, but perhaps even more importantly from the developer's point of view, a servlet developer could spend more time writing application-specific code, since many of the lower level issues were handled by the servlet container. At that time, Java technology was ahead of the rest of the web development world.

The next generation of web technology was about embedding pieces of code into an HTML page in order to make it dynamic. You can see this approach in JSP, ASP, PHP and ColdFusion.

Again, Java technology was ahead, because JavaServer Pages took special care about separation between the application code and its presentation logic. Ideologically fortified by Model-View-Controller design pattern, this approach culminated in Apache Struts framework.

Basically, a Struts application is a traditional servlet/JSP application, but this framework offered a number of efficient solutions for common problems of web development. Struts developers could avoid reinventing the wheel and reuse existing solutions by modifying them with application-specific code. This significantly increased the efficiency of large-scale web development, and Struts framework became extremely popular, once again ensuring the leading position of Java technologies.

However, around the same time Microsoft came up with an alternative technological solution, ASP.NET. This was a component-based approach which was supported by a sophisticated integrated development environment (IDE), Visual Studio, ASP.NET resembles RAD solutions that brought desktop development to a new level of productivity some years ago. An ASP.NET developer can drop a few components on the page, set their properties in a visual property editor and run the application—all in just a few seconds.

This is when the feeling appeared that the Java approach is not quite the best anymore. ASP.NET was quickly gaining popularity, while the mainstream Java approach was exemplified by a Struts application, not component-based, and was still quite a low-level solution.

The Java world tried to retaliate by creating JavaServer Faces specification. Externally, it resembles ASP.NET, but is built on top of the existing Java-specific solutions.

JSF is supported and promoted by major software vendors like IBM, Oracle, and BEA, and it's implemented in their state-of-the-art commercial IDEs. Its approach was very similar to the Microsoft approach, but somehow JavaServer Faces didn't gain the popularity it was expected to gain. Maybe that is because to create the JSF specification, so many different parties had to come to a compromise.

Or maybe the problem is in the fact that the JavaServer Faces specification is created using existing Java solutions and has inherited their weaknesses. For example, JavaServer Pages technology, used by JSF to render pages, was very sound for its time, but a JSP page can easily become an unintelligible mixture of HTML, standard tags, custom tags, and EL expressions. Also, JSF has some older features from Struts, like its navigation configured in a lengthy XML file. As a result, JSF technology is difficult to comprehend, learn and work.

Or perhaps the problem with JSF is that it mimics so closely the Microsoft solution, while the Java world has its own laws, and something that is good for Microsoft might not be equally good here?

My point is that if we look at Tapestry, the framework that was never supported or promoted by billionaire corporations, we might notice that it can easily compete with the most recent versions of ASP.NET in many respects.

Features like code-behind in ASP.NET that allows the separation of code of the page from its template, is an integral part of Tapestry from the very beginning of the framework. In fact, in Tapestry you cannot just mix code and HTML since all Java code goes into the page class.

In fact, many solutions that are promoted as advanced features of ASP.NET can be found either in the core Tapestry framework or in a library of custom Tapestry components, such as Tacos.

It may well happen that with time, as more people realize the benefits of Tapestry, it might become the model for the next generation of a Java web framework specification.

However, nothing is perfect, and Tapestry has its downsides too. One of them is the fact that the framework's development goes ahead in huge steps, which makes the next version very different from the previous one. To fully appreciate what this means, let's have a look at a brief history of Tapestry.

The Journey of Tapestry from 3 to 5

Tapestry was originally conceived by Howard Lewis Ship around the year 1999, but the early versions of the framework are not widely known.

Tapestry 3 became the first well known version, and I used it for my first Tapestry application that I created in the summer of 2005. Tapestry was a great relief after my experience with servlets and JavaServer Pages. Its approach was very easy for me to understand, maybe because in the past I had plenty of experience with Borland Delphi, a very popular Rapid Application Development environment.

However, some features were not fully implemented in Tapestry 3. Most notably the validation subsystem was somewhat deficient. Also, some obvious components were missing, and I had to create a number of custom components myself (although that wasn't too difficult, frankly speaking). All in all, I was very happy that I had learned Tapestry, and I was going to use it for years.

However, when Tapestry 4 appeared in January 2006, it was so different that I had to learn the framework again. It was not a problem though as Tapestry 4 had streamlined and made many features easier than in the previous version. Most significantly, Tapestry 4 was built on top of Hivemind, another Open Source project created by Howard Lewis Ship. Hivemind made it possible to easily extend and configure Tapestry, but most notably, it allowed users to inject anything into the page, as Hivemind was (and is) quite a capable Inversion of Control container. Also, Tapestry introduced a brand new user input validation subsystem, flexible and easy to use.

On a negative note, Tapestry 4 was not compatible with Tapestry 3, and upgrading an application to the new version required a substantial amount of effort.

Tapestry 4.1 became another major step in the development of the framework. It came with Dojo JavaScript toolkit built into it, and as a result it made AJAX functionality easily available to Tapestry developers. It looks like version 4.1 will stay here for a while and allow many people to benefit from using it for building their web applications. It still has a few places where it could be streamlined or enhanced, but, it is a powerful and developer friendly framework.

Very soon however, it became clear that Howard Lewis Ship was working on a completely new, fifth version of Tapestry, and that version was not just a step, but a quantum leap forward. Tapestry 5 was created from scratch, and on one side, it incorporated all the best ideas accumulated by Tapestry developers over the years, while on the other side it got rid of those solutions that proved to be obsolete or inefficient. Needless to say that neither Tapestry 3 nor Tapestry 4 were compatible with Tapestry 5, although their approach was very similar.

Tapestry 5 is a truly contemporary framework. It was specifically designed to be extremely developer friendly. Page classes are now POJOs (Plain Old Java Objects), since they do not need to inherit from any framework-specific classes, and we have more freedom in choosing how to implement them. They are easy to test too. To give Tapestry hints on what we expect from it, we use Java annotations, and the framework adapts to our requirements instead of expecting us to adapt to its rules.

Tapestry 5 comes with new powerful components. Their rich functionality can be easily adjusted for a specific application's needs, and so there will be significantly fewer cases when we need to create custom components. Creating custom components is even easier now than it was before, so our creativity is not limited in any way.

Tapestry 5 is significantly faster than the previous versions too. Not to say that those were slow. Tapestry 3 and Tapestry 4 applications are as fast as any other Java web application. All versions of Tapestry were created with great scalability in mind, which means that Tapestry applications can work under a significant workload—say, thousands of visitors using the application simultaneously.

I am not going to list here all the novelties of Tapestry 5 as we are going to learn them in the course of this book, but I encourage you to visit the Tapestry website (http://tapestry.apache.org) and read what the creators of the framework write about the new version. In general, it is significantly easier to learn to work with and efficient too.

It is also stated by its creators that Tapestry 5 will become a stable long-term platform for the future development of the framework. They have taken special care to ensure that the future versions of the framework will be backward compatible.

So it looks like you came to Tapestry just in time!

Summary


Tapestry is a contemporary, feature-rich, component-based, AJAX-enabled Java web framework.

Tapestry was specifically designed to greatly increase the productivity of web development by being user-friendly, easy to understand and learn, and by minimizing the amount of coding. Tapestry 5 incorporates the latest ideas in software development and it is even easier to use, configure and extend than the previous versions. It is also significantly faster.

Tapestry is a perfect tool for any kind of web development—from a personal website to an enterprise-scale solution. Arguably, Tapestry is the future of Java web development.

In the next chapter we are going to create a working environment for Tapestry development, which means that we shall download, install and configure all the necessary pieces of software. After that, we shall create our first Tapestry project—a very simple one, just to make sure that everything works properly.

Left arrow icon Right arrow icon

What you will learn

  • None
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jan 15, 2008
Length: 280 pages
Edition :
Language : English
ISBN-13 : 9781847193070
Vendor :
Apache
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Hungary

Premium delivery 7 - 10 business days

€25.95
(Includes tracking information)

Product Details

Publication date : Jan 15, 2008
Length: 280 pages
Edition :
Language : English
ISBN-13 : 9781847193070
Vendor :
Apache
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 119.97
Java EE 8 and Angular
€36.99
Mastering JavaServer Faces 2.2
€49.99
Tapestry 5: Building Web Applications
€32.99
Total 119.97 Stars icon

Table of Contents

8 Chapters
Introduction to Tapestry Chevron down icon Chevron up icon
Creating Your Working Environment Chevron down icon Chevron up icon
The Foundations of Tapestry Chevron down icon Chevron up icon
Simple Components Chevron down icon Chevron up icon
Advanced Components Chevron down icon Chevron up icon
User Input Validation Chevron down icon Chevron up icon
Internationalization and Localization Chevron down icon Chevron up icon
Creating Custom Components Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(12 Ratings)
5 star 50%
4 star 33.3%
3 star 8.3%
2 star 0%
1 star 8.3%
Filter icon Filter
Top Reviews

Filter reviews by




Bakul P. Brahmbhatt Feb 27, 2009
Full star icon Full star icon Full star icon Full star icon Full star icon 5
[...]This book is written with very simple examples. Few things are here and there but over all, this book will help you to get started in right direction. What this book is missing is information about Mixin, Ajax, integration with spring and hibernate. But purpose of this book was to give a jump start and not to teach everything. So don't be discouraged by reading negative comments of few people. Get your copy today.
Amazon Verified review Amazon
Kai Wähner Sep 14, 2009
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Dieses Buch bietet eine Einführung in das Web-Framework "Tapestry 5".Nach der üblichen Einleitung (Was ist Tapestry und wieso sollte man es einsetzen?) wird sehr ausführlich beschrieben, wie Tapestry installiert und mit einer IDE (Eclipse und NetBeans) verwendet wird.Danach folgt das wichtigstes Kapitel: Die Einführung an Hand einer Beispielapplikation - Step by Step. Das Beispiel ist sehr einfach und kann ohne Probleme nachgebaut werden. Danach besitzt man alle Grundlagen, um eigene Webanwendungen mit Tapestry zu erstellen.Die weiteren Kapitel erläutern detailiert die weiteren möglichen Komponenten (einfache, fortgeschrittene und eigene Komponenten) sowie Input Validation und Internationalization.Das Buch ist sehr gut verständlich und auch für Entwickler geeignet, die noch keine Erfahrung mit der Webentwicklung besitzen. (Gute) Java- und (geringe) HTML-Kenntnisse sollten aber vorhanden sein.Fazit: Eine super Einführung in Tapestry 5. Viel besser geht es nicht!
Amazon Verified review Amazon
Mark Feb 03, 2008
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an ideal introduction to Tapestry 5. It works equally well for new users and people who have experience in an older version of Tapestry and want to start using version 5.The first part of the book concentrates on getting your environment setup in either Eclipse or Netbeans. This is extremely well done and goes a long ways toward making sure you aren't doing something the hard way.The book takes you through creating a simple web application. The author did a great job of showing the power of the framework without bogging you down in unnecessary details. The example application is simple enough that you don't mind just typing it in yourself as you work through the book, but chosen with enough care to make sure you cover all the important parts of the framework. I have rarely read a technical book that covered so much content so effortlessly.If you understand Java and have basic knowledge of web applications, this book gives you what you need to start developing using Tapestry. Personally the 10 hours I spent working through the book probably saved me over 100 hours of trying to figure things out on my own.
Amazon Verified review Amazon
BrianH Apr 11, 2008
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really enjoyed reading Alexander's book on Tapestry 5. What I liked most was the fact that it takes the reader all the way from setting up the development environment to advanced topics like component development. Alexander's enthusiasm for the Tapestry 5 framework permeates the book and will definitely inspire any reader interested in adopting the framework. The insights provided into how the framework has evolved from version to version and how it is likely to evolve in the future are very interesting. It's obvious that Alexander has sound practical experience of using Tapestry on real life projects.All in all a good complement to the existing Tapestry 5 literature.
Amazon Verified review Amazon
D Mar 06, 2008
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Tapestry 5 is the latest version of the Apache Tapestry framework created by Howard Lewis Ship. In the book Alexander Kolesnikov takes the developer through a brief history of Tapestry identifying the differences between previous versions of the framework. Alexander also takes some time to describe why Tapestry is "Special" and what makes Tapestry appealing to developers, for example he describes how AJAX and DHTML is built into the framework without the need for Java Script coding.After the introduction to Tapestry, its history and reasons why developers should look at Tapestry, Chapter 2 of the book describes how to create a working environment. This chapter assumes the reader has little Java knowledge as it first describes how to install the relevant JDK and Maven for both Windows and Mac OS X. Maven is not however used as the build system throughout the book, but is instead used for its support for building project templates. I found this to be an excellent idea as it enables the reader to concentrate on learning Tapestry rather than learning the intricacies of Maven. Chapter 2 continues and describes how to create basic Tapestry projects and how to open, run and debug them within both Eclipse and NetBeans. I was pleased to see that the book covers both Eclipse and NetBeans throughout whenever it refers to managing Tapestry projects within IDEs.In Chapter 3 of the book, "The Foundations of Tapestry", Alexander describes the architecture of a Tapestry 5 application and how each page consists of an XML page template and a corresponding page class. The chapter starts by taking the simple Tapestry 5 application created in the previous chapter and describing the various components and how they all fit together, including what happens when applications crash and need debugging. The dependency injection mechanisms of Tapestry 5 are then introduced as the book describes how to pass data between different pages within a Tapestry 5 application. This includes a detailed discussion on Persistent Page Fields, Page Activation Contexts and Application State Objects.At the end of Chapter 3, the reader should be experienced with basic Tapestry 5 applications. The next Chapter, "Simple Components" describes some of the more common components used within a Tapestry 5 application, for example, TextFields, PageLinks, ActionLinks, Ifs, Loops etc. The chapter takes the approach of describing how to build a working Tapestry 5 application rather than simply describing the workings of each of the different component types. I found this a good approach for developers as new concepts are introduced gradually with a discussion on why these new concepts are necessary and how they are applicable. The sample application is iteratively improved, for example it starts using a fixed Mock Data Source which is then refactored to show how to use either a mock or a real datasource within the application. After learning about the simple components within the Tapestry 5 framework, we are introduced to more advanced components such as the Grid, BeanEditForm, DateField and the FCKEditor rich text control. Again, all of these components are integrated into the sample application showing how each is used within both the Tapestry XML template and and the Java backing classes.The next couple of chapters of the book cover user input validation and internationalisation and localisation - all essential features of modern web applications. As is common with the rest of the book, both sample code and screen shots are provided to aid the readers understanding.The final chapter of the book brings together all the components that the reader has learned about in the previous chapters and shows how Custom Components can be created within a Tapestry 5 application. The chapter takes the reader through creating several different types of components and shows how this refactoring can be used to simplify application development.The book doesn't detail how to harness the power of AJAX or how to integrate with external products like Hibernate or Spring, but that is not the purpose of this book. The book takes the reader though a journey of developing web applications. It starts with installing the required libraries and setting up IDEs, and then continues through Tapestry pages, creating simple page flows and finally ends by describing how to create custom components, concentrating on core Tapestry fundamentals all the way through.I liked this book and found the writing style to be informative and easy to read. If you have little or no knowledge of Tapestry 5 and you are interested in it (or just want to decide if you should be using it for your applications), then this is the book for you.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela