Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Zero to Portlet in 20 minutes or less


Published on

Lotusphere 2009
Session BP113
Zero to Portlet in 20 minutes or less
Paul T. Calhoun | CTO | NNSU

Work Smarter Not Harder – The Portlet Factory Demystified
Zero to Portlet – Don't Blink !!
The Details – The Nitty Gritty
References – Places to get more info
Q & A

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Zero to Portlet in 20 minutes or less

  1. 1. BP113Zero to Portlet in 20 minutes or lessPaul T. Calhoun | CTO | NNSU ®
  2. 2. Your Presenter – This Is Me! Paul T. Calhoun Chief Technology Officer NetNotes Solutions Unlimited Im a Speaker, Trainer and Consultant who provides customer- focused knowledge transfer and consulting to businesses worldwide. I currently develop solutions using Domino, Web, Java, and XML for customers using Domino, Portlet Factory, WebSphere and Eclipse. I co-authored the IBM Redbook “XML Powered by Domino,” and have developed several online courses for both Application Development as well as System Administration. I have spoke at technical conferences worldwide and published over a dozen articles in leading publications.
  3. 3. Agenda Work Smarter Not Harder – The Portlet Factory Demystified Zero to Portlet – Dont Blink !! The Details – The Nitty Gritty References – Places to get more info Q&A
  4. 4. Work Smarter Not Harder How do you develop applications today ?  Write  Compile  Test  Repeat (Until the project is finished or the End of Time, whichever comes first) How much of your code is re-usable ?  Can you re-factor that application you wrote for the sales department to be used by the HR department ? – How quickly ? What if there was a tool that allowed you to work SMARTER not HARDER ?  Insert Drum Roll here
  5. 5. Introducing the IBM Portlet Factory The IBM Portlet Factory is a Rapid Application Development environment that allows for the creation of Web Applications and Portlets without having to write any code. These applications can then be massively customized to provide different user experiences with the use of profiled input.
  6. 6. So What Exactly is the Portlet Factory ?  Creates WEB APPLICATIONS that can be PORTLET enabled very easily  Designer client that plugs into existing IDE’s  Rational Application Developer  Eclipse  Rapid Application Development Environment  Zero Code Development  Portlet Factory generates ALL the code for you  No, you CAN NOT alter the GENERATED code  No, to the best of my knowledge, you will never be able to modify the generated code  Allows for the MASSIVE customization of applications via PROFILING at runtime
  7. 7. Terminology Portlet Factory – The application design environment enabled as a plug in to IDE’s like Rational and Eclipse Factory Project – Top level container for Portlet Factory elements (Models, supporting HTML, XML, CSS files  A project can contain “N” number of models Model – Container for all application functionality represented as an XML structure of the complete Web Application  Models are made up of Builders
  8. 8. Terminology Builder – Component that provides specific application functionality to the Model Profiling – The ability to dynamically alter the Application at runtime Profile Sets – Container for the dynamic values that alter the Application at runtime Profile Entry – Specific profiled builder input
  9. 9. Deployment Architecture Applications are deployed as standard JEE WAR files  To the Web Application Server  Websphere – Application Server (5.x, 6.x) – Community Edition (1.1, 2.0)  Tomcat  To the Portal Server  Websphere (6.x) All necessary code is deployed with the WAR file  No additional configuration is required on the WAS/Portal server
  10. 10. Versions  Latest and Greatest  6.1 – Fixpak 1  Historical  6.0 – 6.0.1 – 6.0.2 – 6.0.3  5.x
  11. 11. Historical Note  IBM acquired “The Factory” from an IBM Business partner by the name of BowStreet  You will still find many of the back end underlying objects use the com.bowstreet namespace
  12. 12. Zero to Portlet  Get Ready...  Get Set...  GO !!!!!! 12 11 1 10 2 9 3 8 4 7 5 6
  13. 13. The Nitty Gritty  That was really fast !!!!  Then again, thats the whole point !!  Lets look at what we did  IDE – Eclipse  Project – Container for all Factory Resources  Models – Container for application specific functionality contributed by builders  Testing – As a web application (WebSphere Application Server or WASCE) – As a portlet (WebSphere Portal Server)
  14. 14. Integrated Development Environment Rational Developer  If you already have Rational Installed and use it for all development then this is an option  Less flexible than using Eclipse Eclipse (Recommended)  When installing The Factory, choose the Option “With Eclipse” to install with its own copy of Eclipse  More flexible – Allows for multiple instances of The Factory to be installed on the same computer
  15. 15. Projects – A place to put your stuff  Projects contain all of the resources for a portlet factory application  Models  Profile Sets  Java Source code  Web Content – HTML – CSS – Graphics – Javascript – XML – XSD – XML Schemas
  16. 16. Projects use Server Deployment Configurations  When creating your first project you define the Deployment Configurations for  Application Server  Portal Server  Servers need to be up and running before you create the deployment configuration
  17. 17. Application Server  Tests your code as a WEB APPLICATION in the defined web browser  Code is auto-deployed to the defined server  Can be  Rational WAS Test Server  Apache Tomcat  WAS CE (Recommended)  WebSphere Application Server
  18. 18. Portal Server  Tests your code as a PORTLET  Deployment  Auto-deployed – Code is auto deployed to configured Portal Server  Create Local WAR (Recommended) – Code is written to a local WAR file and deployed via the Portals Admin Console
  19. 19. Models – Where all the fun takes place  All the application functionality exists in Models  Functionality is added to models via Builders  Builders add specific application functionality to a Model  Actions and Events  Data Integration  Formatting and Visibility  JSP  Java  Navigation and Page Actions  Page Elements  SQL  Rich UI – AJAX  Services  Variables
  20. 20. Builders are your API  Models are comprised of “N” number of builders  Builders are The Factorys API  Learn these first – Use the WIKIs and on-line help  Like any other language you will use 20% of the builders 80% of the time
  21. 21. The Builder Picker  As you learn The Factory add the builders you use the most often to your favorites  This will make creating your next model much easier
  22. 22. Accessing Data  Using the core builders that ship with The Factory you can access any JDBC data source  Must be defined as a JNDI resource on the WAS/PORTAL server  Project deployment configuration must point to that server in order to read JNDI names in builders  Use the testDataSourceConnection.jsp in the WebContent/factory/util folder – This allows you to test the JNDI name prior to accessing it with builders
  23. 23. Using the Service / Consumer Architecture  Accessing RDBMS data is best done using a Service / Consumer architecture  This separates the access of the data from the display of the data  The foundation for Service Oriented Architectures (SOAs)  A single service model can provide data to single or multiple consumer models Service Consumer Model Service Service Service Service Provider Consumer Provider Consumer Model Model Model Model Service Consumer Model
  24. 24. Service Model  Create a Service Model that accesses the data using the following builders  SQL Datasource – Connects the factory to the Servers JNDI data source  SQL Call – There will be “N” number of SQL calls – One for each unique call type  Service Definition – Exposes this model to service consumer models – Allows for implementing a “Test Harness” to test the service operations  Service Operation – Define one service operation for every SQL call ● These become the public “callable” interface to the consumer models
  25. 25. Consumer Model Create a Consumer Model that calls the “public” methods of the Service Model using the following builders  Service Consumer – Expose all of the public methods defined in the Service model or just a sub-set  Then use the page and data modifier builders to display the results of the public methods from the service model – View and Form – Data Column Modifier  Portalize the Consumer Model by adding a single additional builder – Portlet Adapter
  26. 26. What about Domino ? To access a Domino Server from The Factory  The DIIOP sever task needs to be running  Enable “Allow HTTP clients to browse databases”  A generic user id with an internet password
  27. 27. Enable the Domino Builders  The Domino Builders are enabled via a Feature set either during or after project creation
  28. 28. Set the Domino Server access in the properties file  Copy the default properties file and edit the copy  Use the FQN of the Domino Server and a service ID with an internet password # For SeverName, specify the Domino hostname and port that can be # used to fetch the CORBA IOR. # Username and Password are required for either version. UserName=Professor Notes Password=password
  29. 29. Use the Domino View and Form builder  The Domino View and Form builder  Allows you to access a Domino View  Allows access to documents with the ability to – Create – Read – Edit – Delete  Use the same modifiers used when accessing RDBMS data  Data Column Modifier  Field Modifier  Etc.  Add the Portlet Adapter builder to “Portalize” the application
  30. 30. Testing – Does it Work ?  A default run configuration called “Active Model” is created during the Portlet Factory installation  This will allow you to run the currently open model from a single run configuration  Test your application using the Web Server first  The majority of your functionality testing does NOT require the Portal Server  The only time you need to deploy to the Portal server is when testing Portlet specific functionality  Edit Mode  Config Mode  Interactive Portlets (Cooperative Portlets)
  31. 31. Final Thoughts  The Portlet Factory is A tool, not THE tool  The more you know about the following the better Factory developer you will be  Java  XML  XSD Schemas  HTML  CSS  Javascript  You can leverage existing code you have  The Factory generates the majority of the code, that does not mean you will never need to write some code  Finally – Think of what you could do if you had more than 20 min !!!
  32. 32. Wrap up Other Portlet Factory Sessions  AD503 - Using IBM WebSphere Portlet Factory and IBM Rational Application Developer for Portlet and Portal Site Development  AD504 - Best Practices for Creating IBM WebSphere Portal Applications with WebSphere Portlet Factory  AD505 - Dashboards - The "Superhero" of Portal Tools  AD506 - IBM Dashboard Accelerator -- Build Once, Deploy Anywhere
  33. 33. Resources Portlet Factory WIKI  Developerworks  Portlet Factory Zone   Forums  +Factory+forums+on+developerWorks  Product Documentation  proddoc.html
  34. 34. Resources Davelan Top Gun Portlet Factory Courses   Booth # 713 The Learning Continuum Corporation 
  35. 35. Resources Learning Portlet Factory  Official IBM Curriculum  WP416 – IBM WebSphere Portlet Factory V6.0.1: Developer Fundamentals  WP516 – IBM WebSphere Portlet Factory V6.0.1: Advanced Developer Topics  WP520 – Using IBM WebSphere Dashboard Framework 6  Familiarize your self with ALL of the builders via the Builder help and WIKIs  Samples and Tutorials  Download and review all the samples and tutorials available from the Documentation and wiki sites  Review Sample code added as part of a Feature Set  Review and participate in the Portlet Factory forums
  36. 36. Q&A This is where you get to ask the questions.
  37. 37. Legal disclaimer © IBM Corporation 2008. All Rights Reserv ed. The inf ormation contained in this publication is prov ided f or inf ormational purposes only . While ef f orts were made to v erif y the completeness and accuracy of the inf ormation contained in this publication, it is prov ided AS IS without warranty of any kind, express or implied. In addition, this inf ormation is based on IBM’s current product plans and strategy , which are subject to change by IBM without notice. IBM shall not be responsible f or 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 hav e the ef f ect of , creating any warranties or representations f rom IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement gov erning the use of IBM sof tware. Ref erences in this presentation to IBM products, programs, or serv ices do not imply that they will be av ailable in all countries in which IBM operates. Product release dates and/or capabilities ref erenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other f actors, and are not intended to be a commitment to f uture product or f eature av ailability in any way . Nothing contained in these materials is intended to, nor shall hav e the ef f ect of , stating or imply ing that any activ ities undertaken by y ou will result in any specif ic sales, rev enue growth or other results. Perf ormance is based on measurements and projections using standard IBM benchmarks in a controlled env ironment. The actual throughput or perf ormance that any user will experience will v ary depending upon many f actors, including considerations such as the amount of multiprogramming in the users job stream, the I/O conf iguration, the storage conf iguration, and the workload processed. Theref ore, no assurance can be giv en that an indiv idual user will achiev e results similar to those stated here. All customer examples described are presented as illustrations of how those customers hav e used IBM products and the results they may hav e achiev ed. Actual env ironmental costs and perf ormance characteristics may v ary by customer. IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Uny te is a trademark of WebDialogs, Inc., in the United States, other countries, or both. Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Sy stems Incorporated in the United States, and/or other countries. Jav a and all Jav a-based trademarks are trademarks of Sun Microsy stems, Inc. in the United States, other countries, or both. Microsof t and Windows are trademarks of Microsof t Corporation in the United States, other countries, or both. Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torv alds in the United States, other countries, or both. Other company , product, or serv ice names may be trademarks or serv ice marks of others.