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
79
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
200
Spring Framework 5.2 - Core Container Revisited
ejug
0
180
Andreas Caternberg on Jenkins Pipelines
ejug
0
790
Martin Ahrer on Continuous Delivery Infrastructure With Docker
ejug
0
160
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
100
Michael Nitschinger on Building a reactive Couchbase driver for the JVM
ejug
0
160
Other Decks in Technology
See All in Technology
勉強会企画をアプリで構造化してみた 〜そこで見えた、AIとの付き合い方〜 / I've structured a study group plan using an app.
pauli
0
270
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」紹介資料
laysakura
2
7.9k
フルAIで個人開発して学んだあれこれ / yuruai vol.1
isaoshimizu
0
160
感情と身体を置き去りにしない、エンジニアの生きのこり方 ──いまから、ここから「自分の状態」を扱うという選択
saorimurooka
1
450
AI駆動開発におけるQAエンジニアの役割事例 〜AI駆動開発の現場から〜
kobayashiyorimitsu
0
220
5分でわかるDuckDB Quack
chanyou0311
4
290
NDIAS CTF 2026 問題解説会資料
bata_24
0
160
Zenoh on Zephyr on LiteX
takasehideki
2
170
起点・思考・出力で分解する 〜PM業務の自動化設計〜
kazu_kichi_67
2
1.2k
從觀望到全公司落地:AI Agentic Coding 導入實戰 — 流程整合與安全治理
appleboy
1
440
“詰む”前に仕組みを作れ 〜技術の波に溺れないためのキャッチアップ術〜
takasyou
8
4.9k
組織における AI-DLC 実践
askul
0
270
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
Rails Girls Zürich Keynote
gr2m
96
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Automating Front-end Workflow
addyosmani
1370
210k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
290
How to build a perfect <img>
jonoalderson
1
5.8k
How to train your dragon (web standard)
notwaldorf
97
6.7k
The Cult of Friendly URLs
andyhume
79
6.9k
Into the Great Unknown - MozCon
thekraken
41
2.6k
Chasing Engaging Ingredients in Design
codingconduct
0
230
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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