This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

how does the tapestry framework work?

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is new for me.
What technologies does it support?
What design pattern does it follow?
Any guidance to a good 10 minutes overview-enlightment on this framework?
 
author
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by what technologies it supports? If you think that, like some other frameworks, it needs other technologies (say, JSP or Velosity) in order to work, than this is wrong. Tapestry is quite self-sufficient and the way how it handles page templates (a.k.a. "views") is unique. But it can easily integrate with middle tier frameworks like Spring or Hibernate.

It doesn't literally embody the MVC pattern as many other frameworks do. Indeed, if you are using JSP - technology that just too easily mixes code with presentation - you need to enforce some discipline. So you put your views into one room, business stuff into the other room, create a long listing of XML to keep track of what went where and then create a controller to manage all that stuff...

In Tapestry, there is simply no way to mix code and presentation, so you don't need those multiple rooms. You just have a page class and a page template that work together effortlessly and naturally.

But if you are interested in design patterns, you will find the implementations of Chain of Command, Strategy or Pipeline in Tapestry's IoC subsystem, have a look.

I wonder if an annotated table of contents of my book, showing what can be learned about Tapestry from just 250 pages, will give you the inspiration you are looking for.
 
Tina Ma
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is interetsing. There are actually many 'seemingly' wonderful frameworks available, and I'd not tried it before. I skimmed through your MS project, and you really got another Tapestry-novice interested in your field of expertise.
 
Author
Posts: 3443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Conceptually Tapestry is similar to JSF but that is where the similarity it ends. The implementation is quite different.

The heart of Struts framework is the Controller, which uses the Front Controller design pattern and the Command design pattern. Struts framework has got only single event handler for the HTTP request.

The heart of component based framework like Tapestry is the Page Controller Pattern where there is a front controller servlet where all the request go through with the UI components and then fire off events for each component and render the components using a render toolkit. So a component based web framework can have several event handlers on a page. Also component frameworks loosely couple your model, where it can hook into your model (i.e unlike Struts your model does not have to extend Tapestry classes).


These component based frameworks can be thought of as a combination of Struts framework for thin clients and the Java Swing user interface framework for thick clients. These component based frameworks are developed Rapid Application Developement in mind and can be intgerated with RAD tools. Also the component based frameworks provide a cleaner separation of navigation rules unlike Action based frameworks where navigation is hooked into the action classes.
[ March 04, 2008: Message edited by: arulk pillai ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the record, the framework doesn't have to be "component based" to offer the features mentioned by arulk.

So a component based web framework can have several event handlers on a page

So can an action based framework.

unlike Struts your model does not have to extend Tapestry classes

Neither do most modern action based frameworks

Also the component based frameworks provide a cleaner separation of navigation rules unlike Action based frameworks where navigation is hooked into the action classes.

Can you be more specific? I don't understand this point.
 
Alexander Kolesnikov
author
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This discussion can be endless. Indeed, different people have different preferences, very often based on different history of experiences. I am far from thinking that I can convince an experienced Struts developer that Tapestry is superior - no way. Some years ago I had a colleague who was programming exclusively in assembler, and he was very proud of himself.

The only real test would be to build a reasonably complex application using one framework, than another, but this is not practical or even possible.

My message is to those who haven't yet chosen their framework - be aware of Tapestry, it might be exactly what you need. It is very easy to learn and a pleasure to work with.

I would also suggest to those who understand the limitations of action-based frameworks that JavaServer Faces is not the only alternative. Tapestry is a much healthier and easier solution.

I am going to my office in an hour or so and I am planning to create a couple of pretty complex and functionally rich Tapestry 4 components and put them to work in the new project. I am pretty sure I will be able to complete this work in one day, and probably will even have time left to play with new ideas. This is Tapestry. Once you worked with it, there will be no way back to any other framework, however popular it is.
[ March 05, 2008: Message edited by: Alexander Kolesnikov ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ugh, this is what I keep bringing up. Generalized statements that aren't true.

I am far from thinking that I can convince an experienced Struts developer that Tapestry is superior - no way.

Why not? If Tapestry really is better (relative, and I am no Struts fan) then why can't you sit down with this developer on a few occasions, show them some real reasons why you think Tapestry is better, and see what happens?

The only real test would be to build a reasonably complex application using one framework, than another, but this is not practical or even possible.

Are you kidding? It's not possible? I'd argue that it wouldn't take a reasonably complex application to show the merits of a particular framework. If you are saying this is what it takes to show how Tapestry shines, then that is a problem.

I would also suggest to those who understand the limitations of action-based frameworks that JavaServer Faces is not the only alternative. Tapestry is a much healthier and easier solution.

What limitations do you think action-based frameworks have? I know that some action based frameworks do have limitations just as component based frameworks have limitations. They all do. If you are going to make statements like this you need to not generalize them so much and state some specifics.

Once you worked with it, there will be no way back to any other framework, however popular it is.

Again, your opinion. I used T3 and T4. I was a fan. For me, some better solutions came a long and I switched. So I guess there is a way.
 
Alexander Kolesnikov
author
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, Gregg, let's decrease the temperature. Yes, all the frameworks are good, and comparing them is an extremely difficult task. By a reasonably complex application I mean something that can keep you busy for at least a month of full-time work. I've seen just too many of "framework comparisons" made on the basis of 'hello world' applications - that doesn't make sense at all.

Also when choosing a framework, one needs to consider which kind of application is being built. You can do things with GWT or Flex that will be difficult or impossible to repeat with some other frameworks, but each tool has its limitations.
 
arulk pillai
Author
Posts: 3443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last company I worked for 2 years ago allocated a dedicated resource to implement a particular real business use case as a pilot project using both JSF and Tapestry 4 and the outcome was to use Tapestry 4 at that time. Not all companies have this luxury and usually they resort to industry standards (or framework that is backed by big guns), especially it is very hard to convince some managers. I faced an uphill battle with some companies to even use facelets with JSF. So choosing a framework is not always a technical decision. It can be personal preference, political, prior experience and familiarity, marketing and promotions, level of documentation and availablity of good books, industry backing etc as well. What ever said, I quite enjoyed working with Tapestry and would not mind working with it again if opportunity arises.
 
Our first order of business must be this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!