PWB513: Developing a Reusable PowerBuilder -Based Framework for Web and N-tier Applications - PowerPoint PPT Presentation

1 / 75
About This Presentation
Title:

PWB513: Developing a Reusable PowerBuilder -Based Framework for Web and N-tier Applications

Description:

PB, HTML/JavaScript, Java. Why move ... PB IDE improves developer productivity (HTML, JSP, JavaScript) ... New features enable community collaboration ... – PowerPoint PPT presentation

Number of Views:239
Avg rating:3.0/5.0
Slides: 76
Provided by: fellenm
Category:

less

Transcript and Presenter's Notes

Title: PWB513: Developing a Reusable PowerBuilder -Based Framework for Web and N-tier Applications


1
PWB513 Developing a Reusable PowerBuilder -Based
Framework for Web and N-tier Applications
Joe FritschPrincipal Technology
Consultantjoe.fritsch_at_sybase.com / (301)
896-1309August 8th, 2003
2
Agenda
  • Brief History of PB
  • Why Migrate PB Applications to the Web and N-tier
  • Identify Goals Objectives of a PB/JSP Framework
  • Case Study The PBWEBFW Project
  • Architecture Overview
  • PB Ancestor Objects Common Services
  • The Business Logic Layer
  • The Data Access Layer
  • The Presentation layer
  • Lessons Learned
  • Questions Answers

3
Sybase PowerBuilder
  • Easily creates RAD, 4GL, GUI, database-focused,
    client/server applications
  • 1st tool to provide object-oriented programming
    for business developers
  • Reduced application development time from years
    to months or weeks.
  • It still excels today.
  • 100K PB Customers
  • 500K Production PB Applications Worldwide

4
11 DataWindow Presentation Styles Easy Database
Updates Reports
5
PowerBuilder in a Distributed Environment
  • HTML Generation Capabilities
  • Datawindow Synchronization Techniques
  • GetFullState() / SetFullState(),
    GenerateResultSet(), etc.
  • Multiple Platform Support
  • PB, HTML/JavaScript, Java

6
Why move PowerBuilder applications to the Web /
N-tier?
  • Business Logic is still valid
  • Expose Business Logic to the Enterprise
  • Better Architecture
  • Thinner clients with zero client administration
  • Shared business logic across Web non-Web
    applications
  • Reduced Database load through Database connection
    caching
  • Higher performance, scalability, and High
    Availability through clustering
  • Superior manageability
  • Better security

7
PowerBuilder Architectures
Today 2- Tier Application (Client/Server)
PB Client 2-tier
GUI
Logic
8
EAServer provides an Open Architecture
HTTP(S), RMI/IIOP(S), SSL
Connection Cache
ODBC, JDBC O/C, OCI
EAServer
9
Objectives of a PB/JSP Framework
  • Lower learning curve
  • Focus on the Application, not the Technology
  • Provide a standard architecture
  • J2EE Web Application
  • PB Component Construction and Inheritance
  • Provide JSP Templates PB Ancestor objects to
    jump start the migration
  • Encapsulate the complexities of EAServer
    development into the ancestor objects
  • Position for maximum ROI

10
What is the ROI?
  • Ability to reuse existing code
  • Business Logic
  • Validations, Error Messages, retrieves updates
  • Datawindow Technology
  • Screen layouts, update logic, and expressions
  • Database Architecture
  • Existing Data Model, Stored Procedures, Embedded
    SQL
  • Ability to move to the Web without significant
    retraining costs
  • Leverage staffs knowledge of PB and current
    application
  • Teaching component-development in well understood
    language (PB) reduces training time
  • PB IDE improves developer productivity (HTML,
    JSP, JavaScript)
  • Ability to integrate with other technologies
  • Web Services, XML, J2EE, JSPs, EJBs, HTML, CORBA

Faster time-to-market 4 -16 times faster by
reusing PB code
11
Case Study The PBWEBFW Project
  • Sybase Professional Services Federal developed a
    PB/JSP framework for the U.S. Navy
  • The PB/JSP Framework is available to other U.S.
    Government agencies
  • As the Author, Sybase retained rights to the
    framework under standard government contracting
    rules
  • Sybase Professional Services has created a
    generic version of the framework as the PBWEBFW
    subproject on http//easerver.codexchange.sybase.c
    om
  • A working demo Example Application is available
    to anyone who is interested
  • The framework source code is available to anyone
    who is interested in using Sybase Professional
    Services Consultants

12
SDN Presents CodeXchange
A New Benefit for Sybase Developers
  • Forum for exchanging samples, tools, scripts,
    etc.
  • New features enable community collaboration
  • Download samples created by Sybase or external
    users
  • Leverage contributions of others to extend Sybase
    tools
  • Contribute code or start your own collaborative /
    open source project with input from other product
    experts
  • Any SDN member can participate
  • Log in using your MySybase account via SDN
  • Join the collaboration already underway
  • http//www.codexchange.sybase.com or via SDN at
    www.sybase.com/developer
  • Visit SDN in the Technology Boardwalk or the
    Sybase Booth Theater

13
Overview The PBWEBFW Architecture
Web Browsers
PowerBuilder
Java Clients
Web Services
Portals
Mobile Apps
HTTP(S), RMI/IIOP(S), SSL
Connection Cache
JSP
PB
Java
Java
EJB
EJB
HTML
XML
PB
PB
ODBC, JDBC O/C, OCI
C
C
JavaScript
COM
COM
EAServer
  • JSP-based J2EE Web Application
  • J2EE Web Application Security

14
Overview The PBWEBFW Architecture
Web Browsers
PowerBuilder
Java Clients
Web Services
Portals
Mobile Apps
HTTP(S), RMI/IIOP(S), SSL
Presentation Layer
Connection Cache
JSP
PB
HTML
XML
ODBC, JDBC O/C, OCI
JavaScript
EAServer
  • A Universal Public Interface
  • An approach to passing an array of structures
    between PB Java/HTML

15
Overview The PBWEBFW Architecture
HTTP(S), RMI/IIOP(S), SSL
Connection Cache
JSP
PB
Java
Java
EJB
EJB
HTML
XML
PB
PB
ODBC, JDBC O/C, OCI
C
C
JavaScript
COM
COM
EAServer
  • A set of PB Ancestor Objects that
  • Implement Application Partitioning
  • Leverage the Sybase Datawindow Technology
  • Supports multiple clients (HTML/JavaScript, PB)

16
Overview The PBWEBFW Architecture
HTTP(S), RMI/IIOP(S), SSL
Connection Cache
ODBC, JDBC O/C, OCI
EAServer
  • Common Services
  • Repository Utility, Session Manager, URL Utility,
    Security Proxies, File Services

17
Overview The PBWEBFW Framework Project
  • PB Ancestor Objects Common Services
  • Provide Infrastructure leveraged by all other
    layers
  • The Business Logic Layer
  • Contains the Business Logic that makes each
    application unique
  • Manages Business Transactions
  • Can be exposed to the Enterprise
  • The Data Access Layer
  • Provides a buffer between the Business Logic and
    the underlying physical database implementation
  • Participates in Business Transactions
  • The Presentation Layer
  • Customizes the presentation of information to the
    target client

18
Overview The PBWEBFW Framework Project
  • Comprehensive Security Model
  • J2EE Web App Security
  • JAAS Authentication
  • Custom Authorization Component
  • User Management Facility
  • Security DB for Role Assignments to Users
    Groups
  • Utilities
  • Repository Interface
  • Session Manager
  • URL Utility
  • Logical URL to Physical URL translation
  • File Upload/Download Service

19
The Common Services
Application Infrastructure
  • Repository Utility
  • Provides Restricted access to EAServer Properties
  • Session Manager
  • Provides EAServer-based Session Management
  • URL Utility
  • Provides Translation of Logical Pages to Physical
    URL
  • Security Proxies
  • Provides interface to EAServer Security Role
    Information
  • File Services
  • Provides Utilities to Read/Write server files
  • Provides Utilities to Upload/Download files from
    Client Machine

20
EAServer Repository Properties
  • Server-level
  • com.sybase.jaguar.server.servicesfw_common/Reposi
    toryUtility
  • com.sybase.jaguar.server.roleservicefw_common/Cus
    tRoleService
  • Package-level
  • com.sybase.sps. fw.commonservicespkg
    fw_example_common
  • Application, Package, or Component-level
  • com.sybase.sps. fw.usedbconnectioncachetrue
  • com.sybase.sps.fw.dbcachenamefw_demo
  • com.sybase.sps. fw.trans.dbmsSYJ
  • com.sybase.sps. fw.trans.databasefw_demo
  • com.sybase.sps.fw.debugfalse 

21
PB Ancestor Objects
Application Infrastructure
  • Provides Common Functionality
  • Enables Transaction Management
  • Enables DB interaction
  • Common Error Messaging Facility
  • Common Session Manager
  • Defines Application Constants
  • Manages Standard Variables
  • EAServer Aware
  • Wrapper to EAServer Transaction Primitives
  • Access to EAServer Connection Caches
  • EAServer Logging
  • Interfaces to EAServer Repository
  • Interface to EAServer User Information
  • Access to EAServer Date

22
n_serverbase
PB Ancestor Objects
  • Ancestor for all server PB components
  • Primary role is to be EAServer aware
  • Key Constants
  • SUCCESS, FAILURE, NO_ACTION, CONTINUE_ACTION,
    PREVENT_ACTION, etc.
  • Key Protected Instance Variables
  • its_TransactionServer connection to EAServer
  • itr_Trans Transaction Object
  • iel_Logger Error Logging Object

23
n_serverbase
PB Ancestor Objects
  • Key Protected Instance Variables
  • ib_IsJaguar Indicates code running under
    EAServer
  • ib_DBConnectionRequired Object must connect to
    the dabase
  • is_DBCacheName Name of the connection cache
    that can be set at application, package or
    component level
  • ib_UseDBConnectionCache Indicates use of a DB
    connection cache
  • is_JagConnectionOption wait, force, etc.

24
n_serverbase
PB Ancestor Objects
  • Key Protected Instance Variables
  • ib_debug Turns on debug logging to Server Log
  • DBPARM info
  • is_trans_dbparm, is_trans_dbms, is_trans_lock,
    is_trans_logid, is_trans_logpass,
    is_trans_database, is_trans_servername
  • is_prop_prefix com.sybase.sps.fw
  • is_ServiceClassNames list of service class
    helper objects

25
n_serverbase
PB Ancestor Objects
  • Key Events Constructor
  • Triggers pre_constructor
  • Connects to the Application Server, if available
  • Sets up Error Logging
  • Loads properties from the package/component
  • Debug, connection caching or DB Parm info
  • Sets up DB Connection Information
  • Establishes link to the Session Manager
  • Logs event in debug mode
  • Key Events Activate
  • Connects to the Transaction Server
  • Obtains EAServer User ID
  • Connects to the DB, if Required
  • Establishes Link to the Message Service
  • Logs the event in debug mode

26
The Ancestor Objects n_serverbase
PB Ancestor Objects
  • Key Events Deactivate
  • Disconnects from DB, if connection exists
  • Notifies Message Service of deactivation
  • Logs event in debug mode
  • Key Events Destructor
  • Logs event in debug mode
  • Shuts down Message Service
  • Disconnects link to Session Manager

27
n_serverbase
PB Ancestor Objects
  • Key Functions
  • of_InstantiateObject( ) Instantiates the
    specified object based on the current execution
    environment
  • Logging
  • of_log( ), of_log_enter( ), of_log_exit( )
  • Database
  • of_ConnectToDB( ) Creates the transaction
    object and connects to the Database
  • of_DisconnectFromDB( ) Disconnects from the DB
  • Standard Error Messaging
  • of_Message(), of_AddError()
  • Date - Gets the server Date Time
  • of_GetDateTime()

28
n_serverbase
PB Ancestor Objects
  • Key Functions
  • Transaction
  • of_CompleteWork ( boolean ab_AllowCommit)
  • Ends the transaction based on execution
    environment and ab_AllowCommit
  • Marks the component for deactivation
  • of_ContinueWork ( boolean ab_AllowCommit)
  • Ends the transaction based on execution
    environment and ab_AllowCommit
  • Does NOT Mark the component for deactivation

29
n_srvr_ds
PB Ancestor Objects
  • Ancestor object for all server-side Datastores
  • Supports
  • Server-side service classes
  • Multi-Table Updates
  • Key Constants
  • SUCCESS, FAILURE
  • Key Protected Instance Variables
  • inv_Parent
  • itr_trans
  • its_TransactionServer
  • iel_Logger
  • inv_ServiceObjects
  • ib_isMultiTable
  • ib_debug

30
n_srvr_ds
PB Ancestor Objects
  • Key Events
  • Constructor, dberror, htmlcontextapplied,
    retrieveend, retrievestart, sqlpreview,
    updateend, updatestart
  • All events delegate processing to server-side
    service classes

31
n_srvr_ds
PB Ancestor Objects
  • Key Functions
  • of_GetItemAny ( )
  • of_SetServiceClasses ( )
  • of_RegisterTable()
  • Sets up Multi-table Update
  • of_DBError()
  • Propagates errors to the Error Service
  • of_GenerateXML()
  • Generates XML based on template
  • of_SetParent()
  • Allows Parent to notify child of its identity
  • of_SetTrans()
  • Handle to Parents itr_trans
  • of_Update()
  • Triggers DW Update

32
n_datastoreservicebase
PB Ancestor Objects
  • Ancestor object for all Datastore service class
    objects
  • Placeholder for the following events
  • dberror
  • htmlcontextapplied
  • retrievestart
  • retrieveend
  • sqlpreview
  • updatestart
  • updateend

33
Overview The Business Logic Layer
The Business Logic Layer
  • Contains the Business Logic that makes each
    application unique
  • Validation and Save Logic
  • Implements the Business Process
  • Application Security
  • Manages Business Transactions
  • Coordinates the transaction
  • Can Span Multiple Languages, Databases and
    Application Servers
  • Primary Public Interface to the application
  • Multiple Public Interfaces can map to the same
    internal PB Code
  • Common Data types Outside / PowerScript and
    Datastores inside
  • Can be exposed to the Enterprise
  • As CORBA Components, XML Documents, or Web
    Services
  • Key Component to achieving ROI in PB
  • Existing PB Code is Reusable

34
Components are great, but.
The Business Logic Layer
  • Not all NVOs have to become Components
  • Components are good for
  • Business Logic needed by multiple processes
  • Methods you want to expose
  • NVOs are ideal for
  • Code that is internal only
  • Internal Business Logic, Services Objects, etc.
  • Only used in One Place
  • Code that requires PB Native Data types

35
n_businessobjectbase
The Business Logic Layer
  • PB Ancestor Object for all Business Objects
  • Provides a standard approach to
  • Retrieve, Validation and Save logic
  • Error Message Handling
  • Provides Access to Security Utility
  • Key Protected Instance Variables
  • inv_SecurityUtility Security Utility
  • Key Functions
  • of_GetRoles()
  • of_GetCallerRoles()
  • of_IsCallerInRole()
  • of_IsCallerInRoles()

36
n_businessobjectbase
The Business Logic Layer
  • Key Events
  • ue_save( ) calls
  • Provides Standard Save Processing
  • Called from various of_SaveXXXX( ) Methods
  • Processes against Internal Datastores
  • ue_UpdatesPending( )
  • Checks all Datawindows for pending updates
  • ue_Validate( )
  • Placeholder for Validation Logic coded in
    Descendants
  • ue_PreUpdate( )
  • Placeholder for Pre-Update Logic coded in
    Descendants
  • ue_Update( )
  • Placeholder for Update Logic coded in Descendants
  • ue_PostUpdate( )
  • Placeholder for Post-Update Logic coded in
    Descendants

37
Overview The Data Access Layer
  • Primary role is to manage data access to
    logical table(s)
  • Participates in Business Transactions
  • Provides a buffer between the Business Logic and
    the physical database implementation
  • Provides a PB component to code retrieval and
    update logic
  • Datawindow objects are deployed here
  • Objects that are database-aware

38
n_dataaccessobjectbase
The Data Access Layer
  • Ancestor object for all Data Access Objects
    (DAOs)
  • Key Protected Instance Variables
  • ids_data Datastore of type n_srvr_ds
  • is_ServiceObject stores the name of the
    Server-side service class
  • Key Events
  • Constructor
  • Set ib_DBConnectionRequired to TRUE
  • Instantiate the utility Datastore ids_data
  • Deactivate
  • Reset the utility Datastore

39
n_dataaccessobjectbase
The Data Access Layer
  • Key Functions
  • Of_Update()
  • Updates the Utility Datastore
  • Of_DBError( )
  • Propagates DB errors to the Error Message Service

40
The Presentation Layer
Features of the PBWEBFW Framework
  • Reusable JSP templates
  • Standard Page Layouts, Header, Footer, CSS
  • Role-based Menu
  • TreeView control
  • Tab Folders
  • Multi-Select
  • Standard Error Display
  • Custom Column Sorting, Filtering, Multi-Column
    DDDW Metaphor
  • Smart Navigational Links
  • User Management Interface
  • Conditional Navigation
  • Scrolling, Row Limits, Row Selection

41
HTML/JavaScript Thin Client
The Presentation Layer
  • Generates HTML from datastores obtained from The
    Business Object Layer
  • Translates between datawindow technology and
    HTML/JavaScript technology
  • Page Parameters to Retrieval Arguments
  • Contains PB objects used to customize the HTML
    Generation Process
  • Supports Multiple Browsers
  • Amount and type of HTML is configurable
  • Client-side JavaScript can be created using PB
    Objects
  • Amount and type of JavaScript is configurable

42
PB Component Inventory
The Presentation Layer
  • Presentation Layer Ancestor Object
  • Declares Public Interface
  • of_GenerateHTML()
  • of_Initialize()
  • Defines Standard Event Model
  • Presentation Layer Datastore
  • Configurable HTML Generation
  • Presentation Layer Datastore Service Object
  • Custom Actions in HTMLCONTEXTAPPLIED event
  • JavaScript Helper
  • Defines Page-specific JavaScript Utilities
  • Datawindow JavaScript Helper
  • Defines DW-specific JavaScript Utilities

43
JSP/Servlets
The Presentation Layer
  • JSP is responsible for final assembly of the HTML
    Page
  • Determines the Arrangement of Datawindows
  • Supports standard Page Layout
  • Common Header, Footer CSS
  • Tab Folder JSP Tag Library
  • Java Struts Role-based Menu
  • J2EE Web-Application Security

44
Standard Page Layout
The Presentation Layer
45
The Presentation Layer JSP Templates
The Presentation Layer
lt_at_ include file "/include/fwPageDirectives.jsp"
gt ltHTMLgt ltHEADgt lt_at_ include file
"/include/fwHtmlHead.jsp" gt lt/HEADgt ltBODYgt lt_at_
include file "/include/fwPageHeader.jsp" gt lt_at_
include file "/include/fwMenu.jsp" gt ltSCRIPT
language"JavaScript1.2"gtpageTitle "Example
Application" lt/SCRIPTgt ... lt-- Include the
Common Footer --gt lt_at_ include file"/include/fwPa
geFooter.jsp" gt lt/BODYgt lt/HTMLgt
46
Java Struts Role-based Menu Coolmenu4
The Presentation Layer
47
Tab Folder Control
The Presentation Layer
48
Tab Folder Control
The Presentation Layer
49
Tab Folder Control
The Presentation Layer
50
Tab Folder Control
The Presentation Layer
51
Treeview Control
The Presentation Layer
52
Multi-Select Control
The Presentation Layer
53
Standard Error Message Examples
The Presentation Layer
54
Row Sorting, Selecting, Scrolling, DDDW
The Presentation Layer
55
J2EE Web App Security Custom Authorization
The Presentation Layer
56
Popup Windows
The Presentation Layer
57
Conditional Navigation
The Presentation Layer
  • Scenario 1 Validation Criteria Executed as Part
    of the Origin JSP
  • Scenario 2 Validation Criteria Executed as Part
    of the Destination JSP
  • Implement Complex Workflow by Chaining Scenario 1
    Scenario 2

58
n_htmlclientinterfacemanagerbase
The Presentation Layer
  • Ancestor Object for all PB HTML CIM Components
  • Responsible for Generating HTML for all DWs
    needed by the corresponding JSP Page
  • Defines Standard Interface for all CIMs
  • of_Initialize ( )
  • of_GenerateHTML ( )
  • Key Protected Instance Variables
  • ids_HTMLDW Array of datastores
  • inv_jshelper Handle to the JavaScript Helper
  • inv_DWJSHelper Instance of the DW JavaScript
    helper

59
n_htmlclientinterfacemanagerbase
The Presentation Layer
  • Key Public Functions
  • of_Initialize ( )
  • Initializes the astr_HTMLDWInfo array with
    an element for each registered datastore
  • of_GenerateHTML (
  • string as_Browser,
  • string as_PageParameters,
  • string as_PageErrors,
  • string as_PageJavascript,
  • str_HTMLDWInfo astr_HTMLDWInfo ,
  • string as_Redirect)

60
n_htmlclientinterfacemanagerbase
The Presentation Layer
  • Key Functions
  • Of_GenerateHTML ( )
  • ue_Retrieve( )
  • ue_SetHTMLAction ( )
  • ue_Save ( )
  • ue_SetHTMLDWObjectName ( )
  • ue_SetBrowser ( )
  • ue_SetSelfLink ( )
  • ue_SetColumnLink ( )
  • ue_SetHTMLDWCaching ( )
  • ue_SetHTMLDWJavascript ()
  • ue_SetHTMLGENOptions ( )
  • ue_GenerateHTML ( )
  • ue_SetPageJavascript ( )

61
Array of Datawindows
The Presentation Layer
  • An array of the following Structure is passed
    str_HTMLDW
  • s_ObjectName - HTMLDW Name
  • s_Action - DW Action
  • s_Context DW Context holding changes
  • s_HTML DW rendered into HTML
  • s_JavaScript JavaScript that supports HTMLDW
  • s_Filter String holding the users selected
    Filter Info
  • s_Hidden Any hidden Form Fields on the DW

62
n_htmlclientinterfacemanagerbase
The Presentation Layer
  • Key Protected Functions
  • of_RegisterHTMLDW ( )
  • Adds a datastore to the ids_HTMLDW array with
    a specific name
  • of_RegisterSortColumn
  • Sets up a column for Sorting
  • of_RegisterPopupColumn
  • Sets up a column for Popups
  • of_RegisterMultiSelectSourceDW(),
    of_RegisterMultiSelectTargetDW ()
  • Registers DWs used by Multi-select control
  • of_SetHidden(), of_GetHidden(), of_DeleteHidden()
  • Interface to the Hidden Form Variables

63
The Ancestor Objects n_srvr_ds_cim
The Presentation Layer
  • Ancestor Presentation Layer Datastore
  • Key Events
  • HTMLContextApplied
  • Delegates processing to datastore service class

64
The Ancestor Objects n_srvr_ds_cim
The Presentation Layer
  • HTML Generation Key Functions
  • of_GenerateHTML ( )
  • of_GenerateAppendHTML ( )
  • of_GetHTMLDWObjectName ( )
  • of_SetHTMLDWObjectname ( )
  • of_SetBrowser ( )
  • of_SetClientEvents ( )
  • of_SetClientFormatting ( )
  • of_SetClientScriptable ( )
  • of_SetClientUpdateable ( )
  • of_SetClientValidation ( )
  • of_SetDWCaching ( )

65
The Ancestor Objects n_srvr_ds_cim
The Presentation Layer
  • Other Key Functions
  • of_GenerateDWJavascript ( )
  • of_GenerateCondNavJscript ( )
  • of_GenerateInsertDelete ( )
  • of_GenerateNavigationBar ( )
  • of_GenerateSubmitButton ( )
  • of_RegisterPopupWindow ( )
  • of_SetSearchOptions ( )
  • of_SetUpdateOnRowFocusChange ( )

66
n_ds_cim
The Presentation Layer
  • Service object used by the HTML Client Interface
    Manger
  • Intercepts the htmlcontextapplied and triggers
    custom actions
  • Update action translated into ue_Save() event
  • Key to synchronizing the datastore with changes
    made in HTML

67
JagUtility Bean
The Presentation Layer
  • Java Bean that interfaces between the PB HTML CIM
    and the JSP
  • Key Functions
  • cimGenerateHTML()
  • Returns Array of HTML Datastores
  • Uses uncheck narrow to create components
  • Calls of_Initialize() and of_GenerateHTML()
  • executePageRedirect()
  • Implements Conditional Navigation

68
An Example JSP Page
The Presentation Layer
69
An Example JSP Page
The Presentation Layer
lt_at_ include file "/include/fwPageDirectives.jsp"
gt ltHTMLgt ltHEADgt lt_at_ include file
"/include/fwHtmlHead.jsp" gt lt/HEADgt ltBODYgt lt_at_
include file "/include/fwPageHeader.jsp" gt lt_at_
include file "/include/fwMenu.jsp" gt lt-- Tab
Folder Classes --gt lt_at_ page import"com.sybase.sp
s.fw.tabControl." gt lt-- Tab Folder Tag Lib
Descriptor--gt lt_at_ taglib uri"/WEB-INF/tlds/tabCo
ntrol.tld" prefix"tabControl" gt
70
An Example JSP Page
The Presentation Layer
lt String sReturn String
sPageErrors String sPageJavascript str_htmldwi
nfo htmldwinfo JagPageData pageData new
JagPageData() String pageErrors String
pageJavaScript String contextPath
request.getContextPath() gt lt htmldwinfo
utilityBean.cimGenerateHtml( "fw_example_cim",
"cim_employeeinfo", request, pageData,
response) gt lt sPageErrors
pageData.pageErrors sPageJavascript
pageData.javaScript gt lt-- Display the DW
Content Errors --gt lt sPageErrors gt
71
An Example JSP Page
The Presentation Layer
lt-- Create the tab control --gt lttabControltabCo
ntrol docRoot"lt contextPath gt"gt lt--
Display the Employee Basic Tab --gt lt // Get
the Generated HTML sReturn htmldwinfo0.s_html
// Get the DW-specific javascript sReturn
htmldwinfo0.s_javascript gt lttabControltabPag
e pageName"tab_employeebasic" pageLabel"Basic"
pageEnabled"true"gtlt sReturn
gtlt/tabControltabPagegt lt-- Display the
Employee Address Tab --gt lt // Get the
Generated HTML sReturn htmldwinfo1.s_html /
/ Get the DW-specific javascript sReturn
htmldwinfo1.s_javascript gt lttabControltabPag
e pageName"tab_employeeaddress"
pageLabel"Address" pageEnabled"true"gt
lt sReturn gtlt/tabControltabPagegt
72
An Example JSP Page
The Presentation Layer
lt-- Display the Employee Employment Tab
--gt lt // Get the Generated HTML sReturn
htmldwinfo2.s_html // Get the DW-specific
javascript sReturn htmldwinfo2.s_javascript
gt lttabControltabPage pageName"tab_employeeemp
loyement" pageLabel"Employment"
pageEnabled"true"gtlt sReturn gtlt/tabControltabP
agegt lt-- Display the Employee Bonus Tab
--gt lt // Get the Generated HTML sReturn
htmldwinfo3.s_html // Get the DW-specific
javascript sReturn htmldwinfo3.s_javascript
gt lttabControltabPage pageName"tab_bonus"
pageLabel"Bonus" pageEnabled"true"gtlt sReturn
gtlt/tabControltabPagegt lt/tabControltabControlgt
73
An Example JSP Page
The Presentation Layer
lt-- Insert the generate Page-specific
Javascript --gt ltsPageJavascript gt lt--
Include the Common Footer --gt lt_at_ include file
"/include/fwPageFooter.jsp" gt lt/BODYgt lt/HTMLgt
74
Lessons Learned
  • Dont Over-Componentize
  • Beware of too many small components
  • Components have overhead, make sure they are
    needed
  • Consider combining components that are
    infrequently used
  • Beware of too many Large Components
  • May take up server resources if not used
    frequently
  • Shoot for Medium Size and Medium Complexity
    components
  • Compromise between component reuse and complexity
  • Take it One Step at a Time
  • Do a couple of small sub-systems first
  • Take a Phased Approach
  • Leave Room for Expansion
  • Dont Box Yourself In
  • Getting to the Web is great, but did you build
    BOs that you can expose to the Enterprise?

75
Questions Answers
  • Any Questions?
Write a Comment
User Comments (0)
About PowerShow.com