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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Enterprise Java User Group Austria
November 02, 2010
Technology
83
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
810
Martin Ahrer on Continuous Delivery Infrastructure With Docker
ejug
0
170
Dirk Mahler on Software Analyse mit jQAssistant & Neo4j
ejug
1
320
Christoph Strobl on Spring Data & Hypermedia
ejug
0
170
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
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
230
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
2
2.1k
AIとペアプロを始める。人とのペアプロをやめる。ペアプロの良さを改めて知る。もっと好きになった。 / Rediscovering Pair Programming
honyanya
1
190
[RSJ26] AnoleVLA: Lightweight Vision-Language-Action Model with Deep State Space Models for Mobile Manipulation
keio_smilab
PRO
0
120
Bet AI Day 2026丨How We Bet AI: AIとともに働く場をつくる
layerx
PRO
1
2.1k
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
190
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
530
振り返りこそエンジニアの本領
negima
0
260
データエンジニアリングワークショップ:Auto LoaderとSparkで学ぶデータパイプライン構築
databricksjapan
PRO
0
140
指示待ちから変化に応じるClaude Codeへ!~環境からAgentへの帰り道を作る~
gotalab555
9
1.8k
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.1k
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
330
Featured
See All Featured
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Making the Leap to Tech Lead
cromwellryan
135
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
4.6k
How to train your dragon (web standard)
notwaldorf
97
6.8k
How to build a perfect <img>
jonoalderson
1
5.9k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
Scaling GitHub
holman
464
140k
Balancing Empowerment & Direction
lara
6
1.3k
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