SlideShare a Scribd company logo
1 of 22
Ajax on Struts 2
About Myself

 ●   Chad Davis
 ●   Blackdog Software, Inc.
 ●   J2EE Consulting
 ●   Corporate Training
 ●   Struts 2 in Action
 ●   Open Source Enthusiast
 ●   Debian Devotee
Road Map

●   Something for everyone
●   Struts 2 introduction
●   Ajax introduction
●   Walk through a code sample
●   Questions at any time
Struts 2

●   Web application framework
●   Java Servlets
●   Second generation
●   Software engineering
Classic versus Ajax

    Classic Web Applications
    •



    Ajax Web Applications
    •
Classic Web Applications                            < htm l>
                                                     < head>
                                                       < link rel= quot;stylesheetquot; type= quot;text/cssquot; href= quot;css/ajaxUserBrowser.cssquot; />
                                                     < /head>
                                                     < body>
                                                       < h2> Artist Browser Control< /h2>
                                                       < form nam e= quot;ClassicRetrieveUserquot; action= quot;ClassicRetrieveUser.actionquot;
                                                                                  m ethod= quot;postquot;>
                                                        < select nam e= quot;usernam equot; id= quot;ClassicRetrieveUser_usernam equot;>
                                                        < option value= quot;Jim m yquot;> Jim m y< /option>
                                                        < option value= quot;Charlie Joequot;> Charlie Joe< /option>
                                                        < option value= quot;Maryquot; selected= quot;selectedquot;> Mary< /option>
                                                        < option value= quot;Artyquot;> Arty< /option>
                                                       < /form >
                                                     < /body>
                                                    < /htm l>




URL: /manningSampleApp/chapterEight/ClassicRetrieveUser.action
Data: username=mary
How it works: classic style

●   Browser makes request
    –   Http
    –   URL
    –   Data
●   Server
    –   Processes data
    –   Sends HTML page response
●   Browser receives, renders HTML
<html>
<head>
<link rel=quot;stylesheetquot; type=quot;text/cssquot; href=quot;css/classicUserBrowser.cssquot; />
</head>
<body>
<h2>Artist Browser Control</h2>
<form id=quot;ClassicRetrieveUserquot; name=quot;ClassicRetrieveUserquot; onsubmit=quot;return true;quot;
    action=quot;/manningSampleApp/chapterEight/ClassicRetrieveUser.actionquot; method=quot;postquot;>
<table class=quot;wwFormTablequot;>
    <tr>
        <td class=quot;tdLabelquot;><label for=quot;ClassicRetrieveUser_usernamequot; class=quot;labelquot;>Select an artist:</label></td>
        <td><select name=quot;usernamequot; id=quot;ClassicRetrieveUser_usernamequot;>
            <option value=quot;Jimmyquot;>Jimmy</option>
            <option value=quot;Charlie Joequot;>Charlie Joe</option>
            <option value=quot;Maryquot; selected=quot;selectedquot;>Mary</option>
            <option value=quot;Artyquot;>Arty</option>
        </select></td>
    </tr>
    <tr>
        <td colspan=quot;2quot;>
        <div align=quot;rightquot;><input type=quot;submitquot; id=quot;ClassicRetrieveUser_0quot; value=quot;Submitquot; /></div>
        </td>
    </tr>
</table>
</form>
<hr/>
<h2>Artist Information</h2>
<div id='console'>
<p><span class=quot;browser_labelquot;>Name:</span> Mary Greene</p>
<p><span class=quot;browser_labelquot;>PortfolioName: </span>Wood Cuts</p>
<p><span class=quot;browser_labelquot;>PortfolioName: </span>Oil Paintings</p>
</div>
</body>
</html>
Classic Problems

●   Slow
●   High bandwidth
●   Redundant
●   Page rendering
Ajax Web Applications                              {quot;artistquot;:
                                                             {
                                                                 quot;usernamequot;:quot;Maryquot;,
                                                                 quot;passwordquot;:quot;maxquot;,
                                                                 quot;portfolioNamequot;:quot;Mary's Portfolioquot;,
                                                                 quot;birthdayquot;:quot;2008-10-29 15:10:25.857MDTquot;,
                                                                 quot;firstNamequot;:quot;Maryquot;,
                                                                 quot;lastNamequot;:quot;Greenequot;,
                                                                 quot;receiveJunkMailquot;:quot;falsequot;,
                                                            }
                                                   }




URL: /manningSampleApp/chapterEight/ClassicRetrieveUser.action
Data: username=mary
How it works: Ajax

●   Browser uses Javascript to submit             request
    –   Http
    –   URL
    –   Data
●   Server
    –   Processes data
    –   Sends data response ( JSON, XML, etc. )
●   Browser Javascript
    –   Proceses data
    –   DHTML
{quot;artistquot;:
      {
             quot;usernamequot;:quot;Maryquot;,
             quot;passwordquot;:quot;maxquot;,
             quot;portfolioNamequot;:quot;Mary's Portfolioquot;,
             quot;birthdayquot;:quot;2008-10-29 15:10:25.857MDTquot;,
             quot;firstNamequot;:quot;Maryquot;,
             quot;lastNamequot;:quot;Greenequot;,
             quot;receiveJunkMailquot;:quot;falsequot;,
             quot;portfoliosquot;:{quot;entryquot;:[
                {quot;stringquot;:quot;Wood Cutsquot;, quot;manning.chapterEight.utils.Portfolioquot;:{quot;namequot;:quot;WoodCutsquot;}},
                {quot;stringquot;:quot;Oil Paintingsquot;, manning.chapterEight.utils.Portfolioquot;:{quot;namequot;:quot;Oil Paintingsquot;}}
             ]}
      }
}
Ajax Selling Points

●   Low bandwith
●   No page rendering issues
●   Supports a stronger Separation of Concerns
Observations . . .


  What does the server do?
  The page abstraction: JSP, ASP, PHP
  What should new frameworks do?
Struts 2 Architecture

●   Does all the dirty work for you
●   Separation of Concerns !!
●   Interceptors, Actions, Results, ValueStack
Daily development

●   Actions
    –   you write them
●   Results
    –   declare them
    –   write them if necessary
●   Interceptors
    –   nothing!
    –   declare or write if necessary
Configuration

●   Declare your actions
●   Declare your results
●   XML, Annotations
struts.xml
   <?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?>
   <!DOCTYPE struts PUBLIC quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//ENquot;
                                                   quot;http://struts.apache.org/dtds/struts-2.0.dtdquot;>


   <struts>


     <package name=quot;chapterEightPublicquot; namespace=quot;/chapterEightquot; extends=quot;struts-defaultquot;>


         <action name=quot;ClassicUserBrowserquot; class=quot;manning.chapterEight.UserBrowserquot;>
               <result>classicUserBrowser.jsp</result>
         </action>


     </package>


   </struts>
Let's code: classic style


     What do we need to write?
            Interceptors?
              Results?
             An Action

             A JSP Page
Let's Code: Ajax Style


     What do we need to write?
             Interceptors?
                Results?
     An Action
     A JSP Page?
     Javascript Client Application
Summary
Ajax – Lower Bandwidth
Ajax – No Page Rendering
Ajax – Javascript Client
   Struts 2 – Second Generation Framework
Ajax – JSON,Built on Software Engineering Principles
   Struts 2 – XML
   Struts 2 – Fast Development, Flexible Architecture

More Related Content

What's hot

Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web StandardsAarron Walter
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書拓樹 谷
 
Illuminated Hacks -- Where 2.0 101 Tutorial
Illuminated Hacks -- Where 2.0 101 TutorialIlluminated Hacks -- Where 2.0 101 Tutorial
Illuminated Hacks -- Where 2.0 101 Tutorialmikel_maron
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0wangjiaz
 
6주 javaScript 시작하며
6주  javaScript 시작하며6주  javaScript 시작하며
6주 javaScript 시작하며지수 윤
 
Teen Driving - Kimberly Stavropoulos
Teen Driving - Kimberly StavropoulosTeen Driving - Kimberly Stavropoulos
Teen Driving - Kimberly Stavropouloskimmymarie
 
ARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: RolloversARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: RolloversGilbert Guerrero
 
Efficient JavaScript Development
Efficient JavaScript DevelopmentEfficient JavaScript Development
Efficient JavaScript Developmentwolframkriesing
 
Clave blanca
Clave blancaClave blanca
Clave blancabapes
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsJohn Brunswick
 
BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performancedapulse
 

What's hot (20)

Findability Bliss Through Web Standards
Findability Bliss Through Web StandardsFindability Bliss Through Web Standards
Findability Bliss Through Web Standards
 
Ajax
AjaxAjax
Ajax
 
HTML_HHC
HTML_HHCHTML_HHC
HTML_HHC
 
CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書CSSプリプロセッサの取扱説明書
CSSプリプロセッサの取扱説明書
 
Illuminated Hacks -- Where 2.0 101 Tutorial
Illuminated Hacks -- Where 2.0 101 TutorialIlluminated Hacks -- Where 2.0 101 Tutorial
Illuminated Hacks -- Where 2.0 101 Tutorial
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
SlideShare Instant
SlideShare InstantSlideShare Instant
SlideShare Instant
 
We9 Struts 2.0
We9 Struts 2.0We9 Struts 2.0
We9 Struts 2.0
 
Html5 101
Html5 101Html5 101
Html5 101
 
6주 javaScript 시작하며
6주  javaScript 시작하며6주  javaScript 시작하며
6주 javaScript 시작하며
 
Teen Driving - Kimberly Stavropoulos
Teen Driving - Kimberly StavropoulosTeen Driving - Kimberly Stavropoulos
Teen Driving - Kimberly Stavropoulos
 
ARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: RolloversARTDM 170 Week 3: Rollovers
ARTDM 170 Week 3: Rollovers
 
Efficient JavaScript Development
Efficient JavaScript DevelopmentEfficient JavaScript Development
Efficient JavaScript Development
 
Html5 intro
Html5 introHtml5 intro
Html5 intro
 
Clave blanca
Clave blancaClave blanca
Clave blanca
 
Boston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on RailsBoston Computing Review - Ruby on Rails
Boston Computing Review - Ruby on Rails
 
Html5 101
Html5 101Html5 101
Html5 101
 
Cdddd
CddddCdddd
Cdddd
 
Html5
Html5Html5
Html5
 
BOOM Performance
BOOM PerformanceBOOM Performance
BOOM Performance
 

Viewers also liked

Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odpghessler
 
openHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtopenHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtKai Kreuzer
 
openHAB @ Devoxx 2012
openHAB @ Devoxx 2012openHAB @ Devoxx 2012
openHAB @ Devoxx 2012Kai Kreuzer
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IOJingfeng Liu
 
Board support package_on_linux
Board support package_on_linuxBoard support package_on_linux
Board support package_on_linuxVandana Salve
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systemsVandana Salve
 
Build your own block chain
Build your own block chainBuild your own block chain
Build your own block chainBohdan Szymanik
 
Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Priyanka Aash
 
Zigbee network
Zigbee networkZigbee network
Zigbee networkbhavithd
 
Zigbee technology ppt edited
Zigbee technology ppt editedZigbee technology ppt edited
Zigbee technology ppt editedrakeshkumarchary
 

Viewers also liked (16)

Embedded Linux Odp
Embedded Linux OdpEmbedded Linux Odp
Embedded Linux Odp
 
openHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtopenHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp Darmstadt
 
openHAB @ Devoxx 2012
openHAB @ Devoxx 2012openHAB @ Devoxx 2012
openHAB @ Devoxx 2012
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IO
 
Board support package_on_linux
Board support package_on_linuxBoard support package_on_linux
Board support package_on_linux
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
Zig Bee
Zig BeeZig Bee
Zig Bee
 
Build your own block chain
Build your own block chainBuild your own block chain
Build your own block chain
 
Basics of Vhdl
Basics of VhdlBasics of Vhdl
Basics of Vhdl
 
Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies
 
Zigbee network
Zigbee networkZigbee network
Zigbee network
 
Zigbee technology ppt edited
Zigbee technology ppt editedZigbee technology ppt edited
Zigbee technology ppt edited
 
Zigbee ppt
Zigbee pptZigbee ppt
Zigbee ppt
 
zigbee full ppt
zigbee full pptzigbee full ppt
zigbee full ppt
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 

Similar to Ajax On S2 Odp

Plone Interactivity
Plone InteractivityPlone Interactivity
Plone InteractivityEric Steele
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsWildan Maulana
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentationrailsconf
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?goodfriday
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching ResurrectedBen Scofield
 
Couch Db.0.9.0.Pub
Couch Db.0.9.0.PubCouch Db.0.9.0.Pub
Couch Db.0.9.0.PubYohei Sasaki
 
Flickr Open Api Mashup
Flickr Open Api MashupFlickr Open Api Mashup
Flickr Open Api MashupJinho Jung
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On RailsWen-Tien Chang
 
CSIS 138 Javascript Class1
CSIS 138 Javascript Class1CSIS 138 Javascript Class1
CSIS 138 Javascript Class1Teresa Pelkie
 
Grddl In A Nutshell V1
Grddl In A Nutshell V1Grddl In A Nutshell V1
Grddl In A Nutshell V1Fabien Gandon
 
Doctype htmlcodigioooooo
Doctype htmlcodigiooooooDoctype htmlcodigioooooo
Doctype htmlcodigiooooooANDERSON FABIAN
 
07 Collada Overview
07 Collada Overview07 Collada Overview
07 Collada Overviewjohny2008
 

Similar to Ajax On S2 Odp (20)

Plone Interactivity
Plone InteractivityPlone Interactivity
Plone Interactivity
 
Solr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJsSolr and symfony in Harmony with SolrJs
Solr and symfony in Harmony with SolrJs
 
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity PresentationRails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
 
Haml, Sass & Compass
Haml, Sass & CompassHaml, Sass & Compass
Haml, Sass & Compass
 
Javascript Basic
Javascript BasicJavascript Basic
Javascript Basic
 
Widgets Tools Keynote
Widgets Tools KeynoteWidgets Tools Keynote
Widgets Tools Keynote
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?Microsoft ASP.NET 4.0 : What's Next?
Microsoft ASP.NET 4.0 : What's Next?
 
Merb jQuery
Merb jQueryMerb jQuery
Merb jQuery
 
Page Caching Resurrected
Page Caching ResurrectedPage Caching Resurrected
Page Caching Resurrected
 
Couch Db.0.9.0.Pub
Couch Db.0.9.0.PubCouch Db.0.9.0.Pub
Couch Db.0.9.0.Pub
 
Seam Glassfish Slidecast
Seam Glassfish SlidecastSeam Glassfish Slidecast
Seam Glassfish Slidecast
 
JQuery 101
JQuery 101JQuery 101
JQuery 101
 
Flickr Open Api Mashup
Flickr Open Api MashupFlickr Open Api Mashup
Flickr Open Api Mashup
 
Building Web Interface On Rails
Building Web Interface On RailsBuilding Web Interface On Rails
Building Web Interface On Rails
 
Opensocial Codelab
Opensocial CodelabOpensocial Codelab
Opensocial Codelab
 
CSIS 138 Javascript Class1
CSIS 138 Javascript Class1CSIS 138 Javascript Class1
CSIS 138 Javascript Class1
 
Grddl In A Nutshell V1
Grddl In A Nutshell V1Grddl In A Nutshell V1
Grddl In A Nutshell V1
 
Doctype htmlcodigioooooo
Doctype htmlcodigiooooooDoctype htmlcodigioooooo
Doctype htmlcodigioooooo
 
07 Collada Overview
07 Collada Overview07 Collada Overview
07 Collada Overview
 

More from ghessler

Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installationghessler
 
Joomla Presentation
Joomla PresentationJoomla Presentation
Joomla Presentationghessler
 
Apache Commons Overview
Apache Commons OverviewApache Commons Overview
Apache Commons Overviewghessler
 
Overview Of Xaware
Overview Of XawareOverview Of Xaware
Overview Of Xawareghessler
 
Gimp In Hollywood
Gimp In HollywoodGimp In Hollywood
Gimp In Hollywoodghessler
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixghessler
 

More from ghessler (7)

Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installation
 
Joomla Presentation
Joomla PresentationJoomla Presentation
Joomla Presentation
 
Apache Commons Overview
Apache Commons OverviewApache Commons Overview
Apache Commons Overview
 
Overview Of Xaware
Overview Of XawareOverview Of Xaware
Overview Of Xaware
 
Gimp In Hollywood
Gimp In HollywoodGimp In Hollywood
Gimp In Hollywood
 
JCatapult
JCatapultJCatapult
JCatapult
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMix
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Ajax On S2 Odp

  • 2. About Myself ● Chad Davis ● Blackdog Software, Inc. ● J2EE Consulting ● Corporate Training ● Struts 2 in Action ● Open Source Enthusiast ● Debian Devotee
  • 3. Road Map ● Something for everyone ● Struts 2 introduction ● Ajax introduction ● Walk through a code sample ● Questions at any time
  • 4. Struts 2 ● Web application framework ● Java Servlets ● Second generation ● Software engineering
  • 5. Classic versus Ajax Classic Web Applications • Ajax Web Applications •
  • 6. Classic Web Applications < htm l> < head> < link rel= quot;stylesheetquot; type= quot;text/cssquot; href= quot;css/ajaxUserBrowser.cssquot; /> < /head> < body> < h2> Artist Browser Control< /h2> < form nam e= quot;ClassicRetrieveUserquot; action= quot;ClassicRetrieveUser.actionquot; m ethod= quot;postquot;> < select nam e= quot;usernam equot; id= quot;ClassicRetrieveUser_usernam equot;> < option value= quot;Jim m yquot;> Jim m y< /option> < option value= quot;Charlie Joequot;> Charlie Joe< /option> < option value= quot;Maryquot; selected= quot;selectedquot;> Mary< /option> < option value= quot;Artyquot;> Arty< /option> < /form > < /body> < /htm l> URL: /manningSampleApp/chapterEight/ClassicRetrieveUser.action Data: username=mary
  • 7. How it works: classic style ● Browser makes request – Http – URL – Data ● Server – Processes data – Sends HTML page response ● Browser receives, renders HTML
  • 8. <html> <head> <link rel=quot;stylesheetquot; type=quot;text/cssquot; href=quot;css/classicUserBrowser.cssquot; /> </head> <body> <h2>Artist Browser Control</h2> <form id=quot;ClassicRetrieveUserquot; name=quot;ClassicRetrieveUserquot; onsubmit=quot;return true;quot; action=quot;/manningSampleApp/chapterEight/ClassicRetrieveUser.actionquot; method=quot;postquot;> <table class=quot;wwFormTablequot;> <tr> <td class=quot;tdLabelquot;><label for=quot;ClassicRetrieveUser_usernamequot; class=quot;labelquot;>Select an artist:</label></td> <td><select name=quot;usernamequot; id=quot;ClassicRetrieveUser_usernamequot;> <option value=quot;Jimmyquot;>Jimmy</option> <option value=quot;Charlie Joequot;>Charlie Joe</option> <option value=quot;Maryquot; selected=quot;selectedquot;>Mary</option> <option value=quot;Artyquot;>Arty</option> </select></td> </tr> <tr> <td colspan=quot;2quot;> <div align=quot;rightquot;><input type=quot;submitquot; id=quot;ClassicRetrieveUser_0quot; value=quot;Submitquot; /></div> </td> </tr> </table> </form> <hr/> <h2>Artist Information</h2> <div id='console'> <p><span class=quot;browser_labelquot;>Name:</span> Mary Greene</p> <p><span class=quot;browser_labelquot;>PortfolioName: </span>Wood Cuts</p> <p><span class=quot;browser_labelquot;>PortfolioName: </span>Oil Paintings</p> </div> </body> </html>
  • 9. Classic Problems ● Slow ● High bandwidth ● Redundant ● Page rendering
  • 10. Ajax Web Applications {quot;artistquot;: { quot;usernamequot;:quot;Maryquot;, quot;passwordquot;:quot;maxquot;, quot;portfolioNamequot;:quot;Mary's Portfolioquot;, quot;birthdayquot;:quot;2008-10-29 15:10:25.857MDTquot;, quot;firstNamequot;:quot;Maryquot;, quot;lastNamequot;:quot;Greenequot;, quot;receiveJunkMailquot;:quot;falsequot;, } } URL: /manningSampleApp/chapterEight/ClassicRetrieveUser.action Data: username=mary
  • 11. How it works: Ajax ● Browser uses Javascript to submit request – Http – URL – Data ● Server – Processes data – Sends data response ( JSON, XML, etc. ) ● Browser Javascript – Proceses data – DHTML
  • 12. {quot;artistquot;: { quot;usernamequot;:quot;Maryquot;, quot;passwordquot;:quot;maxquot;, quot;portfolioNamequot;:quot;Mary's Portfolioquot;, quot;birthdayquot;:quot;2008-10-29 15:10:25.857MDTquot;, quot;firstNamequot;:quot;Maryquot;, quot;lastNamequot;:quot;Greenequot;, quot;receiveJunkMailquot;:quot;falsequot;, quot;portfoliosquot;:{quot;entryquot;:[ {quot;stringquot;:quot;Wood Cutsquot;, quot;manning.chapterEight.utils.Portfolioquot;:{quot;namequot;:quot;WoodCutsquot;}}, {quot;stringquot;:quot;Oil Paintingsquot;, manning.chapterEight.utils.Portfolioquot;:{quot;namequot;:quot;Oil Paintingsquot;}} ]} } }
  • 13. Ajax Selling Points ● Low bandwith ● No page rendering issues ● Supports a stronger Separation of Concerns
  • 14. Observations . . . What does the server do? The page abstraction: JSP, ASP, PHP What should new frameworks do?
  • 15. Struts 2 Architecture ● Does all the dirty work for you ● Separation of Concerns !! ● Interceptors, Actions, Results, ValueStack
  • 16.
  • 17. Daily development ● Actions – you write them ● Results – declare them – write them if necessary ● Interceptors – nothing! – declare or write if necessary
  • 18. Configuration ● Declare your actions ● Declare your results ● XML, Annotations
  • 19. struts.xml <?xml version=quot;1.0quot; encoding=quot;UTF-8quot; ?> <!DOCTYPE struts PUBLIC quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//ENquot; quot;http://struts.apache.org/dtds/struts-2.0.dtdquot;> <struts> <package name=quot;chapterEightPublicquot; namespace=quot;/chapterEightquot; extends=quot;struts-defaultquot;> <action name=quot;ClassicUserBrowserquot; class=quot;manning.chapterEight.UserBrowserquot;> <result>classicUserBrowser.jsp</result> </action> </package> </struts>
  • 20. Let's code: classic style What do we need to write? Interceptors? Results? An Action A JSP Page
  • 21. Let's Code: Ajax Style What do we need to write? Interceptors? Results? An Action A JSP Page? Javascript Client Application
  • 22. Summary Ajax – Lower Bandwidth Ajax – No Page Rendering Ajax – Javascript Client Struts 2 – Second Generation Framework Ajax – JSON,Built on Software Engineering Principles Struts 2 – XML Struts 2 – Fast Development, Flexible Architecture

Editor's Notes

  1. Plus images, css, etc.This is a very small page.
  2. show amazon page refresh
  3. XMLHttpRequest