Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Igor Drobiazko on Tapestry5
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Enterprise Java User Group Austria
November 02, 2010
Technology
80
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Igor Drobiazko on Tapestry5
Enterprise Java User Group Austria
November 02, 2010
More Decks by Enterprise Java User Group Austria
See All by Enterprise Java User Group Austria
Gerrit Grunwald on What the CRaC... SUPERFAST JVM STARTUP
ejug
2
210
Spring Framework 5.2 - Core Container Revisited
ejug
0
190
Andreas Caternberg on Jenkins Pipelines
ejug
1
800
Martin Ahrer on Continuous Delivery Infrastructure With Docker
ejug
0
170
Dirk Mahler on Software Analyse mit jQAssistant & Neo4j
ejug
1
310
Christoph Strobl on Spring Data & Hypermedia
ejug
0
160
Stefan Armbruster on Graph Modelling Antipatterns
ejug
1
140
Stefan Armbruster on Introduction into Neo4J
ejug
1
110
Michael Nitschinger on Building a reactive Couchbase driver for the JVM
ejug
0
160
Other Decks in Technology
See All in Technology
ボトムアップ文化が強い組織で セキュリティをどう根付かせていくかの現在進行形の話 / Making Security Stick in a Bottom-Up Organization
yamaguchitk333
0
240
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.9k
モダンフロントエンド 開発研修
recruitengineers
PRO
4
730
LanceDB入門
mocobeta
8
580
Agent 時代の Kaggle 展望 / kaggle-in-the-agentic-era
upura
1
790
【CEDEC2026】コードレビュー支援ツール開発から学ぶ:LLMを用いた業務システムの実践的な運用設計と誤出力対策
cygames
PRO
0
840
Goでデータパイプラインを作ろう
sansantech
PRO
1
490
FPGAが実現する遠方宇宙の高空間分解能天体撮影 -大型地上望遠鏡の視力を補正する「補償光学」とは?-
komei_mt
0
280
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
630
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
9.1k
【AG-UI × A2UI × MCP Apps】Generative UIをやさしく解説する
nrinetcom
PRO
1
140
関東Kaggler会発表資料
takoi
1
250
Featured
See All Featured
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
890
Exploring anti-patterns in Rails
aemeredith
3
460
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
480
Fireside Chat
paigeccino
42
4k
Statistics for Hackers
jakevdp
799
230k
The Limits of Empathy - UXLibs8
cassininazir
1
610
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
400
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Transcript
by Igor Drobiazko
About Me • Apache Tapestry Committer • Project Management Committee
• Tapestry Evangelist • Book author & Speaker • http://tapestry5.de •
[email protected]
Books
Books
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 1.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 4.0 1.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 4.0 1.0 2.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 4.0 5.0 1.0 2.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 4.0 5.0 1.0 2.0 2.0 1.0 1.0
History of Web Frameworks 2000 2001 2002 2003 2004 2005
2006 2007 2008 2009 2010 2011 3.0 1.0 1.0 4.0 5.0 1.0 2.0 2.0 1.0 5.1 5.2 1.0
Why Tapestry?
Tapestry is ... a web framework for Java
Tapestry is ... JSP-less
Tapestry is ... easy to deploy
Tapestry is ... easy to deploy
JSR 303: Bean Validation Tapestry is ... adaptable
Tapestry is ... powerful
Tapestry is ... highly productive
Performance & Scalability
Quality
Tapestry is ... fun
Tapestry Elements
Application Structure Page Application Component Page Component Component Component Component
Component Component
Package Structure org.example pages components services mixins
Tapestry Pages MyPage.java MyPage.tml
RESTful URLs MyPage.java
RESTful URLs MyPage.java
RESTful URLs http://localhost:8080/app/mypage MyPage.java
RESTful URLs http://localhost:8080/app/mypage MyPage.java
RESTful URLs http://localhost:8080/app/mypage MyPage.java HTTP/1.1 200 OK
Tapestry Templates <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${hello} Index.tml
Tapestry Templates public class Index { ! ! public String
getHello() { ! ! return "Hello, World!"; ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${hello} Index.tml Index.java
Tapestry Templates public class Index { ! ! public String
getHello() { ! ! return "Hello, World!"; ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${hello} Index.tml Index.java
Tapestry Templates public class Index { ! ! public String
getHello() { ! ! return "Hello, World!"; ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> Index.tml Index.java
Tapestry Templates public class Index { ! ! public String
getHello() { ! ! return "Hello, World!"; ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${prop:hello} Index.tml Index.java
Invisible Instrumentation <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:pagelink page="MyPage">Go to MyPage</t:pagelink> </body>
</html>
Invisible Instrumentation <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:pagelink page="MyPage">Go to MyPage</t:pagelink> </body>
</html> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="pagelink" page="MyPage">Go to MyPage</a> </body> </html>
Meta Programming public class Login { ! @Property @Persist private
String username; @Property @Persist private String password; @Inject private Session session; @CommitAfter @DiscardAfter public Object onSuccess() { User user = (User) session.createCriteria(User.class) .add(Restrictions.eq("username", username)); ... user.setLastLogin(new Date()); ! return UserProfile.class; } }
State Management public class MyPage { @Persist private String value;
! @SessionState private User user; ... } Persistent field Session State Object
Demo Developer Productivity
Tapestry Components
Tapestry Components MyComponent.java MyComponent.tml
Tapestry Components <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> MyPage.tml
Tapestry Components public class HelloComponent { @Parameter private String name;
public String getHello(){ return "Hello, " + name; } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> MyPage.tml HelloComponent.java
Tapestry Components public class HelloComponent { @Parameter private String name;
public String getHello(){ return "Hello, " + name; } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> MyPage.tml HelloComponent.java
Tapestry Components public class HelloComponent { @Parameter private String name;
public String getHello(){ return "Hello, " + name; } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> ${hello} </div> MyPage.tml HelloComponent.java HelloComponent.tml
Tapestry Components public class HelloComponent { @Parameter private String name;
public String getHello(){ return "Hello, " + name; } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> ${hello} </div> MyPage.tml HelloComponent.java HelloComponent.tml
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> MyPage.tml Tapestry Components
public class HelloComponent { @Parameter private String name; void beginRender(MarkupWriter
writer){ writer.element("div"); writer.write("Hello, " + name); writer.end(); } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> HelloComponent.java MyPage.tml Tapestry Components
public class HelloComponent { @Parameter private String name; void beginRender(MarkupWriter
writer){ writer.element("div"); writer.write("Hello, " + name); writer.end(); } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:helloComponent name="literal:Igor"/> </body> </html> HelloComponent.java MyPage.tml Tapestry Components
Component Rendering
Component Rendering public class HelloComponent { @Parameter private String name;
boolean beginRender(MarkupWriter writer){ writer.element("div"); writer.write("Hello, " + name); writer.end(); return false; } }
Component Rendering
Component Rendering public class HelloComponent { @Parameter private String name;
void beginRender(MarkupWriter writer){ writer.element("div"); } void beforeRenderBody(MarkupWriter writer){ writer.write("Hello, " + name); } void afterRender(MarkupWriter writer){ writer.end(); } }
UI for JavaBeans
BeanEditForm
Grid
Demo User Interfaces for JavaBeans
Component Events
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink">Click me</a> </body> </html> Index.tml Component
Events 1/3
public class Index { ! ! void onAction() { !
! ... ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink">Click me</a> </body> </html> Index.tml Index.java Component Events 1/3
public class Index { ! ! void onAction() { !
! ... ! } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink">Click me</a> </body> </html> Index.tml Index.java Component Events 1/3
Component Events 2/3 <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink" t:id="first">Click me</a>
<a t:type="actionlink" t:id="second">Click me too</a> </body> </html> Index.tml
Component Events 2/3 public class Index { ! ! void
onActionFromFirst(){...} void onActionFromSecond(){...} } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink" t:id="first">Click me</a> <a t:type="actionlink" t:id="second">Click me too</a> </body> </html> Index.tml Index.java
Component Events 2/3 public class Index { ! ! void
onActionFromFirst(){...} void onActionFromSecond(){...} } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink" t:id="first">Click me</a> <a t:type="actionlink" t:id="second">Click me too</a> </body> </html> Index.tml Index.java
Component Events 2/3 public class Index { ! ! void
onActionFromFirst(){...} void onActionFromSecond(){...} } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink" t:id="first">Click me</a> <a t:type="actionlink" t:id="second">Click me too</a> </body> </html> Index.tml Index.java
Component Events 2/3 public class Index { ! ! void
onActionFromFirst(){...} void onActionFromSecond(){...} } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <a t:type="actionlink" t:id="first">Click me</a> <a t:type="actionlink" t:id="second">Click me too</a> </body> </html> public class Index { ! @OnEvent(component="first", event="action") ! void foo() {...} @OnEvent(component="second", event="action") void bar() {...} } Index.tml Index.java Index.java
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:form> <t:texfield value="username"/> <t:passwordfield value="password"/> <input type="submit">
</t:form> </body> </html> Login.tml Component Events 3/3
public class Login { ! void onValidateForm() { ... }
void onSuccess() { ... } void onFailure() { ... } } <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> <t:form> <t:texfield value="username"/> <t:passwordfield value="password"/> <input type="submit"> </t:form> </body> </html> Login.tml Login.java Component Events 3/3
Events & Page Navigation
Events & Page Navigation public class Index { @InjectPage private
MyPage myPage; ! ! Object onAction(){ return myPage; } }
Events & Page Navigation
Events & Page Navigation public class Index { ! Object
onAction(){ return „MyPage“; } }
Events & Page Navigation
Events & Page Navigation public class Index { ! Object
onAction(){ return MyPage.class; } }
Events & Page Navigation
Events & Page Navigation public class Index { ! Object
onAction() throws MalformedURLException { return new URL(“http://www.google.com“); } }
Events & Page Navigation
Internationalization
Message Catalog MyPage.java MyPage.tml MyPage.properties MyPage_de.properties app.properties
Accessing Messages <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} MyPage.tml
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} MyPage.tml
MyPage.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
MyPage.tml MyPage.properties MyPage_de.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, de MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, de MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, de en MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, de en MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Accessing Messages welcome-message=Welcome <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"> <body> </body> </html> ${message:welcome-message} welcome-message=Willkommen
welcome-message="#$%# &#'()#*(+, de en ru MyPage.tml MyPage.properties MyPage_de.properties MyPage_ru.properties
Localizable Templates MyPage.java MyPage.tml MyPage_iw.tml MyPage_jp.tml
None
Localizable Images MyPage.java MyPage.tml Logo.jpg Logo_de.jpg Logo_ru.jpg
Ajax & Tapestry
Partial Updates 0
Partial Updates 0
Partial Updates Click 0
Partial Updates Click
Partial Updates Click 1
Demo Ajax
Around Tapestry Tapestry JumpStart Tapestry360
http://tapestry.apache.org/
Coming Soon
http://tapestry.zones.apache.org:8180/tapestry5- hotel-booking/
http://jumpstart.doublenegative.com.au
http://tynamo.org
http://chenillekit.org
http://tapestry5.de
Thank You