SlideShare a Scribd company logo
T2 framework T2 project http://t-2.googlecode.com/ Shinpei Ohtani(shot6)
Agenda Introduce myself and the team An overview of T2 framework Current web development situation T2 architecture and mechanism Demos Conclusion
Introduce myself Shinpei Ohtani Open source programmer Java/ActionScript/JavaScript/C#... Works at ISI Dentsu, Ltd Blog http://d.hatena.ne.jp/shot6/  (Japanese) Twitter http://twitter.com/shot6/
Introduce the T2 team The team are: 5 committers All professional programmer, especially Java Each of us create both applications and frameworks The experiences are the core of creating T2
Web development situation The time for web application re-invented RIA is no more new thing, it is just choice! Ajax, Flex, Silverlight, there are just choices. Cloud environment is the matter Web application needs to deploy to multiple clouds HTTP based protocol and format rises up AMF, XMPP, reversehttp, pubsubhubbub Or, legacy SOAP:P
RIP –Rich Internet Platform- RIA to RIP(Rich Internet Platform) RIP  is the platform to support multiple RIA environment(HTML5, Ajax, Flex, Silverlight…). HTML5 is the flagship of RIP Unlike HTML4, HTML5 is the platform for RIA. Runtime is the key such as WebSockets WebStorage WebWorker CacheManifest Geolocation API
Cloudability Cloudability Ability to work well at cloud environment Work well means: Deploy easily Scale easily so be stateless Interoperable to multiple cloud environment Not only for GAE, Amazon, or other, do work with all these.
HTTP matters HTTP/HTTPS it the protocol The unified protocol for next generation apps The format also matters AMF for Flex, XMPP for jabber, pubsubhubbub for WebHook, so many format rises up! These formats and mechanism is the key for new interactive web apps
To the next level web apps Choose good/simple framework that has some features for: RIP Cloudability HTTP based multiple format is one of the choice for you.
What is T2 framework Simple and modernized java web framework for real developer Easy to use and maintain by annotation Current version is T2 0.6.1-ga. ASL2 License. http://code.google.com/p/t-2/ The framework for RIP apps Ofcourse support classic web application! Extensible and embeddable framework
The big picture Browser HTTP POST JavaScript Client XmlHttp Request Flex/AIR AMF REST-like Client PUT /hoge/foo POJO POJO POJO Serverside java applications …… …… …… Request format doesn’t effect server side POJO-based model.
The motivation The motivation All of Java webframework is too difficult to use and maintain Also mention none of these follow modernized web clients with one unified model Does your framework handle Ajax, AMF, REST request using one unified programming model?  No clean url, no life. No choice of template engine, no life. Less configuration without difficult CoC!
The motivation(cont’d) Web framework: should be  much more simple . should give developer loosely-coupled  unified model . Request type and format doesn’t effect server side. should handle  modernized web request well Ajax, AMF from Flex, REST, POX from Silverlight… should give you clean beatiful url should give you free to choose template engine
The concept Concept Do one thing well T2 just connects between multiple HTTP clients to POJO using url pattern gracefully.Doesn’t do things at all. Accepts WEB diversity 100 ways to make web application with technology (browser/RIA/CUI…), and we can’t push developer to one way.Do it freely using T2. Only things for sure is using  HTTP  and  URL .
The target user Who should use T2? Developers who’d like to: Develop and control web application easily. Separate clients and server side application gracefully Develop his/her framework based on simple and extensible framework and control perfectly  Develop RIA application quickly using REST like request, Ajax request, or Flex AMF request Develop cloud based application
Programming model Page model All of T2 application uses page model Basically POJO but annotations enhanced for class, method, parameter Very unobtrusive model, no one harms for this  Page  is a class to map an url for a pojo. Page has  action methods  for executing user request. Action parameter  is injected by T2
Programming model(cont’d) Example: @Page("employee") public class EmployeePage { @Default public Navigation index(WebContext context) { … ... } @GET @ActionPath("list/detail") public Navigation detail(WebContext context) { …… } }
Action method design Funnel-like design Page class is created as you put url and its parameter from whole to detail Set url for a page Set url for an action method Set parameter whichever you would like to receive
Action method design(cont’d) Example: HTTP GET /hoge/foo?bar=2 Page class takes /hoge as url Action method tales /foo as url Method args takes bar as String So it is like: @Page("/hoge”) public YourPage { @GET @ActionPath(“hoge”) public Navigation hoge( @RequestParam("bar") String bar ) {
Action parameter design Action parameter is injected by T2 T2 prepared contexts WebContext/Request/Response… Servlet spec contexts HttpServletRequest/HttpServletResponse… Converted POJO from form data From HTTP POST,  or from Flex AMF Useful parameters REST-like some url, or foreach index, upload file…
Take a look code! @Page(”sample") public class SamplePage { @Default public Navigation index(WebContext context) {… @Amf public Navigation execute(HogeDto hoge) {… @ActionParam public Navigation submit(@Form FooDto foo) {… @ActionPath(“fuga/{moge}”) public Navigation submit( @Var(“moge”)  String s) {…
Core components @Page HTTP handling using @GET/@POST URL pattern matching by @ActionPath Request data matching by @ActionParam Request type matching by @Ajax/@Amf Return type, Navigation ContainerAdapter for integrate with DI container
@Page The root annotation for T2 Page Page must have @Page. T2 does not have any configuration except web.xml and @Page Traverse by class path and finds page classes
HTTP matching HTTP matching is the first thing T2 does for action methods GET, POST, PUT, DELETE, even HEAD. These are distinguished by annotation like @GET or @POST
URL matching for action method URL matching for action method @ActionPath is the main role to do @Page(“hoge”) + @ActionPath(“foo”) -> /hoge/foo is the url to access to the method
Data matching for action method Data matching for action method @ActionParam is the main role to do Match submitted request parameter name. If it’s @ActionParam(“execute”), execute the action method if request paramete name “execute” exist Usually it is used to separate user submit action. Data update button, cancel button, things like that.
Request type matching T2 can separate methods for request type. @Ajax Accept only XmlHttpRequest, not others Done by “X-Requested-With” header @Amf Accept only Flex/AIR AMF request, not others Done by content-type header Request type is important The logic must be different with sync/async.
Default method for a page Default method is always good to have. At least some odd error does not happen Default behavior takes over and user doesn’t feel uncomfortable @Default is for default method Usually returns default page transition. Sometimes clear states if application contains.
Navigation Navigation is the user interface for: Telling T2 where the transition goes Telling T2 how view will be rendered Navigation is: Very simple to use. Extensible.Developer can implement easily.
Default prepared navigations Default navigations Forward/Redirect/Proceed(Psuedo redirect) Json(or SecureJson using json-prefixing) Direct(Stream response) AmfResponse(Flex AMF) CacheManifest(Generate HTML5 manifest) In the future: CVS, PDF, GoogleMaps, or Charts.
ContainerAdapter Dependency Injection is the defacto technology for easy and maintainable development T2 provides adapters for these containers: Spring/Guice/Seasar2 or our Lucy It can use by settings using web.xml <init-param> <param-name>t2.container.adapter</param-name> <param-value>org.t2framework.t2.adapter.SpringAdapter</param-value> </init-param>
Demos RIA type demo PureMVC + T2 + Spring + iBatis Complete sample for CRUD Cloud type demo Flex + GAEJ + T2 Using T2 AMF3 implementation Where is my lovely iPhone? Mushup Demo Geolocation(ajax) + T2 + Yahoo local search + iPhone serversman web server
Conclusion Web development will be re-invented by: RIP, mostly HTML5 Cloud environment Multiple HTTP based formats T2 framework is the simple framework for working well with these environments.
Resources Site http://code.google.com/p/t-2/ Download http://code.google.com/p/t-2/downloads/list Maven site http://maven.t2framework.org/maven2/
Resources(cont’d) Documents http://code.google.com/p/t-2/wiki/Index Mailing list http://groups.google.com/group/t2-users-en Source http://code.google.com/p/t-2/source/checkout
Thanks!!
Ad

More Related Content

What's hot (20)

Mobile App Development Tools of 2018
Mobile App Development Tools of 2018Mobile App Development Tools of 2018
Mobile App Development Tools of 2018
Ahmed Abu Eldahab
 
Google flutter and why does it matter
Google flutter and why does it matterGoogle flutter and why does it matter
Google flutter and why does it matter
Ahmed Abu Eldahab
 
Flutter A year of creativity!
Flutter A year of creativity!Flutter A year of creativity!
Flutter A year of creativity!
Ahmed Abu Eldahab
 
Flutter 2.8 features and updates
Flutter 2.8 features and updatesFlutter 2.8 features and updates
Flutter 2.8 features and updates
Ahmed Abu Eldahab
 
Flutter study jam 2019
Flutter study jam 2019Flutter study jam 2019
Flutter study jam 2019
Ahmed Abu Eldahab
 
Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
Ahmed Abu Eldahab
 
Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
Ahmed Abu Eldahab
 
The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019
Ahmed Abu Eldahab
 
6 x1 flutter_talk
6 x1 flutter_talk6 x1 flutter_talk
6 x1 flutter_talk
Ahmed Abu Eldahab
 
Build responsive applications with google flutter
Build responsive applications with  google flutterBuild responsive applications with  google flutter
Build responsive applications with google flutter
Ahmed Abu Eldahab
 
Flutter state management from zero to hero
Flutter state management from zero to heroFlutter state management from zero to hero
Flutter state management from zero to hero
Ahmed Abu Eldahab
 
Google flutter the easy and practical way IEEE Alazhar
Google flutter the easy and practical way IEEE AlazharGoogle flutter the easy and practical way IEEE Alazhar
Google flutter the easy and practical way IEEE Alazhar
Ahmed Abu Eldahab
 
Flutter - DevFestDC
Flutter - DevFestDCFlutter - DevFestDC
Flutter - DevFestDC
Michael R. Traverso
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
Ahmed Abu Eldahab
 
Build web applications using google flutter
Build web applications using google flutterBuild web applications using google flutter
Build web applications using google flutter
Ahmed Abu Eldahab
 
Flutter Online Study jam 10-7-2019
Flutter Online Study jam 10-7-2019Flutter Online Study jam 10-7-2019
Flutter Online Study jam 10-7-2019
Ahmed Abu Eldahab
 
Flutter beyond hello world
Flutter beyond hello worldFlutter beyond hello world
Flutter beyond hello world
Ahmed Abu Eldahab
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
Ahmed Abu Eldahab
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
Edureka!
 
Building Successful Apps with Google Firebase
Building Successful Apps with Google FirebaseBuilding Successful Apps with Google Firebase
Building Successful Apps with Google Firebase
Ahmed Abu Eldahab
 
Mobile App Development Tools of 2018
Mobile App Development Tools of 2018Mobile App Development Tools of 2018
Mobile App Development Tools of 2018
Ahmed Abu Eldahab
 
Google flutter and why does it matter
Google flutter and why does it matterGoogle flutter and why does it matter
Google flutter and why does it matter
Ahmed Abu Eldahab
 
Flutter A year of creativity!
Flutter A year of creativity!Flutter A year of creativity!
Flutter A year of creativity!
Ahmed Abu Eldahab
 
Flutter 2.8 features and updates
Flutter 2.8 features and updatesFlutter 2.8 features and updates
Flutter 2.8 features and updates
Ahmed Abu Eldahab
 
Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
Ahmed Abu Eldahab
 
Google flutter the easy and practical way
Google flutter the easy and practical wayGoogle flutter the easy and practical way
Google flutter the easy and practical way
Ahmed Abu Eldahab
 
The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019The Magic of flutter Comex oman 2019
The Magic of flutter Comex oman 2019
Ahmed Abu Eldahab
 
Build responsive applications with google flutter
Build responsive applications with  google flutterBuild responsive applications with  google flutter
Build responsive applications with google flutter
Ahmed Abu Eldahab
 
Flutter state management from zero to hero
Flutter state management from zero to heroFlutter state management from zero to hero
Flutter state management from zero to hero
Ahmed Abu Eldahab
 
Google flutter the easy and practical way IEEE Alazhar
Google flutter the easy and practical way IEEE AlazharGoogle flutter the easy and practical way IEEE Alazhar
Google flutter the easy and practical way IEEE Alazhar
Ahmed Abu Eldahab
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
Ahmed Abu Eldahab
 
Build web applications using google flutter
Build web applications using google flutterBuild web applications using google flutter
Build web applications using google flutter
Ahmed Abu Eldahab
 
Flutter Online Study jam 10-7-2019
Flutter Online Study jam 10-7-2019Flutter Online Study jam 10-7-2019
Flutter Online Study jam 10-7-2019
Ahmed Abu Eldahab
 
Building beautiful apps using google flutter
Building beautiful apps using google flutterBuilding beautiful apps using google flutter
Building beautiful apps using google flutter
Ahmed Abu Eldahab
 
Flutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | EdurekaFlutter Tutorial For Beginners | Edureka
Flutter Tutorial For Beginners | Edureka
Edureka!
 
Building Successful Apps with Google Firebase
Building Successful Apps with Google FirebaseBuilding Successful Apps with Google Firebase
Building Successful Apps with Google Firebase
Ahmed Abu Eldahab
 

Similar to T2 Web Framework (20)

Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
Matt Raible
 
JavaEE6 my way
JavaEE6 my wayJavaEE6 my way
JavaEE6 my way
Nicola Pedot
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
Kevin Gill
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
Adil Jafri
 
Full Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeFull Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future Scope
IRJET Journal
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
Himanshu Mendiratta
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Alfresco Architecture
Alfresco ArchitectureAlfresco Architecture
Alfresco Architecture
Noushad Kabeer
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
ate.douma
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st week
Raisa Anjani
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
jphl
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
Alfresco Software
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
Matt Raible
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
Kevin Gill
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
Adil Jafri
 
Full Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeFull Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future Scope
IRJET Journal
 
Normalizing x pages web development
Normalizing x pages web development Normalizing x pages web development
Normalizing x pages web development
Shean McManus
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
Himanshu Mendiratta
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
ASG
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
Integrating Social Apps with Content Driven Sites using Apache Rave and Sprin...
ate.douma
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st week
Raisa Anjani
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
An Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP ProgrammersAn Introduction to Websphere sMash for PHP Programmers
An Introduction to Websphere sMash for PHP Programmers
jphl
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
Alfresco Software
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
 
Ad

More from Shinpei Ohtani (17)

Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
Shinpei Ohtani
 
AWS Lambda and Amazon API Gateway
AWS Lambda and Amazon API GatewayAWS Lambda and Amazon API Gateway
AWS Lambda and Amazon API Gateway
Shinpei Ohtani
 
ECS for Docker Meetup #4
ECS for Docker Meetup #4ECS for Docker Meetup #4
ECS for Docker Meetup #4
Shinpei Ohtani
 
JVM的な何か@JVM Operation Casual Talk
JVM的な何か@JVM Operation Casual TalkJVM的な何か@JVM Operation Casual Talk
JVM的な何か@JVM Operation Casual Talk
Shinpei Ohtani
 
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Shinpei Ohtani
 
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 FallAmazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Shinpei Ohtani
 
プログラマブルクラウドの薦め
プログラマブルクラウドの薦めプログラマブルクラウドの薦め
プログラマブルクラウドの薦め
Shinpei Ohtani
 
サンプルから見るMapReduceコード
サンプルから見るMapReduceコードサンプルから見るMapReduceコード
サンプルから見るMapReduceコード
Shinpei Ohtani
 
Hadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダHadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダ
Shinpei Ohtani
 
サンプルから見るMap reduceコード
サンプルから見るMap reduceコードサンプルから見るMap reduceコード
サンプルから見るMap reduceコード
Shinpei Ohtani
 
Hadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダHadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダ
Shinpei Ohtani
 
T2 webframework
T2 webframeworkT2 webframework
T2 webframework
Shinpei Ohtani
 
Struts2を始めよう!
Struts2を始めよう!Struts2を始めよう!
Struts2を始めよう!
Shinpei Ohtani
 
Struts2 in a nutshell
Struts2 in a nutshellStruts2 in a nutshell
Struts2 in a nutshell
Shinpei Ohtani
 
AWS Lambda and Amazon API Gateway
AWS Lambda and Amazon API GatewayAWS Lambda and Amazon API Gateway
AWS Lambda and Amazon API Gateway
Shinpei Ohtani
 
ECS for Docker Meetup #4
ECS for Docker Meetup #4ECS for Docker Meetup #4
ECS for Docker Meetup #4
Shinpei Ohtani
 
JVM的な何か@JVM Operation Casual Talk
JVM的な何か@JVM Operation Casual TalkJVM的な何か@JVM Operation Casual Talk
JVM的な何か@JVM Operation Casual Talk
Shinpei Ohtani
 
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Amazon kinesisで広がるリアルタイムデータプロセッシングとその未来
Shinpei Ohtani
 
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 FallAmazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Amazon Elastic MapReduce@Hadoop Conference Japan 2011 Fall
Shinpei Ohtani
 
プログラマブルクラウドの薦め
プログラマブルクラウドの薦めプログラマブルクラウドの薦め
プログラマブルクラウドの薦め
Shinpei Ohtani
 
サンプルから見るMapReduceコード
サンプルから見るMapReduceコードサンプルから見るMapReduceコード
サンプルから見るMapReduceコード
Shinpei Ohtani
 
Hadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダHadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダ
Shinpei Ohtani
 
サンプルから見るMap reduceコード
サンプルから見るMap reduceコードサンプルから見るMap reduceコード
サンプルから見るMap reduceコード
Shinpei Ohtani
 
Hadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダHadoopソースリーディング第1回アジェンダ
Hadoopソースリーディング第1回アジェンダ
Shinpei Ohtani
 
Struts2を始めよう!
Struts2を始めよう!Struts2を始めよう!
Struts2を始めよう!
Shinpei Ohtani
 
Ad

Recently uploaded (20)

Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
IEDM 2024 Tutorial2_Advances in CMOS Technologies and Future Directions for C...
organizerofv
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 

T2 Web Framework

  • 1. T2 framework T2 project http://t-2.googlecode.com/ Shinpei Ohtani(shot6)
  • 2. Agenda Introduce myself and the team An overview of T2 framework Current web development situation T2 architecture and mechanism Demos Conclusion
  • 3. Introduce myself Shinpei Ohtani Open source programmer Java/ActionScript/JavaScript/C#... Works at ISI Dentsu, Ltd Blog http://d.hatena.ne.jp/shot6/ (Japanese) Twitter http://twitter.com/shot6/
  • 4. Introduce the T2 team The team are: 5 committers All professional programmer, especially Java Each of us create both applications and frameworks The experiences are the core of creating T2
  • 5. Web development situation The time for web application re-invented RIA is no more new thing, it is just choice! Ajax, Flex, Silverlight, there are just choices. Cloud environment is the matter Web application needs to deploy to multiple clouds HTTP based protocol and format rises up AMF, XMPP, reversehttp, pubsubhubbub Or, legacy SOAP:P
  • 6. RIP –Rich Internet Platform- RIA to RIP(Rich Internet Platform) RIP is the platform to support multiple RIA environment(HTML5, Ajax, Flex, Silverlight…). HTML5 is the flagship of RIP Unlike HTML4, HTML5 is the platform for RIA. Runtime is the key such as WebSockets WebStorage WebWorker CacheManifest Geolocation API
  • 7. Cloudability Cloudability Ability to work well at cloud environment Work well means: Deploy easily Scale easily so be stateless Interoperable to multiple cloud environment Not only for GAE, Amazon, or other, do work with all these.
  • 8. HTTP matters HTTP/HTTPS it the protocol The unified protocol for next generation apps The format also matters AMF for Flex, XMPP for jabber, pubsubhubbub for WebHook, so many format rises up! These formats and mechanism is the key for new interactive web apps
  • 9. To the next level web apps Choose good/simple framework that has some features for: RIP Cloudability HTTP based multiple format is one of the choice for you.
  • 10. What is T2 framework Simple and modernized java web framework for real developer Easy to use and maintain by annotation Current version is T2 0.6.1-ga. ASL2 License. http://code.google.com/p/t-2/ The framework for RIP apps Ofcourse support classic web application! Extensible and embeddable framework
  • 11. The big picture Browser HTTP POST JavaScript Client XmlHttp Request Flex/AIR AMF REST-like Client PUT /hoge/foo POJO POJO POJO Serverside java applications …… …… …… Request format doesn’t effect server side POJO-based model.
  • 12. The motivation The motivation All of Java webframework is too difficult to use and maintain Also mention none of these follow modernized web clients with one unified model Does your framework handle Ajax, AMF, REST request using one unified programming model? No clean url, no life. No choice of template engine, no life. Less configuration without difficult CoC!
  • 13. The motivation(cont’d) Web framework: should be much more simple . should give developer loosely-coupled unified model . Request type and format doesn’t effect server side. should handle modernized web request well Ajax, AMF from Flex, REST, POX from Silverlight… should give you clean beatiful url should give you free to choose template engine
  • 14. The concept Concept Do one thing well T2 just connects between multiple HTTP clients to POJO using url pattern gracefully.Doesn’t do things at all. Accepts WEB diversity 100 ways to make web application with technology (browser/RIA/CUI…), and we can’t push developer to one way.Do it freely using T2. Only things for sure is using HTTP and URL .
  • 15. The target user Who should use T2? Developers who’d like to: Develop and control web application easily. Separate clients and server side application gracefully Develop his/her framework based on simple and extensible framework and control perfectly Develop RIA application quickly using REST like request, Ajax request, or Flex AMF request Develop cloud based application
  • 16. Programming model Page model All of T2 application uses page model Basically POJO but annotations enhanced for class, method, parameter Very unobtrusive model, no one harms for this  Page is a class to map an url for a pojo. Page has action methods for executing user request. Action parameter is injected by T2
  • 17. Programming model(cont’d) Example: @Page(&quot;employee&quot;) public class EmployeePage { @Default public Navigation index(WebContext context) { … ... } @GET @ActionPath(&quot;list/detail&quot;) public Navigation detail(WebContext context) { …… } }
  • 18. Action method design Funnel-like design Page class is created as you put url and its parameter from whole to detail Set url for a page Set url for an action method Set parameter whichever you would like to receive
  • 19. Action method design(cont’d) Example: HTTP GET /hoge/foo?bar=2 Page class takes /hoge as url Action method tales /foo as url Method args takes bar as String So it is like: @Page(&quot;/hoge”) public YourPage { @GET @ActionPath(“hoge”) public Navigation hoge( @RequestParam(&quot;bar&quot;) String bar ) {
  • 20. Action parameter design Action parameter is injected by T2 T2 prepared contexts WebContext/Request/Response… Servlet spec contexts HttpServletRequest/HttpServletResponse… Converted POJO from form data From HTTP POST, or from Flex AMF Useful parameters REST-like some url, or foreach index, upload file…
  • 21. Take a look code! @Page(”sample&quot;) public class SamplePage { @Default public Navigation index(WebContext context) {… @Amf public Navigation execute(HogeDto hoge) {… @ActionParam public Navigation submit(@Form FooDto foo) {… @ActionPath(“fuga/{moge}”) public Navigation submit( @Var(“moge”) String s) {…
  • 22. Core components @Page HTTP handling using @GET/@POST URL pattern matching by @ActionPath Request data matching by @ActionParam Request type matching by @Ajax/@Amf Return type, Navigation ContainerAdapter for integrate with DI container
  • 23. @Page The root annotation for T2 Page Page must have @Page. T2 does not have any configuration except web.xml and @Page Traverse by class path and finds page classes
  • 24. HTTP matching HTTP matching is the first thing T2 does for action methods GET, POST, PUT, DELETE, even HEAD. These are distinguished by annotation like @GET or @POST
  • 25. URL matching for action method URL matching for action method @ActionPath is the main role to do @Page(“hoge”) + @ActionPath(“foo”) -> /hoge/foo is the url to access to the method
  • 26. Data matching for action method Data matching for action method @ActionParam is the main role to do Match submitted request parameter name. If it’s @ActionParam(“execute”), execute the action method if request paramete name “execute” exist Usually it is used to separate user submit action. Data update button, cancel button, things like that.
  • 27. Request type matching T2 can separate methods for request type. @Ajax Accept only XmlHttpRequest, not others Done by “X-Requested-With” header @Amf Accept only Flex/AIR AMF request, not others Done by content-type header Request type is important The logic must be different with sync/async.
  • 28. Default method for a page Default method is always good to have. At least some odd error does not happen Default behavior takes over and user doesn’t feel uncomfortable @Default is for default method Usually returns default page transition. Sometimes clear states if application contains.
  • 29. Navigation Navigation is the user interface for: Telling T2 where the transition goes Telling T2 how view will be rendered Navigation is: Very simple to use. Extensible.Developer can implement easily.
  • 30. Default prepared navigations Default navigations Forward/Redirect/Proceed(Psuedo redirect) Json(or SecureJson using json-prefixing) Direct(Stream response) AmfResponse(Flex AMF) CacheManifest(Generate HTML5 manifest) In the future: CVS, PDF, GoogleMaps, or Charts.
  • 31. ContainerAdapter Dependency Injection is the defacto technology for easy and maintainable development T2 provides adapters for these containers: Spring/Guice/Seasar2 or our Lucy It can use by settings using web.xml <init-param> <param-name>t2.container.adapter</param-name> <param-value>org.t2framework.t2.adapter.SpringAdapter</param-value> </init-param>
  • 32. Demos RIA type demo PureMVC + T2 + Spring + iBatis Complete sample for CRUD Cloud type demo Flex + GAEJ + T2 Using T2 AMF3 implementation Where is my lovely iPhone? Mushup Demo Geolocation(ajax) + T2 + Yahoo local search + iPhone serversman web server
  • 33. Conclusion Web development will be re-invented by: RIP, mostly HTML5 Cloud environment Multiple HTTP based formats T2 framework is the simple framework for working well with these environments.
  • 34. Resources Site http://code.google.com/p/t-2/ Download http://code.google.com/p/t-2/downloads/list Maven site http://maven.t2framework.org/maven2/
  • 35. Resources(cont’d) Documents http://code.google.com/p/t-2/wiki/Index Mailing list http://groups.google.com/group/t2-users-en Source http://code.google.com/p/t-2/source/checkout