Session ID: D23 WebSphere Portlet Factory: Davalen’s Practical Advice from the Field   Speaker: Michael “Spoon” Witherspoon WebSphere Portal Technical Conference U.S. 2008
Practical Advice from the Field  Agenda Introduction Presentation Questions / Answers
Introduction Who is  Davalen, LLC? Premier IBM Business Partner & IBM Authorized Training Center since 1993 Who is  Michael “Spoon” Witherspoon ? Career instructor, application developer, course writer Former Lead Technical Instructor at Bowstreet Current Portlet Factory Practice Manager at Davalen Writes the Davalen Top Gun for WPF courses
Presentation Be Prepared Know the Product Well Advice on: Services Schemas Builder Calls User Interface (UI) Linked Java Objects (LJOs) Profiling Programming Patterns 10 Practical  Tips  from the Field
Be Prepared: The Customer is Relying on  You! Customer may not know Portlet Factory Maybe has tried and failed Customer specs may not be complete Heavy focus on user interface (UI) Little detail on data and services Customer may not understand profiling Roles-based profiling is very powerful
Know the Product Well: Everyone Expects You to Know Start with  training  and   mentoring Davalen’s Top Gun courses for WPF developers Comprehensive, Practical, Real-World Examples http://www.davalen.com IBM Course Catalog – search for “Top Gun” Use Portlet Factory  Wiki  and  Forums See URLs at end of presentation Practice, Investigate, Innovate Develop  new  patterns and techniques Learn new things
Advice on Services Expect to Design the Services Layer  Yourself The customer is hyper-focused on the UI Think About the  Schemas Tip! Input schemas should be custom More stable Generated schemas - all inputs are string, all are required Tip! Figure them out  early They drive the UI Avoid   late game schema changes Stabilize the Database Structure  Early Structure changes often force  schema changes Use Views when possible Tip!
Advice on Services – Don’t be Afraid to: Break up the Services into  Multiple Service Provider  models One per  type of data  i.e. Customer or Product One per  data relationship  i.e. Invoice : LineItems Something else  logical Have one Provider Consume   Another’s Services It is  OK  to have a Service Consumer builder in a Service Provider model Tip!  Make  Extra  Services Utilities that return  short   lists – Lookup Table Think broadly  now , save time  later Easy  to disable Tip!
Advice on Schemas The World is not Flat – neither is the data Learn to work with complex XML Leverage Simple Schema Generator builder Modify generated schema as needed Custom input schemas aid Data Page validation Put repeating elements in a parent node <Children><Child></Child>…<Child></Child>…</Children> Easier to work with in Action Lists, Methods, LJOs Tip!
Advice on Schemas – Don’t be Afraid to: Write your own Schemas Customize generated schemas for convenience and consistency Streamline complex schemas W3Schools – http://www.w3schools.com Use Schema-Typed Variables Regular Variable builder Choose schema element Very useful with Data Page builder WebCharts builder XML inputs for Action Lists, Event Handlers, Method Calls
Advice on Builder Calls Use Comments to group builders by feature / function Use naming conventions Action List – Act_ActionName LJO – LJO_ClassName Service Definition / Service Consumer – end with underscore Service method names are much easier to read Variables by purpose Temporary – temp_VariableName Shared – shared_VariableName The actual Variable and not the Shared Variable builder Tip! Use self-documenting naming rules and be consistent Tip!
Advice on UI Learn Data Page well – you will definitely use it Tip! Place on <div> tag and not <span> tag Use it even when there is only one input field  Learn to Nest Repeated Region builders Excellent control over presentation of complex, hierarchical data Good time to use schema-type variables Use AJAX Refresh just one region instead of entire portal page Use Visibility Setter Show / Hide notes, markers, complex variables, service results Drive with Profiling Tip!
Advice on UI – Don’t be Afraid to: Make your own Layout Pages Generated pages can be too generic Data Page works with custom pages Tip! Use Imported HTML pages for layout and Page builders for snippets Use Data Page instead of View and Form It is more work but offers more control Page flow Naming of pages, methods, etc. View and Form encapsulates too much Tip! Always put each Data Page builder on its own Page builder. Combine onto separate page using Inserted Page  Tip!  Tip!
Advice on Linked Java Objects (LJOs) Tip! Learn the IXml API Thorough API for manipulating XML objects Use in Services Complex transforms Complex processing / data manipulation Pre- and Post-Execution methods Use in Service Consumers Process / modify service results for UI purposes Use Builders whenever you can Don’t write everything in LJOs Tip!
Advice on Profiling Do not copy a Profile Set Create new Profile Set from existing instead Name using package name convention Encourage customer to use Profiling Portlet configuration, defaults, user personalization Roles-based application versions Use Profiling during application development Set Default profile to “normal” input values Use a “developer” profile to expose options and visibility for developer’s convenience
Advice on Programming Patterns Use Services Oriented Architecture Service Provider / Service Consumer Beware: not all services generate code equally Use Imported Models for Common Builder Calls Event Declarations SQL Data Source Shared Variables Schemas Build Application Models from Components Static / Dynamic Model Containers Profiled Imported Model Giant step toward model-based builders
10 Practical Tips from the Field: 1. Always make custom input schemas. 2. Nail down the schemas early in the project. 3. Make extra, small utility services even if you think you won’t need them. 4. Put repeating schema elements inside a parent node. 5. Use self-documenting naming of builder calls and be consistent.
10 Practical Tips from the Field: Place Data Page builder calls on <div> tags instead of  <span> tags. Use Data Page even when there is only one input field. Use Imported Page builder with HTML pages for page  structure / layout and use Page builder for snippets. Always put each Data Page builder on its own Page builder. Learn the IXml API and use it liberally in LJOs.
Additional Information and Resources Cited in Presentation Davalen, LLC – WebSite and Top Gun Information http://www.davalen.com IBM Training Course Catalog   http://www.ibm.com/training   Search Training Finder for “Top Gun” WebSphere Portlet Factory Wiki     http://www-10.lotus.com/ldd/pfwiki.nsf WebSphere Forums   http://www-128.ibm.com/developerworks/forums/wsdd_forums.jspa Websphere Portlet Factory Documentation Page http://www-128.ibm.com/developerworks/websphere/zones/portal/portletfactory/proddoc.html Or use the link for Tutorial #5 on the Start Menu in Windows
Additional Information and Resources WebSphere Portal – IBM Site     http://www-3.ibm.com/software/genservers/portal/ WebSphere Portal Business Solutions Catalog: http://catalog.lotus.com/wps/portal/portal WebSphere Portal 6.0 DemoNet http://docs.dfw.ibm.com/wp6/?DDSPageRequest=/ Product Documentation and WebSphere Portal Wiki   http://www-3.ibm.com/software/genservers/portal/library/   http://www-10.lotus.com/ldd/portalwiki.nsf Education    http://www-3.ibm.com/software/genservers/portal/education/ Websphere Portal Developer’s Zone http://www-106.ibm.com/developerworks/websphere/zones/portal/
Please take a few minutes to fill out the session survey.  Thank you Session ID: D23 Session:   WebSphere Portlet Factory:  Davalen’s Practical Advice from the Field  Presenter(s):  Michael “Spoon” Witherspoon 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
© 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.

WebSphere Portlet Factory: Davalen’s Practical Advice from the Field

  • 1.
    Session ID: D23WebSphere Portlet Factory: Davalen’s Practical Advice from the Field Speaker: Michael “Spoon” Witherspoon WebSphere Portal Technical Conference U.S. 2008
  • 2.
    Practical Advice fromthe Field Agenda Introduction Presentation Questions / Answers
  • 3.
    Introduction Who is Davalen, LLC? Premier IBM Business Partner & IBM Authorized Training Center since 1993 Who is Michael “Spoon” Witherspoon ? Career instructor, application developer, course writer Former Lead Technical Instructor at Bowstreet Current Portlet Factory Practice Manager at Davalen Writes the Davalen Top Gun for WPF courses
  • 4.
    Presentation Be PreparedKnow the Product Well Advice on: Services Schemas Builder Calls User Interface (UI) Linked Java Objects (LJOs) Profiling Programming Patterns 10 Practical Tips from the Field
  • 5.
    Be Prepared: TheCustomer is Relying on You! Customer may not know Portlet Factory Maybe has tried and failed Customer specs may not be complete Heavy focus on user interface (UI) Little detail on data and services Customer may not understand profiling Roles-based profiling is very powerful
  • 6.
    Know the ProductWell: Everyone Expects You to Know Start with training and mentoring Davalen’s Top Gun courses for WPF developers Comprehensive, Practical, Real-World Examples http://www.davalen.com IBM Course Catalog – search for “Top Gun” Use Portlet Factory Wiki and Forums See URLs at end of presentation Practice, Investigate, Innovate Develop new patterns and techniques Learn new things
  • 7.
    Advice on ServicesExpect to Design the Services Layer Yourself The customer is hyper-focused on the UI Think About the Schemas Tip! Input schemas should be custom More stable Generated schemas - all inputs are string, all are required Tip! Figure them out early They drive the UI Avoid late game schema changes Stabilize the Database Structure Early Structure changes often force schema changes Use Views when possible Tip!
  • 8.
    Advice on Services– Don’t be Afraid to: Break up the Services into Multiple Service Provider models One per type of data i.e. Customer or Product One per data relationship i.e. Invoice : LineItems Something else logical Have one Provider Consume Another’s Services It is OK to have a Service Consumer builder in a Service Provider model Tip! Make Extra Services Utilities that return short lists – Lookup Table Think broadly now , save time later Easy to disable Tip!
  • 9.
    Advice on SchemasThe World is not Flat – neither is the data Learn to work with complex XML Leverage Simple Schema Generator builder Modify generated schema as needed Custom input schemas aid Data Page validation Put repeating elements in a parent node <Children><Child></Child>…<Child></Child>…</Children> Easier to work with in Action Lists, Methods, LJOs Tip!
  • 10.
    Advice on Schemas– Don’t be Afraid to: Write your own Schemas Customize generated schemas for convenience and consistency Streamline complex schemas W3Schools – http://www.w3schools.com Use Schema-Typed Variables Regular Variable builder Choose schema element Very useful with Data Page builder WebCharts builder XML inputs for Action Lists, Event Handlers, Method Calls
  • 11.
    Advice on BuilderCalls Use Comments to group builders by feature / function Use naming conventions Action List – Act_ActionName LJO – LJO_ClassName Service Definition / Service Consumer – end with underscore Service method names are much easier to read Variables by purpose Temporary – temp_VariableName Shared – shared_VariableName The actual Variable and not the Shared Variable builder Tip! Use self-documenting naming rules and be consistent Tip!
  • 12.
    Advice on UILearn Data Page well – you will definitely use it Tip! Place on <div> tag and not <span> tag Use it even when there is only one input field Learn to Nest Repeated Region builders Excellent control over presentation of complex, hierarchical data Good time to use schema-type variables Use AJAX Refresh just one region instead of entire portal page Use Visibility Setter Show / Hide notes, markers, complex variables, service results Drive with Profiling Tip!
  • 13.
    Advice on UI– Don’t be Afraid to: Make your own Layout Pages Generated pages can be too generic Data Page works with custom pages Tip! Use Imported HTML pages for layout and Page builders for snippets Use Data Page instead of View and Form It is more work but offers more control Page flow Naming of pages, methods, etc. View and Form encapsulates too much Tip! Always put each Data Page builder on its own Page builder. Combine onto separate page using Inserted Page Tip! Tip!
  • 14.
    Advice on LinkedJava Objects (LJOs) Tip! Learn the IXml API Thorough API for manipulating XML objects Use in Services Complex transforms Complex processing / data manipulation Pre- and Post-Execution methods Use in Service Consumers Process / modify service results for UI purposes Use Builders whenever you can Don’t write everything in LJOs Tip!
  • 15.
    Advice on ProfilingDo not copy a Profile Set Create new Profile Set from existing instead Name using package name convention Encourage customer to use Profiling Portlet configuration, defaults, user personalization Roles-based application versions Use Profiling during application development Set Default profile to “normal” input values Use a “developer” profile to expose options and visibility for developer’s convenience
  • 16.
    Advice on ProgrammingPatterns Use Services Oriented Architecture Service Provider / Service Consumer Beware: not all services generate code equally Use Imported Models for Common Builder Calls Event Declarations SQL Data Source Shared Variables Schemas Build Application Models from Components Static / Dynamic Model Containers Profiled Imported Model Giant step toward model-based builders
  • 17.
    10 Practical Tipsfrom the Field: 1. Always make custom input schemas. 2. Nail down the schemas early in the project. 3. Make extra, small utility services even if you think you won’t need them. 4. Put repeating schema elements inside a parent node. 5. Use self-documenting naming of builder calls and be consistent.
  • 18.
    10 Practical Tipsfrom the Field: Place Data Page builder calls on <div> tags instead of <span> tags. Use Data Page even when there is only one input field. Use Imported Page builder with HTML pages for page structure / layout and use Page builder for snippets. Always put each Data Page builder on its own Page builder. Learn the IXml API and use it liberally in LJOs.
  • 19.
    Additional Information andResources Cited in Presentation Davalen, LLC – WebSite and Top Gun Information http://www.davalen.com IBM Training Course Catalog http://www.ibm.com/training Search Training Finder for “Top Gun” WebSphere Portlet Factory Wiki http://www-10.lotus.com/ldd/pfwiki.nsf WebSphere Forums http://www-128.ibm.com/developerworks/forums/wsdd_forums.jspa Websphere Portlet Factory Documentation Page http://www-128.ibm.com/developerworks/websphere/zones/portal/portletfactory/proddoc.html Or use the link for Tutorial #5 on the Start Menu in Windows
  • 20.
    Additional Information andResources WebSphere Portal – IBM Site http://www-3.ibm.com/software/genservers/portal/ WebSphere Portal Business Solutions Catalog: http://catalog.lotus.com/wps/portal/portal WebSphere Portal 6.0 DemoNet http://docs.dfw.ibm.com/wp6/?DDSPageRequest=/ Product Documentation and WebSphere Portal Wiki http://www-3.ibm.com/software/genservers/portal/library/ http://www-10.lotus.com/ldd/portalwiki.nsf Education http://www-3.ibm.com/software/genservers/portal/education/ Websphere Portal Developer’s Zone http://www-106.ibm.com/developerworks/websphere/zones/portal/
  • 21.
    Please take afew minutes to fill out the session survey. Thank you Session ID: D23 Session: WebSphere Portlet Factory: Davalen’s Practical Advice from the Field Presenter(s): Michael “Spoon” Witherspoon 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
  • 22.
    © IBM Corporation2008 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.