26
ARCH-13 Developing WebSpeed Applications Chris Skeldon Principal Consultant

ARCH-13 Developing WebSpeed Applications Chris Skeldon Principal Consultant

Embed Size (px)

Citation preview

Page 1: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

ARCH-13Developing WebSpeed Applications

Chris SkeldonPrincipal Consultant

Page 2: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

2 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Agenda

Browser based applications OpenEdge® RA & WebSpeed eScript WebObject Demonstration

Page 3: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 4: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 5: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 6: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 7: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 8: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

8 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Implementation

eScript WebObject template super-procedure escript.i Few supporting files

Page 9: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 10: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

10 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

ps:eScript Tags

Function call While Data request If Include Discard

Page 11: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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)%>

Page 12: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 13: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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)%>

Page 14: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 15: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 16: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 17: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

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

Page 18: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

18 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

eScript

Demonstration

Page 19: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

19 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Creating a New WebObject

Page 20: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

20 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Demo eScript WebObject

Page 21: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

21 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Demo

Page 22: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

22 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

ps:eScript Framework

Page 23: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

23 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

In Summary

Separate XHTML & 4GL Look at eScript WebObject Consider ps:eScript

Page 24: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

24 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Questions?

Page 25: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

25 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation

Thank you for your time!

Page 26: ARCH-13 Developing WebSpeed  Applications Chris Skeldon Principal Consultant

26 ARCH-13 Developing WebSpeed Applications© 2005 Progress Software Corporation