Upload
andrea-perkins
View
216
Download
2
Embed Size (px)
Citation preview
ARCH-13Developing WebSpeed Applications
Chris SkeldonPrincipal Consultant
2 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Agenda
Browser based applications OpenEdge® RA & WebSpeed eScript WebObject Demonstration
3 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Developing For The Browser
Uses multiple skill sets:– design & create: XHTML/CSS/JavaScript – programming: database/4GL
User-interface subject to design changes throughout development and beyond
Support for multiple browser versions often specified
Ability to alter pages by site, language, etc. often required
4 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Users
Business Servicing Layer
Data Access Layer
Managed Data Stores
Unmanaged Data Stores
Enterprise Services
Integration Layer
OpenEdge Reference Architecture
En
viro
nm
ent
Man
ager
s an
d U
tili
ties
UI Components
UI Controllers
5 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
change statequery
Model-View-Controller (MVC)
Model
View Controlleruser-interactions
data & business
logic
show contents of model
receive interaction,
invoke model action
6 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
MVC for WebSpeed
DataBusiness
logic
ps:eScript WebObject
Interface specific
code
model controller
view
view
7 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Approach
Once upon a time … No restrictions Split XHTML/JavaScript from 4GL code
– Allows XHTML/JavaScript and 4GL to be changed independently
– XHTML/JavaScript can be changed without recompilation of 4GL code
Business logic agnostic
8 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Implementation
eScript WebObject template super-procedure escript.i Few supporting files
9 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript
WebObject
How It Works…
Business
Logic
Application
Database
ps:eScript
Processor
.html files
processMarkup ( customer.html )
Read customer.html
Process customer.htmlloop
fetch data
branch
include
discard
getData ( Customer.Name )
Request
Response
10 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags
Function call While Data request If Include Discard
11 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags – Function Call
Used to pass information from the HTML to the 4GL program
Does not directly change outgoing page <%functionname(params)%>
12 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags - While
Enables a section of HTML to be output between 0 and n times
<%while:functionname(params)%> …<%end:functionname%>
Function returns TRUE if HTML is to be output
After output function called again Result can be reversed with ! or not
13 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags – Data Request
Enabled 4GL program to return data to be included in the page
<%=functionname(params)%>
14 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags – If … Else …
Enables HTML to be conditionally output <%if:functionname(params)%>
…<%else:functionname%>
…<%end:functionname%>
Function returns TRUE if HTML is to be output
Result can be reversed with ! or not
15 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:escript Tags – Include
Loads text from file into page <%include:filename $title=PRGS %> Used to modularise site Text processed after loading Accepts arguments
16 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Tags - Discard
XHTML not processed or sent to client <%discard:start%>
…
<%discard:end%> Useful for removing example data
17 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Developing With ps:eScript
1. Create HTML2. Create ps:eScript WebObject
– Call appropriate web page
3. Add custom tags to HTML– Conditional sections– Repeating sections– Data
4. Add support functions to WebObject5. Test
18 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
eScript
Demonstration
19 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Creating a New WebObject
20 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Demo eScript WebObject
21 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Demo
22 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
ps:eScript Framework
23 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
In Summary
Separate XHTML & 4GL Look at eScript WebObject Consider ps:eScript
24 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Questions?
25 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation
Thank you for your time!
26 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation