SlideShare una empresa de Scribd logo
1 de 33
Tapestry 5 Preview
Howard M. Lewis Ship
TWD Consulting, Inc.




                       © 2007 Howard M. Lewis Ship
A few observations

• ❝If ...


   • ... I have to type one more angle bracket I'll chop off my pinkie! ❞


   • ... I have to run Ant/Maven one more time I'll staple myself to death! ❞


   • ... I have to restart Tomcat on more @&*$**@! time I'm going to become a
     sheep farmer! ❞


   • ... I have to write any more &%@&^@ boilerplate code I'll start to listen to
     those voices in my head! ❞


• You have a budget for mental investment


                                                                            © 2007 Howard M. Lewis Ship
Tapestry 5 Goals and Values

• Less code is better than more code


• Naming conventions are better than explicit configuration


• Java annotations are better than XML


• Easy is better than hard


• Fast is better than slow


• Things should Just WorkTM




                                                             © 2007 Howard M. Lewis Ship
Things Should Be Easy

• How much work to create a form to edit a simple
  object?


                              SessionEval
                          surveyId : long
                          sessionId : String
                          subjectMatter : Rating
                          presentation : Rating
                          materials : Rating
                          comments : String




                                                    © 2007 Howard M. Lewis Ship
Demo #1


Basic BeanEditForm Component
What did we just see?

• Tapestry application starts with a page named quot;Startquot;


• Start page template in WEB-INF/Start.html


                   Tapestry Namespace

Start.html

<html xmlns:t=quot;http://tapestry.apache.org/schema/tapestry_5_0_0.xsdquot;>
  <head>
    <title>Survey</title>
  </head>
  <body>


      <p> ... </p>

      <t:beaneditform object=quot;evalquot;/>

  </body>
</html>                          Parameter object bound
             Component type:         to property eval
              BeanEditForm



                                                                        © 2007 Howard M. Lewis Ship
What did we just see?

Start.java

public class Start
{
  private SessionEval _eval;

    public SessionEval getEval()
    {
      return _eval;
    }                      Property bound to object parameter

    public void setEval(SessionEval eval)
    {
      _eval = eval;
    }

}




                                                                © 2007 Howard M. Lewis Ship
What did we just see?


                        Start



                  BeanEditForm




                         ...
           Form                  TextField


                                             © 2007 Howard M. Lewis Ship
Tapestry Applications


                      Application



                                      Page
            Page


          Component          Component   Component



                      Component     Component




                                                     © 2007 Howard M. Lewis Ship
Connected Objects

 Inside the BeanEditor
      component


                                                          Start
                                                                eval

           TextField
                         value




                                                      SessionEval
                                 eval.sessionId


                                                  sessionEvalId : long
                                                  sessionId : String
                                                  subjectMatter : Rating
                                                  presentation : Rating
                                                  materials : Rating
                                                  comments : String
                                                                           © 2007 Howard M. Lewis Ship
Component ‘n Stuff

                  Parameters
    Sub-                         Injected
 Components                      Services

                 Component

                               Localized
      Template                 Messages
                  Resources


                                            © 2007 Howard M. Lewis Ship
What Else?

• Validation would be nice


   • Via @Validation annotation on bean property methods


• Customize the Form


   • Use a TextArea component for the comments field


   • Use a drop-down list for the session id




                                                           © 2007 Howard M. Lewis Ship
Demo #2


Adding validation and customizing the form
Components & Events
                        Start.java


                        String onSuccess()
   Start                {
                          ...
                        }
           success


BeanEditForm

           success


   Form
                     action



                                             © 2007 Howard M. Lewis Ship
Tapestry and IoC

• Keep Business Logic out of the Page


• Inject Services from the IoC Container

      Start.java

      private SessionEval _eval;

      @Inject
      private SessionEvalDatabase _database;


                           Event Handler
      String onSuccess()
      {
        _database.add(_eval);

          return quot;Thanksquot;;
      }




                                               © 2007 Howard M. Lewis Ship
Demo #3


Processing the form submission
More Components

• PageLink: Link to another page


• Grid: Data table with paging & sorting


• ActionLink: Trigger an action event




                                           © 2007 Howard M. Lewis Ship
Grid Component

• Page navigation & sorting


• Lots of configurability


• Starts very simple
                                     EvalList.html

                                     <t:grid source=quot;evalsquot;/>

                  EvalList.java

                  public class EvalList
                  {
                    @Inject
                    private SessionEvalDatabase _database;


                       public List<SessionEval> getEvals()
                       {
                         return _database.getSessionEvals();
                       }
                  }
                                                                © 2007 Howard M. Lewis Ship
Demo #4


Linking to the EvalList page, adding the Grid
Customizing Grid Output

• Customize number of rows per page with rowsperpage parameter


• Move pages around: pagerposition parameter


• Generates CSS class for each cell


• Class name from property name

                  Start.html

                  <style>
                    TH.comments-header { background-color: black; }
                    TD.comments-cell { color: silver; }
                  </style>




                                                                      © 2007 Howard M. Lewis Ship
Customizing Grid Output

• Special parameters to change cell renderer:



                   Start.html



                   <t:grid source=quot;evalsquot; row=quot;evalquot;
                     rowsPerPage=quot;10quot; pagerPosition=quot;topquot;>

                      <t:parameter name=quot;commentscellquot;>
                        <t:summarize value=quot;eval.commentsquot;/>
                      </t:parameter>

                   </t:grid>




                                                               © 2007 Howard M. Lewis Ship
Summarize Component
      Summarize.java

      public class Summarize
      {
        @Parameter(required = true)
        private String _value;

          @Parameter
          private int _maxLength = 25;

          boolean beginRender(MarkupWriter writer)
          {
            if (_value != null)
            {
              String value = _value;

                  if (value.length() > _maxLength)
                    value = value.substring(0, _maxLength) + quot; ...quot;;

                  writer.write(value);
              }

              return false;
          }
      }


                                                                       © 2007 Howard M. Lewis Ship
Demo #5


Customizing Grid output
Is it ready yet?




                   © 2007 Howard M. Lewis Ship
Still alpha!

• Stable


• Basic Spring / Hibernate integration


• Many features yet to be implemented


• Code stability has been great 5.0.1 ➠ 5.0.5


   • Rethink on Templates


   • Rethink on Inversion of Control container


• Several people building production applications already!

                                                             © 2007 Howard M. Lewis Ship
What's Coming

• Ajax Support


• Improved Hibernate integration


  • Request in Session Pattern


• Spring Web Flow Integration




                                   © 2007 Howard M. Lewis Ship
IDE Support




         ❝I don’t have time
         for Drag and Drop❞



                              © 2007 Howard M. Lewis Ship
Ajax: Coming Soon!

  <html>              Page


 <body>               Layout


 <form>               Form


 <input>             TextField



                                 © 2007 Howard M. Lewis Ship
Tapestry 4 ➠ Tapestry 5

• Clean Slate


• Not backwards compatible


• T4: Hard ➠ T5: Easy


• T4: Easy ➠ T5: Automatic




                             © 2007 Howard M. Lewis Ship
Overcoming “Steep Learning Curve”


                                                                        Multiple
                                                                      Downloads
                                                  XML Configuration

                            Base Classes




                                                   Tapestry 4
      Abstract Classes
                                                             Maven & Archetypes




                                                                            T5
                                                     Live Class Reloading
                         Conventions,
                         Annotations & Defaults
      POJOs
                                                                        © 2007 Howard M. Lewis Ship
More Information

• Home Page:

 http://tapestry.apache.org/tapestry5/

• Dev & User Mailing Lists:

 dev-subscribe@tapestry.apache.org
 users-subscribe@tapestry.apache.org


• Howard’s Blog:

 http://tapestryjava.blogspot.com/


• Howard’s Site:

  http://howardlewisship.com/
                                         © 2007 Howard M. Lewis Ship
How you can help ...

• Give it a whirl!


• Blog!


• Contribute patches!


• JUG talks!




                        © 2007 Howard M. Lewis Ship
Q&A




      © 2007 Howard M. Lewis Ship

Más contenido relacionado

Destacado

Os Alrubaie Ruby
Os Alrubaie RubyOs Alrubaie Ruby
Os Alrubaie Rubyoscon2007
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdatedoscon2007
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5oscon2007
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Touroscon2007
 

Destacado (9)

Pmg1
Pmg1Pmg1
Pmg1
 
Os Edwards
Os EdwardsOs Edwards
Os Edwards
 
Os Ramirez
Os RamirezOs Ramirez
Os Ramirez
 
Os Krug
Os KrugOs Krug
Os Krug
 
Os Alrubaie Ruby
Os Alrubaie RubyOs Alrubaie Ruby
Os Alrubaie Ruby
 
Os Lavigne
Os LavigneOs Lavigne
Os Lavigne
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
 
Solr Presentation5
Solr Presentation5Solr Presentation5
Solr Presentation5
 
J Ruby Whirlwind Tour
J Ruby Whirlwind TourJ Ruby Whirlwind Tour
J Ruby Whirlwind Tour
 

Similar a Os Lewisship

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
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Peter Pilgrim
 
Vs2010and Ne Tframework
Vs2010and Ne TframeworkVs2010and Ne Tframework
Vs2010and Ne TframeworkKulveerSingh
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web FrameworkLuther Baker
 
Tapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseTapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseHoward Lewis Ship
 
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...Cyber Security Alliance
 
A Complete Tour of JSF 2
A Complete Tour of JSF 2A Complete Tour of JSF 2
A Complete Tour of JSF 2Jim Driscoll
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tierodedns
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesMarc Müller
 
Azure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesAzure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesMarc Müller
 
Ajax Basics 2
Ajax Basics 2Ajax Basics 2
Ajax Basics 2bhuvanann
 
02 servlet-basics
02 servlet-basics02 servlet-basics
02 servlet-basicssnopteck
 
Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Eelco Visser
 
Strategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesStrategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesEelco Visser
 
Please Don't Touch the Slow Parts V3
Please Don't Touch the Slow Parts V3Please Don't Touch the Slow Parts V3
Please Don't Touch the Slow Parts V3Federico Galassi
 

Similar a Os Lewisship (20)

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
 
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
Devoxx UK 2013 Test-Driven Development with JavaEE 7, Arquillian and Embedded...
 
Vs2010and Ne Tframework
Vs2010and Ne TframeworkVs2010and Ne Tframework
Vs2010and Ne Tframework
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web Framework
 
Tapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting EaseTapestry 5: Java Power, Scripting Ease
Tapestry 5: Java Power, Scripting Ease
 
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...
ASFWS 2012 - Node.js Security – Old vulnerabilities in new dresses par Sven V...
 
A Complete Tour of JSF 2
A Complete Tour of JSF 2A Complete Tour of JSF 2
A Complete Tour of JSF 2
 
JEE Course - The Web Tier
JEE Course - The Web TierJEE Course - The Web Tier
JEE Course - The Web Tier
 
Azure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 FeaturesAzure DevOps Multistage YAML Pipelines – Top 10 Features
Azure DevOps Multistage YAML Pipelines – Top 10 Features
 
Azure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 FeaturesAzure Pipelines Multistage YAML - Top 10 Features
Azure Pipelines Multistage YAML - Top 10 Features
 
Ajax Basics 2
Ajax Basics 2Ajax Basics 2
Ajax Basics 2
 
Real World MVC
Real World MVCReal World MVC
Real World MVC
 
02 servlet-basics
02 servlet-basics02 servlet-basics
02 servlet-basics
 
Getting started with node.js
Getting started with node.jsGetting started with node.js
Getting started with node.js
 
Codemash-Tapestry.pdf
Codemash-Tapestry.pdfCodemash-Tapestry.pdf
Codemash-Tapestry.pdf
 
Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...Model-Driven Software Development - Strategies for Design & Implementation of...
Model-Driven Software Development - Strategies for Design & Implementation of...
 
Strategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific LanguagesStrategies for Design & Implementation of Domain-Specific Languages
Strategies for Design & Implementation of Domain-Specific Languages
 
Please Don't Touch the Slow Parts V3
Please Don't Touch the Slow Parts V3Please Don't Touch the Slow Parts V3
Please Don't Touch the Slow Parts V3
 
WSS And Share Point For Developers
WSS And Share Point For DevelopersWSS And Share Point For Developers
WSS And Share Point For Developers
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 

Más de oscon2007

Os Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman WiifmOs Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman Wiifmoscon2007
 
Performance Whack A Mole
Performance Whack A MolePerformance Whack A Mole
Performance Whack A Moleoscon2007
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashearsoscon2007
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swposcon2007
 
Os Berlin Dispelling Myths
Os Berlin Dispelling MythsOs Berlin Dispelling Myths
Os Berlin Dispelling Mythsoscon2007
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholisticoscon2007
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillipsoscon2007
 
Os Urnerupdated
Os UrnerupdatedOs Urnerupdated
Os Urnerupdatedoscon2007
 
Adventures In Copyright Reform
Adventures In Copyright ReformAdventures In Copyright Reform
Adventures In Copyright Reformoscon2007
 
Railsconf2007
Railsconf2007Railsconf2007
Railsconf2007oscon2007
 

Más de oscon2007 (20)

Os Borger
Os BorgerOs Borger
Os Borger
 
Os Harkins
Os HarkinsOs Harkins
Os Harkins
 
Os Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman WiifmOs Fitzpatrick Sussman Wiifm
Os Fitzpatrick Sussman Wiifm
 
Os Bunce
Os BunceOs Bunce
Os Bunce
 
Yuicss R7
Yuicss R7Yuicss R7
Yuicss R7
 
Performance Whack A Mole
Performance Whack A MolePerformance Whack A Mole
Performance Whack A Mole
 
Os Fogel
Os FogelOs Fogel
Os Fogel
 
Os Lanphier Brashears
Os Lanphier BrashearsOs Lanphier Brashears
Os Lanphier Brashears
 
Os Tucker
Os TuckerOs Tucker
Os Tucker
 
Os Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman SwpOs Fitzpatrick Sussman Swp
Os Fitzpatrick Sussman Swp
 
Os Furlong
Os FurlongOs Furlong
Os Furlong
 
Os Berlin Dispelling Myths
Os Berlin Dispelling MythsOs Berlin Dispelling Myths
Os Berlin Dispelling Myths
 
Os Kimsal
Os KimsalOs Kimsal
Os Kimsal
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Os Alrubaie
Os AlrubaieOs Alrubaie
Os Alrubaie
 
Os Keysholistic
Os KeysholisticOs Keysholistic
Os Keysholistic
 
Os Jonphillips
Os JonphillipsOs Jonphillips
Os Jonphillips
 
Os Urnerupdated
Os UrnerupdatedOs Urnerupdated
Os Urnerupdated
 
Adventures In Copyright Reform
Adventures In Copyright ReformAdventures In Copyright Reform
Adventures In Copyright Reform
 
Railsconf2007
Railsconf2007Railsconf2007
Railsconf2007
 

Último

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Último (20)

Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Os Lewisship

  • 1. Tapestry 5 Preview Howard M. Lewis Ship TWD Consulting, Inc. © 2007 Howard M. Lewis Ship
  • 2. A few observations • ❝If ... • ... I have to type one more angle bracket I'll chop off my pinkie! ❞ • ... I have to run Ant/Maven one more time I'll staple myself to death! ❞ • ... I have to restart Tomcat on more @&*$**@! time I'm going to become a sheep farmer! ❞ • ... I have to write any more &%@&^@ boilerplate code I'll start to listen to those voices in my head! ❞ • You have a budget for mental investment © 2007 Howard M. Lewis Ship
  • 3. Tapestry 5 Goals and Values • Less code is better than more code • Naming conventions are better than explicit configuration • Java annotations are better than XML • Easy is better than hard • Fast is better than slow • Things should Just WorkTM © 2007 Howard M. Lewis Ship
  • 4. Things Should Be Easy • How much work to create a form to edit a simple object? SessionEval surveyId : long sessionId : String subjectMatter : Rating presentation : Rating materials : Rating comments : String © 2007 Howard M. Lewis Ship
  • 6. What did we just see? • Tapestry application starts with a page named quot;Startquot; • Start page template in WEB-INF/Start.html Tapestry Namespace Start.html <html xmlns:t=quot;http://tapestry.apache.org/schema/tapestry_5_0_0.xsdquot;> <head> <title>Survey</title> </head> <body> <p> ... </p> <t:beaneditform object=quot;evalquot;/> </body> </html> Parameter object bound Component type: to property eval BeanEditForm © 2007 Howard M. Lewis Ship
  • 7. What did we just see? Start.java public class Start { private SessionEval _eval; public SessionEval getEval() { return _eval; } Property bound to object parameter public void setEval(SessionEval eval) { _eval = eval; } } © 2007 Howard M. Lewis Ship
  • 8. What did we just see? Start BeanEditForm ... Form TextField © 2007 Howard M. Lewis Ship
  • 9. Tapestry Applications Application Page Page Component Component Component Component Component © 2007 Howard M. Lewis Ship
  • 10. Connected Objects Inside the BeanEditor component Start eval TextField value SessionEval eval.sessionId sessionEvalId : long sessionId : String subjectMatter : Rating presentation : Rating materials : Rating comments : String © 2007 Howard M. Lewis Ship
  • 11. Component ‘n Stuff Parameters Sub- Injected Components Services Component Localized Template Messages Resources © 2007 Howard M. Lewis Ship
  • 12. What Else? • Validation would be nice • Via @Validation annotation on bean property methods • Customize the Form • Use a TextArea component for the comments field • Use a drop-down list for the session id © 2007 Howard M. Lewis Ship
  • 13. Demo #2 Adding validation and customizing the form
  • 14. Components & Events Start.java String onSuccess() Start { ... } success BeanEditForm success Form action © 2007 Howard M. Lewis Ship
  • 15. Tapestry and IoC • Keep Business Logic out of the Page • Inject Services from the IoC Container Start.java private SessionEval _eval; @Inject private SessionEvalDatabase _database; Event Handler String onSuccess() { _database.add(_eval); return quot;Thanksquot;; } © 2007 Howard M. Lewis Ship
  • 16. Demo #3 Processing the form submission
  • 17. More Components • PageLink: Link to another page • Grid: Data table with paging & sorting • ActionLink: Trigger an action event © 2007 Howard M. Lewis Ship
  • 18. Grid Component • Page navigation & sorting • Lots of configurability • Starts very simple EvalList.html <t:grid source=quot;evalsquot;/> EvalList.java public class EvalList { @Inject private SessionEvalDatabase _database; public List<SessionEval> getEvals() { return _database.getSessionEvals(); } } © 2007 Howard M. Lewis Ship
  • 19. Demo #4 Linking to the EvalList page, adding the Grid
  • 20. Customizing Grid Output • Customize number of rows per page with rowsperpage parameter • Move pages around: pagerposition parameter • Generates CSS class for each cell • Class name from property name Start.html <style> TH.comments-header { background-color: black; } TD.comments-cell { color: silver; } </style> © 2007 Howard M. Lewis Ship
  • 21. Customizing Grid Output • Special parameters to change cell renderer: Start.html <t:grid source=quot;evalsquot; row=quot;evalquot; rowsPerPage=quot;10quot; pagerPosition=quot;topquot;> <t:parameter name=quot;commentscellquot;> <t:summarize value=quot;eval.commentsquot;/> </t:parameter> </t:grid> © 2007 Howard M. Lewis Ship
  • 22. Summarize Component Summarize.java public class Summarize { @Parameter(required = true) private String _value; @Parameter private int _maxLength = 25; boolean beginRender(MarkupWriter writer) { if (_value != null) { String value = _value; if (value.length() > _maxLength) value = value.substring(0, _maxLength) + quot; ...quot;; writer.write(value); } return false; } } © 2007 Howard M. Lewis Ship
  • 24. Is it ready yet? © 2007 Howard M. Lewis Ship
  • 25. Still alpha! • Stable • Basic Spring / Hibernate integration • Many features yet to be implemented • Code stability has been great 5.0.1 ➠ 5.0.5 • Rethink on Templates • Rethink on Inversion of Control container • Several people building production applications already! © 2007 Howard M. Lewis Ship
  • 26. What's Coming • Ajax Support • Improved Hibernate integration • Request in Session Pattern • Spring Web Flow Integration © 2007 Howard M. Lewis Ship
  • 27. IDE Support ❝I don’t have time for Drag and Drop❞ © 2007 Howard M. Lewis Ship
  • 28. Ajax: Coming Soon! <html> Page <body> Layout <form> Form <input> TextField © 2007 Howard M. Lewis Ship
  • 29. Tapestry 4 ➠ Tapestry 5 • Clean Slate • Not backwards compatible • T4: Hard ➠ T5: Easy • T4: Easy ➠ T5: Automatic © 2007 Howard M. Lewis Ship
  • 30. Overcoming “Steep Learning Curve” Multiple Downloads XML Configuration Base Classes Tapestry 4 Abstract Classes Maven & Archetypes T5 Live Class Reloading Conventions, Annotations & Defaults POJOs © 2007 Howard M. Lewis Ship
  • 31. More Information • Home Page: http://tapestry.apache.org/tapestry5/ • Dev & User Mailing Lists: dev-subscribe@tapestry.apache.org users-subscribe@tapestry.apache.org • Howard’s Blog: http://tapestryjava.blogspot.com/ • Howard’s Site: http://howardlewisship.com/ © 2007 Howard M. Lewis Ship
  • 32. How you can help ... • Give it a whirl! • Blog! • Contribute patches! • JUG talks! © 2007 Howard M. Lewis Ship
  • 33. Q&A © 2007 Howard M. Lewis Ship