© 2008 IBM Session ID: D19 Session Title: Annotated Portal Development with RAD and Spring Speaker(s): Ken Sipe, Technology Director, Perficient Peter.

Slides:



Advertisements
Similar presentations
© 2009 IBM Corporation iEA16 Defining and Aligning Requirements using System Architect and DOORs Paul W. Johnson CEO / President Pragmatica Innovations.
Advertisements

© 2009 IBM Corporation SDP023 Extending Rational Team Concert 2.0 Jean-Michel Lemieux Team Concert PMC Jazz Source Control Lead IBM Rational Software Ottawa,
® IBM Software Group © 2010 IBM Corporation Rational Publishing Engine and Rational Change configuration Francisco López Minaya Rational Technical Solution.
Apache Struts Technology
RTC Agile Planning Component
Indianapolis Java User Group JSR-168 Portal Presentation Introduction: Kurt Desserich.
® IBM Software Group © 2007 IBM Corporation Achieving Harmony IBM's Platform and Methodology for Systems Engineering and Embedded Software Development.
Java Portlets (JSR-168) SSE USTC Qing Ding.
® IBM Software Group © 2013 IBM Corporation Innovation for a smarter planet Timeboxes in a New Paradigm of Behavior Modeling Barclay Brown, ESEP IBM
© 2011 IBM Corporation Overview on Modeling RESTful Services August, 2011 Manoj Paul, Software Developer, Rational,
© 2008 IBM Lotus Quickr Master Class: Lotus Quickr Master Class: Introduction and Roadmap John F. Schumacher, Director Development Lotus Quickr and Collaborative.
® IBM Software Group © 2012 IBM Corporation OPTIM Data Studio – Jon Sayles, IBM/Rational November, 2012.
Indianapolis Java User Group Portal Presentation - Part 2 Introduction: Kurt Desserich.
© 2014 IBM Corporation The insights to transform the business with speed and conviction Kevin Redmond Head of Information Management Central & Eastern.
Copyright © 2012 Accenture All Rights Reserved.Copyright © 2012 Accenture All Rights Reserved. Accenture, its logo, and High Performance Delivered are.
Copyright © IBM Corp., All rights reserved; made available under the EPL v1.0 | March 20, 2008 | Short Talk Standards based systems management: An.
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
© 2008 IBM Session ID: D08 Session Title: Streamlining WebSphere Portlet Factory & Dashboard Engagements Speakers: Usman Memon & Abhishek Singh WebSphere.
Copyright © IBM Corp., All rights reserved. This presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. OpenDocument Format.
© 2009 IBM Corporation ® IBM Lotus Notes and Domino Product Roadmap April 2009.
Copyright © IBM Corp., All rights reserved; made available under the EPL v1.0 | March 19, 2008 | Short Talk Extending TPTP for TTCN-3 Paul Slauenwhite.
1 ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1 Building Portlets with ColdFusion Pete Freitag Foundeo, Inc.
© 2009 IBM Corporation Select View/Master/Slide Master to add Session Number Here The Enterprise Architecture Workspace: Your Architecture Blueprint Martin.
IBM ISPF Productivity Tool © 2008 IBM Corporation IBM ISPF Productivity Tool for z/OS V 5.10 More Than Just ISPF.
IBM Software Group ® Jazz Storage Service Thomas.
© 2008 IBM Corporation IBM Software Group An IBM Proof of Technology Discovering the value of IBM WebSphere Portal V6.1 WebSphere Portal v6.1 開發訓練 Elvin.
June 5–9 Orlando, Florida IBM Innovate 2011 Session Track Template Rainer Ersch Senior Research Scientist Siemens AG ALM-1180.
Click to add text © 2012 IBM Corporation 1 Visualization of View Data Susan L. Cline SWS Visualization.
© 2008 IBM Session ID: D10 Session Title: Rapidly Create Widgets for Use in Business Mashups on IBM Mashup Center with Lotus Widget Factory Speaker: Jonathan.
Session AC23 IBM Rational Software Development Conference 2008 © 2007 IBM Corporation ® UML to EGL without writing code and deploy as Java or COBOL Reginaldo.
STORY TITLE Product futures are directional in nature and does not imply any product plan commitment on the part of IBM. Plans are subject to change at.
Copyright © IBM Corp., Introduction to the Eclipse™ Babel Project Kit Lo IBM™ Corporation.
IBM Software Group ® Process Sequence to call ProcessAdminService from browser Thomas.
Copyright 2007 SpringSource. Copying, publishing or distributing without express written permission is prohibited. Spring MVC Essentials Getting started.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
Spring and DWR Frameworks for Rich Web Enterprise Application Thomas Wiradikusuma Presentation to the 20 th.
© 2015 IBM Corporation Big Data Journey. © 2015 IBM Corporation 2.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Click to add text © 2012 IBM Corporation 1 InfoSphere Streams Streams Console Applications InfoSphere Streams Version 3.0 Warren Acker InfoSphere Streams.
IBM eServer iSeries © 2003 IBM Corporation ™™ iSeries Solutions for Business Continuity IBM eServerJ iSeriesJ © 2003 IBM Corporation.
® IBM Software Group © 2011 IBM Corporation Innovation for a smarter planet IBM SOA Overview for MITRE “Driving SOA Program Success and Efficiency” April.
© 2012 IBM Corporation IBM Security Systems 1 © 2012 IBM Corporation Cloud Security: Who do you trust? Martin Borrett Director of the IBM Institute for.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
Brad Adams IBM Software, Rational 05/13/14
Domino iSeries Multi-Versioning © 2002 IBM Corporation | Lotus software © 2002 IBM Corporation Domino Multi-Versioning Mike Gordon – IBM Global Services.
Click to add text © 2012 IBM Corporation Session # INV305 Getting beyond “good enough” with Microsoft Sharepoint Louis Richardson Worldwide Social Business.
© 2013 IBM Corporation IBM UrbanCode Deploy v6.0.1 Support Enablement Training Source Configuration and Database Upgrades Michael Malinowski
IBM Software Group ® Jazz Team Build – Part 1 Overview Jonathan.
© 2013 IBM Corporation LDAP Fundamentals & LDAP for CLM Bruce Besch IBM Rational Services.
© 2013 IBM Corporation IBM Security Systems © 2012 IBM Corporation Offense Magnitude.
IBM Innovate 2012 Title Presenter’s Name Presenter’s Title, Organization Presenter’s Address Session Track Number (if applicable)
Comparison between EPF Composer and Rational Method Composer
© 2013 IBM Corporation IBM UrbanCode Deploy v6.0 Support Enablement Training Jenkins plug-in 1 November 2013.
IBM Software Group ® Jazz Process Component —Process Template Management Thomas.
European Mobility & Endpoint Security User Group.
Work smarter, keep connected with Lotus Software Jon Crouch | Senior Technical Specialist, Lotus Software Matt Newton | Senior Technical Specialist, Lotus.
Lotus Domino Document Manager: Next Steps Jelan Heidelberg, Offering Manager Dave Kajmo, Product Manager
David Hatten Developer, UrbanCode 17 October 2013
Sri Vatsav Konreddy CIS 764 FALL 2007
Kristy Foster – L2 Software Engineer March 18, 2014
Deploy Plugins Developer 29 October 2013
Quickr Domino – Master Class
Integrating Data With Cognos
IBM Blockchain An Enterprise Deployment of a Distributed Consensus-based Transaction Log Ben Smith & Kostantinos Christidis 1 ©2016 IBM Corporation.
Embedded Software (ESW) Engineering Practices Introduction
Presentation transcript:

© 2008 IBM Session ID: D19 Session Title: Annotated Portal Development with RAD and Spring Speaker(s): Ken Sipe, Technology Director, Perficient Peter Blinstrubas, IBM Americas Portal Leader WebSphere Portal Technical Conference U.S. 2008

STORY TITLE WebSphere Portal Technical Conference U.S Abstract  This session will show off the paradigm shift in portlet development which comes with Spring annotations.  The session will also demonstrate how to unit test the portlets without a portal server running.  This session is intended for developers already familiar with portlet development who want to improve their productivity and test their work 2

STORY TITLE WebSphere Portal Technical Conference U.S Agenda  Portlets  Anatomy of a Portlet  Productivity Pain Points  Annotations  What are Annotations?  Spring  What is Spring  Spring 2.5 Annotations  Portlet + Spring Annotation Development  Better Development Paradigm  Better Testing Paradigm 3

© 2008 IBM Portal and Portlets 4

STORY TITLE WebSphere Portal Technical Conference U.S Portal Anatomy - External 5

STORY TITLE WebSphere Portal Technical Conference U.S Portlet Anatomy - Internal These interfaces shape your role in the container and resources available from the container  Portlet  PortletConfig  PortletContext  PortalContext

STORY TITLE WebSphere Portal Technical Conference U.S Portlet Interface 7

STORY TITLE WebSphere Portal Technical Conference U.S Portlet Functionality  Similar to Servlets  Managed by container  Generate dynamic content  Life-cycle managed  Differences from Servlets  Generate Markup fragments  Not Directly addressable  Persistence storage for preferences  Request Processing  Portlet Modes  Window State Minimized, etc.  User Information 8

STORY TITLE WebSphere Portal Technical Conference U.S Portlet Coding Difference 1: Request Processing  Request processing comes in two forms:  Action Requests  Render Requests  Each client request invokes at most one action request  Each client request may invoke any number of render requests, depending on layout, caching, and other factors  A portlet may be rendered many times between action requests  Unlike servlets, portlets are not bound to a logical location (URL)

STORY TITLE WebSphere Portal Technical Conference U.S Portlet Modes  View mode  doView(…)  Normal Display  Edit mode  doEdit(…)  Configuration mode of the portlet Location details Personal preferences  Help mode  doHelp(…)

© 2008 IBM Simple HelloWorld Portlet Example 11

STORY TITLE WebSphere Portal Technical Conference U.S Portal Tool Features v7.x Streamlined Portlet Wizard Co-operative Wizard Usability improvement. Enhanced Credential Vault Support. JSR 168 and JSR 286

STORY TITLE WebSphere Portal Technical Conference U.S Hello World Portlet public class HelloWorld extends GenericPortlet { protected void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType(“text/html”); response.getWriter().println(“Hello Portlet”); }

STORY TITLE WebSphere Portal Technical Conference U.S Pain Points  Code Dependency on Portlet  Not POJO  Management and Dependency on the View Technology  Execution Model  Action Request  Render Request  Portlet Modes  View  Edit  Help

© 2008 IBM Spring Spring MVC Portal 15

STORY TITLE WebSphere Portal Technical Conference U.S What is Spring?  IoC  Generic Bean Factory  Abstraction from other frameworks  Removes croft from developer code  Provides typology freedom Develop on Tomcat, deploy to WebSphere  Provides Testability No need for in the container testing Framework ties are in the spring framework 16

STORY TITLE WebSphere Portal Technical Conference U.S Heart of Spring MVC  DispatcherPortlet  Defined in the portlet.xml file  Controller for portlet  Multiple may be defined in a single portlet.xml file  Name of defined portlet is the key to the configuration file (by default) springportlet-portlet.xml

STORY TITLE WebSphere Portal Technical Conference U.S Spring Portlet XML File  Defines Controller and other Spring Beans  Maps Controller for each mode

STORY TITLE WebSphere Portal Technical Conference U.S Spring Portlet Controller import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import org.springframework.web.portlet.ModelAndView; import org.springframework.web.portlet.mvc.AbstractController; public class ViewController extends AbstractController { protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response) throws Exception { return new ModelAndView("View"); }

STORY TITLE WebSphere Portal Technical Conference U.S Spring View Mapping <bean id="viewResolver“ class= "org.springframework.web.servlet.view.InternalResourceViewResolver"> org.springframework.web.servlet.view.JstlView /WEB-INF/jsp/.jsp

STORY TITLE WebSphere Portal Technical Conference U.S Changes to Web.xml  ContextLoaderListener  Listener to bootstap spring  ViewRendererServlet  Front Controller for Spring Portlet MVC

STORY TITLE WebSphere Portal Technical Conference U.S Spring applicationContent.xml  Required by ViewRendererServlet  Provides Shared Spring beans across portlets

STORY TITLE WebSphere Portal Technical Conference U.S Spring Portlet MVC Setup  Jars:  Spring Spring.jar, spring-webmvc-portlet.jar  Logging Commons-logging.jar, log4j jar  Web Jstl.jar, standard.jar  Create portlet Configuration  Configure for Spring  Portlet.xml with DispatcherPortlet  Spring xml *-portlet.xml  applicationContext.xml  Configure web.xml  Create Controller  Create Views

STORY TITLE WebSphere Portal Technical Conference U.S Spring Portlet Benefits  Separates Portlet from View Technology  Spring Enables the Portlet  After Spring Wiring  Simple Code Model Controller for multiple portlet modes Controller for each portlet mode 24

© 2008 IBM Spring 2.5 Annotations 25

STORY TITLE WebSphere Portal Technical Conference U.S Java 5+ Annotations  Java 5 Introduces Annotations  New Type of Interface  Provides Metadata for:  Compile time  Runtime  Language Provides  Built-in  Ability to Define Custom Annotations  Annotation Author { String name(); }  Annotation ( name = "John Doe" ) public class OrderDAO { // class code goes here } 26

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 Annotations  JSR  JAX-WS 2.0’s  EJB 3.0  Test Enhancements - Junit 4.4 and TestNG   Spring enhancements  AOP  MVC 27

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 Context Annotations  Indicates the scope to use for annotated class instances  Default == “singleton”  Options: Singleton Prototype  Web Options: Request Session Global session

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 Stereotypes **  Indicates that a class is a component  Class is a candidate for auto-detection  Custom component extensions  Specialized Component  Typically used with RequestMapping annotation  Discussed in section on web mvc  2.0 stereotype… previously mentioned  Now an extension  Intended to be a business service facade

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 Factory Annotations  Marks a constructor, field, setter or config method for injection.  Fields are injected After construction Before config methods  Config: AutowiredAnnotationBeanPostProcessor  Marks class as being eligible for Spring-driven configuration  Used with AspectJ  Qualifies a bean for autowiring  May be customized  Marks a method as being injection required

© 2008 IBM A World with No Editor Support 31

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 MVC Annotations  Stereotype used to “Controller” of MVC  Scanned for RequestMappings  Annotates a handler method for a request  Very flexible  Annotates that a method parameter should be bound to a web request parameter  SessionAttributes  Marks session attributes that a handler uses

STORY TITLE WebSphere Portal Technical Conference U.S Extreme Flexibility  Parameters can be  Request / response / session  WebRequest  InputStream  OutputStream  +++  Return types  ModelAndView Object  Model Object  Map for exposing model  View Object  String which is a view name  Void… if method wrote the response content directly

STORY TITLE WebSphere Portal Technical Conference U.S Spring 2.5 Controller public class ConfController private confDB public String showSessionList(ModelMap model) { model.addAttribute("sessions", this.confDB.getSessions()); return "sessionList"; public void String name, OutputStream outputStream) throws IOException { this.confDB.getSpeakerImage(name,outputStream); public String clearDB() { this.confDB.clear(); return "redirect:sessionList"; }

STORY TITLE WebSphere Portal Technical Conference U.S Compare Controllers  Spring w/o annotations  Spring w/ annotations

STORY TITLE WebSphere Portal Technical Conference U.S Testing – Here is your Portlet  Any Problems testing this code? 36

STORY TITLE WebSphere Portal Technical Conference U.S Spring 3.X – What’s Coming?  JSR-286 Portlet Support  Java 5+ Only  Remove all pre-JDK 5 Dependencies 37

STORY TITLE WebSphere Portal Technical Conference U.S Summary  IBM WebSphere Portal Server  #1 portal container in the enterprise  Spring  #1 IoC container and glue of architecture  Enables continuous integration  Future of Development  Annotations  Code by convention instead of configuration 38

STORY TITLE WebSphere Portal Technical Conference U.S Additional Information and Resources WebSphere Portal – IBM Site WebSphere Portal Business Solutions Catalog: Websphere Portal Developer’s Zone Product Documentation and WebSphere Portal Wiki Education WebSphere Portal 6.0 DemoNet

STORY TITLE WebSphere Portal Technical Conference U.S Session ID:D19 Session:Annotated Portal Development with RAD and Spring Presenter(s):Ken Sipe, Technology Director, Perficient, Inc. Peter Blinstrubas, IBM Americas Portal Leader Please take a few minutes to fill out the session survey. Thank you Mark your calendars! 2009 U.S. WebSphere Portal Technical Conference October 12-15, 2009, Sheraton San Diego Hotel and Marina WebSphere Portal Technical Conference U.S. 2008

STORY TITLE WebSphere Portal Technical Conference U.S © IBM Corporation 2008 All Rights Reserved. The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. IBM, the IBM logo, WebSphere, Lotus, Lotus Notes, Domino, Quickplace, Sametime, Workplace and Quickr are trademarks of International Business Machines Corporation in the United States, other countries, or both. Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. All references to Renovations Inc. refer to a fictitious company and are used for illustration purposes only.