13.04.2015 Views

Concepts - WINDEV et WEBDEV

Concepts - WINDEV et WEBDEV

Concepts - WINDEV et WEBDEV

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Concepts</strong>


WebDev 10 - <strong>Concepts</strong><br />

Version 10 - (1) 06-06<br />

Visit the download center at www.windev.com regularly to check for updates.<br />

Free Technical Support email: fre<strong>et</strong>echnicalsupport@windev.com.<br />

This documentation is not contractually binding. Modifications may have been made to<br />

the software the since this guide was published. Please consult the online help.<br />

All product names or other trademarks mentioned in this publication are registered trademarks of their respective<br />

owners.<br />

© PC SOFT 2006: This publication may not be reproduced in part or in whole in any form without the express permission<br />

of PC SOFT.


3<br />

In what order should the guides be read ?<br />

WebDev 10 is a powerful intern<strong>et</strong>/intran<strong>et</strong> site development tool with everything you need<br />

to design and create websites.<br />

To learn quickly and efficiently how to use WebDev 10, we advise you to work in the following<br />

order:<br />

1<br />

2<br />

3<br />

Read the "Basic principles".<br />

This guide presents the main concepts needed to create a high-powered WebDev<br />

site.<br />

"Tutorial" (book + exercises).<br />

The tutorial provides a first "hands-on" approach to WebDev, to familiarize yourself<br />

with the main WebDev editors.<br />

Test the examples.<br />

Test the examples delivered with WebDev in the fields you are interested in (e-business,<br />

scheduling, and so on).<br />

The online help l<strong>et</strong>s you find the syntax of a W-Language function quickly, obtain help on<br />

the interface, and so on.<br />

We hope you enjoy g<strong>et</strong>ting started with <strong>WEBDEV</strong>.<br />

WebDev <strong>Concepts</strong>


4<br />

WebDev <strong>Concepts</strong>


5<br />

Summary<br />

Part 1 - Intern<strong>et</strong>: Main <strong>Concepts</strong> 9<br />

What is a site? 11<br />

Static, semi-dynamic and dynamic sites? 12<br />

Types of dynamic sites 13<br />

Types of pages 14<br />

Comparing AWP pages and dynamic WebDev pages 18<br />

Part 2 - Site Development 21<br />

Developing a site with WebDev 23<br />

Terminology: Site and project 24<br />

Hard and software specifications 25<br />

Server configuration 26<br />

Custom-folders: Organize your project 27<br />

Source Code Manager (SCM) 28<br />

Project Monitoring Center 30<br />

Project configuration 31<br />

Multiple generation 32<br />

RAD 33<br />

RID 34<br />

Code types 35<br />

W-Language: straightforward and very powerful 37<br />

Component 38<br />

Part 3 - Displaying information in a page 39<br />

Two site layouts: templates or frames<strong>et</strong>s 41<br />

Templates 42<br />

Frames<strong>et</strong>: a split HTML page 43<br />

Creating a page in the editor … 44<br />

The following files are automatically created: 45<br />

Choosing a control type for the information to display 46<br />

What type of image to choose: dynamic, static, generated, … ? 48<br />

Creating button effects: custom buttons 50<br />

Repeating a control group 52<br />

Displaying a file in a Table or Looper 53<br />

Positioning controls in a page 54<br />

Overlaying controls 55<br />

CSS styleshe<strong>et</strong>s: to simplify page layout 56<br />

Centered or adapted sites? 57<br />

10 ergonomy tips … 58<br />

Multilingual site 62<br />

Summary


6<br />

Part 4 - Actions on a page 63<br />

Displaying and sequencing pages 65<br />

Preventing a r<strong>et</strong>urn to a page 71<br />

Choose a type of button / link 72<br />

Button / link code run sequence 73<br />

Uploading a file (image, <strong>et</strong>c.) to the server 75<br />

WebDev and reports 76<br />

Print Modes 77<br />

Processing several pages in succession 78<br />

Sending emails 79<br />

Saving information on the web user’s computer with cookies 81<br />

Protecting site access: passwords 82<br />

Encrypting information circulating on the Web with SSL 83<br />

Security advantage for dynamic sites: "Back" management 84<br />

Secure payment with provider 87<br />

Part 5 - Database 89<br />

Types of files that can be accessed 91<br />

Linking a control to its item 92<br />

Hyper File Classic 93<br />

Hyper File Client/Server 94<br />

Queries 95<br />

Embedded queries 96<br />

Universal replication 97<br />

3-tier architecture 98<br />

Part 6 - Testing a site 99<br />

Testing a site: elements to test 101<br />

How to test a site? 102<br />

Debugger 104<br />

What the WebDev administrator is for? 105<br />

Summary<br />

Part 7 - Deploying a site 107<br />

Deploying a static or semi-dynamic WebDev site 109<br />

Deploying a dynamic WebDev site 110<br />

Referencing a site 114<br />

Implementing a dynamic WebDev site 115<br />

Dedicated and shared servers? 116<br />

Choice of server? 118<br />

Installing a dynamic WebDev site with a specific configuration 119


7<br />

Part 8 - Maintaining a site 123<br />

Maintaining a dynamic WebDev site 125<br />

Consulting hits statistics for dynamic sites 126<br />

R<strong>et</strong>rieving data on a site 127<br />

Part 9 - Appendices 131<br />

Main new features in WebDev 10 133<br />

You already know WinDev 135<br />

W-Language functions specific to WebDev 10 136<br />

List of WinDev 10 functions not available in WebDev 138<br />

Summary


8<br />

Summary


PART 1<br />

Intern<strong>et</strong>: Main <strong>Concepts</strong>


11<br />

What is a site?<br />

An intern<strong>et</strong>/intran<strong>et</strong> site is a s<strong>et</strong> of HTML pages stored on a Web server. They are s<strong>et</strong> up<br />

for a specific purpose (e.g.: describe a company, sell products, and so on).<br />

A site is designed to be used by web users. They access it via an ordinary web browser.<br />

With WebDev you can easily create intern<strong>et</strong>/intran<strong>et</strong> sites, which can manage data or not.<br />

Server<br />

HTML page<br />

Web users access the site and<br />

display HTML pages<br />

via a browser<br />

Server at a host’s.<br />

The HTML pages are stored on this server<br />

Part 1: Intern<strong>et</strong>: Main concepts


12<br />

Static, semi-dynamic and dynamic sites?<br />

There are several types of site:<br />

- static sites.<br />

- semi-dynamic sites<br />

- dynamic sites.<br />

The table below describes the differences b<strong>et</strong>ween them:<br />

Static site Semi-dynamic site Dynamic site<br />

The page contents are s<strong>et</strong><br />

once for all.<br />

A static site cannot interact<br />

with data.<br />

Static WebDev site: the Web-<br />

Dev engine is not required.<br />

The page contents are built<br />

from data found in the data files,<br />

but they cannot change.<br />

Static WebDev site: the Web-<br />

Dev engine is not required.<br />

Data displayed in the pages<br />

can change.<br />

Usually pages allow you to:<br />

- run processes and/or calculations<br />

by programming.<br />

- display data stored in a database.<br />

- display images and interactive<br />

text.<br />

Dynamic WebDev site: the<br />

WebDev engine is required.<br />

Examples of sites<br />

The table below shows a few examples of static and dynamic sites:<br />

Part 1: Intern<strong>et</strong>: Main concepts<br />

Static sites<br />

- site presenting a company, …<br />

- association site<br />

- personal site<br />

- site of a daily newspaper, …<br />

Note : A dynamic site can include a static section (to present a company for instance).<br />

With WebDev you can create:<br />

- static pages.<br />

- dynamic pages.<br />

- semi-dynamic pages.<br />

Dynamic sites<br />

- product catalog and real-time order management<br />

- travel booking site<br />

- company stock management site (intran<strong>et</strong>), …


13<br />

Types of dynamic sites<br />

A dynamic site can display pages whose contents change. These contents are usually linked<br />

to a database.<br />

For instance, a dynamic site can manage travel booking in real-time. Bookings are saved<br />

in a data file and can be displayed at any time.<br />

WebDev offers two types of dynamic sites:<br />

- dynamic WebDev site. This type of site requires a WebDev engine on the server. It can<br />

support many databases.<br />

- dynamic PHP site. This type of site requires a PHP engine on the server. It is recommended<br />

for dynamic sites hosted by a public host. It only supports MySQL databases.<br />

Dynamic site<br />

PHP<br />

Dynamic WebDev site<br />

PHP site<br />

Hyper File<br />

ODBC<br />

OLE DB<br />

Native Accesses<br />

Oracle Informix<br />

SQL Server Progress<br />

MySQL Sybase<br />

DB2 Oracle Lite<br />

XML AS/400<br />

...<br />

MySQL<br />

Part 1: Intern<strong>et</strong>: Main concepts


14<br />

Types of pages<br />

WebDev offers different types of pages to use in sites created with WebDev:<br />

- Static pages. This type of page displays unchanging data.<br />

- Semi-dynamic pages. These pages can display data from a database. They are generated<br />

on the development computer along with their contents when the site is created.<br />

Contents do not change once the corresponding HTM pages have been created.<br />

- Dynamic pages. These pages display information from a database dynamically. The<br />

contents vary with the record displayed.<br />

When a dynamic page is displayed, the corresponding context is automatically saved<br />

and updated on the server. The application context mainly has global variables, positioning<br />

variables in data files, and so on.<br />

- Dynamic AWP pages. These pages dynamically display information from a database.<br />

The contents vary with the record displayed.<br />

AWP pages may or may not use the application context. If they don’t use the application<br />

context, they are independent.<br />

- Dynamic PHP pages. These pages dynamically display information from a database.<br />

They can only be used in a PHP site.<br />

Part 1: Intern<strong>et</strong>: Main concepts<br />

The following pages illustrate the different types of pages.


15<br />

Principle of the static page<br />

Development<br />

computer<br />

DEVELOPMENT<br />

Creation of a static page<br />

with WebDev<br />

(".WWH" file)<br />

Server<br />

DEPLOYMENT<br />

HTML page<br />

Web user’s<br />

computer<br />

LOOK-UP<br />

Part 1: Intern<strong>et</strong>: Main concepts<br />

Static page viewed<br />

in the browser


16<br />

Principle of the dynamic page<br />

Development<br />

computer<br />

DEVELOPMENT<br />

Creation of a dynamic page<br />

with WebDev (".WWH" file)<br />

Server<br />

DEPLOYMENT<br />

HTML<br />

page<br />

WebDev<br />

engine<br />

Database<br />

Part 1: Intern<strong>et</strong>: Main concepts<br />

Dynamic page running in the browser.<br />

Data displayed in the pages changes<br />

according to the web user’s action.<br />

LOOK-UP<br />

Web user’s<br />

computer


17<br />

Principle of the semi-dynamic page<br />

DEVELOPMENT<br />

Development<br />

computer<br />

Database<br />

linked to project<br />

Creation of a semi-dynamic<br />

page with WebDev<br />

(".WWH" file)<br />

Generation of<br />

static pages<br />

(".HTM" files)<br />

Server<br />

DEPLOYMENT<br />

HTML<br />

pages<br />

Static page (corresponding to semi-dynamic<br />

pages) running in the browser.<br />

The page displayed corresponds to the<br />

information requested by the web user.<br />

LOOK-UP<br />

Web user’s<br />

computer<br />

Part 1: Intern<strong>et</strong>: Main concepts


18<br />

Comparing AWP pages and dynamic WebDev<br />

pages<br />

Dynamic page<br />

When a dynamic WebDev page is displayed, the following operations are performed:<br />

1. The page is called.<br />

2. WebDev engine runs. This engine will remain on server until the end of application.<br />

3. Application context created. This context will remain on server until the end of the application.<br />

4. The WebDev engine runs the server code and builds the HTML page (from data found<br />

in the database for instance).<br />

5. When the engine has built the HTML page, the server sends the result to the web user<br />

(browser).<br />

Web user’s computer<br />

Call to<br />

display<br />

MyPage1.htm<br />

Call to<br />

display<br />

MyPage2.htm<br />

Part 1: Intern<strong>et</strong>: Main concepts<br />

Server<br />

WebDev<br />

engine runs<br />

MyPage1.htm<br />

displays<br />

Context<br />

created<br />

MyPage1.htm file<br />

created<br />

Context<br />

MyPage2.htm<br />

displays<br />

MyPage2.htm file<br />

created<br />

WebDev engine<br />

stops and the context<br />

closes (end of<br />

application, <strong>et</strong>c.)


19<br />

AWP Pages<br />

An AWP page is a binary file with the page’s HTML code and the server code (entered in<br />

the code editor by the developer). This file must have an ".awp" extension to be interpr<strong>et</strong>ed<br />

by the server.<br />

When a browser (web user) wants to access a dynamic AWP page built with WebDev:<br />

1. The server recognizes the file as AWP.<br />

2. The server calls the WebDev engine to read the AWP file.<br />

3. The WebDev engine runs the server code and builds the HTML page (from data found<br />

in the database for instance).<br />

4. When it has built the HTML page, the engine stops.<br />

5. The server sends the result (HTML page) to the web user (browser).<br />

Web user’s computer<br />

Call to<br />

display<br />

MyPage1.AWP<br />

Call to<br />

display<br />

MyPage2.AWP<br />

Server<br />

MyPage1.htm<br />

displays<br />

WebDev engine<br />

runs<br />

MyPage1.htm file<br />

created<br />

WebDev engine<br />

stops<br />

MyPage2.htm<br />

displays<br />

WebDev engine<br />

runs<br />

MyPage2.htm file<br />

created<br />

WebDev engine<br />

stops<br />

Part 1: Intern<strong>et</strong>: Main concepts


20<br />

Part 1: Intern<strong>et</strong>: Main concepts


PART 2<br />

Site Development


23<br />

Developing a site with WebDev<br />

Requirements<br />

Create the project<br />

Import existing files<br />

Create the analysis<br />

Development<br />

- Project RAD<br />

- Page RAD<br />

- Queries<br />

- Reports<br />

- Source code<br />

GO<br />

Run the site test<br />

Finals tests<br />

Install the site<br />

on a test computer<br />

WDAdmin<br />

Run the site test from<br />

the administrator<br />

WDTEST<br />

SITE<br />

Install the site<br />

on a server<br />

Run site test<br />

Run stress tests<br />

Part 2: Site development<br />

Open the site


24<br />

Terminology: Site and project<br />

A WebDev project is a s<strong>et</strong> of pages, controls, classes, components, and so on, used to<br />

build a site for intern<strong>et</strong> / intran<strong>et</strong>.<br />

A WebDev analysis contains the description of data files.<br />

A project is usually linked to an analysis.<br />

An analysis can be linked to one or more projects.<br />

Project 2<br />

Classes<br />

Pages and<br />

controls<br />

Style she<strong>et</strong><br />

Analysis<br />

Project 1<br />

Project N<br />

Classes<br />

Style<br />

she<strong>et</strong><br />

Pages and<br />

controls<br />

Classes<br />

Style<br />

she<strong>et</strong><br />

Pages and<br />

controls<br />

Part 2: Site development<br />

To create a site called "whosgotlovelyeyes.com", create a project called "whosgotlovelyeyes".


25<br />

Hard and software specifications<br />

Web user<br />

• a computer: PC, Mac, Unix, WebTV, console, and so on<br />

• a browser: Intern<strong>et</strong> Explorer, N<strong>et</strong>scape, and so on<br />

• intern<strong>et</strong> (or intran<strong>et</strong>) access<br />

There are no modules to download. The system works immediately.<br />

Server<br />

Development computer<br />

• 1 server: PC • 1 computer: PC<br />

• 1 server operating system<br />

(Windows or Linux): Windows 2000,<br />

NT server, and so on.<br />

• 1 Web server program : IIS,<br />

Apache, and so on.<br />

• 1 operating system: Windows 2000, NT,<br />

98, 95, and so on.<br />

• 1 Web server program: IIS, Apache, and<br />

so on.<br />

• 1 WebDev application server<br />

(dynamic WebDev sites only)<br />

• 1 WebDev "Development" program<br />

• the site itself • the site currently developed<br />

• the data *<br />

• the data (optional) *<br />

(dynamic site only)<br />

* Data can be located on another computer on the n<strong>et</strong>work.<br />

A UNIX or Linux machine can be used as a front-end server.<br />

• at least one browser: Intern<strong>et</strong> Explorer,<br />

N<strong>et</strong>scape, and so on.<br />

Part 2: Site development


26<br />

Server configuration<br />

For a dynamic WebDev site:<br />

Web user’s<br />

computer<br />

Only a browser<br />

required.<br />

Connection to<br />

WebDev site<br />

Server<br />

Web server (IIS,<br />

Apache, <strong>et</strong>c.)<br />

WebDev<br />

Engine<br />

WebDev site<br />

Database<br />

For a static or semi-dynamic site:<br />

Part 2: Site development<br />

Web user’s<br />

computer<br />

Only a browser<br />

required.<br />

Connection to<br />

WebDev site<br />

Server<br />

Web server (IIS,<br />

Apache, <strong>et</strong>c.)<br />

WebDev site


27<br />

Custom-folders: Organize your project<br />

The WebDev project editor can be used to map the entire project.<br />

With large projects, this representation may be difficult to read. You can make it easier<br />

with a "Global View" and "Custom-Folders".<br />

Custom-folders contain the elements you store there, usually a part of your site, such as<br />

customer or supplier management, and so on.<br />

Some elements can be shared among several "custom-folders". This makes it easier to<br />

work on a part of a site.<br />

Global view of project<br />

Custom folder display<br />

D<strong>et</strong>ails of a custom-folder<br />

Part 2: Site development


28<br />

Source Code Manager (SCM)<br />

Overview<br />

To make team development easier for you, WebDev now includes a Source Code Manager.<br />

This enables several developers to work tog<strong>et</strong>her on the same project at the same time.<br />

Part 2: Site development<br />

Elements found in the SCM can be shared:<br />

- via a n<strong>et</strong>work<br />

- via the intern<strong>et</strong><br />

- in off-line mode. In this case, elements requiring specific attention should be checked<br />

out of the SCM, for instance when connecting a laptop to the main system.


29<br />

How Source Code Manager works<br />

Here is an example of how the Source Code Manager works:<br />

If an element (page, report, and so on) is already checked out, it cannot be checked out again.<br />

When the elements have been modified, they must be checked back in to include them in the main<br />

project. Indeed, the SCM database keeps an history of all the project elements since their creation.<br />

Whenever an element is checked in, the main project version number is incremented by 1.<br />

Part 2: Site development


30<br />

Project Monitoring Center<br />

The Project Monitoring Center helps you to organize and schedule a project from end to end. It l<strong>et</strong>s<br />

you know all the tasks to perform in a project, the developers working on it, the time frame required,<br />

its state of progress, and so on.<br />

Part 2: Site development<br />

How Project Monitoring Center works<br />

When the list of all the tasks in a project is compl<strong>et</strong>e, the Project Monitoring Center does<br />

the rest. Entering the time spent is almost automatic, requires no specific action and engenders<br />

no particular constraints.<br />

When a project is opened, the Project Monitoring Center asks for or indicates the current<br />

task. As soon as a task is performed, indicate that this task is over and specify the new<br />

task.<br />

A task can be linked to a project element (page, report, and so on). Whenever an element<br />

is opened, the time spent on this element is counted and stored in Monitoring Center. Moreover,<br />

you can go to the task list and automatically open the element related to the task<br />

you want to perform from.<br />

Developers can also view their task list directly in the "Project Monitoring Center" pane.


31<br />

Project configuration<br />

Project configurations enable you to create several different "targ<strong>et</strong>s" from the same project.<br />

For example, from the same project, you can create:<br />

- 2 or 3 executables that do not contain the same elements, with different names, and<br />

so on.<br />

- 3 or 4 components<br />

- 2 Web services<br />

- 1 .N<strong>et</strong> assembly<br />

You can work on a specific configuration at any time: the elements that do not belong to<br />

it are grayed in Project Editor.<br />

WebDev Project<br />

Project Configurations<br />

Configuration 1 Configuration 2 Configuration 3<br />

Site Library Component<br />

...<br />

You can generate all (or specific) project configurations in one go by multiple generation.<br />

Part 2: Site development


32<br />

Multiple generation<br />

Project configurations enable you to easily define the "Targ<strong>et</strong>s" for your project. For the<br />

same project, you can define executables, libraries, Web Services, .N<strong>et</strong> assemblies, and<br />

so on.<br />

To generate the result of each configuration, you can of course select them one by one<br />

and generate the related program.<br />

Another faster way is available: multiple generation. In one operation you select all the<br />

configurations you want to generate, and the result is immediate.<br />

Part 2: Site development<br />

To run a multiple generation, use the "Workshop .. Batch Generation" option.


33<br />

RAD<br />

RAD (Rapid Application Development) can be used to create pages from:<br />

- the analysis linked to the project,<br />

- standard RAD models,<br />

- custom RAD models,<br />

- WebDev templates.<br />

The generated pages contain the requisite code. They can be tested immediately with data<br />

on the development computer.<br />

Analysis<br />

RAD model<br />

RAD Pattern<br />

Template<br />

RAD<br />

Full Application RAD<br />

Page RAD<br />

Example of page generated by RAD<br />

Example of code generated by RAD<br />

Part 2: Site development


34<br />

RID<br />

RID (Rapid graphical Interface Design) can be used to create pages from:<br />

- the analysis linked to the project,<br />

- standard RAD models,<br />

- custom RAD models,<br />

- templates.<br />

The pages generated only contain the controls linked to the analysis items. The developer<br />

must write all the code needed for these pages to work. You can enter your custom code<br />

directly.<br />

Analysis<br />

RAD model<br />

RAD Pattern<br />

Template<br />

RID<br />

Full Application RID<br />

Page RID<br />

Part 2: Site development<br />

Example of page generated by RID<br />

This page does not contain any code.


35<br />

Code types<br />

Server code or browser code?<br />

Two kinds of actions can be programmed in a WebDev site:<br />

Web user’s<br />

computer<br />

1. Actions that can be<br />

performed locally (on<br />

the web user’s computer):<br />

input check, and<br />

so on.<br />

Server<br />

2. Actions requiring a r<strong>et</strong>urn<br />

to the server (dynamic<br />

pages only):<br />

information read in the<br />

database, programmed<br />

calculations/processes,<br />

and so on.<br />

To manage such actions, the WebDev code editor uses two different types of code:<br />

- Server code (Yellow or Pink in the code editor): This code is written in W-Language (yellow)<br />

or PHP (pink, only available in PHP pages). It is run on the server. This code is<br />

available in dynamic pages only.<br />

- Browser code (Green or Blue): This code is written in W-Language (green) or Javascript<br />

(blue). When the page is saved, the code is automatically translated into Javascript and<br />

included in the WebDev HTML pages. It is run locally (on the web user’s computer) and<br />

requires no server action.<br />

Server code in a PHP page: W-Language or PHP?<br />

Codes run on the server are represented in the code editor by a yellow or pink line.<br />

- Yellow line = W-Language: the code header is preceded by WL.<br />

- Pink line = PHP: the code header is preceded by PHP.<br />

Part 2: Site development


36<br />

To switch from a yellow code (W-Language) to a pink one (Javascript), click the WL beside<br />

the code header (or vice versa for PHP). When a PHP page is saved, the W-Language code<br />

is automatically converted to PHP.<br />

We advise you to develop in W-Language.<br />

Browser code: W-Language or Javascript ?<br />

Codes run on the web user’s computer (browser) are represented in the code editor by a<br />

green or blue line.<br />

- green line = W-Language: the code header is preceded by WL.<br />

- blue line = Javascript: the code header is preceded by JS.<br />

To switch from a green code (W-Language) to a blue one (Javascript), click the WL beside<br />

the code header (or vice versa for JS). When the page is saved, the W-Language code is<br />

automatically converted to Javascript.<br />

Part 2: Site development<br />

We advise you to develop in W-Language.<br />

The icon bar at the bottom of the code window is used to manage events in addition to the<br />

default ones:<br />

Events are added to the codes in Code Editor by clicking the relevant code icon. Additional<br />

events can be: double-click, key down, key pressed, key up, button down, mouse movement,<br />

and so on.<br />

Reminder: Browser code can be used in dynamic, semi-dynamic or static pages.


37<br />

W-Language: straightforward and very<br />

powerful<br />

W-Language is the integrated WebDev language. You can use it to easily program all the<br />

intern<strong>et</strong> processes you need without having to know HTML, Javascript or PHP.<br />

W-Language consists of simple orders, similar to everyday language for intuitive programming<br />

(W-Language is compatible with WinDev, the leading IDE in France).<br />

Here is a little example to show you how powerful W-Language is: checking an address<br />

input:<br />

In W-Language, you only need a few lines …<br />

IF NoSpace(ADDRESS) = "" THEN<br />

Error("Enter your address")<br />

R<strong>et</strong>urnToEdit(ADDRESS)<br />

END<br />

In Javascript, the process is like this:<br />

<br />

function EXE_NoSpace( szString , nPart )<br />

{<br />

var nFirst = 0;<br />

var nLast = szString.length-1;<br />

if (nPart & 1) while (szString.charAt(nFirst)==" ") nFirst++;<br />

if (nPart & 2) while (szString.charAt(nLast)==" ") nLast--;<br />

r<strong>et</strong>urn szString.substring(nFirst,nLast+1);<br />

}<br />

// Click (onclick) BUTTON_OK<br />

function _VALIDCDE_BUTTON_OK_CLI()<br />

{<br />

if((EXE_NoSpace(ADDRESS,3)==""))<br />

{<br />

alert("Please enter your address ");<br />

r<strong>et</strong>urn;<br />

}<br />

}<br />

<br />

W-Language code is more reliable because it is easier to write, understand and maintain.<br />

It is much more reliable. Upgrading is easier.<br />

Use W-Language for all your processes.<br />

Part 2: Site development


38<br />

Component<br />

A component is a suite of WebDev elements: pages, reports, analysis, and so on which implements<br />

a specific feature. For example, a component can correspond to one of the following<br />

features:<br />

- Send faxes,<br />

- Send emails,<br />

- …<br />

A WebDev component can be distributed to other WebDev developers (free of charge or<br />

not). They can then simply integrate the feature offered by the component into their site.<br />

The component will be included in the site and distributed along with it.<br />

WebDev<br />

project<br />

Component<br />

Development<br />

Generating the component<br />

.WDK file<br />

Part 2: Site development<br />

WebDev<br />

Project<br />

Use of component<br />

Component imported<br />

to WebDev projects<br />

WebDev<br />

Project<br />

Use of component<br />

WebDev<br />

Project<br />

Use of component


PART 3<br />

Displaying information in a page


41<br />

Two site layouts: templates or frames<strong>et</strong>s<br />

When you design a site, you can choose one of the following layout m<strong>et</strong>hods:<br />

- site based on "templates": the pages use the same model. They are sequenced and<br />

fully displayed in the browser. The principle of site development is simple: you just<br />

create the template and use it in the pages.<br />

- site based on "frames<strong>et</strong>s": a frames<strong>et</strong> is use to freeze part of a site (such as the menu).<br />

Pages are sequenced in a frame within the frames<strong>et</strong>.<br />

These layouts are described in the following pages.<br />

Advantages of templates<br />

Templates help to:<br />

- optimize the speed of page display in a site.<br />

- keep down the number of generated HTML files (and hence the number to load on the<br />

web user’s computer).<br />

- simplify page creation.<br />

- simplify page layout.<br />

- simplify update of the site’s style book.<br />

- simplify management of page destinations.<br />

- and so on.<br />

Part 3: Displaying information in a page


42<br />

Templates<br />

With WebDev, you can create templates. These contain all the graphics used by the site<br />

pages.<br />

Changes to a template are automatically applied to all the pages that use it.<br />

A template ensures you comply with the style book defined for a site.<br />

Part 3: Displaying information in a page<br />

Defining a template.<br />

The template is bordered<br />

in yellow in the editor.<br />

Using a template for several pages.<br />

Elements belonging to the template are identified by a yellow square.<br />

To create a template based on the current page, select the "File .. Save As Template" option.<br />

To create a page based on a template, select the template that will be used when the<br />

page is created.<br />

Note: Elements linked to the template can be programmed in the template itself.


43<br />

Frames<strong>et</strong>: a split HTML page<br />

A frames<strong>et</strong> is a specific type of page, divided into several zones called "frames". An HTML<br />

page is displayed in each frame.<br />

A frames<strong>et</strong> is used to group several pages in a single window in the browser. A typical<br />

example is the site menu in one frame and the site pages in another.<br />

Frames<strong>et</strong>s can be used to easily change the information displayed. The same frame can<br />

display different pages depending on what the web user does.<br />

Page<br />

displayed in a<br />

frame<br />

Frame: where<br />

a page is<br />

displayed<br />

Frames<strong>et</strong> displayed in the browser<br />

Page of the<br />

site itself<br />

Part 3: Displaying information in a page<br />

Schematic layout of the frames<strong>et</strong> in 3 separate frames


44<br />

Creating a page in the editor …<br />

To create a page with WebDev, you proceed as follows:<br />

Create a page in the WebDev Page Editor.<br />

Part 3: Displaying information in a page<br />

Enter code lines (optional step).<br />

Save the page.<br />

Browser code<br />

Server code


45<br />

The following files are automatically<br />

created:<br />

Types of page available<br />

AWP<br />

PHP<br />

Dynamic<br />

WebDev page<br />

Semi-dynamic<br />

WebDev<br />

page<br />

Static WebDev<br />

page<br />

AWP Page<br />

PHP Page<br />

Generic<br />

.HTM<br />

WDL<br />

Legend:<br />

Page source file in WebDev format (.WWH)<br />

.HTM .HTM .AWP .PHP<br />

Files generated<br />

.WWH: Page source format<br />

This file contains the full description of the page (control,<br />

browser code and server code). It is used by the editor<br />

and stays on the development computer.<br />

Generic .HTM<br />

This file contains the full description of the page (control,<br />

browser code and server code). Some of the param<strong>et</strong>ers<br />

are generic and will be filled dynamically when<br />

the page is displayed.<br />

.HTM: HTML page of the site<br />

This file contains the control description in HTML and<br />

the browser code (if the code was edited in W-Language,<br />

it is automatically translated into Javascript) and is generated<br />

from the WWH file. It is located on the server.<br />

.WDL: project library<br />

The library contains the server code of the project<br />

pages and is generated when the dynamic site is<br />

deployed. It is located on the server.<br />

.AWP: AWP page<br />

This file contains the description of the controls,<br />

server code and browser code and is generated<br />

from the WWH file. It is located on the server.<br />

.PHP: PHP page<br />

This file contains the control description, server<br />

code and browser code in PHP format and is generated<br />

from the WWH file. It is located on the server.<br />

Part 3: Displaying information in a page


46<br />

Choosing a control type for the information<br />

to display<br />

WebDev provides a wide range of controls:<br />

You want to …<br />

Display text, a title, and so on<br />

Define a colored zone<br />

Display a price, quantity, address, date, time, …<br />

Select a value in a list (Country, City, and so on)<br />

Select several values in a list (message recipients, files to<br />

download, and so on)<br />

Control type to use:<br />

Static, HTML static<br />

Cell, HTML table<br />

Formatted Display Control<br />

Radio button, Combo box, List box<br />

Check box, List box<br />

Part 3: Displaying information in a page<br />

Display a graphic image (photo, and so on)<br />

Display an animated image (animated Gif)<br />

Display a page according to the zone clicked in an image<br />

Display the file content in a table (list of customers, order<br />

d<strong>et</strong>ails, and so on)<br />

Display a regularly refreshed image<br />

Repeat the controls in a page (product catalog with photo,<br />

and so on)<br />

Use an existing HTML code<br />

Use a Java appl<strong>et</strong> (calendar, clock, and so on)<br />

Enter information<br />

Display ranked information (content of a directory, and so<br />

on)<br />

Display a Flash animation<br />

Align controls (HTML table)<br />

Program an action in a page (display a page, validate an<br />

entry, and so on)<br />

Image, Clickable image<br />

Image<br />

Clickable Image<br />

Browsing or memory table, Browsing<br />

or memory looper<br />

Web Camera control<br />

Looper<br />

HTML control<br />

Java control<br />

Edit Control<br />

TreeView control<br />

Flash Control<br />

Cell, HTML table<br />

Button, Link control


47<br />

You want to …<br />

Display a page from another site in one of your pages<br />

Display a bar chart, line chart or pie chart<br />

Display a page from your site within one of your pages<br />

Display an automatic menu (built as the site is browsed)<br />

Display thumbnail images<br />

Control type to use:<br />

IFrame control<br />

Chart control<br />

Internal Page control<br />

Map Path control<br />

Thumbnail control<br />

Part 3: Displaying information in a page


48<br />

What type of image to choose: dynamic,<br />

static, generated, … ?<br />

Site pages are often illustrated with images.<br />

You can use different types of images with WebDev. Each type is designed for a specific<br />

use.<br />

Part 3: Displaying information in a page<br />

Here is a summary of their characteristics, and how to use them.<br />

Our advice: always use homoth<strong>et</strong>ic images when images come from a database.


49<br />

Static<br />

Type of image<br />

Image not changed when the site<br />

is used (company logo for instance).<br />

Image only changed in browser<br />

code (image selected by an<br />

Upload control).<br />

Characteristics<br />

The image linked to a static image must be selected in the<br />

WebDev editor.<br />

This image can be changed by programming in browser code<br />

only.<br />

Image formats recognized by WebDev are authorized.<br />

When the page is saved, the image is automatically converted<br />

to GIF or JPEG format and saved in the _WEB directory<br />

(unless it is already in GIF or JPEG format).<br />

When the WebDev site is deployed:<br />

- the file linked to the image must be found on the server.<br />

- if the image is changed in browser code, the new image<br />

must be accessible and in a format the browser recognizes.<br />

Dynamic<br />

Image modified when the site is<br />

used (product image in a form,<br />

photo in a directory, and so on)<br />

This is the most commonly-used<br />

image.<br />

Generated<br />

Image drawn when the site is<br />

used:<br />

- charts (grXXX functions)<br />

- drawings (dXXX functions)<br />

A background image can be used.<br />

From a database<br />

Products image displayed in a looper<br />

A dynamic image can be changed by programming in server<br />

code or in browser code.<br />

An image linked to a control by programming must be:<br />

- in the _WEB directory.<br />

- in a format recognized by the browser (GIF, JPEG or other).<br />

Note: binary memos cannot be used.<br />

A generated image is built when the dynamic WebDev site is<br />

used.<br />

It is not advisable to use this type of image to display existing<br />

"image" files: your site is likely not to perform as well.<br />

When the browser asks to display the image (e.g. when displaying<br />

or refreshing the page), a temporary image of the current<br />

drawing is made on server and saved in JPG format. This<br />

image is the one displayed in the browser.<br />

These images are saved in binary memos (memo) or text controls<br />

(path).<br />

It is best to use a Homoth<strong>et</strong>ically centered image: all the images<br />

displayed are proportionately resized to fit the image control.<br />

Part 3: Displaying information in a page


50<br />

Creating button effects: custom buttons<br />

A new button is gray by default. To customize it, you can use images. Images enable you<br />

to define its shape and color ("D<strong>et</strong>ails" tab in the button description).<br />

If only one image is linked to a button, it will be used whatever action the web user performs.<br />

To create special effects, e.g. change color when the mouse cursor crosses the button, you<br />

can link several images to it.<br />

Rollover effect<br />

For a rollover effect alone, link two images to the button: one for its "normal" status and<br />

one for its "rollover" status.<br />

Normal button<br />

"Rollover" button<br />

Part 3: Displaying information in a page<br />

These images are specified in the "D<strong>et</strong>ails" tab of the button description window:<br />

Notes:<br />

- The "Catalog" button enables you to choose the two image types from the WebDev image<br />

library.<br />

- Use the option "Border Image/Background Image with 3 images" to easily manage the<br />

width of the button image. When you do so, WebDev automatically divides the button<br />

image into 3 images in order to g<strong>et</strong> the same size of the button.


51<br />

Pressed button effect<br />

To create an effect of pressed button, you can link a specific image to it: this image contains<br />

three drawings. Each one corresponds to a button status: normal, rollover, pressed.<br />

In this case, the button status is managed by a special Java appl<strong>et</strong> provided with WebDev<br />

(just sit back and watch, WebDev does it all for you!)<br />

Image with different button statuses: Normal, Pressed and Rollover<br />

Specify the image file to use in the "D<strong>et</strong>ails" tab of the button description window ("Image"<br />

option).<br />

Note: Use the "Catalog" button to choose a 3-status image from the WebDev image library.<br />

Uniform button styles<br />

For your buttons to have the same style, define a specific style and use it for all of them.<br />

Part 3: Displaying information in a page


52<br />

Repeating a control group<br />

Loopers are used to repeat a s<strong>et</strong> of controls "n" times. When they are repeated, the controls<br />

in the looper can display different information. This way, you can display database<br />

records at every repeat.<br />

Creating a looper in the WebDev editor<br />

Part 3: Displaying information in a page<br />

Looper displayed in the browser<br />

A number of characteristics of each looper control can change when it is repeated: caption,<br />

text color, and so on.<br />

You can repeat by:<br />

- column<br />

- several columns. This is called a "Horizontal Looper".<br />

When you create a looper, you can link it directly to a data file or a query. Its attributes are<br />

automatically defined. No programming is required.


53<br />

Displaying a file in a Table<br />

or Looper<br />

You can use a browsing table or browsing looper to display data from a data file. The file<br />

structure is described in the data model editor, and the data could be edited in the site.<br />

The file can be browsed to display data in the table or looper. The file is read for each row<br />

displayed: when it is read, the record is displayed in a table row or in a looper row.<br />

With WebDev, you create a browsing table or looper with the wizard. You choose the items<br />

displayed, the file search key, <strong>et</strong>c. and the control is created with all the requisite code. A<br />

pager displays automatically, to display the previous or next file records.<br />

You can limit the number of records displayed in the control with a filter (HFilter function<br />

used in the control initialization code).<br />

There are several W-Language functions to handle:<br />

- browsing tables. These functions start with "Table".<br />

- browsing loopers. These functions start with "Looper".<br />

To add a record, add it to the corresponding Hyper File file (HAdd function), then redisplay:<br />

- the table with TableDisplay.<br />

- the looper with LooperDisplay.<br />

To del<strong>et</strong>e a record, del<strong>et</strong>e it from the corresponding Hyper File file (HDel<strong>et</strong>e function), then<br />

redisplay:<br />

- the table with TableDisplay.<br />

- the looper with LooperDisplay.<br />

Part 3: Displaying information in a page


54<br />

Positioning controls in a page<br />

WebDev has two ways to optimize the position of controls in pages:<br />

- positioning tables<br />

- rulers and grid<br />

Positioning tables<br />

Positioning tables are the most common way of aligning controls in an HTML page. They<br />

are also used to create page footers.<br />

Part 3: Displaying information in a page<br />

To view positioning tables, use the "Display .. View Positioning Table" option.<br />

Rulers and grid<br />

Like the snapping grid, alignment rulers are a simple way to align controls in a page.<br />

Rulers can be displayed with the "Display .. Rulers" option.<br />

The grid can be activated with the "Display .. Grid" option.


55<br />

Overlaying controls<br />

For effects of transparency or depth, you can superimpose your controls.<br />

Each control has a "Control can be stacked" option ("D<strong>et</strong>ails" tab of the control description<br />

window).<br />

If you check this option, the control is unlinked from the positioning tables. You can move<br />

and reposition it "on top of" another in the page.<br />

Note: you define the control that will be on top, not the one under it.<br />

For instance, to overlay a caption on an image, specify that the caption can be overlayed<br />

and position it on the image.<br />

In the editor<br />

In the browser<br />

Caution: Overlaying requires the web user to have a recent browser (Intern<strong>et</strong> Explorer version<br />

4 or later, N<strong>et</strong>scape 4.7 or later).<br />

This type of browser is very widespread these days.<br />

Part 3: Displaying information in a page


56<br />

CSS styleshe<strong>et</strong>s: to simplify page layout<br />

Styleshe<strong>et</strong>s are templates to give page controls the same appearance.<br />

Styleshe<strong>et</strong>s are used to define:<br />

- the size and form of your texts, and the font,<br />

- paragraph alignement, indent,<br />

- text style (bold or italic), color,<br />

And much more.<br />

When you change a style characteristic, all the controls linked to the style are refreshed.<br />

So you can change a site’s style book just by a few changes to the styles used.<br />

For example: increasing the size from 9 to 15:<br />

Part 3: Displaying information in a page<br />

Caution: To use styleshe<strong>et</strong>s (CSS), the web user’s browser must be able to support them<br />

(Intern<strong>et</strong> Explorer version 4 or later, N<strong>et</strong>scape 4.7 or later).<br />

This type of browser is very widespread these days.<br />

Note: you can use the "CSS" tab to edit CSS code directly. The code will be added to the<br />

CSS styleshe<strong>et</strong>.


57<br />

Centered or adapted sites?<br />

Page layout is a critical element in building a site. To optimize it, you must not forg<strong>et</strong> the<br />

web user’s screen resolution.<br />

For instance, if your site is created for a resolution of 1024 x 768 pixels, web users with a<br />

resolution of 800 x 600 pixels will see a lot of scrollbars.<br />

At the time this guide goes to press, we advise you to develop sites optimized for 800 x<br />

600.<br />

You can use two types of page layouts:<br />

- centered: The pages are in the middle of the browser. If the web user’s resolution is<br />

greater than the site’s optimal resolution, white margins will display on either side of<br />

the page.<br />

Resolution: 800 x 600 Resolution: 1024 x 768:<br />

margins on either side of the page<br />

- adapted: The pages are displayed in the usual way in the browser. If the web user’s<br />

resolution is greater than the site’s optimal resolution, a white margin will display to<br />

the right of the page.<br />

Resolution: 800 x 600<br />

Resolution: 1024 x 768:<br />

the page "hugs" the left-hand side<br />

Note: the type of page layout (centered or adapted) configured in a template will automatically<br />

be used by the pages linked to it.<br />

Part 3: Displaying information in a page


58<br />

10 ergonomy tips …<br />

1 Take care of your front door.<br />

A site runs from a home page. This page is the "front door" to the site.<br />

Take care with the appearance of the home page and simplify site launch: the logo or link<br />

used to enter the site must be visible and easy to identify.<br />

2 Introduce yourself.<br />

When web users come to a site, they must be able to identify the person or company in<br />

charge of it: give a name, a postal address, a web address, and so on.<br />

Part 3: Displaying information in a page<br />

Other helpful information:<br />

- the date the site was onlined or last updated,<br />

- its purpose, content and end,<br />

- the person in charge of administrating the company, its registration number, …


59<br />

3 Are your pages very long? Give the web user ways to go back to the top.<br />

If your pages are very long (more than 2 screens), use buttons or links to go back to the<br />

top quickly (to avoid using the scrollbar).<br />

Top of page<br />

End of page with a link to go back to the top<br />

4 Harmonize the style and alignment of your buttons.<br />

Check wh<strong>et</strong>her your buttons have the same appearance and check their alignment.<br />

Non-aligned buttons with<br />

different styles<br />

Aligned buttons that look<br />

alike<br />

5 Avoid useless scrollbars.<br />

To avoid useless scrollbars in frames<strong>et</strong> pages, select the "Automatic scrollbar" option in<br />

the page description window ("Frame" tab). This will ensure a scrollbar is only displayed<br />

when necessary.<br />

Part 3: Displaying information in a page


60<br />

6 Do you have lists with more than 20 elements to display? Use several pages to list<br />

them (pager control).<br />

Part 3: Displaying information in a page<br />

7 Use 100% images or homoth<strong>et</strong>ically centered images<br />

For your images to keep their proportions, choose:<br />

- 100% images (for static or dynamic images or if the image is the same as the control<br />

size).<br />

- or centered homoth<strong>et</strong>ic images (for generated images or images of varied sizes from<br />

a database): their size will be homoth<strong>et</strong>ically adapted to the zones defined for them<br />

and they will stay in proportion.<br />

100 % image if the<br />

control size is the<br />

same as the image<br />

size, otherwise<br />

Homoth<strong>et</strong>ic image<br />

Str<strong>et</strong>ched image<br />

(not recommended)<br />

Display mode<br />

selected in the editor<br />

(image description,<br />

"General" tab)


61<br />

8 Are you using images? Check wh<strong>et</strong>her they display properly in your pages.<br />

Image in the editor<br />

Image in the browser.<br />

Display problem<br />

If you have a display problem, check wh<strong>et</strong>her:<br />

- the image exists,<br />

- the image is saved in a format recognized by the browser (e.g. GIF or JPG),<br />

- the image is in the _WEB project subdirectory.<br />

9 Does the web user need to enter a quantity? Use a combo box to simplify the edit.<br />

10 Do you offer a product catalog with an ordering option?<br />

Give all the product d<strong>et</strong>ails (name, reference, price, and so on), and include a button or<br />

link to order it.<br />

Part 3: Displaying information in a page


62<br />

Multilingual site<br />

WebDev makes it easy to create multilingual sites based on the same project.<br />

A page in english …<br />

… the same page in french<br />

Part 3: Displaying information in a page<br />

To create a multilingual site, select the languages supported by the project ("Project .. Project<br />

Description", "Languages" tab).<br />

You can then configure all the project elements in these languages. WebDev enables you<br />

to configure:<br />

- the different elements (captions, page titles, and so on).<br />

- the display characteristics (edit mask and so on).<br />

- the image files for the elements (button, image control, and so on).<br />

All the elements (pages, reports, images, and so on) required are grouped into a single directory<br />

per language.


PART 4<br />

Actions on a page


65<br />

Displaying and sequencing pages<br />

A site is a s<strong>et</strong> of pages linked tog<strong>et</strong>her by buttons (or links). A click on a button displays a<br />

new page.<br />

To display a new page, there are two questions to ask:<br />

1. where to display it (new browser, frame, and so on)?<br />

2. what page to display?<br />

Where to display a page?<br />

A page is displayed in a specific "targ<strong>et</strong>": current page, new browser, and so on.<br />

The targ<strong>et</strong> can be defined:<br />

- in the page editor: no programming is required.<br />

- in the code editor, in a button (or link) process.<br />

Selecting a targ<strong>et</strong> in the page editor (most common m<strong>et</strong>hod)<br />

In a button, to define the targ<strong>et</strong> of the page to display:<br />

- Display the button or link<br />

description (right-click the<br />

control, "Description" option).<br />

- In the list of targ<strong>et</strong>s, select<br />

a pres<strong>et</strong> targ<strong>et</strong> or a frame<br />

(for a frames<strong>et</strong>).<br />

Note: Pres<strong>et</strong> targ<strong>et</strong>s are described later in this manual.<br />

Selecting a targ<strong>et</strong> in the code editor<br />

When the targ<strong>et</strong> depends on a choice made by the web user, it must be selected by programming.<br />

For example, if the web user does not enter a password, an error page displays<br />

in a new browser; otherwise, the next page displays in the current browser.<br />

The W-Language ChangeTarg<strong>et</strong> function is used to change the action targ<strong>et</strong> by programming.<br />

This function must be used in a browser code.<br />

Part 4: Actions in a page


66<br />

Choosing a targ<strong>et</strong><br />

When choosing a targ<strong>et</strong> for a button, link, clickable image, menu item, and so on, you can<br />

select:<br />

- a pres<strong>et</strong> targ<strong>et</strong>: there are four of these:<br />

- Current browser (_top for the initiated)<br />

- Current frame (_self)<br />

- Parent frame (_parent)<br />

- New browser (_blank). You can choose the characteristics of the new browser (with<br />

or without menu bar, status bar, and so on).<br />

- a frame in the current frames<strong>et</strong>.<br />

Note: in this diagram, the grayed area is where the page is displayed when the button is clicked.<br />

Current browser (_top)<br />

Click on<br />

a button<br />

Initial page<br />

New page displayed in<br />

the entire browser<br />

Part 4: Actions in a page<br />

Current frame (_self)<br />

Initial page<br />

Click on<br />

a button<br />

New page displayed in<br />

the same frame


67<br />

Parent Frame (_parent)<br />

Click on<br />

a button<br />

Initial page<br />

(2 nested frames<strong>et</strong>s)<br />

New page displayed in the<br />

page with the<br />

second frames<strong>et</strong><br />

New browser (_blank)<br />

Click on<br />

a button<br />

Initial page<br />

New page displayed in a new<br />

browser window<br />

Window used to define the characteristics<br />

of the new browser<br />

Part 4: Actions in a page


68<br />

What page to display?<br />

The page to display can be defined:<br />

- in the page editor (no programming is required).<br />

- in the code editor, in a button (or link, clickable image and so on) process.<br />

Selecting a page to display in the page editor (most common m<strong>et</strong>hod)<br />

To define the page to display:<br />

- Display the control description<br />

window (right-click the<br />

control, "Description" option).<br />

- Select the page to display in<br />

the list of actions.<br />

Selecting a page to display by programming<br />

You must select a page to display by programming when:<br />

- several pages can be displayed (e.g. an error page if the password is not entered, or<br />

the next page in the site)<br />

- a specific action must be performed on the server (calculation, reading a record, and<br />

so on).<br />

There are W-Language functions to open a new page (or frames<strong>et</strong>). The main ones are: PageDisplay<br />

(for pages) and Frames<strong>et</strong>Display (for frames<strong>et</strong>s).<br />

Part 4: Actions in a page


69<br />

Displaying a dynamic page: creating its context<br />

We know that WebDev can be used to create dynamic pages. The dynamic content is defined<br />

dynamically when the page is run (i.e. when the page is displayed in the web user’s<br />

browser).<br />

For each dynamic page displayed in the browser, a "page context" is created on the server.<br />

This context contains the page information (value of current variables, control contents,<br />

and so on).<br />

Web user’s<br />

computer<br />

Server<br />

Page Context<br />

Each dynamic page (displayed on the web user’s computer) is linked to a page context.<br />

If the page can display different data (e.g. product form with browse buttons), the context<br />

is modified and the page is refreshed whenever a new record is displayed.<br />

Part 4: Actions in a page


70<br />

Dynamic page display and update? PageDisplay or PageRefresh?<br />

W-Language has two functions to display a dynamic page: PageDisplay and PageRefresh.<br />

These are used to display or refresh a dynamic page. The concepts are compl<strong>et</strong>ely different.<br />

Displaying a page = new page<br />

Displaying a dynamic page corresponds to opening a "new page" in the browser. E.g., the<br />

"View_Product" page is opened to view an item selected in a table.<br />

Note: if you "display" a page already opened, the page and its context are closed and reopened.<br />

The page data are reinitialized.<br />

Refreshing a page = redisplaying a page (faster)<br />

Refreshing a dynamic page means you redisplay a page already opened in the browser.<br />

The action is the same as with the "Refresh" button in the browser.<br />

The dynamic page data is updated to match the contexts on the server. Only modified data<br />

are redisplayed.<br />

E.g.: In a business site, the page displaying the list of selected products is refreshed when<br />

a new product is ordered.<br />

Performance advice: To update data displayed in a dynamic page, use "PageRefresh".<br />

With "PageDisplay", the page takes longer to load.<br />

Part 4: Actions in a page


71<br />

Preventing a r<strong>et</strong>urn to a page<br />

The browser "Back" button enables web users to go back to a page already seen. However,<br />

it is not always a good idea to be able to go back to a page.<br />

For instance, in a business site, if the web user goes back to an order validation page, he<br />

might validate his order twice, and so place 2 orders.<br />

To prevent a r<strong>et</strong>urn to a page with the browser "Back" button:<br />

1. Display the page in WebDev Page Editor.<br />

2. Select "Display .. Selection Description". The page description window displays.<br />

3. Display the "D<strong>et</strong>ails" tab.<br />

4. Check "Prevent r<strong>et</strong>urn to page with the browser "Back" button".<br />

5. Validate.<br />

Part 4: Actions in a page


72<br />

Choose a type of button<br />

/ link<br />

Depending on the operation to run on the page<br />

controls, there are several types of button / link<br />

available.<br />

The type of button/link is defined in the control<br />

description window ("General" tab).<br />

Here are some examples of typical ways to use buttons / links in a page:<br />

- Send data from the current page to be processed on the<br />

server<br />

Example: Registration form: the link is used to check the validity<br />

of the information entered and to display a confirmation<br />

page. For this sort of process, use a "Send control<br />

values to server". The page data are sent to the server for<br />

processing.<br />

- Perform a process on the server, without r<strong>et</strong>rieving the current<br />

page’s data<br />

Example: Menu page made up of buttons: each button is<br />

used to open a page on the site. For this sort of process, use<br />

a "None" button.<br />

Part 4: Actions in a page<br />

- Perform a process in browser code<br />

Example: Perform a simple calculation<br />

locally, an edit check, and so on.<br />

For this sort of process, use a "None"<br />

button.<br />

- Display a page external to the WebDev site<br />

Example: Run a search engine with a button.<br />

For this sort of process, use a "None" button.<br />

- Res<strong>et</strong> the page controls<br />

Example: Link used to clear the controls found in the current page.<br />

For this sort of process, use a "Res<strong>et</strong> page controls" button.


73<br />

Button / link code run sequence<br />

Two click codes are linked to buttons / links:<br />

- browser click code, entered in W-Language (or Javascript) in the code editor. This code<br />

is included in the HTML page and run on the web user’s computer.<br />

- server click code entered in W-Language (only for dynamic pages). It is run on the server.<br />

The table below shows the codes run according to the type of button / link chosen, and<br />

the relevant action.<br />

The button / link appearance and targ<strong>et</strong> do not affect the sequence in which the codes<br />

are run.<br />

Browser click<br />

code<br />

Server click<br />

code<br />

Part 4: Actions in a page


74<br />

Operation Sequence of codes run Notes<br />

Submit<br />

Page res<strong>et</strong><br />

Action:<br />

None<br />

Run button / link click code<br />

Codes run:<br />

1. Browser control click code.<br />

2. Browser submit page code (if any).<br />

3. Send the values in the page controls to update the<br />

page context on the server.<br />

4. Control server code.<br />

Action: Display page<br />

Codes run:<br />

1. Browser control click code.<br />

2. Browser submit page code (if any).<br />

3. Send the values in the page controls to update the<br />

page context on the server.<br />

4. Control server code.<br />

5. Display page.<br />

Action: None<br />

Codes run:<br />

1. Browser control click code.<br />

2. Display the initial page (res<strong>et</strong> or clear all page controls<br />

and run the initialization code of each control).<br />

Page context automatically<br />

refreshed on<br />

the server (dynamic<br />

pages only).<br />

Page context automatically<br />

refreshed on<br />

the server (dynamic<br />

pages only).<br />

Page automatically<br />

displayed.<br />

Part 4: Actions in a page<br />

None<br />

Action: None<br />

Codes run:<br />

Browser code only.<br />

Action: Run button / link click code<br />

Codes run:<br />

1. Browser control click code.<br />

2. Control server code.<br />

Action: Display page<br />

Codes run:<br />

1. Browser control click code.<br />

2. Control server code.<br />

3. Display page.<br />

Page automatically<br />

displayed


75<br />

Uploading a file (image, <strong>et</strong>c.) to the server<br />

Uploading means sending a file from the Web user’s computer to the server.<br />

A simple example: Creating a contact in an address book. The web user wants to link a<br />

photo to the contact form. The photo is on his computer’s hard drive.<br />

The UPLOAD control is used to select the image with the "Browse" button.<br />

When the form is validated, the image file is sent to the server and copied on its hard drive<br />

(UploadCopyFile).<br />

The image is displayed in the contact form.<br />

When the page is validated,<br />

the uploaded file is copied<br />

on the server hard drive.<br />

Web server<br />

In the web user’s browser<br />

Host server<br />

Note: The appearance of the "Browse" button is defined by the browser.<br />

Part 4: Actions in a page


76<br />

WebDev and reports<br />

You can use the report editor for quality printouts.<br />

A report is created as follows:<br />

- data to print comes from a data source (file described in an analysis, Hyper File view,<br />

query, memory zone or text file).<br />

- a report groups, sorts and formats data.<br />

A report can be:<br />

- printed on a server printer (intran<strong>et</strong> site).<br />

- displayed in the web user’s browser (HTML, PDF, and so on).<br />

- emailed to the web user (PDF).<br />

- …<br />

Development<br />

computer<br />

Server<br />

Part 4: Actions in a page<br />

Report sources<br />

Txt<br />

Table Control<br />

Memory<br />

zone Control<br />

Query<br />

Text File<br />

Data<br />

Report<br />

Printout on<br />

server printer<br />

HTML, XML<br />

files, …<br />

XLS, PDF<br />

files, …<br />

Text Files<br />

XLS PDF<br />

Txt<br />

Browser


77<br />

Print Modes<br />

To print documents generated by your site (invoices, quotes, and so on), create reports<br />

with the report editor.<br />

To print these reports regardless of the configuration of the web user’s computer, we advise<br />

you to offer at least two print modes:<br />

- Printing in HTML format: the report is displayed in a new site page. It can be printed<br />

with the browser "Print" button. No specific software is required.<br />

- Printing in PDF format: this print mode requires Acrobat Reader on the web user’s<br />

computer.The print operation is run from from this program.<br />

Report in WebDev report editor<br />

Printing in HTML<br />

Printing in PDF<br />

Part 4: Actions in a page


78<br />

Processing several pages in succession<br />

In a business site, ordering can be a process involving several pages:<br />

- page 1: Selecting the products to order.<br />

- page 2: Viewing the cart.<br />

- page 3: Validating the order and entering the customer’s d<strong>et</strong>ails.<br />

Page 1: Selecting products<br />

Page 2: Viewing the cart<br />

Part 4: Actions in a page<br />

Page 3: Entering the customer’s d<strong>et</strong>ails<br />

In this case, the data must be written to the files in the order validation button code: all<br />

the order elements must be stored until the final validation. Do not write in the files during<br />

processing.<br />

Note: You can also use a transaction, but we advise you to store the order d<strong>et</strong>ails.


79<br />

Sending emails<br />

Emails are used:<br />

- for web users to communicate with each other: send messages to a site manager,<br />

mailing-list site, and so on.<br />

- to validate an order: a business site sends web users an email to validate their orders.<br />

- to transfer data from one computer to another: new orders entered in a business site<br />

are transferred by email to the company hq, and so on.<br />

WebDev can be used to send emails from a site in 2 different ways.<br />

1 From the web user’s computer<br />

Use this m<strong>et</strong>hod when an email is sent to a specific address: site author, technical support,<br />

sales department, and so on.<br />

The emailOpenMail browser function is used to open the web user’s messaging system.<br />

Some param<strong>et</strong>ers can be s<strong>et</strong> as default: recipient address, …<br />

Web user 3<br />

Web user n<br />

Web server<br />

Web user 2<br />

Emails b<strong>et</strong>ween<br />

web users Web user 1<br />

This m<strong>et</strong>hod uses the web user’s messaging system: there is no specific process in the<br />

WebDev site.<br />

Part 4: Actions in a page


80<br />

2 From the server (dynamic pages only)<br />

In this case, the server manages the emails. Emails can be sent:<br />

- directly from the dynamic WebDev site (e.g., to transfer data by email or to validate<br />

an order by email).<br />

- by the email spooler (supplied with WebDev).<br />

Web user N<br />

Web server<br />

Web user 3<br />

Email server<br />

(WebDev<br />

administrator)<br />

or<br />

Emails sent directly<br />

Web user 2<br />

Part 4: Actions in a page<br />

Web user 1<br />

Use this m<strong>et</strong>hod for custom email management:<br />

- checking contents of emails sent by web users (e.g., "distribution list" site),<br />

- checking the validity of the recipient address,<br />

- encrypting information sent by email,<br />

- validating a process, …


81<br />

Saving information on the web user’s<br />

computer with cookies<br />

A cookie is a file saved by the WebDev site on the web user’s computer. It can be read at<br />

any time from the server or the browser. Cookies are used to store recurring information<br />

on the Web user’s computer.<br />

For example, when a web user first comes to a site, information is requested (login, password,<br />

and so on) and stored on his computer. At the next logon, the WebDev site reads<br />

the information in the cookie created during the first visit and can gre<strong>et</strong> the web user personally<br />

on the first page.<br />

1st logon<br />

The WebDev site saves the<br />

web user’s information.<br />

A new web user<br />

enters his name and password<br />

Next logons<br />

The WebDev site<br />

reads the data<br />

entered before on the<br />

web user’s computer.<br />

By default, the WebDev site displays the<br />

information read in the cookie<br />

To create cookies in a WebDev site, use the W-Language CookieWrite function.<br />

To read cookies in a WebDev site, use the W-Language CookieRead function.<br />

Part 4: Actions in a page


82<br />

Protecting site access: passwords<br />

Site access by password is required in two cases:<br />

1. Protecting personal d<strong>et</strong>ails<br />

2. Restricting access to a site<br />

To protect personal d<strong>et</strong>ails<br />

To access personal d<strong>et</strong>ails again, the web user must enter a password. In a business site,<br />

the web user defines a password to access d<strong>et</strong>ails of previous orders.<br />

In this case, site access management requires:<br />

- an ID: At the first logon, the web user gives an identity and a password.<br />

Then, the web user gives his ID and can access the relevant features (and history, and<br />

so on).<br />

- a system to enable a web user to r<strong>et</strong>rieve a forgotten password.<br />

WebDev has all the resources required to manage personal passwords.<br />

Restricting access to a site<br />

By default, a website can be accessed by anyone. But they are not all designed for the general<br />

public: some features may be reserved to certain types of web user (site administrator<br />

for instance).<br />

Part 4: Actions in a page<br />

In this case, the site manager assigns a password to each web user. This password cannot<br />

be changed. It is used to access limited features.<br />

E.g., in a business site:<br />

- each salesperson will have a specific password and can access sales figures.<br />

- each member of the mark<strong>et</strong>ing team will have a specific password and can put new<br />

products online.<br />

With WebDev you can handle all types of site access easily.


83<br />

Encrypting information circulating on the<br />

Web with SSL<br />

By default, data exchanged b<strong>et</strong>ween the user’s computer and the Web server are not protected.<br />

Their confidentiality is not guaranteed.<br />

There are several ways to ensure confidentiality. A common system is the SSL protocol (Secure<br />

Sock<strong>et</strong> Layer).<br />

Implementing transactions secured by the SSL protocol<br />

To s<strong>et</strong> up SSL-secured transactions, you must compl<strong>et</strong>e the SSL formalities (purchase of<br />

a certified SSL key from a specialist organisation). For more d<strong>et</strong>ails, see the online help.<br />

SSL-secured transactions in a WebDev site<br />

Only sensitive data such as credit card numbers should be secured because the secure<br />

mode is slower.<br />

Secure transaction is implemented when a new page is opened with a button (or link). Use<br />

the SSLActive function in a button (or link) browser code. When the secure page is opened,<br />

all actions will be run in secure mode (i.e. encrypted).<br />

Web user’s computer<br />

Operations in secure mode<br />

Server<br />

SSLActive(True)<br />

Click on a<br />

button<br />

Open the<br />

page<br />

Secure<br />

page<br />

SSLActive(False)<br />

Click on a<br />

button<br />

Open the<br />

page<br />

Non-secure<br />

page<br />

To r<strong>et</strong>urn to non-secured mode, use the SSLActive(False) function in the button (or link)<br />

browser code to open a new page.<br />

Part 4: Actions in a page


84<br />

Security advantage for dynamic sites:<br />

"Back" management<br />

A browser is used to browse site pages with the "Next" ( ) and "Back" ( ) buttons<br />

in its menu.<br />

For each new dynamic page displayed in the browser, a page context is created specifically<br />

to process it on the server.<br />

When a dynamic page is used to display different data (page with file table, loopers or<br />

"Form with browse" page, and so on), the page context on the server varies based on the<br />

data displayed.<br />

When the web user clicks the "Back" button, the browser does not inform the site or the<br />

server. It goes back to the previous page without the corresponding context.<br />

There is nothing specific to manage in a "Back" operation b<strong>et</strong>ween pages.<br />

Specific management is required when the same dynamic page displays different data.<br />

Why does "Back" need managing? A simple example …<br />

To understand why "Back" needs managing, l<strong>et</strong>’s look at the example of a dynamic page<br />

displaying a list of available DVD-ROM players.<br />

Step 1: Display the list of DVD-ROMs<br />

Part 4: Actions in a page<br />

The context contains the list of elements displayed in this table: DVD-ROM players by<br />

CREATIVE.


85<br />

Step 2: Click the "Next devices" link.<br />

"NEC" devices are displayed. The page context on the server is updated: it contains the list<br />

of elements displayed in this table (DVD-ROM players by NEC).<br />

Step 3: Click the browser "Back" button.<br />

The dynamic page displayed in the browser corresponds to the page displayed in step 1.<br />

But the browser has not informed the server that the web user has clicked BACK.<br />

The page context on the server is still that of the "NEC" records.<br />

If the web user selects an element in the table (DVD-ROM by "CREATIVE"), this will correspond<br />

to the element in the context: a NEC element. The dynamic page displayed and the<br />

page context on the server are desynchronized. The WebDev engine d<strong>et</strong>ects the desynchronization.<br />

BACK button management is absolutely necessary.<br />

Part 4: Actions in a page


86<br />

How to manage "Back" operations?<br />

To manage "Back" operations, you can use:<br />

- the synchronization code of the dynamic page. This code is called when desynchronization<br />

occurs.<br />

- an hidden edit control (invisible control) to identify the record displayed in the browser.<br />

- the option "Disable page synchronization for this control" in your buttons and/or links<br />

("Advanced" tab in the button description).<br />

Depending on the type of action that can be performed in a dynamic page, you can choose<br />

and combine one or other of these options.<br />

D<strong>et</strong>ailed example of BACK management<br />

A dynamic page is used to browse products in a site. The page buttons are:<br />

- Back to main menu<br />

This action does not require specific "Back" management. The button does not use<br />

data files: desynchronization of the context and the page displayed has no effect.<br />

- Del<strong>et</strong>e the current product<br />

This action uses a data file. The del<strong>et</strong>ed record must correspond to the record viewed<br />

by the web user. To manage "Back" in this case, use:<br />

- a hidden control in the dynamic page: this control will contain the identifier of the<br />

record actually seen in the browser.<br />

- the synchronization code: this code updates the context (search for the record<br />

viewed by the web user).<br />

Part 4: Actions in a page<br />

The actions performed in the synchronization code are:<br />

1. Rereading the record corresponding to the identifier stored in the hidden control.<br />

2. If the record is not found, an error page is displayed and the "Del<strong>et</strong>e" button code<br />

is not run.<br />

3. If the record is found, the page context is automatically changed on the server<br />

and the "Del<strong>et</strong>e" button code is run.<br />

Compl<strong>et</strong>e security!


87<br />

Secure payment with provider<br />

There are several providers of secure payment systems. Payments by credit card are validated<br />

with the card center by the provider.<br />

The payment steps are as follows:<br />

Provider<br />

server<br />

Check<br />

the card<br />

number<br />

Web Server<br />

- WebDev application<br />

server<br />

- WebDev site<br />

Web user’s<br />

computer<br />

1. The customer validates the order.<br />

2. The WebDev site requests debit from the provider.<br />

3. The provider asks for the card number.<br />

4. The customer enters the card number.<br />

5. After check, the provider sends an authorization number.<br />

6. The order is accepted.<br />

Part 4: Actions in a page


88<br />

Part 4: Actions in a page


PART 5<br />

Database


91<br />

Types of files that can be accessed<br />

WinDev, WebDev and WinDev Mobile offer simple access to the most common databases.<br />

Windows<br />

OLE DB<br />

ODBC<br />

Progress<br />

AS/400<br />

Linux<br />

Client /<br />

Server<br />

XML<br />

Mobile<br />

Hyper File<br />

Native<br />

UDC<br />

MySQL<br />

Sybase<br />

Classic<br />

Native Accesses<br />

Informix<br />

Oracle<br />

SQL<br />

Server<br />

DB2<br />

UDC: Universal Data Connector (HReadSeek, HExecuteQuery, File, Item, Automatic file<br />

link, SQLExec, an so on).<br />

Part 5: Database


92<br />

Linking a control to its item<br />

To display information from a database in a page, you have to link the page controls to the<br />

database items.<br />

It is very easy to display and r<strong>et</strong>rieve information:<br />

- You define the link b<strong>et</strong>ween a control and an item in the Page Editor when you describe<br />

the control ("File" tab).<br />

- The PageToFile function is used to update the record with the data displayed on the<br />

page.<br />

- The FileToPage function is used to update the data displayed on the page with the information<br />

recorded in the file.<br />

PageToFile<br />

FileToPage<br />

Part 5: Database<br />

Database


93<br />

Hyper File Classic<br />

A WebDev Hyper File application can operate in Classic or Client/Server mode.<br />

The characteristics of the Classic mode are:<br />

- A site using Hyper File Classic is run on different browsers. A session is opened for every<br />

site run.<br />

- The data files are located in a directory accessible to WebDev site sessions (on the server<br />

or another computer). Each session physically accesses the data files.<br />

- The processes (query, read/add to file, and so on) are performed by each session.<br />

Part 5: Database


94<br />

Hyper File Client/Server<br />

A WebDev Hyper File application can operate in Classic or Client/Server mode.<br />

The characteristics of Client/Server mode are:<br />

- A Client/Server Hyper File site is run on different user computers. A session is opened<br />

on the WEB server for every site run.<br />

- The data files are located on a server computer (Hyper File Server). Only the server physically<br />

accesses the data files.<br />

- All processes (query, read/add to file, and so on) are performed on the server.<br />

Part 5: Database


95<br />

Queries<br />

A query is used to interrogate a database to view, insert, modify or del<strong>et</strong>e data. The query<br />

structure defines the data used.<br />

A query can interrogate one or more files.<br />

Queries can be created very simply with the query editor, without having to program.<br />

Pages and controls in a<br />

page ("Content" tab)<br />

Query<br />

The query result is used in the same<br />

way as a file<br />

Reports<br />

Programming<br />

(use in W-Language<br />

functions)<br />

Data from one or more files<br />

(Hyper File, Oracle, and so on)<br />

Queries<br />

Part 5: Database


96<br />

Embedded queries<br />

Page controls can be linked to a data file, an existing query, and so on. They can also be<br />

linked to a query created when the control is designed.<br />

Looper linked to an embedded query<br />

Embedded query: MyPage_1$Query<br />

Part 5: Database<br />

In this case, the query is embedded in the page and is in the related WPW file. If the WPW<br />

file is transmitted, the embedded queries used by the page are also supplied.


97<br />

Universal replication<br />

Universal replication is used to update databases in the same or different formats (Hyper<br />

File Classic, Oracle, SQL Server, and so on). You can for instance synchronize a Hyper File<br />

Classic database and an Oracle database.<br />

Universal replication uses a centralized model: all the databases synchronize with a master<br />

database. The master database then propagates the modifications to the other databases.<br />

Synchronization can be adapted to specific cases. For instance, you can r<strong>et</strong>rieve only the<br />

records concerning a specified product or records made on a particular date, manage conflicts,<br />

and so on.<br />

Such adaptations must be programmed by the HRplFilterProcedure function.<br />

Part 5: Database


98<br />

3-tier architecture<br />

3-tier architecture is designed to separate the usual 3 tiers of an application: GUI, processes<br />

and data.<br />

An application will consist of 3 separate tiers:<br />

- a presentation tier,<br />

- a process tier,<br />

- a data access tier.<br />

The reason for separating them is to facilitate maintenance and future upgrades of the<br />

application. This ensures higher security because database access is only authorized via<br />

the process tier. It also helps to optimize teamwork and multi-targ<strong>et</strong> development.<br />

Part 5: Database


PART 6<br />

Testing a site


101<br />

Testing a site: elements to test<br />

The test is a crucial part of site development. It shows if the site works properly and is usable.<br />

Here are some of the main points to test in a WebDev site:<br />

- how it operates: page sequencing, how the code runs, and so on.<br />

- its style: use different browsers (mainly Intern<strong>et</strong> Explorer and N<strong>et</strong>scape Navigator) and<br />

screen resolutions, resize the browser, and so on.<br />

- specific Web features: printing, cookies, browser "Back" button, and so on.<br />

- web user access management: logins and passwords, concurrent access to data files,<br />

and so on.<br />

- regression test when the site is updated: to validate modifications to the site and<br />

check that unchanged features can still be accessed.<br />

- stress test (for a site installed on a server): to validate the maximum number of hits on<br />

the site at the same time.<br />

Part 6: Testing a site


102<br />

How to test a site?<br />

There is a range of tools for testing a WebDev site:<br />

- WebDev main editor.<br />

- WebDev administrator. This module is required to run a dynamic WebDev site. Dynamic<br />

sites can be tested on the development computer via a test page created by the<br />

administrator.<br />

- WDTestSite (stress site).<br />

The table shows you when and how to use these test modes.<br />

Test mode Type of test To run the test<br />

Editor<br />

You can run a test from the editor<br />

to test:<br />

- site features,<br />

- the code used in processes.<br />

There is a powerful debugger to<br />

track every step of process execution.<br />

- the way the site behaves with<br />

different browsers (installed on<br />

the development computer).<br />

"Project .. Test Mode .. Test Project"<br />

or "Project .. Test Mode .. Run<br />

Project Test from the Home Page"<br />

in the editor.<br />

Note:<br />

Web user rights (access, read and<br />

write) are the same as the developer<br />

rights.<br />

WebDev<br />

Administrator:<br />

WD100ADMIN<br />

(dynamic WebDev<br />

site only)<br />

You can run a test from the administrator<br />

to test:<br />

- site features,<br />

- specific Web features (cookies,<br />

and so on).<br />

1. Run the WebDev administrator<br />

("Programs .. WebDev 10 .. Web-<br />

Dev Administrator" in the "Start"<br />

menu).<br />

2. Click "Test Page" ("Configuration"<br />

tab").<br />

Part 6: Testing a site<br />

Note: This test runs the WebDev<br />

site in the same conditions as those<br />

of a web user.<br />

The rights (access, read and write)<br />

of the web user are the same as<br />

the default rights defined in the<br />

web server used.


103<br />

WDTestSite<br />

(dynamic WebDev<br />

site only)<br />

WDTestSite is used to perform<br />

stress tests.<br />

WDTestSite can run several simultaneous<br />

connections to a WebDev<br />

site. Each connection runs a s<strong>et</strong> of<br />

actions in the WebDev site (pres<strong>et</strong><br />

scenario).<br />

This test must be run on a WebDev<br />

site installed on a deployment computer<br />

that is ready for operation.<br />

1. Create a test scenario (with WD-<br />

TestSite).<br />

2. Install WDTestSite and the scenario<br />

on different computers to simulate<br />

a large number of access<br />

attempts.<br />

3. Specify a number of connections.<br />

4. Run the test scenario on each<br />

computer.<br />

Note:<br />

Each computer runs a defined<br />

number of connections. Each connection<br />

runs a selected scenario.<br />

Part 6: Testing a site


104<br />

Debugger<br />

To develop your code, a debugger is supplied with WebDev.<br />

You can use the debugger to run your dynamic sites step-by-step, and view how the W-Language<br />

code runs, variable contents, and so on.<br />

To run the debugger, use:<br />

- either a breakpoint s<strong>et</strong> in the code editor: the debugger will automatically start when<br />

the line preceding the breakpoint is run.<br />

To s<strong>et</strong> a breakpoint, click in front of the code line: a red bull<strong>et</strong> displays.<br />

Part 6: Testing a site<br />

- or the W-Language server keyword Stop in your W-Language code: the debugger will<br />

automatically start when this code line is run.<br />

- or the option "Project .. Test Mode.. Trace Project": the debugger starts at the same<br />

time as the dynamic site test.


105<br />

What the WebDev administrator is for?<br />

The WebDev administrator is required to run dynamic WebDev sites.<br />

When you develop a dynamic WebDev site, the administrator is mainly used to:<br />

- test dynamic sites using a test page ("Configuration" tab, "Test Page" button)<br />

- define the connection s<strong>et</strong>tings: disconnection time, and so on ("Configuration" tab)<br />

- directly del<strong>et</strong>e current test connections ("Connections" tab)<br />

- change the web server used for your tests ("Configuration" tab, "Server" option)<br />

- perform a diagnostic if a problem occurs when running a dynamic WebDev site ("Configuration"<br />

tab, "Diagnostic" button)<br />

- …<br />

In deployment, the WebDev administrator is used to:<br />

- manage WebDev accounts ("Configuration" tab)<br />

- manage the configuration of the dynamic sites installed on the server: number of connections<br />

authorized, and so on ("Sites" tab)<br />

- customize the error messages of the dynamic sites installed on the server ("Configuration"<br />

tab),<br />

- …<br />

Part 6: Testing a site


106<br />

Part 6: Testing a site


PART 7<br />

Deploying a site


109<br />

Deploying a static or semi-dynamic WebDev<br />

site<br />

Principle<br />

Static or semi-dynamic sites are deployed by FTP:<br />

Development<br />

computer<br />

Host<br />

Creation of s<strong>et</strong>up<br />

version by FTP<br />

(WDDeploy)<br />

Configuration of<br />

FTP server<br />

Onlining the site<br />

(run link)<br />

Information required for deployment<br />

You cannot run s<strong>et</strong>up without this information. Ask the provider for the information.<br />

Information required for deployment, the host must give the developer the following information:<br />

- Name of the web server where the site will be installed (or IP address)<br />

- Login and password defined on the FTP server<br />

When deploying by FTP, the developer must specify in WDDeploy:<br />

- the information provided by the host<br />

- the files to install<br />

Part 7: Deploying a site


110<br />

Deploying a dynamic WebDev site<br />

Types of deployment<br />

WebDev offers three ways to deploy a dynamic site:<br />

- deployment by hard media (CD-ROM, and so on), with creation of a s<strong>et</strong>up version on<br />

CD-ROM for the host<br />

Development<br />

computer<br />

Host<br />

Creation of s<strong>et</strong>up version<br />

by developer on hard<br />

media (CD-ROM, and so<br />

on)<br />

Installation of WebDev<br />

site and s<strong>et</strong>ting<br />

administrator<br />

param<strong>et</strong>ers<br />

Onlining the site (run link)<br />

- remote deployment from the development computer (file transfer by intern<strong>et</strong>, FTP)<br />

Part 7: Deploying a site<br />

Development<br />

computer<br />

Creation of s<strong>et</strong>up version<br />

by FTP<br />

Onlining the site (run link)<br />

Host<br />

Configuration of FTP<br />

server and<br />

account manager<br />

(WD100ADMIN.EXE)


111<br />

- remote deployment from an administration computer (file transfer by intern<strong>et</strong>, FTP)<br />

Development<br />

computer<br />

Web server<br />

Creation of s<strong>et</strong>up package<br />

Configuration of FTP<br />

server and<br />

account manager<br />

(WD100ADMIN.EXE)<br />

Onlining the site (run link)<br />

Package<br />

transmission<br />

Site s<strong>et</strong>up<br />

Administration<br />

computer<br />

Package execution:<br />

Site s<strong>et</strong>up on<br />

server by FTP<br />

Choosing a deployment m<strong>et</strong>hod<br />

The choice of deployment m<strong>et</strong>hod mainly depends on the host constraints and on the location<br />

of the deployment server (remote or onsite).<br />

S<strong>et</strong>up by hard media is recommended if the Web server is easily accessible (e.g., on the<br />

same premises as the development team).<br />

Remote s<strong>et</strong>up (by FTP) from the development computer is recommended if the development<br />

computer is not easily accessible. There must be a standard FTP server on the development<br />

computer. Before remote s<strong>et</strong>up, the host must configure the FTP server and<br />

the WebDev account manager.<br />

Part 7: Deploying a site


112<br />

Remote s<strong>et</strong>up (by FTP) from an administration computer is recommended if the developer<br />

does not know what the server characteristics are when the s<strong>et</strong>up program is created.<br />

The s<strong>et</strong>up program here is called a "Package".<br />

If a site is intended for several customers, you can create a single package and distribute<br />

it to all of them.<br />

The server s<strong>et</strong>tings (address, FTP account, and so on) are specified when the package is<br />

run on the administration computer.<br />

Deployment on hard media: information required<br />

For deployment on hard media, the information on site s<strong>et</strong>up and s<strong>et</strong>tings is given in the<br />

s<strong>et</strong>up preparation wizard and in the s<strong>et</strong>up wizard.<br />

To prepare s<strong>et</strong>up, you must provide:<br />

- the s<strong>et</strong>up directory,<br />

- the files to install,<br />

- the s<strong>et</strong>up generation directory.<br />

For s<strong>et</strong>up, you must provide:<br />

- the data file directory,<br />

- the site file directory.<br />

After s<strong>et</strong>up, you must configure the site characteristics (connection timeout, number of<br />

connections, and so on) in the WebDev administrator (deployment version).<br />

Part 7: Deploying a site


113<br />

Deployment by FTP from the development computer: information required<br />

You cannot run s<strong>et</strong>up without this information. Ask the provider for the information.<br />

Before deploying by FTP, the host must give the developer the following information:<br />

- Name of the Web server where the site will be installed (or IP address)<br />

- Login and password defined in the WebDev account manager<br />

- Login and password defined on the FTP server<br />

When deploying by FTP, the developer must specify in the wizard:<br />

- the information provided by the host<br />

- the files to install<br />

- the name of the data file subdirectory<br />

- the site connection s<strong>et</strong>tings<br />

Notes:<br />

- You can delay s<strong>et</strong>up and run it at a specified date and time.<br />

- S<strong>et</strong>up and update by FTP are secured by password and data encryption.<br />

Deployment by FTP from an administration computer: information required<br />

When you create the s<strong>et</strong>up program, no specific information is required.<br />

When you run the s<strong>et</strong>up program (from an administration workstation), the host must specify:<br />

- Name of the Web server where the site will be installed (or IP address)<br />

- Login and password defined in the WebDev account manager<br />

- Login and password defined on the FTP server<br />

Notes:<br />

- You can delay s<strong>et</strong>up and run it at a specified date and time.<br />

- S<strong>et</strong>up and update by FTP are secured by password and data encryption.<br />

Part 7: Deploying a site


114<br />

Referencing a site<br />

To visit to your site, web users must be able to find it. So your site should be proposed whenever<br />

a web user enters keywords relating to it in a search engine.<br />

To simplify its referencing, WebDev enables you to include a home page in your site. This<br />

home page is where you describe your site and its keywords.<br />

Example of home page automatically created by WebDev:<br />

Part 7: Deploying a site<br />

You can include a home page in your site:<br />

- when the project is created (in the project creation wizard).<br />

- when the project is developed (option "Project .. Site Referencing (Home Page)").<br />

Several home page templates are available.


115<br />

Implementing a dynamic WebDev site<br />

Your dynamic WebDev site can be accessed as soon as it is implemented. Implementing<br />

a dynamic WebDev site means activating it.<br />

A dynamic WebDev site can be activated in a number of ways:<br />

- during s<strong>et</strong>up by FTP: there is a check box to activate it automatically after s<strong>et</strong>up.<br />

- by the remote administrator (see “Maintaining a dynamic WebDev site”, page 125).<br />

- by the WebDev administrator on the development computer ("WebDev site locked for<br />

Update" option in "Sites" tab).<br />

Part 7: Deploying a site


116<br />

Dedicated and shared servers?<br />

Hosts propose two types of servers to install your WebDev sites:<br />

- shared server: server with resources shared by several customers (customer = hosted<br />

company)<br />

Shared features :<br />

- WebDev Application Server<br />

- operating system<br />

- registry<br />

- Web and FTP servers<br />

Disk space<br />

customer 1<br />

Disk space<br />

customer 3<br />

Disk space<br />

customer 2<br />

Disk space<br />

customer n<br />

Part 7: Deploying a site<br />

Characteristics:<br />

The host provides a server for different customers.<br />

The host:<br />

- configures the FTP server.<br />

- decides the maximum number of connections for all the dynamic sites of one customer<br />

(with the WebDev account manager).<br />

S<strong>et</strong>up and update of dynamic or static sites can be done by FTP.


117<br />

- dedicated server: the server is reserved to one customer. The host only provides intern<strong>et</strong><br />

access (IP address, cable, and so on). The machine is either rented by the host or<br />

provided by the customer.<br />

Computer dedicated<br />

to customer:<br />

- Web server and FTP server if<br />

necessary<br />

- operating system<br />

- WebDev Application Server<br />

- WebDev sites<br />

Characteristics:<br />

The host only provides Intern<strong>et</strong> access (IP address, cable, and so on).<br />

The customer must:<br />

- provide (or hire) the server<br />

- configure the server (system, and so on).<br />

- install the Web server<br />

- install and configure WebDev sites (by FTP or CD-ROM)<br />

Part 7: Deploying a site


118<br />

Choice of server?<br />

The table below describes the advantages and disadvantages of the different types of servers.<br />

Whatever server is chosen, a deployment license is required for each dynamic WebDev<br />

site installed on it.<br />

Each server hosts one or more dynamic WebDev sites.<br />

Server Advantages / Disadvantages When to use this<br />

server?<br />

Shared<br />

Main advantages:<br />

- Lower cost<br />

- Server administrated by the host<br />

Main disadvantages:<br />

- Memory resources shared by all the sites on<br />

the server.<br />

- If one site is down, all the sites on the server<br />

are down.<br />

- Standalone executables can rarely be used.<br />

- Access to data is not secured: Non-authorized<br />

persons could access data: the host, and<br />

even other customers if the server is not configured<br />

properly. Our advice: encrypt the data<br />

files to prevent any unauthorized use.<br />

A shared server is recommended<br />

for:<br />

- sites with few hits (up to<br />

20 or 30 simultaneous<br />

connections),<br />

- sites requiring little memory<br />

(no large calculations<br />

on the server),<br />

- sites in startup phase.<br />

Part 7: Deploying a site<br />

Dedicated<br />

Main advantages:<br />

- Server resources available for the site(s) installed.<br />

- Custom management of data download:<br />

- replication by email,<br />

- WDREPLIC<br />

- file copy by FTP.<br />

Main disadvantages:<br />

- High cost<br />

- Server entirely administrated by the customer<br />

in most cases.<br />

A dedicated server is recommended<br />

for:<br />

- sites with many hits,<br />

- sites requiring a lot of<br />

disk space and memory,<br />

- sites with sensitive data,<br />

- dynamic sites.


119<br />

Installing a dynamic WebDev site with a<br />

specific configuration<br />

1. Installing on a Web server run on Windows (95, 98, NT, 2000) or Linux<br />

Intern<strong>et</strong><br />

Windows server<br />

Installed on the server:<br />

- WebDev application server<br />

- Dynamic WebDev site<br />

- Windows Web server<br />

Intern<strong>et</strong><br />

Linux Server<br />

Installed on the server:<br />

- WebDev application server<br />

- Dynamic WebDev site<br />

- WebDev server run on Linux<br />

Part 7: Deploying a site


120<br />

2. Installing on a Windows server, with Intern<strong>et</strong> access via UNIX<br />

UNIX server<br />

UNIX Web server<br />

Static pages<br />

Intern<strong>et</strong><br />

Windows server<br />

- WebDev Application Server<br />

- Dynamic WebDev sites<br />

- Windows Web server<br />

Part 7: Deploying a site<br />

1. Open a static page. The static page is located on the UNIX server.<br />

2. Run a dynamic WebDev site (on the Windows server) via a link in the HTML static page.<br />

3. The WebDev site operates in the usual way.<br />

Note: the same configuration can be used for a Linux server.


121<br />

3. Installing on a Windows or Linux server with Load Balancer<br />

The Load Balancer system spreads the number of connections to a dynamic WebDev site<br />

over several computers.<br />

Intern<strong>et</strong><br />

Load<br />

balancer<br />

Server<br />

Server<br />

Server<br />

Data server<br />

Solution 1: Install the dynamic WebDev site only on the data server.<br />

This solution involves installing:<br />

- the WebDev application server on each Web server,<br />

- the dynamic WebDev sites and data files on the data server.<br />

Part 7: Deploying a site


122<br />

Solution 2: Install the dynamic WebDev site on all Web servers.<br />

This solution involves installing:<br />

- the WebDev application server and dynamic WebDev sites on each Web server.<br />

- the dynamic WebDev site data files on the data server.<br />

Part 7: Deploying a site


PART 8<br />

Maintaining a site


125<br />

Maintaining a dynamic WebDev site<br />

Deploying a dynamic site is an important step in site development, but not the last: this is<br />

where site maintenance starts.<br />

Maintenance involves:<br />

- Managing the dynamic sites: A remote WebDev administrator can be run from any<br />

browser and any computer. This administrator is used to configure access to dynamic<br />

sites, regular updates by FTP, and so on.<br />

- Updating the dynamic sites: rectifications, new features, and so on.<br />

You can upgrade dynamic sites by remote update (FTP) or by s<strong>et</strong>up with physical media.<br />

- Monitoring access to the Web server: A monitoring robot is used to regularly test access<br />

to the Web server. If there is a problem (server and WebDev sites locked, and so<br />

on), an email is automatically sent to the dynamic site manager. You can also restart<br />

the WebDev engine or reboot.<br />

Development<br />

computer<br />

Monitoring Robot<br />

Monitoring the WebDev<br />

engines (on the<br />

development computer<br />

for a shared server)<br />

Update<br />

WebDev site update<br />

from the development<br />

computer by FTP<br />

Web server:<br />

- WebDev administrator<br />

- Dynamic WebDev site<br />

- Web server<br />

Monitoring Robot<br />

Monitoring the WebDev<br />

engine (recommended for<br />

a dedicated server)<br />

Remote administrator<br />

Management of<br />

dynamic WebDev sites<br />

Part 8: Maintaining a site


126<br />

Consulting hits statistics for dynamic sites<br />

It is very important to have exact statistics on visits to your sites.<br />

How do you find out who visited it, what pages they looked up, what applications they<br />

used, what site they came from?<br />

WebDev has a compl<strong>et</strong>e statistics tool for dynamic pages: WDStatistic. This tool can be<br />

installed on any computer.<br />

Here are some examples of statistics provided by WDStatistic: number of connections per<br />

day, pages viewed, operating systems and browsers of web users, and so on.<br />

Examples of statistics for dynamic sites:<br />

Part 8: Maintaining a site


127<br />

R<strong>et</strong>rieving data on a site<br />

A business site enables web users to place orders, make bookings and so on.<br />

There are several ways to r<strong>et</strong>rieve this information.<br />

Tip: process the r<strong>et</strong>rieved data in a WinDev "Back Office" application.<br />

1 R<strong>et</strong>rieving data from a site<br />

1.1 By email:<br />

Principle:<br />

Web user<br />

Server<br />

- Dynamic WebDev site<br />

- WebDev application<br />

server<br />

Company<br />

HQ<br />

1. The web user places an order on the site.<br />

2. The WebDev site tells the web user that the order has been recorded and will be confirmed<br />

by email.<br />

3. The WebDev site sends an email to the company HQ with the order that was placed.<br />

4. The company sends the web user an email to say that the order will be processed.<br />

Advantages:<br />

- Easy to implement.<br />

- No additional executable program required on the server.<br />

Disadvantage: Data r<strong>et</strong>rieval only: no data update sent to the server.<br />

This solution can be used with a shared server.<br />

This solution is recommended for e-commerce sites with a limited number of orders.<br />

Part 8: Maintaining a site


128<br />

1.2 By FTP:<br />

WebDev can be used for regular update of the WebDev site data files. The backup is sent<br />

to the company HQ by FTP. Then you:<br />

- r<strong>et</strong>rieve the compressed backup of data files<br />

- decompress the files (with a WinDev application)<br />

- process the data in the files.<br />

Advantages:<br />

- Easy to implement.<br />

- No additional executable program required by the host.<br />

Disadvantage: All application data files are r<strong>et</strong>rieved.<br />

This solution can be used with a shared server.<br />

2 Replication<br />

Replication is used for updating remote databases with the same structure such as a Web-<br />

Dev site database and the WinDev application database at a company HQ.<br />

Part 8: Maintaining a site<br />

For instance, a database for order input and stock management is used on a WebDev site<br />

(online order) and at the company HQ (phone or mail order).<br />

Replication is used to:<br />

- send online orders to the company hq (one-way replication)<br />

- send online orders to the company HQ, and send stock updates to the website (twoway<br />

replication)<br />

Caution: Replication constraints must be taken into account when the project is created.<br />

There are several rules to follow when the analysis and the file items are described.<br />

There are two types of replication:<br />

- by email<br />

- with WWReplic


129<br />

2.1 Replication by email<br />

An email engine is installed:<br />

- on the server. This engine is supplied with WebDev.<br />

- at the company hq.<br />

An email is created whenever time the database is modify (addition, modification, del<strong>et</strong>ion).<br />

It contains the information required to update the remote database. It is sent and<br />

processed by the email engine.<br />

Company HQ<br />

- Back Office<br />

application (WinDev)<br />

- Email engine<br />

Data transfer by email<br />

Web Server<br />

- Front Office application<br />

(WebDev)<br />

- Email engine (supplied<br />

with the WebDev application<br />

server)<br />

Advantages:<br />

Data can be updated:<br />

- from the server to the company hq.<br />

- from the company hq to the server.<br />

Requirements:<br />

An email engine as a background task on the server and on the computer receiving the<br />

emails at company HQ.<br />

This solution is recommended for a site installed on a dedicated server (an executable<br />

cannot always be run on a shared server).<br />

Part 8: Maintaining a site


130<br />

2.2 Replication with WDREPLIC<br />

WDREPLIC is a tool used to update remote databases. It is supplied with WebDev and Win-<br />

Dev.<br />

Company HQ<br />

- Back Office<br />

application (WinDev)<br />

- WDREPLIC<br />

Data transfer<br />

Web Server<br />

Transfer directory<br />

on the<br />

Web server<br />

- Front Office<br />

application (WebDev)<br />

- WDREPLIC<br />

Part 8: Maintaining a site<br />

Advantages:<br />

Data can be updated:<br />

- from the server to the company hq.<br />

- from the company hq to the server.<br />

Requirements:<br />

- WDREPLIC must be run on the server for replication (e.g. by a BATCH process).<br />

- Direct access and read/write rights in the transfer directory on the server.<br />

This solution is recommended for an application installed on a dedicated server with direct<br />

access.


PART 9<br />

Appendices


133<br />

Main new features in WebDev 10<br />

Read this section if you already know WebDev 9.<br />

WebDev 10 has many new features for developing dynamic WebDev sites or deploying<br />

static WebDev sites.<br />

It is fully compatible with WinDev 10 and WinDev Mobile 10.<br />

• Project Editor:<br />

•Source Code Manager (see page 28).<br />

•Custom organization of the panes and tabs in the environment ("Project" pane, "Analysis"<br />

pane, and so on).<br />

•Custom Notes: for entering your own reminders on project elements ("New Custom-Notes"<br />

option in the popup menu).<br />

•FishEye: zoom on the part of the hovered project graph ("FishEye" icon).<br />

•D<strong>et</strong>ection of unused project elements with the option of del<strong>et</strong>ing or archiving them<br />

("Tools .. Clear Project Directory").<br />

•Component images in custom-folders.<br />

•Disabling of a warning ("Don’t display" option in the popup menu).<br />

•Page Editor:<br />

•New controls: Chart, iFrame, Internal Page, Site Map Path, Thumbnail.<br />

•Improved site image management: you can manage the directory_WEB as you please.<br />

•3-image mode for button images.<br />

•Loopers with breaks, adaptable loopers.<br />

•RID (Rapid graphical Interface Design): to create just the window interface based on the<br />

project analysis (see page 34).<br />

•Interactive zoom: zoom of a specific part of a page ("Display .. Toolbars .. Additional modules<br />

.. Interactive zoom" option).<br />

•Control "D<strong>et</strong>ails" tab: easy-to-understand visual options.<br />

•Multilingual: description of the date, time, currency and numeric formats in a given language<br />

("Languages" tab in the project description).<br />

•AWP pages with automatic context.<br />

•Page template GO available.<br />

•Analysis of dependencies and broken links.<br />

• Code Editor:<br />

•Brick of Code: ability to enter reusable pieces of code ("Code .. Bricks of Code .. Manager<br />

of Bricks of code").<br />

•Function tooltip: displays r<strong>et</strong>urn values.<br />

•Assisted Input: proposes the page param<strong>et</strong>ers.<br />

•Compl<strong>et</strong>ion: list of elements already handled.<br />

•Automatic correction: proposes a list of possible corrections.<br />

•Variables spell checker.<br />

Part 9: Appendices


134<br />

•Centralized error management.<br />

•Automatic variables and controls prefixing.<br />

•Debugger: multithread debugging, component debugging, code input available during<br />

debugging, class and table edit, and so on.<br />

•UML Editor:<br />

•Automatic update of diagram when the code of a class or structure is modified.<br />

• Modeling editor:<br />

•New editor to easily model the steps of a process, organization of a service, sequence of<br />

an operating mode, and so on.<br />

• Database:<br />

•HFDiff utility: compares the contents of two data files with the same structure.<br />

•Hyper File Client / Server: supports transactions, logging and integrity constraints.<br />

•3-Tier (see page 98).<br />

•Hyper File Client / Server file administrator via the intern<strong>et</strong>.<br />

•Linux:<br />

•Print functions available in Linux.<br />

•New functions available (email, HTTPQuery, ScriptDisplay, ScriptExecute, and so on).<br />

•3-Tier (see page 98).<br />

•Hyper File Client / Server file administrator via the intern<strong>et</strong>.<br />

•PHP:<br />

•Hyper File orders available in MySQL.<br />

•More powerful PHP RAD.<br />

•New functions supported (N<strong>et</strong>IPAddress).<br />

•Hyper File Client / Server file administrator via the intern<strong>et</strong>.<br />

Part 9: Appendices<br />

Programming<br />

Main new programming features:<br />

• Impact Study of Modifications.<br />

• Creation of procedures by code selection.<br />

• Search through language tables, selected rows or all rows in a table control (FOR ALL<br />

instruction).<br />

• New functions:<br />

•Timing functions (ChronoXXX functions).<br />

•Functions for managing HSL colors.<br />

•...


135<br />

You already know WinDev<br />

What is different in WebDev:<br />

- WebDev is used to create pages while WinDev creates windows.<br />

- Different types of code can be entered: a W-Language code run on the server, a W-Language<br />

code run on the browser, and a Javascript code run on the browser. If you create<br />

a PHP page, an additional code displays: a PHP code running on server.<br />

- There are new specific W-Language functions for the intern<strong>et</strong> and intran<strong>et</strong> (see the list<br />

on page 136).<br />

- The W-Language functions that serve no purpose for intern<strong>et</strong> and intran<strong>et</strong> no longer<br />

exist (see the list on page 138).<br />

- Some W-Language functions can only be used in an executable process in server code.<br />

- Some W-Language functions can only be used in an executable process in browser<br />

code.<br />

- New types of controls designed for Intern<strong>et</strong>/Intran<strong>et</strong> applications:<br />

• Formatted Display Control<br />

• Java Appl<strong>et</strong> Control<br />

• Cell Control<br />

• Flash Control<br />

• Clickable Image (Map Area)<br />

• iFrame Control<br />

• HTML Caption<br />

• Link Control<br />

• Horizontal Rule<br />

• Internal Page Control<br />

• Pager Control<br />

• HTML Table Control<br />

• Thumbnail Control<br />

- Some types of control that serve no purpose for intern<strong>et</strong> have gone: scrollbar, slider,<br />

ActiveX, OLE Object, Tab, Spin, …<br />

Part 9: Appendices


136<br />

W-Language functions specific to<br />

WebDev 10<br />

(D<strong>et</strong>ails in the W-Language online help)<br />

Part 9: Appendices<br />

AddFavorite ......................................Adds a web address to a list of favorites.<br />

ASPDisplay ........................................Calls an external ASP script and r<strong>et</strong>urns the result page in the current<br />

browser window.<br />

ASPExecute .......................................Calls an external .asp script and r<strong>et</strong>urns the result in a string. An http<br />

query is run: you can use a POST or a GET m<strong>et</strong>hod.<br />

BrowserClose ....................................Closes the current window in the browser and stops the execution of<br />

the current code.<br />

BrowserIPAddress ............................R<strong>et</strong>urns the IP address of the web user’s computer connected to the<br />

WebDev site.<br />

BrowserName ...................................R<strong>et</strong>urns the name of the web user’s browser.<br />

BrowserOpen ....................................Opens a new window in the browser.<br />

ChangeAction ...................................Enables you to specify the action to take when the HTML page displayed<br />

in the browser and the page context on the server are desynchronized.<br />

ChangeTarg<strong>et</strong> ...................................Changes the page targ<strong>et</strong> frame<br />

ConnectionOccurrence ....................R<strong>et</strong>urns the number of instances of the current WebDev site running<br />

on the server.<br />

ContextExist ......................................L<strong>et</strong>s you find out wh<strong>et</strong>her a page context exists on the server.<br />

ContextClose ....................................Closes a page context.<br />

ContextOpen .....................................Opens a new page context without r<strong>et</strong>urning the information to the<br />

browser.<br />

CookieWrite ......................................Writes a cookie on the web user’s computer the next time a WebDev<br />

page is displayed in the browser.<br />

CookieRead ......................................R<strong>et</strong>rieves the value of a cookie saved on the web user’s computer.<br />

CurrentPage ......................................R<strong>et</strong>urns the name of the page with the current W-Language code.<br />

DynamicSiteDisplay .........................Displays a dynamic site (created with WebDev) in the web user’s browser<br />

from a dynamic or static WebDev page.<br />

EmailOpenMail .................................Opens the default messaging system on the browser computer.<br />

EmailStatus ......................................R<strong>et</strong>urns the status of an email sent in an SMTP session opened in<br />

asynchronous mode.<br />

FileDisplay ........................................R<strong>et</strong>urns a specific file to the browser.<br />

FileToPage ........................................Automatically initializes controls in a page with the values of the linked<br />

items in the current record (loaded in memory) of the Hyper File<br />

file.<br />

FolderWeb ........................................R<strong>et</strong>urns the path of the directory containing the images, Javascript files,<br />

Java appl<strong>et</strong> files and other files accessible from the browser, and<br />

so on.<br />

Frames<strong>et</strong>Display ..............................Displays a WebDev frames<strong>et</strong> in the Web user’s browser.<br />

Frames<strong>et</strong>Refresh .............................Updates a frames<strong>et</strong> displayed in the web user’s browser according to<br />

the context on the server.<br />

Frames<strong>et</strong>Use ....................................Displays a WebDev frames<strong>et</strong> in the web user’s browser and closes all<br />

the current page and frames<strong>et</strong> contexts.<br />

fWebDir .............................................R<strong>et</strong>urns the full physical name of the directory containing the images,<br />

Javascript and Java files of the WebDev site.<br />

grImageSize ......................................Defines the size of the image containg a chart.<br />

ImageXPos ........................................R<strong>et</strong>urns the horizontal position of the mouse cursor in relation to an<br />

image control.<br />

ImageYPos ........................................R<strong>et</strong>urns the vertical position of the mouse cursor in relation to an image<br />

control.<br />

ImageZone ........................................R<strong>et</strong>urns the number of the area clicked by a web user (clickable image<br />

only).<br />

JSM<strong>et</strong>hod ..........................................L<strong>et</strong>s you execute a Javascript m<strong>et</strong>hod on an element in the current page.


137<br />

JSProperty .........................................L<strong>et</strong>s you access features specific to objects present in the current page.<br />

PageAddress ....................................G<strong>et</strong> the intern<strong>et</strong> address of a page.<br />

PageDisplay ......................................Displays a page in the Web user’s browser.<br />

PageExist ..........................................Checks wh<strong>et</strong>her the specified page is currently displayed in the web<br />

user’s browser.<br />

PageInitialization ..............................Res<strong>et</strong>s (or not) the controls in the current page and runs the control<br />

initialization processes.<br />

PageParam<strong>et</strong>er ................................R<strong>et</strong>urns the value of a param<strong>et</strong>er passed to the current page.<br />

PagePosition ....................................Scrolls a page to position a control in the visible part of it in the browser.<br />

PageRefresh .....................................Refreshes a page displayed in the web user’s browser according to<br />

the context on the server.<br />

PageSubmit ......................................Validates the specified page and runs a button.<br />

PageToASP .......................................Sends the data in the page currently displayed in the browser to an<br />

ASP server.<br />

PageToEmail .....................................Sends the data in the page currently displayed in the browser by<br />

email.<br />

PageToFile ........................................Automatically initializes the value of file items with the value of page<br />

controls.<br />

PageToJSP ........................................Sends the data in the page currently displayed in the browser to a JSP<br />

server.<br />

PageToPHP .......................................Sends the data in the page currently displayed in the browser to a<br />

PHP server.<br />

PageUse ............................................Displays a WebDev page in the web user’s browser and closes all the<br />

current page contexts.<br />

PHPDisplay .......................................Calls an external PHP script and r<strong>et</strong>urns the result page in the current<br />

browser window.<br />

PHPExecute ......................................Calls an external PHP script and r<strong>et</strong>urns the result in a string.<br />

PreviousPage ...................................R<strong>et</strong>urns the name of the previous page.<br />

ScriptDisplay ....................................Calls an external script (.php, .asp. mhtml or .mht for example) and r<strong>et</strong>urns<br />

the result page in the current browser window.<br />

ScriptExecute ...................................Calls an external script (.asp or .php for instance) and r<strong>et</strong>urns the result<br />

in a string. An http query is run: you can use a POST or a GET<br />

m<strong>et</strong>hod.<br />

SemiDynamicPageDisplay ...............Displays a semi-dynamic page in the web user’s browser from a dynamic<br />

or static WebDev page.<br />

SiteAddress ......................................R<strong>et</strong>urns the intern<strong>et</strong> address of the connection to a dynamic WebDev<br />

site located on the same server.<br />

SiteMapPathAddLink (*) ..................Adds a link to the site map path.<br />

SiteMapPathDel<strong>et</strong>eAll (*) .................Del<strong>et</strong>es all the links from the site map path.<br />

SiteMapPathDel<strong>et</strong>eLink (*) .............Del<strong>et</strong>es a link from the site map path.<br />

SiteMapPathInsertLink (*) ..............Inserts a link in the site map path.<br />

SiteMapPathModifyLink (*) .............Modifies a link in the site map path.<br />

SSLActive ..........................................Enables or disables the SSL secure mode.<br />

UploadCopyFile ................................Saves a file uploaded by a web user on the server.<br />

UploadFileName ..............................Find out the name of a file uploaded by a web user.<br />

(*): New functions of WebDev version 10.<br />

Part 9: Appendices


138<br />

List of WinDev 10 functions not available<br />

in WebDev (functions that serve no<br />

purpose for intern<strong>et</strong> / intran<strong>et</strong>)<br />

Part 9: Appendices<br />

ActiveXEvent AgentAdvice AgentBeep AgentChoice AgentCreate AgentHeight AgentHide<br />

AgentInput AgentMessage AgentMove AgentParent AgentShow AgentTerminate AgentWidth<br />

AgentXPos AgentYPos AnimationG<strong>et</strong>Param<strong>et</strong><strong>et</strong>er<br />

AnimationS<strong>et</strong>Mode AnimationS<strong>et</strong>Parame-<br />

AnsiToOem<br />

AppliControl<br />

AutomationEvent AutomationParam<strong>et</strong>er AutoRunAdd AutoRunDel<strong>et</strong>e Beep BuildAutomationVariant<br />

BuildBrowsingTable<br />

cdbAdd cdbCancelSearch cdbClose cdbCol cdbDateTimeToInteger cdbDel<strong>et</strong>e cdbFound<br />

cdbIntegerToDateTime cdbListFile cdbModify cdbNbCol cdbNbRec cdbOpen cdbOut<br />

cdbRead cdbReadFirst cdbReadLast cdbReadNext cdbReadPrevious cdbReadSeek cdbRecNum<br />

cdbRes<strong>et</strong> cdbWriteCol ceConnect ceConnectionStatus ceCopyFile ceCreateShorcut ceDel<strong>et</strong>eFile<br />

ceDel<strong>et</strong>eShortcut ceDir ceDisconnect ceFileDate ceFileExist ceFileSize ceFileTime<br />

ceListFile ceMachineName ceMakeDir ceOEMInfo cePlatform cePowerStatus ceProcessorType<br />

ceRegistryCreateKey ceRegistryDel<strong>et</strong>eKey ceRegistryDel<strong>et</strong>eValue ceRegistryExist ceRegistryFirstSubKey ceRegistryListValue ceRegistryNextKey<br />

ceRegistryQueryValue ceRegistryS<strong>et</strong>Value ceRegistrySubKey ceRemoveDir ceRunExe ceSysDir ceWindowsVersion<br />

ceWinEnum ceWinTitle ceXRes ceYRes ChangeAlphab<strong>et</strong> ChangeKeyboard ChangeSource<br />

ChangeTemplate Clipboard ClipboardFormat ClipboardHeight ClipboardWidth Close ComboClose<br />

ComboOpen Confirm ControlClone ControlDel<strong>et</strong>e ControlInOutReason ControlOver ControlTab<br />

CreateShortCut CurrentColumn CurrentField CurrentSubscript CurrentTitle CurrentWin CursorCapture<br />

CursorDisplay CursorInUse CursorLoad CursorModify CursorPos CursorUnload DelayBeforeClosing<br />

Del<strong>et</strong>eParam<strong>et</strong>er Del<strong>et</strong>eShortCut dHorizontalSymm<strong>et</strong>ry Dialog dInvertColor DisableAAF DnDAccept<br />

DnDCacheData DnDCursor DnDEvent DnDForce DnDG<strong>et</strong>Data DnDIsDataAvailable dResize<br />

dRotation dSaveImagePNG dVerticalSymm<strong>et</strong>ry EmailProgressBar EndEvent EndTimer EndTimerSys<br />

EnumControl EnumMenu EnumSubElement Event ExecuteAAF ExeListDLL ExeListProcess<br />

ExePriority ExeRunning ExeTerminate ExplorerAccept ExplorerR<strong>et</strong>rieve fAttributeReadOnly fD<strong>et</strong>ectRemovableStorage<br />

fGraphicFilter FieldExist FieldFirst FieldNoSpace FileToPalm fImageSelect fLongName<br />

fLongPath fMoveFile FontSelect fSelect fSelectDir fShortName fShortPath<br />

gAlignment gBackground gCircle gCoord G<strong>et</strong>ActiveObject gFont gImage<br />

gLine gPen gpwG<strong>et</strong>FileInfo gpwG<strong>et</strong>UserInfo gpwInitAnalysis gpwLogin gpwMenuDescribe<br />

gpwOpen gpwOpenConnection gr3DSParam<strong>et</strong>er grDestinationWnd gRectangle grMenu grMenuOption<br />

grOverlayChart grPrint grTooltip grWndSize Handle hCopyFileReplica HelpFile<br />

HourGlass HtmlNavigate HTTPProgressBar iCloseReport IconInstall Iconize iDocumentCanceled<br />

iDocumentPrinted InitParam<strong>et</strong>er Input Instance Intern<strong>et</strong>Connected iParam<strong>et</strong>erPreview iSelectFont<br />

iWindowCancel KeyPress KeyPressed LargeFontFactor LDAPConnect LDAPDisconnect LDAPFind<br />

LDAPListAttributes LDAPListChildren LDAPNbValue LDAPRes<strong>et</strong> LDAPValue ListInfoXY LoadImage<br />

LoadParam<strong>et</strong>er LooperPosition LooperSelect LooperSelectCount LooperSelectMinus LooperSelectPlus LooperXYInfo<br />

Maximize MCIBegining MCIClose MCIEnd MCIErr MCIExecute MCIHeight<br />

MCIMsgErr MCINumTracks MCIOpen MCIPause MCIPlay MCIPosition MCIPositionFormat<br />

MCIR<strong>et</strong>rieve MCISize MCIStart MCIStatus MCIStop MCIStop MCITrack<br />

MCIVolume MCIWidth MCIWindowSize MCUActive MCUOpen MDIActive MDIEnumChild<br />

MDIOpen MDIParent MDIWindowMenu MenuAdd MenuCaption MenuInvisible MenuIsMarked<br />

MenuMark MenuSelectMinus MenuSelectPlus MenuState MenuUnMark MessageAddCell MessageDel<strong>et</strong>eCell<br />

N<strong>et</strong>Connect<br />

MouseXPos MouseYPos MultitaskRedraw N<strong>et</strong>ClientMessageBox N<strong>et</strong>ClientSendMessage<br />

N<strong>et</strong>CloseRemoteAccess<br />

N<strong>et</strong>DirList N<strong>et</strong>Disconnect N<strong>et</strong>DiskList N<strong>et</strong>EndServer N<strong>et</strong>EraseFile N<strong>et</strong>Execute N<strong>et</strong>G<strong>et</strong>File<br />

N<strong>et</strong>MsgError<br />

N<strong>et</strong>OpenRemoteAccess<br />

N<strong>et</strong>RemoteAccessInfo N<strong>et</strong>RemoteAccessList N<strong>et</strong>RemoteMessage- N<strong>et</strong>RenameFile N<strong>et</strong>SendBuffer<br />

Box<br />

N<strong>et</strong>SendFile N<strong>et</strong>SendMessage N<strong>et</strong>ServerOption N<strong>et</strong>StartServer NextField NextSubscript NextTitle<br />

NumHelp OemToAnsi OKCancel OLEActivate OLECopy OLECreateCopy OLECreateEmpty


139<br />

OLELoad OLEPaste OLEPlay OLESave OLEServer Open OpenChild<br />

OpenPopup OpenPopupMenu OpenPopupPosition OpenSibling OrderLine PalmAdd PalmClose<br />

PalmDel<strong>et</strong>e PalmFilter PalmInstall PalmListCategory PalmListUsers PalmLoad PalmModify<br />

PalmNbRec PalmOut PalmPosition PalmRead PalmReadFirst PalmReadLast PalmReadNext<br />

PalmReadPrevious PalmRefresh PalmReinit PalmRes<strong>et</strong> PalmToString PalmUninstall Ping<br />

PopupField PostMessage PreviousField Progress bar RegistrySeek Restore R<strong>et</strong>urnToCapture<br />

RTFAdd RTFInsert RTFLoad RTFReplace RTFSearch RTFSelection RTFToText<br />

RunReportsAndQueries<br />

SaveParam<strong>et</strong>er SchedulerAddTask SchedulerAddTrigger SchedulerDel<strong>et</strong>eTask SchedulerDel<strong>et</strong>eTrigger<br />

SchedulerModifyTask<br />

SchedulerModifyTrigger<br />

SchedulerOpenTask-<br />

Properties<br />

SchedulerTaskStatus<br />

SchedulerRes<strong>et</strong> SchedulerTaskList SchedulerTaskProperties<br />

SchedulerTriggerProperties<br />

sClose ScreenFirst ScrollBarShow SelectColor SelectionColor sEndEvent SendKey<br />

SendMessage sEscape S<strong>et</strong>Focus sEvent ShowToolTip sInEntryQueue sInExitQueue<br />

Sock<strong>et</strong>Accept Sock<strong>et</strong>ClientInfo Sock<strong>et</strong>ConnectInfrared<br />

Sock<strong>et</strong>CreateInfrared Sock<strong>et</strong>CreateUDP Sock<strong>et</strong>Deny Sock<strong>et</strong>WaitForConnection<br />

sOpen Sound sParam<strong>et</strong>er sRead StreamAccept StreamConnect StreamDisconnect<br />

StreamInfo StreamPlay StreamReject StreamStop StringToPalm StringToUTF8 sWrite<br />

SysColor SysColorRes SysErrorMode SysG<strong>et</strong>DC SysIconAdd SysIconDel<strong>et</strong>e SysIconize<br />

SysIconModify SysInstance SysM<strong>et</strong>ric SysNameExe SysReleaseDC SysS<strong>et</strong>Focus SysShutdown<br />

SysValidHandle SysWinActive SysWinHandle SysWinShow SysWinTitle SysXRes SysYRes<br />

Table TableAdjust TableFixColumn TableInfoXY TableInputInProgress TableInputSearch TableMode<br />

TableMoveColumn TableSelectCount TableSelectToFile tapiAnswerCall tapiBlindTransfer tapiCallDuring tapiCalledID<br />

tapiCallEnd tapiCallerID tapiCallIsBusy tapiCallIsOver tapiCallIsWaiting tapiCallStart tapiCapability<br />

tapiCompl<strong>et</strong>eTransfer tapiDevice tapiDeviceList tapiDial tapiError tapiHangUp tapiHold<br />

tapiKeyPressed tapiListen tapiNoAnswer tapiOrigin tapiPlay tapiRecord tapiSendKey<br />

tapiStop tapiStopCallD<strong>et</strong>ection tapiUnhold telLineDial TextHeight TextWidth Timer<br />

TimerSys ToClipboard ToolbarDock ToolbarPosition ToolbarUndock ToolTipColor TreeInfoXY<br />

TreePosition TreeSelectMinus TreeSort_55 TwainCurrentSource TwainListSource TwainScanZone TwainSelectSource<br />

TwainSourceHeight TwainSourceWidth TwainState TwainToBMP TwainToClipboard TwainToControl TwainToGIF<br />

TwainToJPEG<br />

USBD<strong>et</strong>ectRemovableStorage<br />

USBDisconnect USBFind USBListDevice USBProperty UTF8ToString<br />

VideoCapture VideoChangeDriver VideoConfigure VideoDisplay VideoListDriver VideoStatus VideoStop<br />

Warning WHelp WinAdaptSize WinAnimationClosing WinAnimationNext WinAnimationOpening WinBackgroundImage<br />

WinChangeAlias WindowBitmap WindowCount WindowsVersion WinIconBarHeight WinInactiveEffect WinInHeight<br />

WinInput WinInWidth WinInXPos WinInYPos WinOutHeight WinOutWidth WinOutXPos<br />

WinOutYPos WinRedraw WinSize WinStatus YesNo<br />

Part 9: Appendices

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!