Struts presentation

2,052 views

Published on

Struts Presentation

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,052
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
63
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Struts presentation

  1. 1. Formatvorlage des Untertitelmasters durch Klicken bearbeiten Struts Web Technologies – Struts – WS 2010/11 Felix Matenaar, Ivan Golod Patrick Schlebusch, Petru Nicolaescu
  2. 2. 18.11.10 Web Technologies History  Server-side for dynamic web pages and web applications:  Common Gateway Interface – CGI  Overloaded server  ISAPI and Apache DSO  ASP  Java  JavaServer Pages – JSP  Java servlets Web Technologies1
  3. 3. 18.11.10 Web Technologies Motivation  Model 1:  JSP handles all responsibilities:  Processing request  Validating data  Handling business logic  Generating response  Good for small projects  Disadvantage:  Page design is intermixed with business logic  Inadmissible for big projects Web Technologies2
  4. 4. Web Technologies3 22.11.2010 Web Technologies MVC ViewModel Controller  Model 2:  Separates display of content from business logic  Model-View-Controller Pattern  Invented in Smalltalk at Xerox  Model - behavior and data  View - renders the model  Controller – receives input and initiates a response
  5. 5. 18.11.10 Web Technologies What is Struts?  Framework for MVC in Java Web Applications  Components:  Extensible controller implementation  Front controller  Own servlets realize actual functionality  Tag libraries for the JSPs  HTML Forms  Internationalization  AJAX Web Technologies4
  6. 6. 18.11.10 Web Technologies MVC In Struts Web Technologies5 View JSP Tags Model Java Beans Controller ActionServlet Action struts-config.xml ActionForm
  7. 7. 18.11.10 Web Technologies Architecture & Request Life Cycle Web Technologies6 Front Controller Action Template (e.g. JSP) Configuration request response Provided by Struts Created by developer Interceptor (Struts 2) Tags result
  8. 8. 18.11.10 Web Technologies Action; Action Form  The Action class  execute() : ActionForward  ActionForward, associated with current request  Configuring the action classes  The ActionForm  Associated with html form  Respects JavaBean specification Web Technologies7
  9. 9. 18.11.10 Web Technologies Configuration File: struts-config.xml  Available under “WebContentWEB-INF”  ActionForm declaration  Action Mappings  General mapping  any request to a resource with .do extension will be taken by Struts’ ActionServlet Web Technologies8
  10. 10. A whole bunch of frameworks Web Technologies9 Django Ruby on Rails Zend Solarphp Typo3 Google Web Tookit Struts Web2py 18.11.10
  11. 11. Criteria Web Technologies10  performance  user feeling  infrastructure costs  security  availability  data loss → image loss  development speed  time to market  always offer latest technology Not only the framework design but also the programming Language influence the applicability 18.11.10
  12. 12. Cursory comparison Web Technologies11 Criteria Struts Django Zend Rails Language Java Python PHP Ruby Typing Strict Duck Duck Duck Concept MVC MVC MVC MVC Performance ++ - - - Security o + - - ++ 18.11.10
  13. 13. Summary  Big projects should separate business logic and presentation  Struts is an MVC framework  Java  Scalable  Controller -> Actions  View -> JSP 18.11.1012
  14. 14. The end Thank you! 18.11.10
  15. 15. 18.11.10 Web Technologies Literature  http://struts.apache.org Framework Download, Documentation, Tutorials, etc..  Ian Roughley - „Starting With Struts 2“ (http://www.infoq.com/minibooks/starting-struts2)  James Holmes - „Struts: The Complete Reference“  http://www.javauc.com/java/727

×