SlideShare una empresa de Scribd logo
1 de 86
Descargar para leer sin conexión
Apache
Tapestry 5:
State of the
Union
Howard M. Lewis Ship

Director of Open Source Technology
Formos
© 2006 Chris Walton
http://www.flickr.com/photos/philocrites/245011706/
                                                     © 2009 Formos www.formos.com
Howard Lewis Ship


• Creator, Apache Tapestry
• Author, "Tapestry in Action"
• Independent Consultant
 2003-2007
• Formos 2008-

                                 © 2009 Formos www.formos.com
What is Tapestry?




               © 2009 Formos www.formos.com
Java
       © 2009 Formos www.formos.com
Open
Source
     © 2009 Formos www.formos.com
Component
  Based
       © 2009 Formos www.formos.com
Developer
 Focused
        © 2009 Formos www.formos.com
Concise
      © 2009 Formos www.formos.com
Fast!
        © 2009 Formos www.formos.com
Mature
     © 2009 Formos www.formos.com
Tapestry
          Elements
© 2009 Nataline Fung
http://www.flickr.com/photos/metaphora/3384569933/
                                                    © 2009 Formos www.formos.com
Tapestry Templates



        Login.tml

        <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
          <body>
            <h1>Please Login</h1>
                                                        Login
             <t:form>
                <t:label for="userId"/>
                <t:textfield value="userId"/>
                <br/>
                                                                   form
                <t:label for="password"/>
                <t:passwordfield value="password"/>
                <br/>                                              label
                <input type="submit" value="Login"/>
             </t:form>
           </html>
                                                                 textfield


                                                                   label

                                                                passwordfield


                                                                           © 2009 Formos www.formos.com
Page Classes


   Login.tml

   <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
     <body>
       <h1>Please Login</h1>
                                                        Login.java
        <t:form>
           <t:label for="userId"/>                       public class Login
           <t:textfield value="userId"/>                 {
           <br/>                                           @Property
           <t:label for="password"/>                       private String userId;
           <t:passwordfield value="password"/>
           <br/>                                             @Property
           <input type="submit" value="Login"/>              private String password;
        </t:form>
      </html>                                                Object onSuccess()
                                                             {
                                                               …
                                                             }
                                                         }




                                                                                        © 2009 Formos www.formos.com
Page Flows

  Login.java                          UserProfile.java

  public class Login                  public class UserProfile
  {                                   {
    @Property                           …
    private String userId;            }
      @Property
      private String password;

      void onValidate()
      {
        …
      }

      Object onSuccess()
      {
        …

          return UserProfile.class;
      }
  }




                                                                 © 2009 Formos www.formos.com
Inversion of Control
  Login.java

  public class Login
                                                            Your
                                                            code
  {
    @Property
    private String userId;

      @Property
      private String password;

      …                          Inject IoC
      @Inject
                                 Service
      private Session session;   into field

      @CommitAfter
      Object onSuccess()
      {
        …

          User user = (User) session. …

          user.setLastLogin(new Date());



  }
      }
          return UserProfile.class;
                                              Tapestry
                                              Services
                                                         © 2009 Formos www.formos.com
Meta-Programming
 Login.java

 public class Login                Generate getter & setter
 {
   @Property
   private String userId;

     @Property
     private String password;

     @InjectPage
     private UserProfile userProfilePage;

     …

     @Inject
     private Session session;
                                    Commit Hibernate transaction
     @CommitAfter
     Object onSuccess()
     {
       …

         User user = (User) session. …

         user.setLastLogin(new Date());


         return userProfilePage;
     }
 }



                                                                   © 2009 Formos www.formos.com
State Management


                    UserProfile.java

                    public class UserProfile
                    {                               Shared global value (any page)
                      @Property
                      @SessionState
   This page only     private UserEntity user;

                        @Property
                        @Persist
                        private Date searchStart;

                    }




                                                                         © 2009 Formos www.formos.com
Template                             Injections



                  Component      Meta-
     Java Class
                              Programming


                   Message
                   Catalog




                                            © 2009 Formos www.formos.com
❝Most software today is very much
like an Egyptian pyramid with
millions of bricks piled on top of each
other, with no structural integrity, but
just done by brute force and
thousands of slaves.❞

Alan Kay, co-designer of the Smalltalk programming
language
                                           © 2009 Formos www.formos.com
Developer
Productivity
© 2006 Martino Sabia
http://www.flickr.com/photos/ezu/297634534/
                                             © 2009 Formos www.formos.com
© 2009 Formos www.formos.com
Non-Tapestry Exception Reporting




                                   © 2009 Formos www.formos.com
Index does not contain a property named 'now'


              Available properties: class,
              componentResources, currentTime




                                        © 2009 Formos www.formos.com
© 2009 Formos www.formos.com
© 2009 Formos www.formos.com
Scaffolding




              © 2009 Formos www.formos.com
BoardGame.java

@Entity
public class BoardGame
{
  @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @NonVisual
  private long id;

  @Validate("required")
  private String title;

  private String creator;

  private String publisher;

  private Date published;

  private boolean inPrint;

  @Validate("required")
  @Column(nullable = false)
  private Genre genre;

  @Validate("required")
  @Column(nullable = false)
  private Theme theme;

  @Validate("min=1")
  private Integer minPlayers;

  @Validate("min=1")
  private Integer maxPlayers;

  @Validate("min=1,max=5")
  private Integer rating;

  @DataType("longtext")
  private String notes;


                                                                       © 2009 Formos www.formos.com
© 2009 Formos www.formos.com
Parameters
    Property Types




                             BeanEditForm
    Naming Conventions



     Annotations



        Explicit Overrides



Localized Messages

                                            © 2009 Formos www.formos.com
Feedback &
Exploration


© 2008 Alan Grinberg
http://www.flickr.com/photos/agrinberg/2465119180/
                                                    © 2009 Formos www.formos.com
Flow




© 2008 Manu Gómez
http://www.flickr.com/photos/manugomi/2884678938/
                                                    © 2009 Formos www.formos.com
❝PHP and Rails have taught us that
development speed is more important
than we thought it was ... you really
don’t understand a feature till you’ve
built it, so the faster you can build
them the faster you understand
them.❞

Tim Bray, Director of Web Technologies, Sun
Microsystems
                                              © 2009 Formos www.formos.com
Internationalization




© 2006 Tom Magliery
http://www.flickr.com/photos/mag3737/267638148/
                                                 © 2009 Formos www.formos.com
© 2009 Formos www.formos.com
Index_de.properties

page-title=Erstellen Sie eine neue Brettspiel
add-game=Spiel hinzufŸgen

modern=Modernen                     Index.tml
medieval=Mittelalter
bible=Bibel                         <html t:type="layout" title="message:page-title"
abstract=Zusammenfassung              xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
                                      xmlns:p="tapestry:parameter">
war_game=Kriegsspiel
card=Karte                           <t:beaneditform submitlabel="message:add-game" object="game"/>
role_playing=Rollenspiele           </html>
cooperative=Genossenschaft

creator-label=Schšpfer
publisher-label=Verlag
published-label=Veršffentlicht
inprint-label=Im Druck
theme-label=Thema
minplayers-label=Mindest-Spieler
maxplayers-label=Maximale Spieler
notes-label=Notation




                                                                                      © 2009 Formos www.formos.com
Tapestry
  Components




Copyright © A. Lipson 2003
http://www.andrewlipson.com/escher/relativity.html   © 2009 Formos www.formos.com
Intrinsic
       © 2009 Formos www.formos.com
Inheritance
         © 2009 Formos www.formos.com
Composition
         © 2009 Formos www.formos.com
POJO
       © 2009 Formos www.formos.com
Events
     © 2009 Formos www.formos.com
Consistency!
http://flickr.com/photos/kylemay/1430449350/   © 2009 Formos www.formos.com
Nested Components
                                                                      Layout
                                                                    title : String
Layout.tml
                                                                  pageNames : List
                                                                 pageName : String
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
  xmlns:p="tapestry:parameter">
  <head>
    <title>${title}</title>
  </head>
  <body>
  …
    <div id="menu">
    <ul>
      <li t:type="loop" source="pageNames" value="pageName"
           class="prop:classForPageName">
         <t:pagelink page="prop:pageName">${pageName}</t:pagelink>   Index
      </li>
    </ul>
  </div>
                                                                     Layout
   …



                                                             Loop              PageLink

                                                                           © 2009 Formos www.formos.com
Layout Components
Layout.tml


<html xmlns="http://www.w3.org/1999/xhtml"                           ❷
  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
  xmlns:p="tapestry:parameter">
    <head>
        <title>${title}</title>
    </head>
    <body>

         . . .

             <t:body/>   ❸
         . . .
                   ❺         Index.tml
    </body>
</html>                      <html t:type="layout" title="message:page-title"                       ❶
                               xmlns:t="http://tapestry.apache.org/schema/ ↵
                             tapestry_5_1_0.xsd"
                               xmlns:p="tapestry:parameter">

                                <t:beaneditform submitlabel="message:add-game"
                                   object="game" />
                                                                                 ❹
                             </html>



                                                                                © 2009 Formos www.formos.com
Component Parameters

   Layout.java


   public class Layout
   {
     /** The page title, for the <title> element and the <h1> element. */
     @Property
     @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
     private String title;

      @Property
      @Parameter(defaultPrefix = BindingConstants.LITERAL)
      private String sidebarTitle;

      @Property
      @Parameter(defaultPrefix = BindingConstants.LITERAL)
      private Block sidebar;

      @Property
      private String pageName;




                                                                     © 2009 Formos www.formos.com
Non-Template Components



  OutputDate.java


  public class OutputDate
  {
    private final DateFormat formatter =
      DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);

      @Parameter(required = true, allowNull = false)
      private Date date;

      void beginRender(MarkupWriter writer)
      {
        writer.write(formatter.format(date));
      }
  }




                                                                     © 2009 Formos www.formos.com
Start




           SetupRender
                                                      Component Rendering
               true
                                            RichOutput.java
                                    false
           BeginRender

                                             void beginRender(MarkupWriter writer)
               true
                            false            {
                                               writer.write(formatter.format(date));
                                             }
          Render Template




           Render Body




  false
            AfterRender
false
                true



          CleanupRender


               true



               End
                                                                           © 2009 Formos www.formos.com
© 2009 Formos www.formos.com
Tapestry
Performance




© 2009 viernest
http://www.flickr.com/photos/viernest/3380560365/
                                                   © 2009 Formos www.formos.com
Request
Processing
Speed




© 2007 Jojo Cence
http://www.flickr.com/photos/jojocence/1372693375/
                                                    © 2009 Formos www.formos.com
Java
== Fast
      © 2009 Formos www.formos.com
No
Reflection
       © 2009 Formos www.formos.com
Page
Pooling
      © 2009 Formos www.formos.com
GZIP
Compression
         © 2009 Formos www.formos.com
Scalability
© 2007 Patrick Dirden
http://www.flickr.com/photos/sp8254/2052236004/
                                                        © 2009 Formos www.formos.com
YSlow!
     © 2009 Formos www.formos.com
JavaScript
Aggregation
         © 2009 Formos www.formos.com
Far Future
 Expires
 Header © 2009 Formos www.formos.com
Versioned
  URLs
       © 2009 Formos www.formos.com
Content
Delivery
Network© 2009 Formos www.formos.com
Correct
HttpSession
   Usage © 2009 Formos www.formos.com
❝Architecture is the decisions that you
wish you could get right early in a
project.❞



Martin Fowler, Chief Scientist, ThoughtWorks
                                           © 2009 Formos www.formos.com
Conclusion




             © 2009 Formos www.formos.com
© 2009 Dani Ihtatho
http://www.flickr.com/photos/ihtatho/627226315/
                                                 © 2009 Formos www.formos.com
Infrastructure




© 2008 Christophe Delaere
http://www.flickr.com/photos/delaere/2514143242/
                                                  © 2009 Formos www.formos.com
Performance




© 2007 Marina Campos Vinhal
http://www.flickr.com/photos/marinacvinhal/379111290/
                                                       © 2009 Formos www.formos.com
Tapestry: The Expert is
Built In




© 2006 kris247
http://www.flickr.com/photos/kris247/86924080/
                                                © 2009 Formos www.formos.com
Tapestry 5 In Production




                           © 2009 Formos www.formos.com
Adoption




© 2007 seth m
http://www.flickr.com/photos/thalamus/469762314/
                                                  © 2009 Formos www.formos.com
Page Views / Month
                                   Wicket                                             Tapestry

                                                                                                                                                       700,000
                                                                                             Tapestry 5.0.18



                                                                                                                                                     525,000




                                                                                                                                                    350,000




                                                                                                                                                   175,000




  03-2008   04-2008
                      05-2008
                                06-2008
                                          07-2008
                                                    08-2008
                                                              09-2008                                                                          0
                                                                        10-2008
                                                                                  11-2008
                                                                                            12-2008
                                                                                                      01-2009
                                                                                                                02-2009
                                                                                                                          03-2009
                                                                                                                                    04-2009




                                                                                                                                    © 2009 Formos www.formos.com
Page Views / Month
                        Wicket                                 Tapestry                              Struts

                                                                                                                                                     3,000,000




                                                                                                                                                    2,250,000




                                                                                                                                                   1,500,000




                                                                                                                                                  750,000




 03-2008
           04-2008
                     05-2008
                               06-2008
                                         07-2008
                                                   08-2008                                                                                    0
                                                             09-2008
                                                                       10-2008
                                                                                 11-2008
                                                                                           12-2008
                                                                                                     01-2009
                                                                                                               02-2009
                                                                                                                         03-2009
                                                                                                                                   04-2009


                                                                                                                                   © 2009 Formos www.formos.com
Downloads / Month
                                   Wicket                                             Tapestry

                                                                                                                                                       90,000




                                                                                                                                                     67,500




                                                                                                                                                    45,000

                                                                                            Tapestry 5.0.18


                                                                                                                                                   22,500




  03-2008
            04-2008   05-2008
                                06-2008
                                          07-2008
                                                    08-2008
                                                              09-2008                                                                          0
                                                                        10-2008
                                                                                  11-2008
                                                                                            12-2008
                                                                                                      01-2009
                                                                                                                02-2009
                                                                                                                          03-2009
                                                                                                                                    04-2009




                                                                                                                                    © 2009 Formos www.formos.com
Downloads / Month
                        Wicket                                 Tapestry                              Struts

                                                                                                                                                      5,000,000




                                                                                                                                                    3,750,000




                                                                                                                                                   2,500,000




                                                                                                                                                  1,250,000




 03-2008
           04-2008
                     05-2008
                               06-2008
                                         07-2008
                                                   08-2008                                                                                    0
                                                             09-2008
                                                                       10-2008
                                                                                 11-2008
                                                                                           12-2008
                                                                                                     01-2009
                                                                                                               02-2009
                                                                                                                         03-2009
                                                                                                                                   04-2009


                                                                                                                                   © 2009 Formos www.formos.com
Meet the Team




© 2009 spong
http://www.flickr.com/photos/sponng/3206728292/
                                                 © 2009 Formos www.formos.com
Dan Adams
                                 Boston, MA, USA
                     ❝Tapestry has allowed us
             achieve higher code re-use and
              deliver higher-quality, better-
             tested solutions to clients with
                 more modern interfaces. It's
            also fun to work in which makes
               life better for our engineers.❞

            Goals:
            •Increase support for general
             development including DOM
             manipulation and utility
             components
            •Feed back in features and
             improvements from our real world
             projects




                                 © 2009 Formos www.formos.com
Andreas Andreou
                                            Athens, Greece
              ❝I first came across Tapestry at the
              second half of 2004... it was love at
                                        first sight!❞




                  Goals:
                  •Release AmpFlow, a project that
                   works at the component level... it is
                   to flows what BeanEditForm is to
                   Forms




                                          © 2009 Formos www.formos.com
Ben Dotte
                                 Madison, WI, USA
             ❝Tapestry has served as a solid
            base for our suite of digital asset
             management applications since
                         Tapestry version 2❞




            Goals:
            •As we convert our Tapestry 4
             application to Tapestry 5 ...
             contribute any changes we make to
             ensure that our applications are
             performant and customizable, and
             that deployment processes are as
             streamlined as possible




                                  © 2009 Formos www.formos.com
Daniel Gredler
                                       Atlanta, GA, USA

                     ❝I know it sounds blasé, but
                 Tapestry is hands down the best
                      web framework out there❞




                 Goals:
                 •Integrate HtmlUnit testing




                                       © 2009 Formos www.formos.com
Daniel Jue
                                   Frederick, MD, US
                         ❝When I tell the other
                 developers I chose Tapestry 5
             for my project's web framework,
                     I get the jealous nod. The
               dependency injection alone is a
               joy to work with. Tapestry 5 is
                 amazingly stable and succinct,
                allowing me to stay focused on
                   optimizing my own code and
              expanding the app's capabilities
                        with less effort than my
                                     colleagues.❞
             Goals:
             •Provide a wider range of samples
              apps to help new users get up to
              speed
             •Google Web Toolkit / Tapestry IoC
              Integration



                                    © 2009 Formos www.formos.com
Thiago H. de Paula Figueiredo
                        Belo Horizonte, Minas Gerais, Brazil
                  ❝No Java Web framework is so
                     clean, elegant, flexible, and
                        productive as Tapestry❞




                 Goals:
                 •Add transaction management and
                  other features… towards a full
                  application stack, like Spring
                 •Raise awareness and increase
                  adoption of Tapestry




                                           © 2009 Formos www.formos.com
Marcus Schulte
                                     Zürich, Switzerland
                      ❝Tapestry stands for simple
                 components and an elegance and
                  consistency of design that I have
                       yet to find in another web-
                                      framework❞




                 Goals:
                 •Provide improved Tapestry /
                  Google Web Toolkit integration




                                       © 2009 Formos www.formos.com
Robert Zeigler
                                    Saint Louis, MO, USA
                     ❝Tapestry 5-IOC is IOC done
                    right: concise and easy to use,
                   with plenty of power when you
                      need it. Tapestry takes code
                    reuse from aspired-to ideal to
                            practical inevitability.❞



                 Goals:
                 •Improved Tapestry/Cayenne
                  integration
                 •Improve and Simplify Ajax support,
                  especially Ajax with Forms
                 •Detailed Tapestry Tutorial (using
                  Cayenne)




                                        © 2009 Formos www.formos.com
Howard M. Lewis Ship
                                    Portland, OR, USA
                  ❝There will never need to be a
                                    Tapestry 6❞




                Goals:
                •Spring Web Flow Integration
                •Portlet Support
                •More and better Ajax
                •Better documentation
                •Towards a fuller stack




                                      © 2009 Formos www.formos.com
http://tapestry.apache.org




                   © 2009 Formos www.formos.com
http://tapestry.formos.com




                    © 2009 Formos www.formos.com
http://formos.com




howard.lewis.ship@formos.com

                    © 2009 Formos www.formos.com

Más contenido relacionado

Similar a Tapestry: State of the Union

iBeans = Dead-simple integration for web app development
iBeans = Dead-simple integration for web app developmentiBeans = Dead-simple integration for web app development
iBeans = Dead-simple integration for web app developmentKen Yagen
 
Webform and Drupal 8
Webform and Drupal 8Webform and Drupal 8
Webform and Drupal 8Philip Norton
 
XML and Web Services with Groovy
XML and Web Services with GroovyXML and Web Services with Groovy
XML and Web Services with GroovyPaul King
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...Carl Tyler
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptYakov Fain
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptMichael Girouard
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersKathy Brown
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's NewTed Pennings
 
Flex3 Deep Dive Final
Flex3 Deep Dive FinalFlex3 Deep Dive Final
Flex3 Deep Dive FinalRJ Owen
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptdominion
 
Extending the Browser Programming Model with Silverlight
Extending the Browser Programming Model with SilverlightExtending the Browser Programming Model with Silverlight
Extending the Browser Programming Model with Silverlightgoodfriday
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web FrameworkLuther Baker
 

Similar a Tapestry: State of the Union (20)

Codemash-Tapestry.pdf
Codemash-Tapestry.pdfCodemash-Tapestry.pdf
Codemash-Tapestry.pdf
 
iBeans = Dead-simple integration for web app development
iBeans = Dead-simple integration for web app developmentiBeans = Dead-simple integration for web app development
iBeans = Dead-simple integration for web app development
 
Cascade
CascadeCascade
Cascade
 
Webform and Drupal 8
Webform and Drupal 8Webform and Drupal 8
Webform and Drupal 8
 
XML and Web Services with Groovy
XML and Web Services with GroovyXML and Web Services with Groovy
XML and Web Services with Groovy
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
.Net template solution architecture
.Net template solution architecture.Net template solution architecture
.Net template solution architecture
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Learning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client DevelopersLearning To Run - XPages for Lotus Notes Client Developers
Learning To Run - XPages for Lotus Notes Client Developers
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
Models
ModelsModels
Models
 
Flex3 Deep Dive Final
Flex3 Deep Dive FinalFlex3 Deep Dive Final
Flex3 Deep Dive Final
 
Django introduction
Django introductionDjango introduction
Django introduction
 
Xml
XmlXml
Xml
 
Advisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScriptAdvisor Jumpstart: JavaScript
Advisor Jumpstart: JavaScript
 
Extending the Browser Programming Model with Silverlight
Extending the Browser Programming Model with SilverlightExtending the Browser Programming Model with Silverlight
Extending the Browser Programming Model with Silverlight
 
Wicket 6
Wicket 6Wicket 6
Wicket 6
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web Framework
 

Más de Howard Lewis Ship

Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEBHoward Lewis Ship
 
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestSpock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestHoward Lewis Ship
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserHoward Lewis Ship
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapHoward Lewis Ship
 
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHoward Lewis Ship
 
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)Howard Lewis Ship
 
Arduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd PerspectiveArduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd PerspectiveHoward Lewis Ship
 
Practical Clojure Programming
Practical Clojure ProgrammingPractical Clojure Programming
Practical Clojure ProgrammingHoward Lewis Ship
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingHoward Lewis Ship
 
Brew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoBrew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoHoward Lewis Ship
 
Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Howard Lewis Ship
 
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Howard Lewis Ship
 

Más de Howard Lewis Ship (14)

Testing Web Applications with GEB
Testing Web Applications with GEBTesting Web Applications with GEB
Testing Web Applications with GEB
 
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestSpock: A Highly Logical Way To Test
Spock: A Highly Logical Way To Test
 
Backbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The BrowserBackbone.js: Run your Application Inside The Browser
Backbone.js: Run your Application Inside The Browser
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter Bootstrap
 
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for JavaHave Your Cake and Eat It Too: Meta-Programming Techniques for Java
Have Your Cake and Eat It Too: Meta-Programming Techniques for Java
 
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
Clojure: Towards The Essence Of Programming (What's Next? Conference, May 2011)
 
Arduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd PerspectiveArduino: Open Source Hardware Hacking from the Software Nerd Perspective
Arduino: Open Source Hardware Hacking from the Software Nerd Perspective
 
Practical Clojure Programming
Practical Clojure ProgrammingPractical Clojure Programming
Practical Clojure Programming
 
Clojure: Towards The Essence of Programming
Clojure: Towards The Essence of ProgrammingClojure: Towards The Essence of Programming
Clojure: Towards The Essence of Programming
 
Codemash-Clojure.pdf
Codemash-Clojure.pdfCodemash-Clojure.pdf
Codemash-Clojure.pdf
 
Brew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoBrew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with Cappuccino
 
Clojure Deep Dive
Clojure Deep DiveClojure Deep Dive
Clojure Deep Dive
 
Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)Clojure: Functional Concurrency for the JVM (presented at OSCON)
Clojure: Functional Concurrency for the JVM (presented at OSCON)
 
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
Clojure: Functional Concurrency for the JVM (presented at Open Source Bridge)
 

Último

Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...ssifa0344
 
Indore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfIndore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfSaviRakhecha1
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdfAdnet Communications
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfGale Pooley
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfGale Pooley
 
The Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfThe Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfGale Pooley
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfGale Pooley
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfMichael Silva
 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdfFinTech Belgium
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...dipikadinghjn ( Why You Choose Us? ) Escorts
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja Nehwal
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfGale Pooley
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfGale Pooley
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 

Último (20)

Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
 
Indore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdfIndore Real Estate Market Trends Report.pdf
Indore Real Estate Market Trends Report.pdf
 
20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf20240429 Calibre April 2024 Investor Presentation.pdf
20240429 Calibre April 2024 Investor Presentation.pdf
 
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
(INDIRA) Call Girl Mumbai Call Now 8250077686 Mumbai Escorts 24x7
 
The Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdfThe Economic History of the U.S. Lecture 19.pdf
The Economic History of the U.S. Lecture 19.pdf
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 
The Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdfThe Economic History of the U.S. Lecture 18.pdf
The Economic History of the U.S. Lecture 18.pdf
 
The Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdfThe Economic History of the U.S. Lecture 26.pdf
The Economic History of the U.S. Lecture 26.pdf
 
The Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdfThe Economic History of the U.S. Lecture 17.pdf
The Economic History of the U.S. Lecture 17.pdf
 
Stock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdfStock Market Brief Deck (Under Pressure).pdf
Stock Market Brief Deck (Under Pressure).pdf
 
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Koregaon Park Call Me 7737669865 Budget Friendly No Advance Booking
 
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
06_Joeri Van Speybroek_Dell_MeetupDora&Cybersecurity.pdf
 
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
VIP Call Girl Service Andheri West ⚡ 9920725232 What It Takes To Be The Best ...
 
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home DeliveryPooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
Pooja 9892124323 : Call Girl in Juhu Escorts Service Free Home Delivery
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
 
The Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdfThe Economic History of the U.S. Lecture 25.pdf
The Economic History of the U.S. Lecture 25.pdf
 
The Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdfThe Economic History of the U.S. Lecture 30.pdf
The Economic History of the U.S. Lecture 30.pdf
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
 
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(DIYA) Bhumkar Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 

Tapestry: State of the Union

  • 1. Apache Tapestry 5: State of the Union Howard M. Lewis Ship Director of Open Source Technology Formos © 2006 Chris Walton http://www.flickr.com/photos/philocrites/245011706/ © 2009 Formos www.formos.com
  • 2. Howard Lewis Ship • Creator, Apache Tapestry • Author, "Tapestry in Action" • Independent Consultant 2003-2007 • Formos 2008- © 2009 Formos www.formos.com
  • 3. What is Tapestry? © 2009 Formos www.formos.com
  • 4. Java © 2009 Formos www.formos.com
  • 5. Open Source © 2009 Formos www.formos.com
  • 6. Component Based © 2009 Formos www.formos.com
  • 7. Developer Focused © 2009 Formos www.formos.com
  • 8. Concise © 2009 Formos www.formos.com
  • 9. Fast! © 2009 Formos www.formos.com
  • 10. Mature © 2009 Formos www.formos.com
  • 11. Tapestry Elements © 2009 Nataline Fung http://www.flickr.com/photos/metaphora/3384569933/ © 2009 Formos www.formos.com
  • 12. Tapestry Templates Login.tml <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <h1>Please Login</h1> Login <t:form> <t:label for="userId"/> <t:textfield value="userId"/> <br/> form <t:label for="password"/> <t:passwordfield value="password"/> <br/> label <input type="submit" value="Login"/> </t:form> </html> textfield label passwordfield © 2009 Formos www.formos.com
  • 13. Page Classes Login.tml <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <h1>Please Login</h1> Login.java <t:form> <t:label for="userId"/> public class Login <t:textfield value="userId"/> { <br/> @Property <t:label for="password"/> private String userId; <t:passwordfield value="password"/> <br/> @Property <input type="submit" value="Login"/> private String password; </t:form> </html> Object onSuccess() { … } } © 2009 Formos www.formos.com
  • 14. Page Flows Login.java UserProfile.java public class Login public class UserProfile { { @Property … private String userId; } @Property private String password; void onValidate() { … } Object onSuccess() { … return UserProfile.class; } } © 2009 Formos www.formos.com
  • 15. Inversion of Control Login.java public class Login Your code { @Property private String userId; @Property private String password; … Inject IoC @Inject Service private Session session; into field @CommitAfter Object onSuccess() { … User user = (User) session. … user.setLastLogin(new Date()); } } return UserProfile.class; Tapestry Services © 2009 Formos www.formos.com
  • 16. Meta-Programming Login.java public class Login Generate getter & setter { @Property private String userId; @Property private String password; @InjectPage private UserProfile userProfilePage; … @Inject private Session session; Commit Hibernate transaction @CommitAfter Object onSuccess() { … User user = (User) session. … user.setLastLogin(new Date()); return userProfilePage; } } © 2009 Formos www.formos.com
  • 17. State Management UserProfile.java public class UserProfile { Shared global value (any page) @Property @SessionState This page only private UserEntity user; @Property @Persist private Date searchStart; } © 2009 Formos www.formos.com
  • 18. Template Injections Component Meta- Java Class Programming Message Catalog © 2009 Formos www.formos.com
  • 19. ❝Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.❞ Alan Kay, co-designer of the Smalltalk programming language © 2009 Formos www.formos.com
  • 20. Developer Productivity © 2006 Martino Sabia http://www.flickr.com/photos/ezu/297634534/ © 2009 Formos www.formos.com
  • 21. © 2009 Formos www.formos.com
  • 22. Non-Tapestry Exception Reporting © 2009 Formos www.formos.com
  • 23. Index does not contain a property named 'now' Available properties: class, componentResources, currentTime © 2009 Formos www.formos.com
  • 24. © 2009 Formos www.formos.com
  • 25. © 2009 Formos www.formos.com
  • 26. Scaffolding © 2009 Formos www.formos.com
  • 27. BoardGame.java @Entity public class BoardGame { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @NonVisual private long id; @Validate("required") private String title; private String creator; private String publisher; private Date published; private boolean inPrint; @Validate("required") @Column(nullable = false) private Genre genre; @Validate("required") @Column(nullable = false) private Theme theme; @Validate("min=1") private Integer minPlayers; @Validate("min=1") private Integer maxPlayers; @Validate("min=1,max=5") private Integer rating; @DataType("longtext") private String notes; © 2009 Formos www.formos.com
  • 28. © 2009 Formos www.formos.com
  • 29. Parameters Property Types BeanEditForm Naming Conventions Annotations Explicit Overrides Localized Messages © 2009 Formos www.formos.com
  • 30. Feedback & Exploration © 2008 Alan Grinberg http://www.flickr.com/photos/agrinberg/2465119180/ © 2009 Formos www.formos.com
  • 31. Flow © 2008 Manu Gómez http://www.flickr.com/photos/manugomi/2884678938/ © 2009 Formos www.formos.com
  • 32. ❝PHP and Rails have taught us that development speed is more important than we thought it was ... you really don’t understand a feature till you’ve built it, so the faster you can build them the faster you understand them.❞ Tim Bray, Director of Web Technologies, Sun Microsystems © 2009 Formos www.formos.com
  • 33. Internationalization © 2006 Tom Magliery http://www.flickr.com/photos/mag3737/267638148/ © 2009 Formos www.formos.com
  • 34. © 2009 Formos www.formos.com
  • 35. Index_de.properties page-title=Erstellen Sie eine neue Brettspiel add-game=Spiel hinzufŸgen modern=Modernen Index.tml medieval=Mittelalter bible=Bibel <html t:type="layout" title="message:page-title" abstract=Zusammenfassung xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> war_game=Kriegsspiel card=Karte <t:beaneditform submitlabel="message:add-game" object="game"/> role_playing=Rollenspiele </html> cooperative=Genossenschaft creator-label=Schšpfer publisher-label=Verlag published-label=Veršffentlicht inprint-label=Im Druck theme-label=Thema minplayers-label=Mindest-Spieler maxplayers-label=Maximale Spieler notes-label=Notation © 2009 Formos www.formos.com
  • 36. Tapestry Components Copyright © A. Lipson 2003 http://www.andrewlipson.com/escher/relativity.html © 2009 Formos www.formos.com
  • 37. Intrinsic © 2009 Formos www.formos.com
  • 38. Inheritance © 2009 Formos www.formos.com
  • 39. Composition © 2009 Formos www.formos.com
  • 40. POJO © 2009 Formos www.formos.com
  • 41. Events © 2009 Formos www.formos.com
  • 43. Nested Components Layout title : String Layout.tml pageNames : List pageName : String <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> <head> <title>${title}</title> </head> <body> … <div id="menu"> <ul> <li t:type="loop" source="pageNames" value="pageName" class="prop:classForPageName"> <t:pagelink page="prop:pageName">${pageName}</t:pagelink> Index </li> </ul> </div> Layout … Loop PageLink © 2009 Formos www.formos.com
  • 44. Layout Components Layout.tml <html xmlns="http://www.w3.org/1999/xhtml" ❷ xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> <head> <title>${title}</title> </head> <body> . . . <t:body/> ❸ . . . ❺ Index.tml </body> </html> <html t:type="layout" title="message:page-title" ❶ xmlns:t="http://tapestry.apache.org/schema/ ↵ tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter"> <t:beaneditform submitlabel="message:add-game" object="game" /> ❹ </html> © 2009 Formos www.formos.com
  • 45. Component Parameters Layout.java public class Layout { /** The page title, for the <title> element and the <h1> element. */ @Property @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL) private String title; @Property @Parameter(defaultPrefix = BindingConstants.LITERAL) private String sidebarTitle; @Property @Parameter(defaultPrefix = BindingConstants.LITERAL) private Block sidebar; @Property private String pageName; © 2009 Formos www.formos.com
  • 46. Non-Template Components OutputDate.java public class OutputDate { private final DateFormat formatter = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM); @Parameter(required = true, allowNull = false) private Date date; void beginRender(MarkupWriter writer) { writer.write(formatter.format(date)); } } © 2009 Formos www.formos.com
  • 47. Start SetupRender Component Rendering true RichOutput.java false BeginRender void beginRender(MarkupWriter writer) true false { writer.write(formatter.format(date)); } Render Template Render Body false AfterRender false true CleanupRender true End © 2009 Formos www.formos.com
  • 48. © 2009 Formos www.formos.com
  • 50. Request Processing Speed © 2007 Jojo Cence http://www.flickr.com/photos/jojocence/1372693375/ © 2009 Formos www.formos.com
  • 51. Java == Fast © 2009 Formos www.formos.com
  • 52. No Reflection © 2009 Formos www.formos.com
  • 53. Page Pooling © 2009 Formos www.formos.com
  • 54. GZIP Compression © 2009 Formos www.formos.com
  • 55. Scalability © 2007 Patrick Dirden http://www.flickr.com/photos/sp8254/2052236004/ © 2009 Formos www.formos.com
  • 56. YSlow! © 2009 Formos www.formos.com
  • 57. JavaScript Aggregation © 2009 Formos www.formos.com
  • 58. Far Future Expires Header © 2009 Formos www.formos.com
  • 59. Versioned URLs © 2009 Formos www.formos.com
  • 61. Correct HttpSession Usage © 2009 Formos www.formos.com
  • 62. ❝Architecture is the decisions that you wish you could get right early in a project.❞ Martin Fowler, Chief Scientist, ThoughtWorks © 2009 Formos www.formos.com
  • 63. Conclusion © 2009 Formos www.formos.com
  • 64. © 2009 Dani Ihtatho http://www.flickr.com/photos/ihtatho/627226315/ © 2009 Formos www.formos.com
  • 65. Infrastructure © 2008 Christophe Delaere http://www.flickr.com/photos/delaere/2514143242/ © 2009 Formos www.formos.com
  • 66. Performance © 2007 Marina Campos Vinhal http://www.flickr.com/photos/marinacvinhal/379111290/ © 2009 Formos www.formos.com
  • 67. Tapestry: The Expert is Built In © 2006 kris247 http://www.flickr.com/photos/kris247/86924080/ © 2009 Formos www.formos.com
  • 68. Tapestry 5 In Production © 2009 Formos www.formos.com
  • 69. Adoption © 2007 seth m http://www.flickr.com/photos/thalamus/469762314/ © 2009 Formos www.formos.com
  • 70. Page Views / Month Wicket Tapestry 700,000 Tapestry 5.0.18 525,000 350,000 175,000 03-2008 04-2008 05-2008 06-2008 07-2008 08-2008 09-2008 0 10-2008 11-2008 12-2008 01-2009 02-2009 03-2009 04-2009 © 2009 Formos www.formos.com
  • 71. Page Views / Month Wicket Tapestry Struts 3,000,000 2,250,000 1,500,000 750,000 03-2008 04-2008 05-2008 06-2008 07-2008 08-2008 0 09-2008 10-2008 11-2008 12-2008 01-2009 02-2009 03-2009 04-2009 © 2009 Formos www.formos.com
  • 72. Downloads / Month Wicket Tapestry 90,000 67,500 45,000 Tapestry 5.0.18 22,500 03-2008 04-2008 05-2008 06-2008 07-2008 08-2008 09-2008 0 10-2008 11-2008 12-2008 01-2009 02-2009 03-2009 04-2009 © 2009 Formos www.formos.com
  • 73. Downloads / Month Wicket Tapestry Struts 5,000,000 3,750,000 2,500,000 1,250,000 03-2008 04-2008 05-2008 06-2008 07-2008 08-2008 0 09-2008 10-2008 11-2008 12-2008 01-2009 02-2009 03-2009 04-2009 © 2009 Formos www.formos.com
  • 74. Meet the Team © 2009 spong http://www.flickr.com/photos/sponng/3206728292/ © 2009 Formos www.formos.com
  • 75. Dan Adams Boston, MA, USA ❝Tapestry has allowed us achieve higher code re-use and deliver higher-quality, better- tested solutions to clients with more modern interfaces. It's also fun to work in which makes life better for our engineers.❞ Goals: •Increase support for general development including DOM manipulation and utility components •Feed back in features and improvements from our real world projects © 2009 Formos www.formos.com
  • 76. Andreas Andreou Athens, Greece ❝I first came across Tapestry at the second half of 2004... it was love at first sight!❞ Goals: •Release AmpFlow, a project that works at the component level... it is to flows what BeanEditForm is to Forms © 2009 Formos www.formos.com
  • 77. Ben Dotte Madison, WI, USA ❝Tapestry has served as a solid base for our suite of digital asset management applications since Tapestry version 2❞ Goals: •As we convert our Tapestry 4 application to Tapestry 5 ... contribute any changes we make to ensure that our applications are performant and customizable, and that deployment processes are as streamlined as possible © 2009 Formos www.formos.com
  • 78. Daniel Gredler Atlanta, GA, USA ❝I know it sounds blasé, but Tapestry is hands down the best web framework out there❞ Goals: •Integrate HtmlUnit testing © 2009 Formos www.formos.com
  • 79. Daniel Jue Frederick, MD, US ❝When I tell the other developers I chose Tapestry 5 for my project's web framework, I get the jealous nod. The dependency injection alone is a joy to work with. Tapestry 5 is amazingly stable and succinct, allowing me to stay focused on optimizing my own code and expanding the app's capabilities with less effort than my colleagues.❞ Goals: •Provide a wider range of samples apps to help new users get up to speed •Google Web Toolkit / Tapestry IoC Integration © 2009 Formos www.formos.com
  • 80. Thiago H. de Paula Figueiredo Belo Horizonte, Minas Gerais, Brazil ❝No Java Web framework is so clean, elegant, flexible, and productive as Tapestry❞ Goals: •Add transaction management and other features… towards a full application stack, like Spring •Raise awareness and increase adoption of Tapestry © 2009 Formos www.formos.com
  • 81. Marcus Schulte Zürich, Switzerland ❝Tapestry stands for simple components and an elegance and consistency of design that I have yet to find in another web- framework❞ Goals: •Provide improved Tapestry / Google Web Toolkit integration © 2009 Formos www.formos.com
  • 82. Robert Zeigler Saint Louis, MO, USA ❝Tapestry 5-IOC is IOC done right: concise and easy to use, with plenty of power when you need it. Tapestry takes code reuse from aspired-to ideal to practical inevitability.❞ Goals: •Improved Tapestry/Cayenne integration •Improve and Simplify Ajax support, especially Ajax with Forms •Detailed Tapestry Tutorial (using Cayenne) © 2009 Formos www.formos.com
  • 83. Howard M. Lewis Ship Portland, OR, USA ❝There will never need to be a Tapestry 6❞ Goals: •Spring Web Flow Integration •Portlet Support •More and better Ajax •Better documentation •Towards a fuller stack © 2009 Formos www.formos.com
  • 84. http://tapestry.apache.org © 2009 Formos www.formos.com
  • 85. http://tapestry.formos.com © 2009 Formos www.formos.com
  • 86. http://formos.com howard.lewis.ship@formos.com © 2009 Formos www.formos.com