0% found this document useful (0 votes)
61 views99 pages

Windev Concepts Us

This document provides an overview of the main concepts for creating a WINDEV application. It discusses the application development cycle, types of windows and controls, reports, and the WINDEV development environment. The document is organized into two parts - the first part covers main concepts like projects, the UI, windows, controls, and reports. The second part discusses the WINDEV editors, project dashboard, compatibility with other PC SOFT products, project configuration options, and source code management tools. The goal is to help new users get started with WINDEV by explaining its key features and development process.

Uploaded by

dede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views99 pages

Windev Concepts Us

This document provides an overview of the main concepts for creating a WINDEV application. It discusses the application development cycle, types of windows and controls, reports, and the WINDEV development environment. The document is organized into two parts - the first part covers main concepts like projects, the UI, windows, controls, and reports. The second part discusses the WINDEV editors, project dashboard, compatibility with other PC SOFT products, project configuration options, and source code management tools. The goal is to help new users get started with WINDEV by explaining its key features and development process.

Uploaded by

dede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 99

WINDEV - Concepts

Version 28 - (1) 02-2023


How to discover WINDEV?
WINDEV is a powerful Windows-focused Integrated Development Environment, that includes all
the tools required to design and develop applications.

To quickly and efficiently learn how to use WINDEV, we recommend that you proceed in the
following order:

1
Read the “Concepts” (online or on physical documentation).
This guide presents the main concepts required to create a WINDEV application. Some
concepts are followed by a “Practical” section that presents some features of the editor.

2
”Tutorial” (online tutorial + exercises).
The tutorial provides a first "hands-on" approach to WINDEV. It allows you to familiarize
yourself with the main editors of WINDEV.

3
Try the examples.
Try the examples provided with WINDEV in the fields you are interested in (sales manage-
ment, scheduling, etc.).

The online help, available on Internet at https://doc.windev.com or installed with WINDEV, allows
you to quickly find the syntax of a WLanguage function, get help about the interface and more, ...
For each programming theme, you will find a description of the associated feature and the list of
the corresponding WLanguage functions.

Remark: If there is a difference between the tutorials and the online help, follow the instructions in
Remember to visit the download section of www.windev.com on a regular basis to the online help.
check whether upgraded versions are available.
We hope you enjoy getting started with WINDEV.

Email address of our Free Technical Support: [email protected].

This documentation is not contractually binding. Modifications may have been made
to the software since this guide was published. Please check the online help.

All product names or other trademarks mentioned in this publication are registered trademarks of
their respective owners.
© PC SOFT 2023: This publication may not be reproduced in part or in full without the express
consent of PC SOFT.

Introduction 3
Organization of WINDEV Concepts Table of contents
This guide presents the main concepts required to create a WINDEV application. Some concepts Part 1 - Main concepts
are followed by a "Practical" section that presents some features of the editor. Project and analysis...................................................................................................................................................9
Application development cycle......................................................................................................................... 12
Therefore, two types of pages are included in this guide: UI: Windows..................................................................................................................................................................14
Modal, non-modal or MDI windows.................................................................................................................15
Internal window.......................................................................................................................................................... 17
Window templates...................................................................................................................................................18
Types of standard controls................................................................................................................................. 32
Smart controls........................................................................................................................................................... 37
Control templates....................................................................................................................................................48
Edit: Reports................................................................................................................................................................49
Report templates.....................................................................................................................................................50

Concept page
Part 2 - Development environment
WINDEV editors........................................................................................................................................................53
Project dashboard................................................................................................................................................... 57
WINDEV/WEBDEV/WINDEV Mobile: 100% compatible...................................................................58
Project configuration.............................................................................................................................................59
Multiple generation.................................................................................................................................................60
Custom-Folders: Organize your project........................................................................................................61
Source Code Manager (SCM)............................................................................................................................ 62
Internal component.................................................................................................................................................69
External component............................................................................................................................................... 72
Generation modes...................................................................................................................................................80
Project Monitoring Center..................................................................................................................................85
Managing requirements.......................................................................................................................................86
Managing tasks......................................................................................................................................................... 87
Managing suggestions and incidents...........................................................................................................88
Managing business rules......................................................................................................................................89

Implementation page Part 3 - Databases


Analysis: Database structure.............................................................................................................................93
Types of accessible files.....................................................................................................................................102
HFSQL Classic..........................................................................................................................................................104
HFSQL Client/Server........................................................................................................................................... 105
HFSQL Client/Server cluster........................................................................................................................... 106
HFSQL: files physically created......................................................................................................................107
Binding controls to data.................................................................................................................................... 108
Queries: concepts.................................................................................................................................................. 110
Embedded queries................................................................................................................................................. 111

4 Introduction Table of contents 5


Table/Looper controls..........................................................................................................................................112
Universal replication..............................................................................................................................................114
PART 1
3-Tier architecture..................................................................................................................................................115

Part 4 - Advanced concept


RAD (Rapid Application Development).......................................................................................................119
UML models..............................................................................................................................................................120
User Groupware...................................................................................................................................................... 127
Multilingual applications.....................................................................................................................................135
Optimizing an application...................................................................................................................................141
Distributing "Reports and Queries"..............................................................................................................143
UMC: User Macro-Code......................................................................................................................................144
Available tests..........................................................................................................................................................146
Debugger: concepts.............................................................................................................................................147
Unit tests/Automated tests..............................................................................................................................149
Unit tests on the executable........................................................................................................................... 150
Main concepts
Part 5 - Setup
The WINDEV Framework...................................................................................................................................159
Modes to install an application........................................................................................................................161
Monitoring your applications...........................................................................................................................170

Part 6 - Communication
Managing emails.....................................................................................................................................................173
Transferring files via FTP...................................................................................................................................175
Managing sockets.................................................................................................................................................. 177
WINDEV and telephony......................................................................................................................................179
Webservices: concepts...................................................................................................................................... 180

Part 7 - Appendices
Components provided with WINDEV.........................................................................................................183
Examples provided with WINDEV.................................................................................................................186

6 Table of contents
Project and
analysis
The development of a Windows Application with WINDEV is based on two main elements: the
Project and the Analysis.

A WINDEV Project is a set of elements (windows, reports, controls, classes, components, etc.),
which put together, make it possible to create a Windows application.

A WINDEV Analysis is a diagram of the data used by the application. The analysis groups the
different data files (tables) used by the application.

An application is built from a project.


In most cases, a project is associated with an analysis.
An analysis can be associated with one or more projects.

Project 1

Classes Style Windows


sheet and controls

Analysis

Project 2 Project N

Classes Style Windows Classes Style Windows


sheet and controls sheet and controls

8 Part 1: Main concepts Part 1: Main concepts 9


Projects in practice To open the dashboard of your project:
1. In the open document tabs, open the context
"Project" tab, in the "Project" group, click "List of
elements".
menu of the "P" ("Project") icon. This option is used to:
2. Select "Display dashboard". • add to your project elements belonging to
1 Overview For more details, see Project dashboard. projects that can be accessed from your
computer. The corresponding files will not be
The first step to create an application consists in expectations. All project characteristics specified 3.2 Project elements moved to the directory of your project.
creating a project. when creating the project can be modified later. • delete elements from your project. The
The project includes windows, reports, queries, sets
When creating a project, you will be asked multiple Remark: The analyses are presented in Analysis: of procedures, etc. corresponding files are not physically deleted.
questions so that your project meets all your database structure. To quickly find an element in your project, press "Ctrl
To know the list of elements of a project, on the
+ E" from any editor.
2 Creating the project
4 Operations performed on a project
To create a project: • whether the project will be used by several
1. Click in the WINDEV quick access buttons. developers. You have the ability to use the Let’s see the main operations that can be performed • Duplicate a project,
The creation window appears: click "Project". The source code manager (SCM) to share the on a project: • Copy or delete a project,
project creation wizard starts. project. • Save a project, • Rename a project.
2. Specify the different project options. The main • the code style. This code style is used to • Restore a project, For more details, see the online help.
options are as follows: automatically prefix names of controls,
• the type of project. Multiple options are windows, etc. It is also possible to 5 Technical documentation of the project
automatically add prefixes when creating
available: application, component, Java
variables. WINDEV allows you to print different technical • start the print job,
application, etc. These options will be
presented later. In most cases, a project is used • the style book. documentations describing all the elements of the • export the technical documentation as PDF (via
to generate an application (executable). • the supported languages. These languages project (windows, reports, data files, items, etc.). To the "Export" tab of the report viewer).
• the operating system (Windows or Linux). will be proposed by default if an option can be print the technical documentation:
For more details, see the online help.
translated in a control, window, report, etc. • on the "Home" tab, in the "General" group,
• the creation mode (blank project or based on
an example). 3. Specify whether the project must use a expand and select "Print project technical 5.2 Print areas
database. If yes, you can use an existing database, documentation". The technical documentation
• the runtime mode and the type of executable If graphical representations (LDM, UML diagrams,
or create a new one. can contain all the characteristics of the project.
to generate (if necessary). etc.) must be printed, the print areas must be set
4. Validate the wizard. The created project • on the "Home" tab, in the "General" group, click before printing the technical documentation.
• the creation mode of the project. You can
becomes the current project. . In this case, the technical documentation will
create a blank project or a project based on an To specify the print areas of the current graphic
Remarks: contain only the details of the current element
existing example. representation:
(window, report, query, etc.).
• the name and location. These options cannot • If you chose to create a database, the analysis 1. Display the print areas in the current editor.
be modified. The project corresponds to a creation wizard will start automatically. 5.1 Type of technical documentation For example, in the data model editor, go to the
".WDP" file. All elements associated with • The specified information can be modified in "Display" tab, "Help for edit" group, and check
the project will be created in the specified the project description. To open the project There are different types of technical
"Print areas".
directory. description window, go to the "Project" tab, documentation:
2. A series of borders that represent the printable
"Project" group and click "Description". • Overall: Contains basic information about the
areas in the documentation will appear in the
project elements.
current editor.
3 Dashboard and project elements • Code: Contains the code of all the project objects
3. Reduce the graphic representation (change
and procedures.
the value in the combo box with a percentage in
• Full documentation: Contains all project the "Display" pane, or use the Ctrl + Mouse wheel
3.1 Dashboard The developer wants to quickly access the most information. This type of technical shortcut) to see the entire graph.
frequently used project elements, sections of code, documentation can be very extensive.
All project managers seek to have a global and 4. With the mouse:
etc.
synthetic vision of the progress status of the • Custom: Corresponds to a selection of
The dashboard meets all these requirements. • move these borders to the desired location by
projects they lead. information to print.
Additionally, it contains different indicators or keeping the mouse button down (the mouse
The QA manager wants to know the number of bugs Generating the technical documentation cursor is black).
"Widgets". These widgets can be configured by the
and their priority, and follow up their status. The technical documentation can be printed on the
user: the user can add, delete or resize them. • choose the number of pages on which the
The product manager would like to know what new selected printer. The technical documentation is graphic representation must be printed (the
You can also display the project statistics (e.g., the
features are requested by the users. generated and displayed in the report viewer. You mouse cursor turns into a North-West/South-
number of windows), the results of different audits
can: East double arrow).
(static audit, dynamic audit, etc.)

10 Part 1: Main concepts Part 1: Main concepts 11


Application development
cycle
WINDEV covers the entire application development life cycle:

Test and
Design Development generation Deployment

Specifications Create the project Test and debug


Generate the setup
the application

Generate the
UML modeling Create the analysis Final test
application:
- Win32 executable
- Win64 executable First setup:
Import the Development - Linux application local, network, by HTTP, push
existing files - Project RAD
- Windows/Linux service
- Window RAD ...
- Queries - Webservice
- Reports
- Input of source code Update the application
Synchronize the deployed
data

Details of the different steps:


Testing and generation phase: WINDEV includes several automated test tools to guarantee
Design phase: An application can be designed from specific requirements, a UML modeling of the
application reliability and make sure there are no regressions during the development steps.
processes or even from existing data files.

Deployment phase: A WINDEV application can be deployed using one of the following methods:
Development phase: The project and the analysis are created via specific wizards. The application
download, over a local area network (including Push mode) or via the Internet. In any case, the
can be developed in RAD (Rapid Application Development) mode, with automatic code and
HFSQL data files will be automatically updated based on the changes made to the application.
interface generation; or it can result from manually creating multiple project elements.

12 Part 1: Main concepts Part 1: Main concepts 13


UI: Modal, non-modal or MDI
Windows windows
The UI (User Interface) of an application is mainly composed of windows. The applications created with WINDEV can use several types of windows (and mix each one of
these types).
WINDEV includes an advanced window editor allowing you to easily and quickly develop all types
of UI. Modal windows
Several features allow you to easily obtain intuitive and user-friendly applications: A modal window is opened in the foreground of the application and it locks the access to the other
• powerful controls, windows that are already opened (if any). In most cases, modal windows are used as:
• an anchoring mechanism allowing the UI to automatically adapt to the size of the display, • main windows of an application,
• a UI compilation system with error detection (empty titles, untranslated text, overlaps, etc.), • dialog boxes whose validation triggers an action.
• etc.
With WINDEV, when a modal window is opened, a gray shadow appears on the windows displayed
in the background: it is the DDW feature or Dim Disabled Windows.

14 Part 1: Main concepts Part 1: Main concepts 15


Internal
Non-modal windows
A non-modal window is opened in parallel with other application windows. Each window remains
window
accessible. In most cases, non-modal windows are used:
• as tool palettes, The Internal Window control is used to include a window (and its code) in another window. At
• as dialog boxes that affect the main window when modified. runtime, the internal window will be dynamically merged with the host window.

1. Creating an internal window.


To create an internal window:
• Click in the quick access buttons.
• The creation window appears: click "Window" then "Internal window".
An internal window is a specific window that
has no title bar or menu.
All types of controls can be used in this
window.
In the example, an internal window is used to
select files.

2. Using an internal window.


To use an internal window:
In this example, each description window of a chair opens the description window of another chair. • Create an Internal Window control.
All open windows remain accessible. • In the control description window, select the
internal window to use.
MDI windows • Validate the control description window.
Remarks:
In an MDI application, all the application windows are displayed in the same main window: the MDI
• The internal window used in the "Internal
parent window. There are two types of windows in MDI applications:
Window" control can be modified through
programming.
MDI parent window:
• Limitations: The host area is rectangular and
The other windows of the application are no override is allowed. To perform overrides,
displayed in this window. This window allows it is recommended to use control templates.
the user to handle the main menu of the
application.

MDI child window:


Application window displayed in the
parent window. The user will be able to
type information in these windows.

16 Part 1: Main concepts Part 1: Main concepts 17


Window
Windows in practice
templates The purpose of a window is to display, present or For more details on how to manipulate controls in a
allow users to enter information. This information window, see "Controls in practice", page 38.
WINDEV allows you to create window templates. These templates contain all the graphic elements can come from data files in an analysis, external files, This chapter presents the following topics:
common to all windows of your application. queries, etc. • "Creating a window", page 19.
There are multiple options to create the windows of
Changes made to a window template are automatically applied to all the windows that use the • "Simple operations on a window from the editor",
a project in WINDEV:
template. page 20.
• Create a blank window with the wizard. • "Main characteristics of a window", page 20.
• Build all the windows of the application from the
A window template follows the style book defined for an application. • "Window and image", page 22.
analysis description.
• "Opening a popup window", page 24.
• Create a window from the analysis description
• "Dim disabled windows", page 25.
(with or without code).
• "Internal window", page 25.
• Create standard windows.
• "Window templates", page 26.
• Create windows based on a template, etc.
• "Events associated with windows" page 26.
Regardless of the method used, the window can
be modified once it has been created: you can • "Menus", page 29.
add, modify or delete controls and change the • "The status bar", page 31.
characteristics of the window.

View of a window template. 1 Creating a window


The template is bordered by an orange line
in the editor. WINDEV allows you to create several types of 5. Specify the window title and name. The window
windows: corresponds to a ".WDW" file. By default, this file
• Blank windows, without controls. will be created in the main project directory. This
• Windows created via the RAD methodology. name will be used to handle the window.
• Internal windows. These windows can be used in 6. Validate the window.
"Internal Window" controls. 7. Create the controls in the window.
• Windows based on a window template. Remark: The main characteristics of the windows
• Windows imported from a non-WINDEV are available in the online help. The different types of
application. controls are presented in Controls in practice.
This paragraph explains how to create blank 1.2 Internal window
windows, internal windows or windows based on a
template. For more details, see the online help. An internal window is a window without title bar
Template used in multiple windows. or status bar that will be directly included in the
Elements from the template are identified by a yellow square. 1.1 Creating blank windows other windows of your application via the "Internal
window" control.
To create a blank window:
This allows you to include a window (and its code) in
Remark: The programming associated with the template elements can be performed in the 1. Click in the quick access buttons. The new another window.
template directly. element window appears: click "Window" then
To create an internal window:
"Window". The window creation wizard starts.
The characteristics of the elements can be dissociated from the template. For example, dissociate 1. Click in the quick access buttons. The new
the position of a control from the template to move it elsewhere while keeping other changes 2. Choose the "Blank" type.
element window appears: click "Window" then
(code, style, etc.). This is referred to as control inheritance. In this case, the elements are identified 3. Select the window skin template. "Window". The window creation wizard starts.
by a blue square. 4. Validate the window creation. A blank window 2. Select the "Internal window" tab.
is created in the editor. The save window appears
3. Select the type of window and the associated
automatically.
skin template.
4. Validate. The save window appears
automatically.

18 Part 1: Main concepts Part 1: Main concepts 19


1.3 Window based on a template 2. Select the "Based on a template" tab. • be automatically dimmed when it becomes 3.4 Characteristics by tab
3. Select the desired template and the associated inaccessible. This feature is called DDW, which
WINDEV also allows you to create a window based This section presents the different categories of the
skin template. stands for Dim Disabled Windows. For more
on a window template. In this case, simply select the characteristics displayed by each tab.
4. Validate. The save window appears details, see the online help.
desired window template. For more details on the options available in each tab,
automatically. • allow drag and drop. For more details, see the
The window templates contain the graphic elements see the online help.
Changes made to a window template are online help.
and code common to all the windows in the
automatically applied to all the windows that use the • allow end users to change the UI. For more General tab
application.
template. details, see the online help. The "General" tab allows you to specify the window
To create a window based on a window template:
Window templates allow you to keep the style book name and title.
1. Click in the quick access buttons. The new Remark: To force an action on a window, simply
element window appears: click "Window" then defined for an application. set a Button control of this window to "Automatic UI tab
"Window". The window creation wizard starts. execution" mode. For more details, see the online The "UI" tab allows you to define the parameters of
help. the window interface:

2 Simple operations on a window from the editor 3.2 Description window • visibility of the window,
• position of the window,
The description window includes several tabs that
The window editor allows you to perform the • Save and copy a window. • right click, mouse cursor,
group all the characteristics that can be configured
following actions on the windows: • Import and export a window. for the window. • association with a context menu, etc.
• Open a window in the editor: All you have to do • Change the tab order. Remark: You can also view and/or change the Details tab
is double-click the window name in the "Project characteristics of a window in the modifier. For more
For more details, see the online help. The "Details" tab allows you to define the different
explorer" pane. details, see the online help.
window settings:
• Resize a window.
3.3 Displaying the characteristics • type of window
To open the description window: • UI modification by end user,
3 Main characteristics of a window • double-click the window background. • animation,
• select "Description" in the context menu of the • automatic closing.
3.1 Characteristics • include a drop-down menu: this menu allows window.
users to quickly access the main functionalities • select the window and press Alt + Enter.
A window can include all types of controls. A window
of the application. To create a drop-down menu
can:
in a window, go to the "Window" tab, "Bars and
• be resizable: the end user will be able to change menus" group, expand "Main menu" and select
the window size. Depending on the anchors "Add main menu". The first option appears in the
defined for each control, the position of the window. The options can be manipulated via the
controls can change when the window is resized context menu. Then, the menu options can be
(see the online help). handled programmatically. For more details, see
• include a background image: this image is the online help.
displayed in the window background and the • include a status bar: the status bar will display
controls will be positioned over the image. You the help message associated with the different
can also define the resize options via the 9-slice controls in the window. This bar can also be used
scaling mode. For more details, see the online to display additional information. For more details,
help. see the online help.
• be clipped: the window will have custom shapes • be multilingual: all the languages defined for
(window shaped like a circle, a computer, etc.). For the window will be available for all its controls. A
more details, see the online help. window can be associated with more languages
than the project (windows shared between
several projects for example). For more details,
see the online help.

20 Part 1: Main concepts Part 1: Main concepts 21


Image tab Notes tab • Tiled: the image is displayed at 100% and is Symmetry
This tab allows you to define: The "Notes" tab allows you to describe the window. repeated in the background of the window to The symmetry options are used to change the
This information will be printed in the technical occupy all the available space. orientation of the image in the image file. These
• the window background image,
documentation of the project, window, etc.. • Homothetic: the image is proportionally enlarged options will be kept even if the image is modified
• the image of the sizing handle,
Help tab to be entirely displayed in the window. programmatically (Image property).
• the window icon.
The "Help" tab allows you to associate a context- • Homothetic centered: the image is homothetic Initial image:
Languages tab
sensitive file with the window. This help file contains and it is centered in the window.
This tab shows the languages supported by the the context-sensitive help pages displayed by each • Homothetic extended: the image is proportionally
window as well as the language displayed in the control. enlarged so that the smallest side of the image is
editor. You can add, change or remove languages.
Style tab entirely displayed in the window.
The "Style" tab allows you to define the window • Homothetic centered extended: the image is
style: proportionally enlarged and centered in the
window.
• Show the title bar.
• Homothetic without enlargement: if the image Vertical Horizontal Horizontal
• Show icons. symmetry symmetry and vertical
can be entirely displayed in the window, it is
• Show the status bar, etc. symmetry
displayed at 100%. If the image is larger than the
window, it is automatically resized to be displayed
4 Window and image in its entirety.
• Homothetic centered without enlargement: the
image is centered without enlargement.
4.1 Overview • Position. In homothetic mode, the "High-quality display (HQ)"
To customize the style of the windows in your • Transparency. option allows improving the image quality when it is
applications, WINDEV allows you to use: • Symmetry. reduced from its original size.
9-slice scaling
• background colors. Several standard colors can • 9-slice scaling. Position
be used. The background color is configured in If this option is selected, the 9-slice scaling mode
• Clipping the window according to the background This parameter sets the position of the upper-left
the "Style" tab of the window description. will be used on the background image of the window.
image. corner of the image, relative to the window area.
• images. These images are used as the window The 9-slice scaling method consists in dividing the
Management of multilingual images These options will be kept even if the image is background image into 9 areas.
background. The controls are displayed over the modified programmatically (Image property).
image. The background image can be set in the A different background image can be displayed
"Image" tab of the window. according to the program runtime language. The Transparency
display characteristics can be specific to each
The transparency options for the background image
Remark: To customize your windows, you can also language.
are as follows:
use a skin template or a window template. To define a multilingual background image:
• Transparent magenta: The magenta color in
4.2 Setting the background image 1. Click the button to the right of the background the image will be transparent when the image is
image name. displayed in the editor or at runtime.
The settings are defined in the "Image" tab of the
2. In the menu that appears, select "Multilingual".
window description. Transparency: none Transparent magenta
3. Choose the appropriate image for each language
You can set the background image by selecting a
defined in your window.
file or by choosing an image from the image catalog.
The main image formats that can be displayed are: 4. Validate. The "Multilingual Value" text appears in
BMP, JPEG, TIFF or GIF. the background image field.
You can also drag the image from the file explorer Display mode
and drop it onto the WINDEV window. An image can be displayed in a window according
For each area, you can define whether the section
The options available for the image are: to several display modes. These display modes
• Top left pixel: all pixels with the same color as the of the image corresponding to the area must be
• Management of multilingual images. produce different results:
top left pixel of the image will be transparent. displayed or not: simply click the area to make
• Display mode. • 100%: the image is displayed at 100% from the it visible or invisible. If the image section is not
These options will be kept even if the image is
upper-left corner of the window. displayed, it will be replaced by the background color
modified programmatically (Image property).
• 100% Centered: the image is displayed at 100% of the window or control.
and is centered in the window.
• Stretched: the image is stretched to occupy all
the space in the window.

22 Part 1: Main concepts Part 1: Main concepts 23


The margins are used to define the size of each The 9-slice scaling method is used to manage the 6 Dim disabled windows
area. You have the ability to enter the values of the behavior of each area when resizing the window. For
different areas or to move the line corresponding to each area, the image will be enlarged: Your application opens several windows at the same
the margin. • by repeating the image that constitutes the area time and you don’t know which one to use ?
When resizing the window, only the areas 2, 4, 6, 8 • by stretching the image that constitutes the area The inactive windows can be automatically dimmed.
and 5 are resized to occupy the entire space: This feature allows you to always know which
4.3 Clipped window window to use.
WINDEV allows you to clip windows. The windows This feature is called DDW, which stands for Dim
will have custom shapes (window shaped like a Disabled Windows.
circle, a computer, etc.). For example:
The window shape is defined by an image. In
this image, define the color that will be used to
define the transparent areas ("Light magenta" for
example). All these areas will be invisible when the
window is displayed at runtime: the window will be
clipped. Step 2: A window prompts you to confirm or cancel
the changes. The main window (in the background)
Caution: The image borders must be as sharp as
has become unavailable. It is automatically dimmed.
possible (no gradient, etc.) to avoid any unexpected
You immediately identify the window that must be
display effects when previewing or opening the
used.
clipped window.
The window clipping is configured in the "Image" The DDW features are available for the entire
tab of the description window. project or they can be customized for each window.
You can also set the DDW feature programmatically.
For more details, see the online help.
5 Opening a "popup" window Step 1: You change the customer information and
then click "Validate".

5.1 Overview Remark: The characteristics of a popup window are


as follows: 7 Internal window
WINDEV gives you the ability to open "popup"
windows. • by default, it appears below the control that
Internal windows allow you to dynamically share the This UI can be used in the different windows of your
opens it (above or to the left if there is not enough
A "popup" window is a small window that opens same UI section in one or more applications. application via the "Internal Window" control.
space below the control).
above the current window. In most cases, this The UI to be used multiple times is created in an Remark: The internal window can come from a
The initial position can be changed
window allows users to select a value. Then, it "Internal Window". component.
programmatically.
returns the value selected by the user to the main
• it closes automatically when it loses focus or For more details, see the online help.
window. This window closes automatically when the
user clicks inside or outside the popup window. when Close is called.
For example: • only the closing icon is displayed in the title bar
of the window (if the title bar was defined in the
style).

24 Part 1: Main concepts Part 1: Main concepts 25


8 Window templates 10 Context menus
WINDEV allows you to create window templates. • set the layout of the windows. The user can open a context menu by pressing the For example:
These templates contain the graphic elements and • easily update the application style book. right mouse button. This menu allows users to easily
code common to all the windows in your application. access the specific features of a window or control.
A window template is as easy to create as a window.
Changes made to a window template are To create a window from a template, select "Based WINDEV allows you to manage two types of context
automatically applied to all the windows that use the on a template". menus:
template. • system context menus managed by Windows.
By default, all changes made to the template are
Window templates allow you to keep the style book applied to the windows that use it. However, it is These context menus appear when the user
defined for an application. possible to define particular cases in a specific right-clicks on some types of controls (Edit
Using window templates in your applications allows window by overriding the template elements. control, Table, etc.). For more details, see Default
you to: system context menu.
For more details, see the online help.
• create windows more easily. • custom context menus managed by WINDEV.
These menus are created in the window editor
and can be handled programmatically.
9 Events associated with windows WINDEV allows you to create custom context
menus and associate them with:
10.1 Context menu edit windows
• one or more controls in a window. WINDEV allows you to create and modify custom
9.1 Default events • Set the Value property (internal windows only)
context menus in a specific edit window. To better
Executed when a value is assigned to the Value • a window.
WINDEV manages the following events by default understand how to manage custom context menus,
property in the Internal Window control.
(in order of appearance in the code editor): let’s take a look at the vocabulary related to this edit
• Get the Value property (internal windows only) window:
• Global declarations:
Executed when the Value property is used in read
Declaration of variables global to the window.
mode in the Internal Window control.
• End of initialization:
Executed when opening the window, before the 9.2 Optional events
code for gaining focus. The initialization event of
Several optional events are supported. Simply:
the window controls is executed after this code.
1. Click "Add other events to" at the bottom of the
• Request for refreshing the display:
list of events displayed in the code editor.
Used to group the code for updating the window
controls: contents of controls, state (visible, 2. The optional events window appears.
grayed out...), text to refresh, etc, ... 3. Select the optional event(s) to add and validate.
This event is started upon request by the 4. The selected events are automatically added
following functions: after the default events.
• RequestRefreshUI: Executes the event at You can manage, for example:
the end of the current event (asynchronous • gain and loss of focus,
execution).
• changes in one of the window controls,
• ExecuteRefreshUI: Executes the event
• window size changes,
immediately.
• mouse hover over the window,
• Close a child window: Run when closing a child
window opened from the current window. • left mouse button down, up, double click,
• Closing: Executed when closing the window. • right mouse button down, up, double click,
Remark: resuming the input in one of the window • mouse wheel, etc.
controls in this code prevents the window from
closing.

26 Part 1: Main concepts Part 1: Main concepts 27


10.2 Available features For more details on the translation of this menu, 11 Main menus
see the online help.
WINDEV allows you to:
• ActiveX control:
• Create a custom context menu. 11.1 Overview
• Associate a custom context menu with one or A main menu is always associated with a window. In
more elements (window or controls). WINDEV, this menu is displayed below the window
• Edit a custom context menu. title bar. In most cases, the applications contain a
• Open the description window of a custom context menu window. This window only contains a main
menu. menu and is used to access the other windows of
• Delete a custom context menu. the application.
For more details, see the online help. For example:

10.3 Default system context menu


The following types of controls have a default
system context menu (displayed if no custom
context menu is associated with the control):
11.2 Vocabulary associated with the main
• Edit control: menus
To easily handle a main menu, you must be familiar
with the following vocabulary:

Remark: The system context menu displayed


depends on the ActiveX program associated with
For more details on the translation of this menu, the control.
see the online help. This default context menu can be disabled from the
• table column: editor or in the code.

28 Part 1: Main concepts Part 1: Main concepts 29


11.3 Available features Special case: Tool menu 13 The status bar
WINDEV allows you to automatically insert a "tool"
WINDEV allows you to: The status bar of a window can display: • The cursor position in the current Edit control
menu ("?" type) in your application. On the "Window"
• Create a main menu. tab, in the group "Bars and menus", expand "Main • an information message linked to the current ("Column and row of the caret" option).
• Edit a main menu. menu" and select "Add the "?" menu". control. This message can be entered in the • The status of the Caps Lock key that indicates
• Delete a main menu. "Help" tab of the control description window. whether it is enabled or not.
For more details, see the online help. The message will be displayed in the status bar • The status of the Insert key that indicates
when the user selects the control. whether it is enabled or not.
• a specific information message. This message is • The name of the current user in an application
12 Menu options displayed programmatically with Message. that uses the User Groupware.
• a progress bar. This progress bar is displayed Two specific options are also available:
programmatically with eye.
12.1 Overview The menu options can also be defined in the window • Programmatically: The information displayed
editor, and their characteristics can be modified via a To display different types of information in the status bar is specified programmatically
A menu (main menu or context menu) includes one simultaneously, you can divide the status bar into
description window. (using Message for example).
or more options and sub-options. Each option runs a several cells ("Insert a cell" in the context menu of
WLanguage code. The description window of the menu options allows • The update event: The "Whenever updating"
the status bar). event is automatically associated with the cell of
you to:
In the editor, you can handle menu options in the
the status bar. This event is run on a regular basis.
same way for both main menus and custom context • change the option caption. 13.1 Status bar description window
This event can contain the elements that will be
menus. • check or uncheck a menu option.
The description window of a status bar allows you to: displayed in the cell, for example.
To handle the menu options, simply edit the relevant • associate an image with a menu option.
• add and/or delete cells.
menu. • associate a keyboard shortcut with a menu
• change the order of the cells.
13.3 Characteristics of the cells in the sta-
To edit (or display in the editor): option. tus bar
• specify the information that will be displayed for
• the main menu of a window: You also have the ability to associate a WLanguage The status bar description window also allows you to
each cell.
• open the relevant window in WINDEV. code with a menu option. Only menu options without define the display characteristics of the cells.
submenus can start a WLanguage process. For more details, see the online help.
• select one of the menu options. The options • The position of the cell in the status bar.
and the sub-options are automatically For more details, see the online help. 13.2 Type of cell in the status bar • The background image of the cell.
displayed.
12.3 Handling menu options programma- The type of allows you to display: • The background color of the cell.
• the custom context menu of a window: on tically • The progress bar. This progress bar will be run • The width of the cell.
the "Window" tab, in the "Bars and menus"
Options are handled in the same way in context when using eye. • Whether the cell is editable.
group, expand "Popup menus" and select
"<ContextMenuName>". menus and main menus. • The help message associated with the control • The anchors of the cell (its behavior when the
To handle a menu option programmatically, use the that has focus. This help message is defined in window is resized).
12.2 Handling menu options in the editor following syntax: the "Help" tab of the control or in the code using All these characteristics can be handled
the Message property. programmatically via the properties available for the
The window editor allows you to easily perform the • "<OptionName>" if the menu option is handled
from the window. • The date of the current computer. cells in the status bars.
following operations:
• "<WindowName>.<MenuName>.<OptionN • The time of the current computer.
• Add a menu option.
• Add a separator. ame>" if the option is handled from another
window.
• Add a submenu.
• Delete a menu option.

30 Part 1: Main concepts Part 1: Main concepts 31


Types of standard
controls Select a date.

WINDEV includes different types of controls. Let’s see how to use them according to the operation
Calendar
to perform:

In order to... Use the following


control...
Display a text, a title, etc.
Display an image (photo, etc.), an animation or use
Static drawing functions.

Image
Read a PDF file PDF Reader

Display and edit a Word document. Word Processing


Display the contents of a data file in a table (list of
Select a value from a list (Country, City, etc.) customers, order details, etc.).

Radio Button, Combo Box,


List Box

Select multiple values from a list (message recipients, Table


etc.)

Check Box, List Box

Select one or more values from a ListView (picture Show the same controls multiple times in a window (e.g.
directory, etc.) product catalog with images, etc.)

ListView

Looper
Select a value in a preset range.
Slider,
Round Slider,
Spin,
Range Slider

32 Part 1: Main concepts Part 1: Main concepts 33


Display a video or animation. Group the controls by theme and display the themes one
by one.

Web Camera
Multimedia Tab
Conference Sidebar
Drawer

Enter information.
Display a bar code.
Edit control

Program an action in a window (display another window,


Bar Code
start a print job, etc.).
Button

Display information in a hierarchy (directory). Display events over a period of time.

TreeView
TreeView Table

Organizer

Display a column chart, a line chart, a pie chart, etc, ...

Chart
Create statistical tables.

Display a progress.
Pivot Table
Spreadsheet

Progress Bar

34 Part 1: Main concepts Part 1: Main concepts 35


Smart
Represent weighted data.
controls
Smart controls are an innovative concept for creating UIs. A Smart control is a ready-to-use
TreeMap control (or group of controls) that includes a "business logic" WLanguage code where necessary.
Thanks to the Smart controls, you can add sophisticated behaviors to your WINDEV applications
with a single click.
WINDEV includes several Smart controls: Twitter, Instagram, Signature, Countdown, Date range
selection,
Menu with drawers, Workflow, Cookie consent, Process monitoring, and more.

Display important elements in a dashboard.


To integrate a Smart control into your interfaces:
1. On the "Creation" tab, in the "Smart" group, click "Smart controls".
2. Select the desired control in the window that appears:

Dashboard

Display HTML data.

HTML Display control

Enter HTML data. HTML Editor control

Select intervals or change zoom Range Slider


Display a map or an itinerary.

Map You can:


• Browse through the different types of controls,
• Enter keywords in the search box.
Remark: The "Go" button that appears when hovering over the Smart controls allows you to see
and try the control before integrating it in your window.
3. Select the desired control, drag it and drop it onto the window editor.
Edit an image Image editor

Display an ActiveX control ActiveX

36 Part 1: Main concepts Part 1: Main concepts 37


Controls in practice 2 Control characteristics
All the controls in the window editor include a
WINDEV includes different types of controls that can be created via the "Creation" tab of the ribbon.
description window. This window has several tabs
can be easily used in your windows. These controls All controls can be handled through programming. that group the characteristics that can be set on one
or multiple controls.

1 Creating a control

1.1 Different types of window controls All controls can be handled through programming.
For more details, see the online help about each
The following controls are available in the WINDEV type of control, their main characteristics and their
window editor: programming in WLanguage.

• Edit control, • Gantt Chart, 1.2 Creating a new control


• Static, • TreeView Table, To create a control:
• Button, • TreeView, 1. Select the type of control to create via the
• Image, • Diagram Editor, corresponding icon in the "Creation" tab of the
• Image Editor, • Organization chart, WINDEV menu.
• HTML Editor, • Progress Bar, 2. The shape of the new control appears under the
• Radio Button, • Looper, cursor.
• Check Box, • Multiline zone, 3. Click where you want to create the control. The
control is automatically created.
• List Box, • Scrollbar,
Remark: Other creation modes are available. For
• Combo Box, • Slider,
more details, see the online help.
• ListView, • Spin,
• Sidebar, • TimeLine, 1.3 Creating a control associated with an
• Drawer, • Tab, item
• Web Camera, • Ribbon, All the controls in a window can be bound to a data
• Conference control, • Internal Window file item, EXCEPT the following:
• OLE control, control,
• Button • Timeline
• ActiveX, • Toolbar,
• Splitter, • Shape • Dashboard Remarks:
• Shape, Remark: You can also view and/or change the
• Bar Code, • Chart, • Tab • Xaml characteristics of one or more controls in the • The description window can be displayed for a
• Map, modifier. For more details, see the online help. set of selected controls. Only the characteristics
• HTML Display • Toolbar • Carousel common to the selected controls will be
control, • Carousel,
• Map • Cube 2.1 Displaying the characteristics displayed.
• Supercontrol, • Cube,
To open a control description window: • Several description windows can be opened at
• Organizer, • Widget, • Ribbon • HTML Display the same time. Each description window displays
• Scheduler, • Xaml, control • double-click the control.
the characteristics of one or more controls.
• Rating, • Calendar, • select "Description" in the context menu.
• Splitter • Layout control
• Pivot Table, • Control template, • select the control and press Alt + Enter.
• Dashboard, • Layout control, There are multiple methods to create a control that
• Table, • Dockable panel, is bound to an item:
• Spreadsheet, • PDF Reader. • Drag and drop the item from the "Analysis" pane.
• Word Processing, • Using the "File" tab of the control description
window.

38 Part 1: Main concepts Part 1: Main concepts 39


2.2 Characteristics by tab Notes tab 3 Handling controls in the editor
This section presents the different categories of the The "Notes" tab allows you to describe the control
operating mode in detail. This information will be
characteristics displayed by each tab.
included in the technical documentation (project 3.1 Control handles 3.2 Available operations
General tab documentation, window documentation, etc.). Handles appear around new or selected controls. The window editor allows you to:
The "General" tab allows you to specify the name Handles allow you to:
Help tab • Select one or more controls (with the lasso for
and all the display characteristics of the control • view the control size, example),
(text, input mask, etc.). The "Help" tab allows you to enter and set the types
of help systems associated with the control. A • change the control size. • Group selected controls,
UI tab control can have: The colors of the handles identify the actions that • Move controls,
The "UI" tab allows you to define the parameters of • A tooltip, displayed when the control is hovered can be performed: • Change the text of the controls,
the control interface: over by the mouse cursor. • The black handles (different color depending on • Show an advanced tooltip (when the cursor
• Initial state of the control when the window is • A help message, displayed in the status bar when the skin template used) allow you to distinguish hovers over the control) with: the control name,
opened, the control gains focus. and resize the selected control. position, size, anchors and initial state.
• Control visibility, • A help window with a specific title, displayed • White handles are used in two cases: • Use a control outside the window. This control will
• Control size, when pressing the F1 key. • simple selection: the selected control is in be visible in edit mode and invisible at runtime.
• Alignment, etc. A control can also be associated with a specific help read-only mode. For example, these handles
page from a CHM help file. This help page will be may appear if the control is selected and its
Details tab displayed: description window is open. In this case, the
The "Details" tab allows you to define the different control cannot be directly modified or moved
• as a context-sensitive help (tooltip displayed
parameters of the control: in the editor.
upon request), if a help file was defined for the
• input parameters, window. • multiple selection: the selected control is part
• Drag and drop, etc. • as a help page. In this case, use WHelp to display of a multiple selection, but it is not the first
The content of this tab depends on the type of the the help page. control selected.
Remark: You can use a control outside the window
current control. This type of handles is also displayed when a to:
Style tab window is in read-only mode for the developer:
Binding tab The "Style" tab allows you to define the style of the the controls cannot be modified.
• associate it with the window without displaying it
This tab allows you to select the item (from a data file different control elements. This tab lets you: at runtime. This allows you to use the content of
• The gray handles indicate the first control the control programmatically (like a variable).
or query) to which the control is bound. Depending • Change the control aspect: simply select the selected in a multiple selection. This control will
on the current record, the content of the bound item control element to be modified, and then choose • display new controls in a window when resizing it.
be the reference control.
will be displayed in the control. the style characteristics. Only the aspect of the
The binding can be established to a single file or to current control is modified.
multiple files. • Apply an existing style to the control: simply 4 Aligning controls
Content tab select the style to apply.
• Create or change a style: the created or modified The alignment of controls allows you to create 4.1 Rulers
The "Content" tab allows you to define: "professional" and outstanding interfaces. WINDEV
style is updated for all project controls that use You can display alignment rulers in the window
• the initial content of the control (for Edit controls includes the following tools to help you create
this style. editor.
only). standard interfaces:
• the data source used to populate the control (for These rulers have snap-on guides: any control that
• rulers.
List Box, Combo Box, Table controls, etc). comes close to a guide is automatically "snapped"
• grids. by it.
• real-time interface checker (appears This feature allows you to easily position, align or
automatically when positioning controls). resize controls in a window.
• advanced interface checker.
• alignment options.

40 Part 1: Main concepts Part 1: Main concepts 41


Displaying the rulers Handling markers 4.3 Real-time interface checker The custom alignment allows you to use specific
To display the rulers, go to the "Display" tab, "Help The markers can be easily handled with the mouse alignment properties. In the custom alignment, you
When a control is moved in a window, guides are
for edit" group and check "Rulers". Two types of in the editor. When a marker is hovered over by the can define:
automatically displayed by the real-time interface
markers can be used: mouse, the cursor turns into a double arrow. • the horizontal or vertical alignment: controls can
checker. The objects snap to the guides, allowing
• markers, which allow you to align and place the you to align the moved control with the other be aligned to the left from the beginning of the
controls inside the windows using the associated 4.2 Snap-on grid control or from the input area. They can also be
controls found in the window.
guides. The snap-on grid is used to position vertical and aligned to the right according to the end of the
• border markers, which allow you to obtain a horizontal markers in the window. The created 4.4 Advanced interface checker control or input area
border of the same size on each side of the controls are attracted to these markers, as if the • the even spacing: the spacing between controls
The advanced interface checker is a tool used to
window. A guide allows you to view the border controls and the markers were magnetic. The snap- is adapted in order to be the same between each
improve the layout of the controls in the different
area. on grid is used to align the controls according to the control (horizontally or vertically).
windows of the application.
Remark: To show or hide the window guides, markers. • the size: the size of the selected controls
This interface checker also enables you to apply the
select "Show guides" in the context menu of the interface rules from the Windows standard to the automatically adapts to obtain controls with the
rulers. Guides are always enabled even if they are current window or to the selected controls: control same height and/or width.
not visible: any control moved toward a marker is alignment, standardization of Button control sizes, • the reference control: to align and define the size
automatically snapped by it. etc. of the controls, the reference control can be:
• the first selected control (the one with the
Example in a window: 4.5 Alignment options white handles).
To align multiple controls, WINDEV includes: • the last selected control.
• a preset alignment (available on the "Alignment" • the largest selected control.
or "Modification" tab, in the "Depth and • the most top left selected control.
Alignment" group).
• a custom alignment (available on the "Alignment"
tab, in the "Other alignments" group).

5 Control edit options in a window


The edit options allow you to set: 5.1 Making a control visible/invisible
• the display options. To make a control visible/invisible in the window
• the snap-to behavior of the controls. editor:
• the clicks and double-clicks on the controls. 1. Select the control in the editor.
• the control selection options. 2. On the "Modification" tab, in the "Help for edit"
• the position of the window when it is opened. group, check/uncheck "Visible (editor)".
These display options are used to customize the
operations performed on the controls in the window
editor.
To open these options, go to the "Display" tab and
click the dialog box launcher ( ) in the "Options"
group.

42 Part 1: Main concepts Part 1: Main concepts 43


5.2 Locking/Unlocking a control 5.3 Framing a control 6.1 Anchoring a control in the editor Vertical distribution: This option
To lock/unlock a control in the window editor: To frame a control in the window editor: To anchor a control: is available only when multiple
1. Select the control in the editor. 1. Select the control in the editor. 1. Select the controls you want to anchor. controls are selected. The selected
controls stretch downward and are
2. On the "Modification" tab, in the "Help for edit" 2. On the "Modification" tab, in the "Help for edit" 2. Define the control anchoring options:
distributed proportionally when the
group, check/uncheck "Locked". group, check/uncheck "Outlined". • in the "UI" tab of the control description window is enlarged vertically.
A locked control cannot be selected by clicking Framing a control allows you to easily view all the window ("Description" in the context menu).
and dragging over it. Let’s look at an example controls of a window (especially Image controls). • via "Anchor" in the context menu of the control Bottom: The control moves down
with a Tab control. When you click and drag over (right click). when the window is enlarged
multiple controls in a tab pane, the Tab control is not downward. Set the "bottom" anchor
3. In the window that appears, select the type of
automatically selected. rate to define how much the control
anchors to be applied. The most common options
All other operations can be performed on a locked moves.
are represented by different icons:
control. Width and bottom: The control
No anchors: The control does not
stretches to the right and moves
change when the window is resized.
downward when the window is
6 Anchoring controls No anchoring option is selected.
enlarged.
Width: The control stretches to the Set the "bottom" anchor rate to
The windows of a WINDEV application can be right when the window is enlarged. define how much the control moves.
resized at runtime. With the anchoring mechanism, Set the "width" anchor rate to define Set the "width" anchor rate to define
controls are automatically resized and positioned how much a control stretches how much a control stretches
when the window is resized. relative to the window. relative to the window.
The anchors of a control include two settings: Right: The control moves to the Right and bottom: The control
• the type of anchor: defines the control behavior right when the window is enlarged. moves to the right and down when
based on the new window size. The control can Set the "right" anchor rate to define the window is enlarged. Set the
be moved to the left and/or down, or be stretched how much the control moves. "bottom" and "right" anchor rates to
horizontally or vertically, ... define how much the control moves.
Horizontally centered: The control
• the anchor rate: defines how much a control remains centered horizontally Horizontally centered at bottom:
stretches or moves. This option allows you to: regardless of the width of the The control remains centered
• keep a control centered horizontally in the window. horizontally regardless of the width
window regardless of its size. of the window. However, the control
Height: The control stretches
• proportionally enlarge some controls. downward when the window is is anchored to the bottom and
These settings can be defined: vertically enlarged. Set the "height" moves down when the window is
• in the window editor. anchor rate to define how much enlarged.
• through programming with the WLanguage a control stretches relative to the Set the "bottom" anchor rate to
properties. window. define how much the control moves.
Width and height: The control Vertically centered: The control
stretches to the right and downward remains centered vertically
when the window is enlarged. Set regardless of the height of the
the "width" and "height" anchor window.
rates to define how much a control
stretches relative to the window. Horizontal distribution: This option
is available only when multiple
Height and right: The control controls are selected. The selected
stretches downward and moves controls stretch to the right and are
to the right when the window is distributed horizontally when the
enlarged. window is enlarged.
Set the "right" anchor rate to define
how much the control moves.
Set the "height" anchor rate to
define how much a control stretches
relative to the window.

44 Part 1: Main concepts Part 1: Main concepts 45


Vertically centered to right: The
6.2 Example of control anchors 7 Automatic button execution
control remains centered vertically The following example shows how controls are
regardless of the height of the anchored in a window. To force an action on a window, simply set a Button
window. control of this window to "Automatic execution"
Initial window:
mode. The principle is very simple, if no button
However, the control is anchored to has been used for a given period of time, the
the right and moves right when the click code of the Button control associated with
window is enlarged. the "Automatic execution" will be automatically
Set the "right" anchor rate to define executed.
how much the control moves. At runtime, the duration is automatically
decremented. When it reaches zero, the code of the
Centered: The control remains Button control is automatically run.
centered vertically and horizontally
regardless of the size of the window. 7.1 Implementation
To run the code of a Button control automatically:
4. Define (if necessary) the different anchor rates. 1. Define which Button control must be run
5. Validate. If the "Anchor" option is enabled (on automatically.
the "Display" tab, in the "Show (all controls)" group), Enlarged window:
2. In the window description ("Details" tab of the
the anchor signs are automatically displayed in the description window), specify:
control (red arrows).
• the time before the automatic execution of the
Button control. 7.2 Programming
• the name of the Button control to be run. You can also define an automatic validation Button
3. At runtime, the remaining time is automatically control using DelayBeforeClosing.
displayed.
7.3 AAF: Automatic Application Feature
This feature is also directly accessible to the end
users. They can request a Button control to be
automatically run after a specific duration.

To obtain this result:


1. Select the [<-] and [->] Button controls: center
these controls vertically and horizontally ( ).
2. Select the two List Box controls: anchor these
controls to the right, horizontally and vertically
(check the "right", "width" and "height" options).
3. Select the three Button controls: these controls
must stretch to the right proportionally ( ).
Remark: The anchors of the controls can be set
programmatically using different WLanguage
properties.

46 Part 1: Main concepts Part 1: Main concepts 47


Control Edit:
templates Reports
WINDEV allows you to create control templates. A control template is a set of controls that can be A report provides a custom view of data: data entered in the database, data in a text file, data from
reused in several windows. a Table control, etc, ...
Changes made to a control template are automatically applied to all the windows that use the Reports can be displayed on the screen, saved in an HTML file, printed, etc.
template.
A control template is used to: A report can be used to summarize and synthesize data.
• group a set of controls for a specific purpose. You can:
• make the controls independent of the host window. • group data.
• sort data based on different criteria.
• perform calculations (means, statistics) or even create charts.

The diagram below illustrates the concept of reports:


• the data to print comes from a data source (data file described in an analysis, HFSQL view, query,
memory area or text file).
View of a control template.
• the report groups, sorts and formats the data.
The template is bordered by an orange line in the editor. • the report can be represented on the screen, as a file (HTML, RTF, etc.). or sent to the printer.

Sources of Print
report modes

Table control HTML files,


XML files, ...

Memory Zone
XLS files, PDF files,
control
...
Template used in a window.
The elements belonging to the template are bordered
Query
by a blue line and identified by a yellow square. Text file
Report
(Report editor)
To create a window based on a control template, create a "Control template" control. Text file
Remark: The programming associated with the template elements can be performed in the PCL file
template directly.
The characteristics of the elements can be dissociated from the template. For example, dissociate Data
the position of a control from the template to move it elsewhere while keeping other changes Printer
(code, style, etc.). This is referred to as control inheritance. In this case, the elements are identified
by a blue square. WLanguage variable

Print preview

48 Part 1: Main concepts Part 1: Main concepts 49


Report
templates PART 2
Most organizations use a standardized appearance and layout for their print jobs: date in the
upper-right corner in a specific format, page footer with print time and file name, logo in the upper-
left corner, etc.
Report templates are used to easily standardize report layouts.

Development
environment
View of a report template in the report editor.

Template used in different reports.


The elements that belong to the template are identified by a yellow square.
Overridden template elements are identified by a blue square.

A report template can be created:


• via the icon in the quick access buttons. In the "New" window, click "Report", and then
"Report template".
• from the current report (on the "Home" tab, in the "General" group, expand "Save" and select
"Save as a template").
To create a report based on a template, select the template that will be used when creating the
report.
The characteristics of the elements can be dissociated from the template. For example, dissociate
the position of a control from the template to move it elsewhere while keeping other changes
(code, style, etc.). This is referred to as inheritance. In this case, the elements are identified by a
blue square.

50 Part 1: Main concepts


WINDEV
editors
To handle a project, WINDEV proposes several editors:
• project editor. • data model editor.
• query editor. • window editor.
• report editor. • UML editor.
• ...

These editors are used to easily handle the different project elements.

Report editor

Data model editor Window editor

Project editor Query editor

52 Part 2: Development environment Part 2: Development environment 53


User-friendly editors in practice The UML editor is mainly used to:
• describe one or more UML diagrams.
2.5 Window editor
The window editor allows you to describe the
• build a UML model by reverse engineering the characteristics of the project’s UI.
project. Multiple skin templates (style sheets associated
1 Introduction Let’s see some characteristics of the UML editor: with the window) and types of windows are available.
• Creation and description of UML diagrams. They help you make your windows and applications
WINDEV is built on a set of editors that operate in • code editor, debugger and compiler. more user friendly.
• Automatic formatting of links.
a single environment and adapt to the needs of • help editor.
• Automatic generation of a class (or set of classes) For more details on how to create a window, see the
developers: • modeling editor. from a class diagram. online help.
• project editor. • document editor. • Zoom in the UML editor. Let’s see some characteristics of the window editor:
• data model editor. • image editor. • Insertion of comments in a UML model. • WYSIWYG editor ("What You See Is What You
• UML editor. Get"). You can directly view your windows as they
These editors allow you to create the different • Relation between the different panes and
• query editor. elements (windows, reports, databases, programs, will appear to the user.
elements of the UML model.
• window editor. etc.) used by the application. • Creation and description of windows and
• report editor. 2.4 Query editor controls.
• Drag and drop to copy, paste or move controls
The query editor allows you to automatically create
from one window to another.
2 Types of editors queries based on data files.
• Window skin templates and preset control styles.
A wizard helps you create queries: choose the
items you want to include and enter the selection • Icon catalogs to associate images with controls.
2.1 Project editor • WYSIWYG editor ("What You See Is What You conditions via the wizard. The query is automatically • Real-time interface checker to position controls
Get"). You can directly view all the data files and generated (in optimized SQL code) and can be more easily.
The project editor allows you to manage the project
links of your project. tested immediately. • Anchoring of controls in the window.
using a comprehensive dashboard.
Various widgets allow you to see: • Creation and description of the data files and • Ability to enter the captions of the controls
Let’s see some characteristics of the query editor:
their items. directly in the editor work area.
• the number of project elements, • WYSIWYG editor ("What You See Is What You
• Automatic formatting of the analysis links. • Context-sensitive help in the windows.
• the registered incidents, Get"). You can directly view the query and its
• Information about the links via tooltips. result. • Zoom in the window editor.
• the tasks to be performed,
• Simplified retrieval of the description of an • Easy query creation via a wizard. • Relation between the different panes and
• the checked out elements,
external database (SQL Server, Oracle, etc.). elements of the editor.
• ... • Automatic generation of the SQL code for each
• Independent data file descriptions. query.
2.2 Data model editor • Encryption of data files. 2.6 Report editor
• Ability to test queries immediately.
• Automatic modification of the data files when the • Zoom in the query editor. The report editor allows you to easily create reports
The data model editor allows you to describe the
structure of the files changes. that can be printed.
characteristics and structure of the data files. For more details, see the online help about the query
• Verification of the referential integrity. editor. Let’s see some characteristics of the report editor:
The data model editor supports the Merise method
(CDM and LDM). • Automatic generation of the analysis. • WYSIWYG editor ("What You See Is What You
• Zoom in the data model editor. Get"). You can directly view the reports as they
The data model editor supports two types of
will be printed.
database descriptions: • Insertion of comments in the graph of the
analysis. • Easy-to-create, zero-code reports.
• direct description of the analysis linked to the
project (also called Logical Data Model (LDM)) • Relation between the different panes and • Drag and drop to copy, paste or move controls
elements of the analysis. from one report to another.
• description of the Conceptual Data Model (CDM)
and automatic generation of the analysis.
2.3 UML editor
Let’s see the online help:
UML is a visual language that can be used to:
• represent an information system using objects.
• generate the object structure of the application
(structure of the application in the form of object
classes) that corresponds to the information
system being analyzed.

54 Part 2: Development environment Part 2: Development environment 55


Project
dashboard
• Report skin templates and preset control styles. • Zoom in the code editor.
• Real-time interface checker to position controls • Relation between the different panes and
more easily. elements of the editor.
• Use of a form in a report background. For more details, see the online help about the code
• Creation of multi-column labels. editor.
The project dashboard is an essential element for managing WINDEV Mobile projects. It shows an
• Ability to edit a report in HTML (to publish it on 2.8 Help editor overall and detailed view of the project’s progress.
the Internet for example) or RTF (to use it in a
word processing software). The help editor allows you to create a set of help
• Zoom in the report editor. pages ("CHM" file) based on your project. The project dashboard includes several indicators about the project content:
For more details, see the online help about the A help page is created for each window in your • project statistics,
report editor. project. These pages allow you to describe the • incidents,
different operations that can be performed by the
• tasks,
2.7 Code editor users.
• status of automated tests,
The code editor allows you to write all processes/ Let’s see some characteristics of the help editor:
• result of different audits,
events in WLanguage (programming language • WYSIWYG editor ("What You See Is What You
common to WINDEV, WEBDEV and WINDEV Get"). You can directly view the help pages of
• list of elements checked out from the SCM (Source Code Manager),
Mobile). For example, it allows you to enter the your project. • result of action plans (continuous integration), etc.
source code of the following elements:
• Compilation of help pages and creation of a CHM
• controls, file.
• windows or pages, • Ability to create an index and a table of contents.
• reports, • Insertion of images.
• local and global procedures, • Insertion of links in the help pages.
• classes and methods, etc. • Ability to display the titles of the pages in a bar.
Let’s see some characteristics of the code editor: • Zoom in the help editor.
• Automatic formatting.
• Automatic completion. 2.9 Image editor
• Glossary of functions. The image editor allows you to edit images and icons
• Typing error detection and spelling checker. in the project and its elements.
• Incremental compilation. Let’s see some characteristics of the image editor:
• Insertion of WLanguage events specific to the • Crop.
use of the mouse or keyboard. • Resize.
• History of code changes and ability to roll back. • Symmetry, rotation.
• Ability to open multiple code windows (to • Text.
compare code, for example). • Layers.
• Access to image catalog. The elements in this dashboard are displayed as widgets. These widgets can be configured,
• Transparency. moved, enabled, disabled, etc. You can also add new indicators.

The dashboard configuration is saved for each user. The dashboard configuration is the same for
all the projects of a given user.

56 Part 2: Development environment Part 2: Development environment 57


WINDEV/WEBDEV/WINDEV Project
Mobile: 100% compatible configuration
New projects are often cross-platform. Project configurations allow you to adapt the same project to multiple "targets".
For example, for an ERP system on Windows, it is very likely that beside the main application, there From the same project, you can create:
will be sales agents equipped with PDAs or smartphones, stores with mobile devices for inventory • executables with different elements, names, etc.
management, and Intranet and Internet sites. • different components.
• Webservices.
All elements, excluding the UI (pages and windows), are 100% compatible and can be shared • .Net assemblies.
between WINDEV, WEBDEV and WINDEV Mobile projects.

It is thus possible to share sets of procedures or classes, for example, between several projects.
WINDEV project
A project can be opened in any IDE regardless of the one that was used to create it.

When you open a project in a different IDE, a wizard appears,


allowing you to create a project configuration specific to the
IDE used.

For example, if you open a WINDEV project in WEBDEV, you


will be able to create a project configuration named "Site", to Project configurations
group all the elements required by the WEBDEV site.

You can also view the elements of each platform from each
environment. A project in WINDEV displays the thumbnails
of the WEBDEV pages and WINDEV Mobile windows, Config 1. Config 2. Config 3. Config 4. Config 5.
WINDEV DotNet Component Java archive Web service
for example. Clicking a WEBDEV page from the WINDEV executable assembly
project editor opens the WEBDEV page (WEBDEV must be
installed on the computer).

The multiple generation allows you to generate all project configurations (or some of them) in a
Remark: If you have WINDEV and WINDEV Mobile, you can handle WINDEV Mobile configurations
single operation.
from WINDEV. You can open, modify and test mobile windows.

58 Part 2: Development environment Part 2: Development environment 59


Multiple Custom-Folders: Organize
generation your project
Project configurations allow you to easily define the "target" platforms of the project. Multiple All elements included in a project are listed in the "Project explorer" pane. By default, the elements
executables, components and libraries can be defined for the same project. are organized according to their type: windows, reports, classes, etc.
In large projects, it is often more practical to group the elements that relate to the same feature:
You can select each configuration individually to generate the corresponding program. stock management or order management for example.
To do so, create the "Custom-Folders" in the tree structure of the "Project explorer" pane and drag
There is a faster method: the multiple generation. You can select all the configurations to be the different elements onto these folders.
generated at the same time to obtain the corresponding programs immediately. Some elements can be common to several "Custom-Folders".
It makes it easier to work on part of the application.

To start a multiple generation, go to the "Project" tab, "Generation" group and click "Multiple
generation".

Remark: WINDEV also allows you to create internal components to organize your projects and
share sets of elements between different projects.

60 Part 2: Development environment Part 2: Development environment 61


Source Code Manager
Operating mode of the Source Code Manager
(SCM) The following example presents the Source Code Manager:

Overview
Local Computer 1
To simplify teamwork, WINDEV includes a Source Code Manager.
The Source Code Manager allows developers to work together on the same project at the same
2
Project A
Check-out 9:57 Project A
time and share elements between multiple projects. Version 1 Version 1

Network 3 Modification

Check-in 10:41
(intranet) Project A
Version 2
Project A

4
Version 2

ADSL Local Computer 2 Project A

5
Version 3
(internet)
Project A Check-out 14:28
Version 2 Repository
Mobile Computer
Offline Check out Beta window from
Project A Version 1 at 9:13

Mobile Computer

SCM
Local Computer 1

1
Check out Alpha window from
Project A Version 1 at 9:57
Check in modified Alpha window
Project A Check-out 9:57 into Project A Version 2 at 10:41
Version 1

6
Local Computer 2
A repository contains a collection of project elements. Each computer has a local copy of the Modification Check out Alpha window from
for end users
elements required for development. Project A Version 2 at 14:28

Project A Check-in 18:32


Mobile Computer
Version 3

7
Check in modified Beta window
Elements in the SCM can be shared: into Project A Version 3 at 18:32

• via PCSCloud (paid turnkey solution, on a dedicated server),


• via SCMDrive (paid turnkey solution, on a shared server).
• via a network, A project element (window, report, etc.) can only be checked out by one developer at a time.
• via the Internet, Once the checked out elements are modified, they must be checked back in so that the source
• in offline mode. In this case, the necessary elements will be checked out from the SCM when the project can take the changes into account. The repository stores a history of all the project
laptop is connected to the main system, for example. elements since they were created.

Each time an element is checked back in, the version number of the source project is incremented
by 1.

62 Part 2: Development environment Part 2: Development environment 63


Sharing a project in practice To use the latest version, the other developers must
synchronize their local project with the reference
Tips
The sources of your applications are essential.
project (located in the repository). These sources must be handled with great care!
The development of a large IS system requires To share a project, you can use the Source Code
the participation of multiple developers. These Manager. SCM server Tips for configuring the server that will host your
1 CHECK OUT Developer
developers must work on a single WINDEV project AN ELEMENT Local network sources:
while sharing different resources (queries, classes, • Use a dedicated server with a disk with enough
Local
etc.). project space (at least 200 GB).
Reference 3 CHECK-IN 2 MODIFICATION
project • Use the Source Code Manager (SCM) in Client/
Developer Server mode.
1 Source Code Manager SYNCHRONIZATION ADSL (Internet)
• The hard disks may encounter physical problems:
4
use a RAID I system on your server (several disks

SY
Local

N
4
1.1 Overview
project

CH
The SCM can be run locally or remotely, via Internet that store the same information).

RO
N
or via an HTTP or HTTPS connection. This feature • Use a UPS to protect the power supply of your

IZ
Developer

AT
WINDEV boasts innovative features for teamwork

IO
Disconnected
enables you to work on a project from your office server.

N
management in the Source Code Manager (also
or from a remote site without losing any changes. Local
• Make backup copies of the repository on a
called SCM). project

The SCM can also be used in offline mode. regular basis (at least once a week).
The Source Code Manager (SCM), which is fully
integrated in the environment, is used to: 1.2 Principle • Place the server in a "secure" area and use a
firewall.
• make teamwork easier and faster,
Setup
• store the history of changes and versions,
• save the sources of the development team SCM server
LOCAL COPY
2 Creating a repository for the SCM
automatically. Local Developer
project
Local network
Designed for teams between 1 and 100 developers,
the SCM promotes and standardizes the
LOCAL COPY 2.1 Overview • locally, in a shared directory on the network:
Reference Developer all the SCM users must have full rights on this
collaboration between developers (even when Local
project ADSL (Internet) To share a project via the Source Code Manager, a
project directory. The repository will be in HFSQL Classic
developing alone, the SCM is useful because it LOCAL COPY repository must be created. This repository must be
format.
contains the history of your applications). Developer created once only on the server.
Local
project Disconnected Simply specify the network directory where the
The SCM uses a repository: procedures, classes, The operating system and file system on which the repository will be created.
pages, reports, components, analyses, etc. All project elements are saved in the repository repository is installed must support files exceeding
You can choose between a repository: (on the server). This operation is performed when 4 GB. 2.2 When to create a repository?
creating the project or when importing an existing The repository can be created:
• in HFSQL Client/Server mode: The repository must be created only once.
project into the Source Code Manager.
• installed on a custom server, • via SCMDrive, a "turnkey" solution WINDEV allows you to create this repository at
Each developer who uses the Source Code Manager (recommended). In this case, a shared server is
• available via a PCSCloud (paid turnkey solution, different times:
retrieves a local copy of the project. used. This paid solution simplifies all the SCM
on a dedicated server) platform, • when installing WINDEV.
• available via SCMDrive (paid turnkey solution,
Use server setup operations. For more details, see
• when creating a project that uses the SCM.
To work on a project element (window, page, report, SCMDrive.
on a shared server). • when importing a project into the Source Code
etc.), the developer must check out the element • via PCSCloud, a "turnkey" solution. In this case,
• in HFSQL Classic mode (installed locally or in a Manager.
from the repository, modify it and check the a dedicated server is used. This paid solution
shared directory). • in the SCM administrator directly.
element back in. simplifies all the SCM server setup operations.
If the element is already checked out, the developer You will use a platform adapted to your needs. For Once the repository is created, all the WINDEV
can send a message to request that the element be more details, see PCSCloud. projects to share can be imported into this
checked back in. • on an HFSQL Client/Server server: the repository repository.
will be in HFSQL Client/Server format. In this
case, you must specify: 2.3 Backups
• the server, We advise you to make backup copies of the
• the database, repository on a regular basis. These backups can be
performed via the SCM administrator.
• the port used,
• the name and password of an HFSQL database
administrator.

64 Part 2: Development environment Part 2: Development environment 65


3 Configuring the project to work with the SCM • automatic mode: if you try to modify an element A screen allows you to perform the following actions
that has not yet been checked out, the SCM before checking the element back in:
Some operations are required before an existing • An existing repository. Simply select the automatically prompts you to check it out. Once • view the changes made.
project can be used by the Source Code Manager. desired repository. the check-out is validated, the element can be • compare the element in the repository with the
4. Validate the wizard. The project is added to the modified. local (checked out) element.
3.1 Adding a project to the SCM SCM. Remark: this mode is not recommended when
• access the element history in the repository.
using the SCM with a slow Internet connection.
To add a local project to the SCM:
1. Open your project in WINDEV.
3.2 Sharing resources To change the check-out mode:
You can check in the changes made to the element
while keeping the element checked out ("Keep
2. On the "SCM" tab, in the "Add project" group, A first project was imported into the Source Code 1. On the "Home" tab, in the "Environment" group, element checked out" option).
click "Add project to SCM". Manager. This project contains elements shared expand "Options" and select "General options of
3. In the wizard, select the repository to be used: with other projects (classes, windows, procedures, WINDEV". 4.4 Project management modes
style sheets, analysis, etc.). 2. In the "General" tab, the "" option allows you to
• A new repository. In this case, select the type Two management modes are available with the
Sharing is an important concept of the SCM. There switch all subsequent projects to automatic mode. SCM:
of repository you want to create (SCMDrive or
are several methods to share resources. For more
PCSCloud, Client/Server or local repository). Opening a project element to • Managing the project in Master/Guest mode.
details, see the online help.
Provide the required information according to change its characteristics • Managing the project in automatic mode (by
the chosen option. default).
To change the characteristics of a project element
included in the SCM: Master and guest
4 Working with the SCM 1. Check out the element from the Source Code The Source Code Manager distinguishes between 2
Manager. types of users:
2. Select the check-out mode for the element. The • the master: the master is the user who initially
4.1 Project options related to the SCM • Check out/Check in the project automatically: check-out mode can be:
This option is used to automatically manage stored the project in the Source Code Manager.
Several options are available to configure a project • exclusive: nobody can check out this element • the guests: the guests are the developers
the "project file". If this option is checked, the
handled by the Source Code Manager. These until it is checked back in. The element can be who handle the project from the Source Code
project file is checked out only if the action
options can be found in the "SCM" tab of the project checked out for tests only. Manager.
performed requires it. Once the actions have
description ("Project" tab, "Description"). These • for test: the element can be modified but the
been completed in the project, the project file is There is no need to be connected in master mode on
options are checked by default. modifications will not be checked back in.
automatically checked back in. a project. The "Master" mode is only required to:
• Propose to get the latest version of the This option disables the "Master/Guest" • multiple: the element can also be checked out • change the project characteristics and check
elements when the project is opened: management on the project. This option by other users. In this case, the differences these changes back into the repository.
When opening a project located in the SCM, this can also be enabled on the "SCM" tab, in the between the different element versions can be
option prompts you to get the latest version of • check in all the elements to create the executable
"Project" group, by expanding "Master/Guest" viewed when the element is checked back in.
the project elements. and the setup program of the application.
and selecting "Manage project check-out 3. Validate. The element is opened. The title bar
By default, the latest version of the elements is automatically". To switch from master mode to guest mode, go to
indicates that the element is checked out.
automatically retrieved. the "SCM" tab, "Project" group, expand "Master/
• Suggest checking the elements back in when 4.2 Checking out an element 4.3 Checking an element back in Guest" and select "Become guest on the project
the project is closed: (and check all in)".
When the project is closed, this option displays a The different check-out modes The elements checked out from the Source Code
In this case, the Source Code Manager allows you to
Manager are bordered by a red line in the project
list of the checked out elements to check some The SCM includes two modes to check out the check in all the elements of the project (including the
editor.
or all of them back in. project elements: .WDP file).
By default, when the project is closed, the To check in an element, go to the "Project explorer"
• standard mode: if you open an element that has
checked out elements are not checked back in. pane and select "Check in" in the context menu of
not been checked out from the SCM, a panel
the element.
indicates that the element must be checked
out to modify it. The element can be checked
out immediately (check-out button found in the
dialog box).

66 Part 2: Development environment Part 2: Development environment 67


Internal
component
To switch from guest mode to master mode, go to Automatic mode
the "SCM" tab, "Project" group, expand "Master/ With the automatic mode, the project file is
Guest" and select "Become master on the project". checked out only if the action performed requires
Caution: Changing the project options: it (regardless of the user). Once the actions have
All the users of the project (master or guests) can been completed in the project, the project file is
change the project characteristics (first window of automatically checked back in. An internal component is a set of elements from a project. This set is used to:
the project, animations, code style, etc.). However, With the automatic mode, you do not need to • Organize a project: you can create internal components to group the elements of a project, by
only the project master will be able to check these manage the "Master/Guest" mode in the project. functionality, for example.
changes back into the Source Code Manager. • Share elements between multiple projects, via the SCM.
The changes made by a guest will be lost when the
project is updated from the repository.
SCM
5 Working in offline mode with the SCM
The Source Code Manager allows you to easily work the different elements you will work on (these
in offline mode. elements will appear as "already checked out"
For example, this mode allows a developer who for the other users). Then, you can work on your Project 1
works on a laptop to continue working on a project project locally. You can handle the different
located in the repository while offline. elements in the project directly.

1
Project 2
The principle is simple: • on reconnection, on the "SCM" tab, in the "Other Create the
• before disconnecting, go to the "SCM" tab, actions" group, expand "Remote work" and select internal component
"Reconnect and synchronize". Then, simply check
"Other actions" group, expand "Remote work"
the modified elements back in.
and select "Disconnect to work offline". Before Windows

2
working offline, it is recommended to check out For more details, see the online help.
Share the
internal component
6 SCM administrator Classes via the SCM

The SCM administrator is used to directly handle • manage the different files of the repository
the different projects included in the source code (check-out, check-in, share, etc.). Queries
manager. • start some tools (options, maintenance, etc.).
It allows you to: • restore a project version.
• manage repositories (create or connect to a • see the history and differences in the versions.
repository). • undo check-outs (in administrator mode).
• manage branches. • clear, save, restore a repository, etc.
• manage files and directories located in a project WCI file
• add different types of files to the repository (.doc, Subdirectory of
in the repository (add, delete, rename files and (List of elements)
directories).
.xls, .pdf, etc.). <MyComponent>
project

The elements of an internal component can be private or public:


• Private elements can be handled by the other elements of the component.
• Public elements can be handled by the elements of the project that uses the internal
component.

68 Part 2: Development environment Part 2: Development environment 69


Internal components in practice • Use a specific analysis: The internal
component accesses its own data files. The
2.2 Internal component and analysis:
total autonomy
internal component and the project use
An internal component can be linked to its own
different execution contexts.
analysis. In this case, the project that hosts the
1 Overview This is the default mode if the component uses
internal component can have multiple analyses:
an analysis.
In this case, the analysis used by the internal • the analysis of the project.
An internal component is a set of elements from a Difference with an external component: An internal component must be specified. You can also • the analysis of the internal component(s). This
project. This set is used to: component allows you to include all its elements in create a new analysis directly. This analysis will analysis is defined when creating the internal
• Organize a project: You can create internal the interface of the project. All the "public" elements be associated with the internal component. component. It can also be selected from the
components to group the elements of a project, of the internal component can be handled directly in internal component description window.
6. Validate the new internal component. At any
by functionality, for example. the editor. The elements generated by the RAD for the internal
moment, you can:
• Share elements between multiple projects: The When using an external component, the "public" component will be saved in the internal component
• Change the characteristics of the internal
elements in an internal component can be shared elements of the component cannot be handled directory. If changes are made to the analysis of
component via its description window.
between multiple projects via the SCM. directly. To modify the external component, you the internal component, the RAD will prompt you to
need to open the corresponding project. • Handle the internal component and its
One of the advantages of an internal component generate the elements these changes applied to.
elements.
compared to an external component is that it can be
Tip: An internal component contains no code for
debugged directly from the project that uses it.
declaring the global variables. A set of procedures
can be used to initialize the internal component.
2 Creating an internal component
3 Sharing internal components (via SCM)
2.1 Steps to follow 4. Specify the elements of the internal component
that will be directly accessible in the code and The internal components can be shared between • create the internal component from a project
To create an internal component: multiple projects via the SCM. located in the SCM. The internal component will
in the preset actions of the project hosting the
1. On the "Project" tab, in the "Project internal component. To share an internal component via the SCM, the be automatically saved in the SCM.
configuration" group, expand "New configuration" Remark: The automatic completion will display project containing the internal component must be • import a project containing one or more
and select "Internal component". The internal accessible (or "public") elements. They can be used in the SCM. You can: internal components into the SCM. The internal
component creation wizard starts. by the elements of the project or from another components will be automatically included in the
2. Specify the characteristics of the internal internal component. Inaccessible (or "private") SCM.
component: elements can only be used by another element of
• its name. The name of the internal component the internal component (the automatic completion
will be used for the WCI file that corresponds will display "private" elements only from the
to the description of the internal component. elements of an internal component).
This name will also be used to create a 5. Specify how the data and execution contexts are
subdirectory in your project with all the managed. There are three modes to manage data
elements of the internal component. and execution contexts:
• its caption. • Use the project analysis or no analysis (full
• its description. share): The internal component accesses
3. Select the elements that will be included in the data files of the project. The internal
the internal component. An internal component component and the project use the same
can contain all types of elements from a project: execution contexts.
windows, reports, templates, sets of procedures, This is the default mode if the internal
etc. component does not use an analysis.
• Use the project analysis with different
execution contexts (advanced mode): The
internal component accesses the data files of
the project. The internal component and the
project use different execution contexts.
This mode is reserved to specific cases.

70 Part 2: Development environment Part 2: Development environment 71


External
External component in practice
component
An external component is a set of WINDEV elements : windows, reports, analysis, etc. This set of
1 Overview
elements performs a specific operation. For example, an external component can correspond to
one of the following actions: 1.1 Definition 1.2 What is an external component com-
• Sending SMSs, An external component is a set of WINDEV,
posed of?
• Sending emails, WEBDEV or WINDEV Mobile elements: windows, An external component can be:
pages, reports, analysis, etc. This set of elements • defined and generated from an existing
• etc.
performs a specific operation. For example, a WINDEV, WEBDEV or WINDEV Mobile project. A
A WINDEV external component can be distributed to other WINDEV developers (free or not). component can correspond to one of the following "Component" project configuration will allow you
Developers will be able to easily include the functionalities of the external component in their features: to select the elements of the existing project to
applications. The external component will be included in the application and distributed with the • Sending faxes, be integrated into the component.
application. • Sending emails, • created from an "External component" project.
• ... By default, this project is composed of an
WINDEV project Remarks: "External component" platform which will contain
the elements required to create and generate the

1
• To optimize the organization of your projects, you
Develop the component.
component can use internal components. For more details,
This external component can then be integrated
see the online help.

2
into other WINDEV, WEBDEV or WINDEV Mobile
Generate the • In this chapter, we will refer to "external
component
projects.
component" as "component".
All the elements of the component are totally
An external component can be redistributed to
.WDK file other WINDEV, WEBDEV or WINDEV Mobile
independent of the project in which it is integrated.
The external component can have its own analysis,
developers (free of charge or not). These windows, reports, data files, etc.
Created in the EXE directory developers will be able to easily integrate the
When generating the external component, simply
feature included in the component into their
specify if the project that uses the component
application (or site). The component will therefore
will access these elements. The project will not be
be integrated into and distributed with the
able to read or manipulate elements that are not
application (or site).
accessible.
3 Import the
component
When creating the external component, the author
specifies: The external component consists of several files:

• which elements in the component are visible <Component name>.WDK


to the user. Visible elements will be accessible
programmatically, or via the "Project explorer" Component file. Contains all the elements
WINDEV project WINDEV project WINDEV project pane. of the external component.
This file is required to include the external
• how to use the component (use mode, the

4 4 4
component in a project.
Use the Use the Use the parameters used to access the component
component component component This file must also be provided in the client
functionalities, etc.). A short documentation (to
version of the application that uses the
be completed) is automatically generated and
external component.
associated with the component.
Remark: WINDEV includes several examples of <Component name>.WDI
components. These components can be imported
Component description (when developing
via the "Project" tab of the editor: on the "Import"
applications only).
tab, in the "Project" group, expand "Project" and
This file is required to include the external
select "An External component .. Utility component
component in a project.
or example". You can open the corresponding
This file must not be provided in the client
projects from the WINDEV home page (Ctrl + <).
version of the application that uses the
external component.

72 Part 2: Development environment Part 2: Development environment 73


<Component name>.WDZ
1.3 What elements are included in an • Distribution via the SCM: This distribution mode • If necessary, the specific files handled by the
external component? allows all projects in the SCM to directly use component (data files, initialization files, etc.) as
File with the dependencies of the WDK a component published in the SCM. For more well as the <Component name>.WDO file. The
An external component contains:
file (only for WEBDEV and WINDEV Mobile details, see SCM and components. <Component name>.WDO file contains the list of
components) • the elements to be distributed (windows, reports, Example: A company shares several projects via files that must be provided with the component.
File containing the dependencies of the etc.). These elements can be accessible (or not) the SCM. The projects used to create the external For more details on this file, see Distributing an
WDK file. This information is extracted when importing the component into a WINDEV, components and the projects that use the advanced component: WDO file.
in the project in which the component is WEBDEV or WINDEV Mobile project. These components share the same SCM.
integrated. elements cannot be modified from the project
• Distribution via a setup program (with a setup 3.4 Distribution via a setup procedure
that uses the component.
• For a WEBDEV component, this file procedure of the component similar to the one The distribution of external components using a
contains the generated WEBDEV pages, • a short description of the component. used for the applications). setup procedure requires providing a setup program
images, etc. • a help text to reuse the component. This help is Example: This distribution mode is recommended to the users. This program installs all the files
• For a Mobile component (iOS or generated from the code comments. if the external component is intended to be required for the external component in the directory
Android), this file contains the Android Remark: By default, if an external component uses sold or distributed on a large scale, with regular specified by the user.
generation files, etc. an analysis and data files, the HFSQL functions updates. This installation mode allows you to automatically
will handle these elements in an independent manage:
<Component name>.WDO HFSQL context. These parameters can be changed 3.2 Direct use of the component
• the WDO file and the installation of specific files
Optional file in the advanced options of the component. For The external component is created and used on the (data files, etc.) used by the external component.
Text file containing the list of the additional more details, see Advanced options of an external same computer.
component. • the installation of specific tools (MDAC, ODBC
elements provided with the external When the external component is imported into driver for HFSQL, etc.).
component (data files, .INI files, etc.). This a project, all you have to do is select the WDI file
• the automatic update of data files used by the
file can be created manually or generated corresponding to the component. This file can be
external component (if necessary).
automatically from the items specified in found in the EXE directory of the component project.
the "Other" folder of the "Project explorer" • the uninstallation of the external component.
The generation directory is the directory
pane. For more details, see WDO file. associated with the "External component" project To create a setup procedure for an external
configuration. component:
1. Create the setup procedure of the external
2 Creating and generating an external component Caution: The files in the <Component name>.WDO component directly from the quick access buttons:
file will be automatically copied to the EXE directory 2. In the different steps of the wizard, specify:
Below are the steps to create an external 4. Generating the external component. of the project that uses the component.
• the name of the external component.
component: The external component can be distributed and If the external component uses specific files
• the languages of the setup procedure.
1. Creating the external component. reused. For more details, see Distributing an external (data files, text files, etc.), a <Component name>.
WDO file must be created (or completed) once the • the title of the main window of the setup
2. Developing the elements of the external component and Using an external component in an program. You can configure the interface of
application. component is generated. This file contains the list of
component. the installer via the "Advanced" button.
external files (data files, text files, etc.) used by the
3. Defining the advanced options of the external component. For more details, see WDO file. • the files installed. You can add specific files on
component. top of the default component files. The WDO
3.3 Basic distribution file will be automatically created from this list.

3 Distributing an external component The standard distribution of an external component • the default component setup directory. You
can configure the changes to be made to the
consists in copying the files required by the
component to a given location. The files are copied system via the "Advanced" button.
3.1 Overview • Standard distribution, providing the necessary to a specific directory. This directory can be located • the optional modules to install.
files. on a network server, for example. • the installation media, security options and
Once the component has been created, tested and
Example: the external component is intended When the external component is imported into advanced parameters.
generated, it can be distributed to other developers.
to be used within the same company, by several a project, all you have to do is select the WDI file
Multiple methods are available: • ...
developers. In this case, the necessary files can corresponding to the component in the distribution
• Direct use of the external component be copied to a network drive. By default, the files required to install an external
Example: the external component is directly used directory. component are created in the "<Project name>\
on the computer of the developer who created it. To distribute an external component, you must EXE\INSTALL_COMPO<Component name>"
provide: subdirectory.
• The files automatically generated by WINDEV Reminder: When creating the installation of an
or WEBDEV (<Component name>.WDK and application, the necessary files are created in the
<Component name>.WDI files) "<Project name>\EXE\INSTALL" subdirectory.

74 Part 2: Development environment Part 2: Development environment 75


4 Using an external component in an application 6.2 Types of compatibility • backward compatibility: the component version
(.WDK file) used to compile the applications must
Compatibility is linked to the versions of the
A component can be reused at any time in any If the component was published and imported be greater than or equal to the version that has
component. If changes are made to the component,
WINDEV application: simply import the directory of via the SCM, the available updates appear when already been deployed.
the applications that use the component may
the component into the project. The component can opening the project that uses the component. This type of compatibility is automatically
encounter runtime problems if they are not
also be imported via the SCM. The executable (that uses the component) is managed. If the version of the component
synchronized with it.
When a new version of the component is available, created in the same way as a WINDEV application. installed with the application is earlier than the
Compatibility is an important step when making version used by the application, the application
you just have to install the new files in the setup The DLLs required for the component are changes to a component. There are two types of
directory of the component (depending on the automatically detected. will not run.
compatibility:
setup mode used). For more details on the different • forward compatibility: you can prevent the use
modes to install a component, see the online help. of a new version of a component with a project
compiled using a previous version. You need to
recompile the projects to use the new version of
5 Deploying an application that uses an external component the component.

5.1 Overview Two methods can be used to update a component 7 Advanced component characteristics
on the end-user computers:
An application that uses one or more components is
deployed in the same way as a standard application 1. Recompiling the host project
Recompile the application that uses the 7.1 Automatic documentation When is the documentation gene-
("Setup procedure" on the "Project" tab). rated?
component and redistribute the application with External components must include a technical
When deploying an application that contains a The documentation of the component is created the
the component. In this case, no version problem or documentation.
component, the following files are automatically first time the component is generated ( in the quick
compatibility problem will occur. The recompilation WINDEV, WEBDEV and WINDEV Mobile help you
installed on the user computer: access buttons).
is required in the following cases: create this documentation via the following options:
• <Component name>.WDK, When generating the documentation:
• New features have been added to the • A general overview of the component. This
• <Application name>.EXE, component and must be taken into account. • the comments in the code are used to create the
overview can be entered when generating the
• the files required for the component and the • The parameters of some procedures have documentation.
component.
application. been modified. • if there are no comments in your code, the
• A technical documentation generated
expected input and output parameters of each
5.2 Updating components and deployed • Incompatibility between new and earlier automatically from the comments in the code of
accessible element of the component will be
executables versions of the component. the component elements.
automatically included in the documentation.
• ... Which code comments are taken into account?
When updating a component and/or an executable, The corresponding comments are automatically
the following elements can be installed on the end- 2. Distributing the .WDK file directly The following comments are automatically created in the different elements.
user computer: Provide an upgraded version of the component taken into account to create the component
Remark: The component documentation can be
(.WDK file) to the end users without recompiling the documentation:
• the application executable, the component and regenerated each time the component is generated
project. • Comments at the beginning of the WLanguage
the necessary files. ("Regenerate" button).
In most cases, this possibility applies when: procedures.
• the executable and the files required for the Caution: If you use the "Regenerate" option,
• The new version is used to correct problems of the changes made to the documentation in the
application.
an earlier version. generation wizard will be lost.
• the component and any necessary files.
• New features have been added to the
For more details on the compatibility between component but are not required to run the How to access the component
applications and components, see the online help. application. documentation?
The general component overview is automatically
• Comments at the beginning of the following displayed in the component description window.
6 Modifying an external component events:
The technical documentation of the component is
• Initialization code of windows or pages, available:
• Initialization code of reports,
6.1 Overview • change rights on the elements of the component. • when a component is included in a project: on
• Initialization code of classes, the "Project" tab, in the "Project" group, expand
A component can be modified at any time once it • make changes to one of the elements of the
• Initialization code of sets of procedures. "Import" and select "An External component".
has been created and generated. These are some of component.
• in the description of the components included in
the changes that can be applied: In any case, the component must be regenerated to
the project.
• add elements to the component. take these changes into account.
In the "Project explorer" pane:
• remove elements from the component. • In the "External components" folder, select the
desired external component.

76 Part 2: Development environment Part 2: Development environment 77


• Right-click to open the context menu and <Component name>.WDZ • a file name that uses a relative path. The Example: The "Zip Code" component uses a
select "Description". available syntaxes are as follows: "Cedex" data file (Cedex.fic and Cedex.ndx files).
• In the "Details" tab, you can get the details of File with the dependencies of the WDK - Directory\FileName.xxx to specify a This data file is located in the EXE directory of the
the generated documentation. file (only for WEBDEV and WINDEV subdirectory of the current directory. component creation project.
Mobile components) - .\FileName.xxx to specify the current directory. To provide and install the component with the
The documentation specific to an element of the
File containing the dependencies of the - .\FileName.xx to specify the parent directory. data file, the WDO file must be created in the EXE
component (window, etc.) can be viewed:
WDK file. This information is extracted For example: \PickerComponent\InitialStatus.INI directory of the component creation project. This
• by double-clicking the desired element in the in the project in which the component is This file will be used when including the external file must contain the following lines:
Project explorer pane or by pressing F2 in the integrated. component in the project. The paths specified in the
code of the element. .\CEDEX.Fic
• For a WEBDEV component, this file WDO file must correspond to the paths where the
• from the "Project explorer" pane: contains the generated WEBDEV .\CEDEX.NDX
files are installed on the development computer of
• Select the "External components" folder. pages, images, etc. the external component.
• Right-click to open the context menu. Distributing a component with a
• For a Mobile component (iOS or When including the external component, the tree WDO file
• Select "List of external components imported Android), this file contains the Android structure specified in the WDO file will be kept and
To distribute a component that uses a WDO file, you
into the project". generation files, for example. reproduced in the EXE directory of the project. For
need to provide:
more details, see the online help.
7.2 Component element visibility These files must be distributed along with the • the WDK file (if necessary)
component. • the WDI file
When you create a component, you can define
If the external component uses additional elements • the WDO file
which elements of the component will be accessible
(data files, for example), the following files must be
to end users. • all the necessary files referenced in the WDO file.
added in the project EXE directory:
• If an element is accessible, the user will see it in
• a <Component name>.WDO file: This file contains
the list of project elements. Users will be able to
the list of external files (data files, text files, etc.)
handle these elements programmatically (like any
used by the external component. These files
other element in the project).
must be provided and installed with the external
Remark: The code of this element is not visible.
component.
• If the element is not accessible, the user will not
• the files that must be distributed with the
even know that it exists.
external component. These files can be in a
Caution: Depending on how the project elements specific subtree. In this case, the code of the
are declared (classes, sets of procedures, etc.), the external component must manage the access to
elements that are accessible may change. these files based on this tree structure.
7.3 WDO file What is a WDO file?
When generating the external component, multiple The <Component name>.WDO file is a TXT file that
files are automatically created in the EXE directory can be created and edited at any time. This file can
of the current project: be created and edited with Notepad, the Windows
standard text editor.
<Component name>.WDK This file contains the list of external files (data files,
text files, etc.) used by the external component.
Contains all the WINDEV elements to
These are also the files that must be provided and
be redistributed with the component
installed with the external component. These files
(windows, reports, etc.).
must be copied to the EXE directory of the projects
<Component name>.WDI that use the external component.
Component interface. This file contains: This ".WDO" file can contain:
• a help text on how to use the • the full name of the file.
component when it is reintegrated, For example: C:\ComponentsWD\
PickerComponent\InitialStatus.INI
• the elements required to use the
component in the project (compilation • the file name. This file will be searched in the
information, etc.). current directory of the external component.
For example: InitialStatus.INI

78 Part 2: Development environment Part 2: Development environment 79


Generation
modes Applications and .Net assembly DLLs
WINDEV allows you to generate applications and assemblies for the .Net
platform of Microsoft. A .Net assembly generated by WINDEV can be
In addition to Windows applications, WINDEV allows you to generate other types of projects. imported into a .Net application developed in another language in a way
similar to an external component shared between two WINDEV applications.

Applications Java applications


Applications are the most common generation mode. Applications WINDEV allows you to generate Java applications. Java applications can be
developed with WINDEV can run on the following platforms: Windows (32 or run on any computer equipped with a Java virtual machine, regardless of its
64-bit) and Linux. operating system. This allows you to build applications that run on Windows,
Mac OS or Solaris, for example.

Services Universal Windows Platform applications


WINDEV allows you to generate Universal Windows Platform applications.
WINDEV allows you to generate services for Windows (32 or 64-bit) and
These applications can be used in tile mode or be distributed via the
Linux (in Linux, services are usually called daemons). A service is a specific
Windows Store.
type of application, started at the same time as the operating system but
without an interface.

Libraries and patches


A library is a single file that contains multiple elements of a WINDEV project:
windows, reports, etc. You can generate stand-alone libraries that can
be used by other applications as well as patches for an application that is
already deployed. This allows you to avoid reinstalling the entire application
for a minor correction.

External components
External components are application snippets that allow you to share one
or more specific functionalities between multiple applications. An external
component generated by WINDEV can also be used in a WEBDEV or
WINDEV Mobile project.

SOAP or REST Webservices


A Webservice (also called XML Web service) can be generated from a
WINDEV or WEBDEV project. A Webservice uses a set of functions (one
or more sets of procedures) and makes them accessible via the web (or a
private network) using HTTP, SOAP and REST.
Remark: A Webservice must be deployed to a WEBDEV Application Server
to be used.

80 Part 2: Development environment Part 2: Development environment 81


Creating the executable in practice Java applications in practice
When your application is complete (windows, Once the executable file has been created, the
reports, etc.), you must create the corresponding application can be deployed on the end-user
executable file. computers via the setup program 1 Overview
The ".EXE" file can be run directly : there is no need
to start the application from WINDEV.
WINDEV allows you to generate Java applications 1.2 Why develop a Java application with
without previous experience in Java development. WINDEV?
As for all WINDEV applications, the application is
You have developed a WINDEV application that runs
1 Creating the executable file of a WINDEV application developed in WLanguage.
on Windows and you want to make it accessible on
1.1 What is a Java application? any operating system? Generate a Java application
To create the executable file: • the error message that will be displayed if a so that Mac OS users can use your application, for
1. Select (if necessary) the project configuration programming error occurs. A Java application is entirely compiled in JAVA. If example.
that corresponds to the executable to be created: • if the telemetry will be enabled. Telemetry this application uses a database, this database must This allows you to share network applications.
allows you to get information on how your have a JDBC driver (MySQL, Oracle, etc.). This driver
• Project configuration for a 32-bit Windows
executable file. application is being used. is specific to each database (it can be downloaded 1.3 Generating a Java application with
• the use of patches for updates. In this case,
from the Web site of the database publisher). WINDEV
• Project configuration for a 64-bit Windows
you just have to copy the patch file to the HFSQL databases are accessed natively (in
executable file. As mentioned above, you don’t need to have
executable directory. Windows and Linux only) via the SQL WLanguage
• Project configuration for a Linux executable. previous experience in Java development to
functions. No additional driver is required.
• the languages supported by the executable. develop a Java application with WINDEV. You can
2. On the "Project" tab, in the "Generation" group, A Java application corresponds to a ".jar" file. It
• the files to be included in the library (if it is develop your applications in WLanguage like any
click "Generate". requires the Java Runtime to be executed.
used). other WINDEV application and, when compiling the
3. The executable creation wizard starts. To compile (in Java) a Java project created with project, the windows and WLanguage functions are
• whether the components used in the project
4. Specify: WINDEV, the Oracle J2SDK (version 1.4.2 or later) automatically converted to Java.
are included in the executable.
• the general options of the executable must be installed on the development computer. A Remark: the number of WLanguage functions
• the location of the User Groupware data files version is available on the WINDEV setup media.
(executable name, icon of the executable file, that can be used in a Java project is limited in this
(if the application uses the User Groupware) This program can also be downloaded from the
splash screen, etc.). version. This number of functions will increase in
• the location of the data files that will be used Oracle site. forthcoming versions.
• the operating mode of the executable:
by the executable.
• Multi-instance: The program can be started
• the version information. This information
multiple times from the same computer:
multiple instances will be opened at the will be available in the "Version" tab of the 2 Features of a Java project
executable properties window (accessible in
same time.
the Windows explorer). The version number
• Single-instance: The program can be started can be automatically incremented each time 2.1 Creating a Java project • The window RAD or the full RAD is specific to a
only once from the same computer: a single database handled by a Java application.
the executable is created. A Java project can be created like any WINDEV
instance will be opened at a time. If the user • The compiler indicates whether the project
• the mode for using the WINDEV framework project:
tries to run another instance of the program, contains functions or controls that cannot be
(framework specific to the application or 1. Click in the WINDEV quick access buttons.
the current instance will be enabled. used in Java. A purple message is displayed in
common to all WINDEV applications installed The new element window appears: click "Project".
• how the library will be used. The library the "Compilation errors" pane.
on the computer).
is optional. It can be created in a separate 2. The project creation wizard starts.
• the manifest to use (for an execution on • The creation of the archive makes it possible
file (".WDL" extension) or included in the 3. In one of the first steps, the wizard allows you to to generate a ".jar" file in the EXE directory of
Windows Vista and later only).
executable. choose the project generation mode. Select "Java the project.
The advantage of including the library in the • whether a project backup must be created. archive" and continue.
• The setup module only handles the files
executable file is that you only need to install or 5. Validate the executable description. The By default, a WINDEV project for Java corresponds
required to deploy the Java application.
update one file. However, this would increase executable is automatically generated based on to a specific project configuration. The type of
the size of the ".EXE" file. this information. The executable can be directly run project generation can be changed at any time. Remark: it is recommended to create a new
once it has been created. Simply create a new project configuration. WINDEV project to develop a Java application rather
Once the project has been configured as a Java than converting a WINDEV application to Java.
project, all the tools available in WINDEV are
automatically configured for the Java project:

82 Part 2: Development environment Part 2: Development environment 83


Project
Monitoring Center
2.2 JAVA RAD 2.4 Compiling a Java project in WINDEV
As with any project associated with an analysis, A Java project is compiled to:
you can use the RAD methodology to generate the • identify programming errors in the WLanguage
windows of your application. code
The RAD methodology takes into account all the • see controls, events and WLanguage functions WINDEV includes a Project Monitoring Center to manage development projects. The Project
specific features of Java generation (controls, that are not available in Java. These errors appear Monitoring Center allows you to:
processes, functions that can be used in a WINDEV in purple in the "Compilation errors" pane.
application generated in Java). • Manage project requirements,
For more details on WINDEV elements not
Regardless of the type of window to generate, the available in a Java application, see the online help. • Monitor the progress of a project (schedule tasks),
first screen of the wizard allows you to enter the Remark: as mentioned in the What is a Java • Manage bugs and changes made to a project.
type of connection to the database: application? section, the Sun J2SDK must be The Project Monitoring Center uses an HFSQL Classic or Client/Server database: the Control
• HFSQL (in Windows or Linux): the standard installed on the development computer to compile Center database. This database is shared between different tools available in WINDEV:
window creation wizard appears. your project in Java.
• JDBC: you can specify the parameters for
connecting to the database that uses the JDBC
2.5 Creating a Java archive - Tasks
- Requirements
driver. WINDEV allows you to:
- Quality
• create and compile in a Java compiler the
2.3 Test a Java project in the editor different Java files required by the application. Project
When a Java project is tested ( ), the project is • create a Java archive that can be run directly: Monitoring Center
compiled and run in Windows. The project is not • a standard Java application,
compiled in Java.
• a Java Web Start application.
To run the Java application, you must run the ".Jar"
To create the Java archive, all you have to do is
file located in the EXE directory of the project.
create the executable: on the "Project" tab, in the
"Generation" group, click "Generate". A wizard helps
you create the Java archive.

2.6 Deploying a Java application


Like for any application, WINDEV allows you to
create a setup program for Java applications. This
setup procedure is available for Windows only.
The setup program is an executable. It can be used
to install the necessary files as well as the Java
WINDEV login window
Runtime Environment (JRE). For other platforms,
you need to deploy your files manually. Database of
To start the setup creation wizard, go to the Control Centers
"Project" tab, "Generation" group and click "Setup
procedure".
For more details, see the online help (keyword:
"Java").

Remark: Stand-alone
When installing WINDEV, the setup program prompts you to: Image catalog
Business Rules Automatic tests (custom images)
messaging (WDBAL)
• create the database of the Control Centers (database of the Project Monitoring Center). This
database will be automatically created in HFSQL Classic format in the specified directory.
• share an existing database of the Control Centers.

84 Part 2: Development environment Part 2: Development environment 85


Managing Managing
requirements tasks
The Project Monitoring Center allows the project manager to manage a development project. To The Project Monitoring Center allows the project contributors to manage their task schedule.
do so, you must: These tasks can be linked to certain requirements and correspond to multiple projects.
• define the different project contributors.
• define the requirements (and the associated elements).
Each developer performs the different tasks assigned to them.
The project manager can follow the progress status of the project at any time.

Project Manager Developer

1 Create requirements
composed of: 2 Fulfill
requirements:

Project Monitoring
Center
Tasks

Once the project tasks have been defined, you can follow their progress in the Project Monitoring
Incidents Center. The time spent on a task is calculated automatically, it does not require any specific action
and does not generate any particular constraints.

When the relevant project is opened, the Project Monitoring Center requests or indicates the
current task. As soon as a task is completed, simply indicate that the task is finished and specify
Pane of
the new task.
Business Rules
Business Rules

A task can be linked to a project element (window, report, etc.). When the element is opened, the
time spent on it is counted and stored in the Project Monitoring Center. Conversely, the element

3
that corresponds to the desired task can be automatically opened from the task list.
Monitor requirements (Project Monitoring Center):
Each developer can also see their own task list in the "Project Monitoring Center" pane in the
editor.

Manage
requirements

86 Part 2: Development environment Part 2: Development environment 87


Managing suggestions and Managing business
incidents rules
The Control Centers also allow you to manage user feedback on your applications. WINDEV allows you to manage business rules. A business rule is used to define a specific
If your application contains an automatic help menu (’?’ menu with "Send suggestions..."), the users operating mode or particular process. For example: the calculation of a specific VAT rate, the rules
of your application will be able to easily send suggestions, incidents or business rules. for changing the status of a customer, the formula for calculating shipping costs, a commercial
commission, a discount rate, a decay coefficient, etc.

A business rule can be simple or complex.


End user
Business rules can come from:
• specifications (corresponding to requirements).
• suggestions made by users of the application.
Use the Feedback component
(connected mode or by emails)

Business Rules Suggestions or bugs


Define requirements

Spool for user feedback

Define Business Rules


Bugs linked to Tasks linked to
the application project the application project

Business Rules
Apply Business suggested by the users
Rules to the project (“?” menu and Feedback
Pane for managing Project Monitoring
component)
Business Rules Center

Use application
Developers

Remark: if a fatal error occurs when the application is running, an error report can be automatically
During the development, the business rules defined for the project are directly displayed in the
generated and sent to the developer via the "Feedback" component provided with WINDEV.
"Business rules" pane of the development environment. This pane displays the number of project
elements to which the business rules apply and the percentage of rules currently implemented.

88 Part 2: Development environment Part 2: Development environment 89


PART 3

Databases

90 Part 2: Development environment


Analysis: Database
structure
When a WINDEV, WEBDEV or WINDEV Mobile project uses data files, it must be associated with
an analysis. An analysis is used to describe the data structures (data files, items, etc.) used in your
project.
The data model editor allows you to easily create an analysis.

Supplier Product Order Customer


Full name, ... Description, Price, ... Date, ... Full name, ...

System studied

Corresponding analysis

The analysis of a WINDEV, WEBDEV or WINDEV Mobile project corresponds to the LDM (Logical
Data Model). The analysis contains the entire structure and data organization: data is grouped into
files (data files). Each file contains multiple data fields, called items.

In the analysis, the description of a data file can be linked to a type of file (HFSQL Classic, HFSQL
Client/Server, SQLite, etc.).

92 Part 3: Databases Part 3: Databases 93


Analysis in practice • whether the data file includes an "Automatic
identifier" item. The value of this item is
Two solutions can be used to import an existing
data file description:
unique for each record and is automatically
Solution 1: From the data model editor
calculated by WINDEV, WEBDEV or WINDEV
1. On the "Analysis" tab, in the "Creation" group,
1 Overview Mobile.
click "New file". The data file creation wizard starts.
• the type of database associated with the data
file: 2. Select "Use the data files from an existing
When a project uses data files, it must be associated • 2nd method: Creating the Conceptual Data
database" and select the type of database.
with an analysis. An analysis describes the structure Model (CDM), then automatically creating the • Database HFSQLDrive (paid turnkey
of the data (data files, items, etc.) used in your analysis from the CDM. For more details, see the solution, on a shared server). 3. Specify the source database containing the
project. online help. descriptions to be imported and the type of
• HFSQL database in PCSCloud (paid turnkey
database. Depending on the selected type, specify
There are two methods to describe an analysis: This chapter presents the first method. solution, on a dedicated server).
the requested information.
• 1st method: Creating the analysis directly (which • HFSQL database (Client/Server or Classic).
4. Select the tables or data files whose description
means a Logical Data Model (LDM)). • Database accessible via a Native Connector. must be imported and validate.
• Other types. 5. The imported data file is automatically inserted
2 Creating an LDM (Logical Data Model) Depending on the type selected, this data file into the current analysis.
will be handled by the HFSQL engine, an OLE
DB driver or one of WINDEV or WEBDEV’s Solution 2: From the Windows explorer
In WINDEV, the terms "LDM" and "Analysis" are 2.2 Adding a data file to an analysis Drag the data file description from the Windows
interchangeably used to define the structure of the Native Connectors (SQL Server, Oracle, etc.).
The analysis defines the structure of the data files 4. The new data file becomes the current data explorer and drop it onto the data model editor.
database associated with a project.
used by the project. In the analysis, a data file can be: file. The description window of the data file items
2.3 Creating an item
2.1 Creating an analysis (or LDM) • A new data file. opens automatically. It allows you to describe the
• A preset data file, provided with WINDEV, file items. To create an item:
To create a LDM:
WEBDEV or WINDEV Mobile. 1. Double-click the data file where the item will be
1. Click in the quick access buttons. The To import a preset description of a data file:
• A data file imported from an existing database created. The description window of the data file
creation window appears: click "Data" then 1. On the "Analysis" tab, in the "Creation" group,
(using a specific format, for example). items opens.
"Analysis". The analysis creation wizard starts. click "New file". The data file creation wizard starts.
The following paragraphs explain how to create a 2. Click the first empty row in the table.
2. Specify the general details of the analysis: 2. Select the option "Select a description among
data file. 3. Specify the name, caption and type of the item.
• the analysis name and directory. The analysis the preset data files".
corresponds to a ".WDA" file. By default, To create a new data file: 4. In the right section of the window, indicate the
3. Choose the preset data file to be created (you
this file will be created in the directory of details of the new item (type, size, default value,
1. On the "Analysis" tab, in the "Creation" group, can select multiple data files). This data file will be
the project analysis (<Project name>.ANA iteration direction, etc.).
click "New file". The data file creation wizard starts. imported into the current analysis. This data file
directory). This directory must be accessible in can be modified later. 5. Specify the details about the shared information:
2. Select "Create a new data file description".
read/write mode. click "Parameters of the control bound to the
3. Specify: 4. Select the items you want to keep. These items
• the analysis description to briefly explain what selected item (shared information)".
can be modified later.
• the name of the data file. This name is the 6. Validate the item description.
the analysis is about. 5. The imported data file is automatically inserted
logical name of the data file. It will be used to
3. In the next step, select the type of database: into the current analysis. Remark: you can also create an item from the
handle the data file.
• Database HFSQLDrive (paid turnkey solution, metatypes available in WINDEV. To do so, click the
• the caption of the data file that briefly Remark: To modify a data file or the items in a data
on a shared server). button. The list of available metatypes appears.
describes the file subject. file:
• HFSQL database in PCSCloud (paid turnkey 1. Select the data file.
• the representation of a record in the data
solution, on a dedicated server). 2. Select "Data file description" or "Description of
file. This representation makes the questions
• HFSQL database (Client/Server or Classic). asked when describing the links easier to items" in the context menu.
• Database accessible via a Native Connector. understand. This option must be preceded by
• Other types. an indefinite article (A or AN).
4. In the next step, specify if necessary the
connection information.
5. Validate the analysis creation wizard. A wizard to
create the first data file appears automatically.
6. Create all the elements of the analysis (data files,
items and links).

94 Part 3: Databases Part 3: Databases 95


2.4 Creating a link 4. To define the advanced cardinalities, check To put it simply, these two questions can be broken 3.4 Referential integrity
"Display advanced cardinalities" and answer the down into four questions. For example, to describe a
Different types of links can be created between data Referential integrity in a database is a set of
questions. link between the Club data file and the Person data
files. For more details on links, see Characteristics of constraints that maintains consistency of data in a
5. Specify the link caption and briefly describe the file:
the links defined in an analysis. relationship between two data files.
purpose of the link. • each "Club" has at least one "Person": Yes/No?
To create a link: Referential integrity checks that:
6. Specify the keys to be linked. • each "Club" can have several "Persons": Yes/No?
1. On the "Analysis" tab, in the "Creation" group, • if a record is deleted from the owner data file, the
click "New link". The mouse cursor turns into a pen. 7. Define the integrity rules. These rules ensure • each "Person" has at least one "Club": Yes/No? matching records in the member data files are
data integrity when one of the keys of the • each "Person" can have several "Clubs": Yes/No? also deleted,
2. Select the two data files to be linked. The link
relationship is modified or deleted.
description window opens automatically. Example of cardinalities: • if a record is added to a member data file, there is
8. Validate. The link is automatically created. a matching record in the owner data file,
3. To define the cardinalities between the two data This example presents two different cardinalities:
files: • if a record is updated in the owner file, the unique
• select the desired cardinalities (0, 1; 1, 1; 0, N; key doesn’t change, etc.The referential integrity is
1, N). checked based on the nature of the link between
the data files.
• answer the questions. The cardinalities will be
automatically updated. For more details on referential integrity, see the
online help.
• 0,1 cardinality: A person can be a member of a
3 Characteristics of the links defined in an analysis single sport club. This person does not have to 3.5 Types of links
belong to a sport club.
There are different types of links between data files:
• 0,N cardinality: A club can have no member or
3.1 Owner file and member file 3.2 Cardinalities several members. • parallel
• optional
When a link is defined between two data files, there Cardinalities are used to count the relationships 3.3 Advanced cardinalities • complement
is an owner data file and a member data file: between two data files.
Cardinalities can be defined more precisely. This is • shared
• the owner data file is the owner of the key. Cardinalities are defined according to the answers
referred to as advanced cardinalities. • complex
• the member data file is a member of the analysis to the two following questions:
These cardinalities allow you to specify exactly the
data files containing a copy of the key. 1. For each record of the data file, what is the
minimum and maximum cardinality. Parallel link
To set the link between two data files, the key of the minimum number of records in the other data file In a parallel link, each record found in a data file
this record is linked to? To define the advanced cardinalities, check "Display
owner data file is copied to the member data file. (Product) is linked to a record in another data file
The answer provides the first part of the cardinality advanced cardinalities" in the link description.
For example, the key of the Supplier data file is (Info), and conversely.
(minimum cardinality): Example of advanced cardinalities:
copied to each record of the Product data file.
Several records of the Product data file can have the • if the answer is "none", the cardinality is 0,X. This example presents two different cardinalities:
same key of the Supplier data file: • if the answer is "a single one", the cardinality
• Supplier is the owner data file, is 1,X.
• Product is the member data file. 2. For each record of the data file, what is the
maximum number of records in the other data file In a parallel link, the identifier of the Product data
This type of link is represented as follows:
this record is linked to? file is copied to the Info data file. This identifier is
The answer provides the second part of the • 0,1 cardinality: A person can be a member of a also a unique key in the Info data file.
cardinality (maximum cardinality): single sport club. This person does not have to Product is the owner data file and Info is the
• if the answer is "a single one", the cardinality belong to a sport club. member data file.
is X,1. • 0,10 cardinality: A club can have 0 to 10 Remark: This type of link is rare because the two
• if the answer is "several", the cardinality is X,N. members. data files can be combined into one.
The answer to these two questions defines the The parallelism of records in the data file is
cardinality that can be: 0,1 ; 0,N ; 1,1 ; 1,N respected if the following operations are run
The description of cardinalities is essential: it is the simultaneously on the two data files:
basis for respecting the referential integrity of the • creation of a record.
database.
• deletion of a record.
• reindexing with compression.

96 Part 3: Databases Part 3: Databases 97


Optional link Shared link Shared link with a 1,n - 0,1 cardinality Complex link
For an optional link: For a shared link, the same record in a data file With this type of link: For a "complex" link, you need to define a
• Each record of a data file (Category) has no (Supplier) can be shared by several records in • each owner has at least one member (a supplier relationship file.
matching records or has one matching record in another data file (Product). has at least one product). The relationship file will be automatically created. It
the other data file (Group). In a shared link, the key of the Supplier data file is • a member may have no owner (a product may will contain a unique key that includes the two keys
• Each record of the other data file (Group) is copied to the Product data file. It becomes a multiple have no supplier). of the related data files.
associated with no record or with a single key to optimize the speed of the integrity check. The relationship file can also contain information
record in the first data file (Category). Supplier is the owner data file and Product is the specific to the link.
member data file. A complex link includes two shared links.
Depending on the cardinality, we can distinguish
between four types of shared links: Example of complex link
• Shared link with a 0,n - 0,1 cardinality. An order (Orders data file) can contain one or more
Shared link with a 1,n - 1,1 cardinality products. A product (Product data file) can be used
• Shared link with a 0,n - 1,1 cardinality.
An optional link is established by copying the With this type of link: in several orders.
• Shared link with a 1,n - 0,1 cardinality.
identifier from one data file to the other. • each owner has at least one member (each In this case, a relationship file is required (OrderLine
• Shared link with a 1,n - 1,1 cardinality. data file).
Complement link supplier has at least one product).
Shared link with a 0,n - 0,1 cardinality • each member has a single owner (each product The OrderLine data file contains:
For a complement link:
has a single supplier). • a unique key containing the keys of Product and
• Each record from a data file (Product) has no Orders.
matching records or has one matching record in
• the number of products ordered.
another data file (Details).
The links between the data files are as follows:
• Each record in the other data file (Details) has a
matching record in the first data file (Product).
With this type of link:
• an owner may have no member (a supplier does
not necessarily have a product).
• a member may have no owner (a product does
not necessarily have a supplier).
Complement links are quite common. They are Shared link with a 0,n - 1,1 cardinality 4 Possible operations in an analysis
used when a record can have additional optional
information. WINDEV allows you to perform the following WINDEV allows you to perform the following
In a complement link, the key of the Product data operations on an analysis: operations on a data file in the data model editor:
file is copied to the Details data file. To ensure the • Duplicate/Copy an LDM: Duplicating an LDM • Duplicate/Copy a data file.
maximum cardinality of 1, it remains a unique key. allows you to have two identical LDMs with • Delete a data file.
Since this key is unique, it is not possible to insert different names.
more than one record in the Details data file for a • Rename a data file.
With this type of link: • Delete an LDM.
record in Product. WINDEV allows you to perform the following
• an owner may have no member (a supplier may • Rename an LDM. operations on an item of a data file in the data model
Product is the owner data file and Details is the
member data file. have no product). • Associate an LDM with a project. editor:
• each member has a single owner (each product • Enlarge or reduce a LDM in the editor. • Duplicate/Copy an item.
has a single supplier). • Move a LDM in the editor. • Delete an item.
Remark: This type of link is quite common. WINDEV • Rename an item.
allows you to automatically create windows that For more details, see the online help.
manage data files with a 0,N - 1,1 relationship.

98 Part 3: Databases Part 3: Databases 99


5 Generating the analysis (LDM) 6.1 Restoring an analysis 6.2 Undoing the last generation
To restore an analysis from the version manager: Undoing the last generation of the analysis allows
The analysis is generated before the programming To generate the analysis, go to the "Analysis" tab, you to restore the analysis to its state before the
1. Select the version to restore.
cycle and after describing the data files. This "Analysis" group and click "Generation". last generation. All changes made since then are not
generation is used to: 2. You can: applied.
The generation includes three steps:
• validate the changes made on the analysis (LDM). • restore the version in the specified directory.
• Verification of the changes made and generation
An independent analysis corresponding to 6.3 Resetting the version number to 1
• create the modules required for programming. of the physical files corresponding to the analysis
the selected version is created. This option is The analysis generation number can be reset to "1":
• automatically update the data files if necessary. description.
selected by default. on the "Analysis" tab, in the "Analysis" group, click
As long as the analysis (the LDM) is not generated, • Automatic modification of accessible data files
• overwrite the current analysis. "Generation" and select "Reset analysis version to
the analysis description (the data files) cannot be (files in the "EXE" directory of the project).
3. Validate. The restore operation is performed. 1".
used in the project. • Project synchronization.
Caution: The data files of an analysis whose version In this case, the analysis version number is reset
number is more recent than the restored version to one. No specific action is performed on the data
6 Managing the analysis versions cannot be reopened. In this case, you must also files.
restore the data files of the restored analysis version
To manage the different versions of the analysis: The "small rectangles" displayed between two or delete the existing data files and create them
versions indicate: again.
1. On the "Analysis" tab, in the "Analysis" group,
click "Generation". • one rectangle: few changes were made between
2. Select "Manage versions". the two versions.
3. In the wizard, specify whether you want to work • several rectangles: several changes were made
on the current analysis or on a specific analysis. between the two versions.
Remark: when an analysis is damaged, you can To see the details of the changes made between
select the damaged analysis to restore one of the two versions: Double-click the row containing the
earlier versions, for example. "small rectangles" or click [Changes].
All the versions of the analysis are displayed as a The options available in the version manager are as
graph. The yellow box indicates the version number follows:
of the analysis and the text on the right shows the • Restoring an analysis.
generation date.
• Undoing the last generation.
• Resetting the version number to 1.

100 Part 3: Databases Part 3: Databases 101


Types of accessible
files
WEBDEV, WINDEV and WINDEV Mobile offer simple access to the majority of databases on the
market.

APPLIC ATIONS SITES APPLIC ATIONS

APPLIC ATIONS SITES APPLIC ATIONS

UNIVERSAL DATA CONNEC TOR NATIVE APPLICATIVE


(HReadSeek, HExecuteQuery, File, Item,
Automatic File Link, Databinding, Replication, SQLExec...)
CONNECTOR
- Google - Outlook - XML
- iCalendar - SalesForce - ...
UNIVERSAL DATA CONNEC TOR NATIVE APPLICATIVE - JSON - SAP R/3
(HReadSeek, HExecuteQuery, File, Item,
Automatic File Link, Databinding, Replication, SQLExec...)
CONNECTOR - LDAP
- Lotus Notes
- RSS
- Webservice
- Google - Outlook - XML - MATLAB SOAP/REST
NATIVE CONNEC TOR NATIVE HFSQL
- iCalendar
- JSON
- SalesForce - ...
- SAP R/3
Powerful SQL database: Windows - Linux - Android - iOS
Unlimited deployment,
free - MQTT - XLS/XLSX

- LDAP - RSS
- Lotus Notes - Webservice

NATIVE CONNEC TOR SQL Server NATIVE


MySQLHFSQL Unlimited deployment,
free
- MATLAB
- MQTT
SOAP/REST
- XLS/XLSX BIG DATA
Powerful SQL database: Windows - Linux - Android - iOS
Classic/Embedded Mobile - Hadoop - Hive - Redis
Local, network, iOS (iPhone, iPad), Android, - HBase - Memcached - Riak
32 & 64 bits Windows IoT, UWP,... - HDFS - MongoDB - ...
SQL Server MySQL Oracle MariaDB BIG DATA
Classic/Embedded Mobile - Hadoop - Hive - Redis
Local, network,
32 & 64 bits
AS/400 DB2
iOS (iPhone, iPad), Android,
Windows IoT, UWP,...
- HBase
- HDFS
- Memcached - Riak
- MongoDB - ... ODBC
32 & 64 bits
Oracle MariaDB

S
Windows et Linux
Client/Server
Windows, Linux, Docker, ODBC PCSCLOUD
AS/400 DB2 Progress Sybase Spare, 32 & 64 bits for PC SOFT applications
32 & 64 bits
OLE DB

S
Windows et Linux
32 & 64 bits
Client/Server
PostgreSQL
Windows, Linux, Docker,Informix PCSCLOUD
Progress Sybase Spare, 32 & 64 bits for PC SOFT applications
OLE DB
32 & 64 bits
SQLite Azure Cluster
PostgreSQL Informix Windows, 32 & 64 bits
HFSQLDrive

SQLite Azure Cluster


Windows, 32 & 64 bits
HFSQLDrive Full compatibility

Full compatibility

102 Part 3: Databases Part 3: Databases 103


HFSQL HFSQL Client/
Classic Server
HFSQL Classic is a powerful system for managing relational databases (RDBMS) that can be used HFSQL Client/Server is a powerful system for managing relational databases (RDBMS) in Client/
on a single computer or in local network. HFSQL Classic does not require the setup of a database Server mode.
server. The characteristics of HFSQL Client/Server are as follows:
The characteristics of HFSQL Classic are as follows: • An HFSQL Client/Server application can be run on different client computers that communicate
• An HFSQL Classic application can be run on different client computers distributed across a local with the database server over the network.
network. • Data files are located on a server. Only the server physically accesses the data files.
• The data files are located in a directory that can be accessed by the client computers (a shared • All processes (queries, read from and write records to a data file, etc.) are performed on the
directory on the network, for example). Each client computer physically accesses the data files. server.
• All processes (requests, read from and write records to a data file, etc.) are performed on each
client computer. Client computer 1

User 1

WINDEV application

WINDEV application
Client computer 2 Windows or Linux
HFSQL server
User 2
Manta server
Network HFSQL
Classic database
WINDEV application

WINDEV application
HFSQL
(shared directory) Client computer n Client/Server
databases
User n

WINDEV application

WINDEV application

104 Part 3: Databases Part 3: Databases 105


HFSQL Client/Server HFSQL: files physically
cluster created
HFSQL Cluster is an extension of the HFSQL Client/Server database model. In a database cluster, The data model editor allows you to define the structure of the data files.
all HFSQL servers contain a copy of the databases and are synchronized in real time. Files are physically created depending on the information entered in the data model editor.
• The read load can be balanced across multiple servers.
• You can make changes to the physical configuration without interruptions on client computers. Characteristics Files physically
of the file (Analysis) created
• If one of the servers crashes, the client is automatically redirected to an operating server.
HFSQL Classic or Client/Server file ".fic" file
Data file

One or more search keys (unique ".ndx" file

Client computer
or with duplicates) Index file

".ftx" file
One or more full-text indexes
Full-text index file
WINDEV application
".mmo" file
One or more "Memo" items
Memo file

Access data
Remark: This diagram only presents the main created files. Other specific files can be created if the
data file uses replication, logs or transactions.
Cluster

HFSQL Client/Server HFSQL Client/Server


server server

Apply modifications

HFSQL Client/Server HFSQL Client/Server


server server

106 Part 3: Databases Part 3: Databases 107


Binding controls to
Control - variable binding
data
A window can display information from:
• a database: controls are directly bound to the items in the data files or queries available in the
database.
• variables in the application’s WLanguage code (variables global to the window or to the project
or parameters passed to the window).

To display information in a window, the controls in the window must be bound to:
• the different items in the database.
ScreenToFile Linked variable FileToScreen
• the available WLanguage variables.
Simple control
There are multiple methods to display and update values from a data source: Link with:
- Simple variable
• The binding between a control and an item or variable can be defined in the window editor, in the - Instance of class or structure member
control description ("Binding" tab). - Property of dynamic object

• ScreenToFile updates the record or the variable with the values from the UI.
• FileToScreen updates the data in the UI with the values from the data file or variable.

Control - item binding

ScreenToFile FileToScreen

Database

108 Part 3: Databases Part 3: Databases 109


Queries: Embedded
concepts queries
A query is used to request information from a database to view, insert, change or delete data. The The controls from a window can be linked to a data file or existing query, ... These controls can also
query structure defines the data used. be linked to a query created when building the control.
A query can request information from one or more data files.

The query editor allows you to easily create queries without programming.

Sources Possible uses


Windows and controls
of a window Embedded query:
MyWindow_1$Query
Data coming from
one or more files
Reports
(HFSQL, Oracle, ...) The result of a
query can be used
Programming
like a file
(use in the
WLanguage functions)

Queries

Remark: In the code, you can handle queries and data files in the same way. Queries can be
associated with controls in the UI (a Table control, for example) to display the desired data.

Embedded query:
MyWindow_2$Query

In this case, the query is embedded in a window. It is located in the WDW file that corresponds to
the window. If the WDW file is copied (to another project, for example), the embedded queries used
by the window will also be copied.

110 Part 3: Databases Part 3: Databases 111


Table/Looper
controls
Table/Looper controls can be used to display a set of information (e.g., the content of a data file).
The content of these controls can come from three different sources:
• Table/Looper controls with direct access to the data source,
Data in
• Table/Looper controls populated programmatically,
memory
• Table/Looper controls with in-memory data source.
Remark: These three modes will be explained in detail for the Table control. However, the same When data is in memory, you can perform different actions in the Table control (sort columns,
concepts apply to the Looper control. search in columns, etc.).

Table control with direct access to the data source Table control with in-memory data source
A Table control with direct access to the data source directly displays data from a data file or Table controls with in-memory data source combine the advantages of Table controls with direct
query. The structure the data file is described in the data model editor and the data is entered in access to the data source and Table controls populated programmatically.
the application, for example.
The Table control is linked to the data file but the entire content of the data file is loaded in memory.
When you loop through the data file, the data is displayed in the Table control. The data file is read Sort and the search features are available for all columns.
for each row displayed: the record read is displayed in a row of the Table control.
The data that is not linked to the data file is not lost when moving the scrollbar (in Check Box
columns, for example).
Since the data file records are loaded in memory, this type of control is recommended for data files
with less than 100 000 records (to avoid memory overflow).

Customer
file

The data displayed that is not linked to the data file is lost when the Table control is refreshed Customer
(when scrolling, for example). file
The number of records displayed in the control can be limited by setting a filter (HFilter used in the
control initialization code).
Several WLanguage functions can be used to handle Table controls based on a data file. These
File loaded
functions start with "Table". in memory
To add a record to the Table control, add the record to the corresponding HFSQL data file (using
HAdd) and refresh the Table control with TableDisplay.
To delete a record from the Table control, delete the record from the corresponding HFSQL data
file (using HDelete) and refresh the Table control with TableDisplay.

Table control populated programmatically


In this case, the Table control directly displays the data loaded in memory. Data is added to the
Table control programmatically, via different WLanguage functions (TableAddLine, for example). Remark: The different modes to populate the controls (programmatically, with direct access to the
data source and with in-memory data source) are available for different types of controls: List Box,
Combo Box, Table, Looper, etc.

112 Part 3: Databases Part 3: Databases 113


Universal 3-Tier
replication architecture
Universal replication makes it possible to keep databases of the same or different formats updated 3-tier architecture is an application architecture model.
(HFSQL, Oracle, SQL Server, etc.). For example, you can synchronize an HFSQL Classic database It consists in dividing an application into 3 tiers:
with an Oracle database. • Presentation tier: the User Interface,
Universal replication uses a centralized model: all databases are synchronized with a master • Application (or processes) tier: business logic of the application,
database. Then, the master database reflect the changes in the other databases.
• Data tier: to access persistent data.

The objective with this separation is to make each tier independent, in order to facilitate
maintenance and future developments of the application. This provides better security because
only the Application tier allows access to the database. It also optimizes teamwork and cross-
platform development.

Mobile Windows Browser

Presentation layer

Universal
replication

Components Webservices WEBDEV application


server
Application layer

HFSQL External databases


The synchronization can be adapted to special cases. For example, you can retrieve the records Classic, Client/Server Oracle, AS/400, SQL Server...
related to a specific product or created on a given date, manage conflicts, display a configuration
Data layer
window, etc.
These adaptations must be done through programming with HRplFilterProcedure.
The 3-tier architecture is fully compatible with the development of applications or sites using
WINDEV, WEBDEV or WINDEV Mobile.

114 Part 3: Databases Part 3: Databases 115


PART 4

Advanced
concept

116 Part 3: Databases


RAD (Rapid Application
Development)
The RAD (Rapid Application Development) is used to create windows from:
• the analysis linked to the project,
• standard or custom RAD patterns,
• skin templates.

With RAD, windows are generated with all the code they require to work properly. These windows
can be tested immediately with the data present on the development computer.

Project RAD Skin template


analysis pattern

Full Application RAD


Window RAD

Example of window generated


by RAD

118 Part 4: Advanced concept Part 4: Advanced concept 119


UML
UML models in practice
models
WINDEV allows you to create nine types of UML models:
1 Overview
• Class diagram: describes the overall structure of a system. The main objective of a development team is to WINDEV, WEBDEV and WINDEV Mobile allow you to
• Use case diagram: represents the system features from the user’s point of view. create optimized applications, capable of satisfying create the following nine types of UML models:
• Object diagram: represents a set of objects and their relationships at a given time. the ever-changing needs of their users. • Class diagram,
Modeling an application defines the structure • Use case diagram,
• Component diagram: describes the physical and static architecture of a computer application.
and the expected behavior of a system. It helps
• Activity diagram: represents the behavior of a method or the progress of a use case. • Object diagram,
understand its organization and detect simplification
• Sequence diagram: represents the chronological order of messages sent and received by a set • Component diagram,
and reuse opportunities as well as manage potential
of objects. risks. • Activity diagram,
• Collaboration diagram: represents the structural organization of objects that send and receive A model is a simplification of reality. It allows you to • Sequence diagram,
messages. better understand the system to develop. • Collaboration diagram,
• State-transition diagram: represents a sequence of states. A diagram is the graphical representation of a set • State-transition diagram,
of elements that build a system. To view the system • Deployment diagram.
• Deployment diagram: shows the redistribution of the devices (nodes) used in a system as well from different perspectives, the Unified Modeling
as the association between the executable programs and these devices. This chapter only provides an overview of UML.
Language (UML) defines nine different diagrams. For more information about UML, see the specific
Each diagram represents a system state. documentation.

2 Types of UML diagrams

2.1 Class diagram For example, the following diagram presents the
management of stocks:
A class diagram describes the structure of a system
via classes and the relationships among them.
Class diagrams are the most common diagrams in
object-oriented systems modeling.

120 Part 4: Advanced concept Part 4: Advanced concept 121


A class diagram includes the following elements: • Use case: describes a sequence of actions 2.3 Object diagram
• Class: represents the application structures. Each performed by the application. For example, place
An object diagram represents a set of objects and
class is divided into three compartments: an order, enter an invoice, create a new customer
how they relate to each other at a certain moment
entry, etc, ...
• the name of the class indicates what the class in time.
A use case describes the actions performed by
is, not what it does. An object diagram is used to show a context
an application but it does not specify how the
• the attributes of the class determine the class (before or after an interaction between objects, for
application performs these actions.
characteristics. example).
• Relationship: describes the behavior of an
• the class operations represent the actions the For example, the diagram below presents a section
actor with a use case. There are three types of
class can execute. of the general structure of motorcycles:
relationships:
For example, the Inventory class contains the • Association: Structural relationship between
ProductList attribute. This class also groups the two linked elements.
AddProduct and DeleteProduct operations. These
• Dependency: Indicates that one element uses
operations can be applied to the class instances.
or depends on another element. For example,
Remark: UML provides three visibility levels for
a bank customer may get cash from an ATM. In
attributes and operations:
this case, the Get Cash action depends on the
• Public: the element is visible to all other • Package: divide and organize the diagram Customer.
classes. representation (in the same way that directories To withdraw money, the Customer must enter
• Protected: the element is visible to the class organize files). Each package can contain classes a PIN number. In this case, the Get Cash action
and its subclasses. and relationships. depends on the Password.
• Private: the element is visible to the class only. The generation of a class diagram allows you to
• Relationship: describes how classes interact with create the structure of the WINDEV, WEBDEV and An object diagram includes the following elements:
each other. There are three types of relationships: WINDEV Mobile classes used in your application.
• object: represents a class instance.
• Association: Structural relationship between Remark: If a class diagram is opened, you can
classes. For example, the Orders class is
2.2 Use case diagram
create an object from a class in this diagram
linked to the Product and Customer classes. A A use case diagram is used to view the behavior of a (Drag and drop it from the "UML analysis" pane).
Customer can place several Orders. An order system in such way that: • Generalization: Relationship in which elements • composite object: visually represents an object
contains several products. An order must • the user can understand how to use each are organized based on a hierarchy. made of other objects. For example: a window
contain at least one product. element. For example: that contains scrollbars, buttons, etc.
• Dependency: Use relationship that establishes • the developer can implement these elements. • the Customer actor can be of two types: • link: represents the relationship between
that the instances of a class are linked to the Individual customer or Company customer. different objects.
For example, the behavior of a cell phone can be
instances of another element. For example, the • there are two ways to verify the user’s
described via a use case diagram.
Orders class uses the Inventory class: before identity: a password or a fingerprint. 2.4 Component diagram
adding a product to an order, you must make
sure the product is available in stock. A component diagram describes the physical and
static architecture of a software application. For
• Generalization: Relationship between a general
example: source files, libraries, executables, etc.
class (parent) and a specific class (child) that
derives from it. For example, the Sail_Boat and For example, the diagram below presents the steps
Speed_Boat classes are derived from the Boat of a program that allows users to log in in text mode
class. in Unix.

A use case diagram includes the following elements:


• Actor: represents the role of the users that • Package: divides and organizes the diagram
interact with the application. For example, a representation (in the same way that directories
person who works in a bank as a loan manager. If organize files). Each package can contain actors
they have an account in the same bank, they will and use cases.
also play the role of customer.

122 Part 4: Advanced concept Part 4: Advanced concept 123


A component diagram includes the following • object: relates activities to the object that 2.7 Collaboration diagram For example, the diagram below presents the
elements: performs them. For example, the "Order" and different steps of a car wash:
A collaboration diagram presents the structural
• module: represents the different physical "Pay" activities are related to the "Customer"
organization of objects that send and receive
elements that make up a software application. object; the "Teach" and "Evaluate" activities are
messages.
For example: a file, a library, etc, ... related to the "Teacher" object.
For example, the diagram below represents a
A module can be represented: • send signal: represents a signal sent to an object.
person that uses an elevator:
• by a specification that shows the module • accept event: represents the acceptance of an
interface. This specification can be generic for event coming from an object.
classes that can be configured. • transition: represents the transition from one
• by its body that presents the module completed activity to another. For example: "Too
implementation. much water", "Enough money", etc.
• task: represents a component that has its own
control flow (thread). 2.6 Sequence diagram
• main programs of the software application. A sequence diagram represents the chronological
• subprograms: groups the procedures and order of messages sent and received by a set of
functions that do not belong to any class. objects.
For example, the following diagram represents the
2.5 Activity diagram beginning of a phone call: A state-transition diagram includes the following
An activity diagram represents the behavior of a elements:
method or the flow of a use case. A collaboration diagram includes the following • state: represents the value of the object
elements: attributes at a given time.
For example, the following diagram presents the
flow of a dam: • object: represents the different objects used. • initial state: represents the state when the
• actor: represents an element external to the system is started.
system. A person, for example. • final state: represents the state of the system at
• message: represents the messages exchanged the end of the operation.
between different objects. • superstate: used to structure the diagram by
specifying several distinction levels between the
2.8 State-transition diagram
states.
A state-transition diagram presents a sequence • history: represents the last active state of a
of states that an object goes through during its superstate (or composite state).
A sequence diagram includes the following lifecycle. It describes how the states of an object or
elements: • entry/exit points: represent the states in a
component change.
• object: represents the different objects used. superstate. This allows you to link these states to
An activity diagram includes the following elements: A state is defined by its duration and stability. other states that do not belong to the superstate.
Each object is represented by a square at the top
• activity: represents a specific step in a workflow. A transition represents the change from one state to • transition: represents the change from one state
of a dotted line. This line represents the object
For example: "Print an estimate", "Open the another. to another.
lifespan. For example: "Caller", "Callee", etc.
window", etc. A transition is triggered:
• activation period of an object: activation periods
• synchronization bar: synchronizes different • by an event.
can be inserted into the object lifeline. These
activities:
periods indicate when the object is active. • automatically when no triggering event is
• by indicating the activities that must be specified.
• message: represents, via horizontal arrows,
performed before a given activity. For example:
the message exchanged between the different
"Press clutch" and "Change gear" before
objects. These arrows are oriented from the
"Release clutch".
sender to the recipient. The order in which the
• by indicating the activities that will happen in messages are sent is given by the position of the
parallel. arrows on the vertical axis.
For example: "Picks up", "Ring", etc.

124 Part 4: Advanced concept Part 4: Advanced concept 125


User
Groupware
2.9 Deployment diagram A deployment diagram includes the following
elements:
A deployment diagram shows the physical
arrangement of devices (hardware/nodes) in a • node class: represents a class of a physical
system as well as the relationships between the resource. For example: server, PC, printer, etc.
executables and these devices. • node instance: represents a physical resource.
For example: server 3, printer 70, etc.
The User Groupware allows easily including user and rights management in a WINDEV application.
For example, the diagram below represents the
hardware used in a company: • connection: depicts the communication path There are two types of users:
between two nodes. For example: ISDN or TCP/ • simple user: uses the application directly.
IP link. • supervisor: configures the users and their rights.

1
User
Start application

3 Use
the application

2 Identification

Use Check
rights rights

Supervisor

HFSQL Classic,
Client/Server,
Native Access,
LDAP

User Groupware Database

Configuration of
rights and users

4 Supervisor
menu

History
of connections

126 Part 4: Advanced concept Part 4: Advanced concept 127


User Groupware in practice 3 Implementing the User Groupware

3.1 Adding the User Groupware to an • the "Files" tab, which allows you to specify the
application type of database and authentication used.
1 Overview • the "OAuth" tab, which allows you to specify
To implement the User Groupware in a WINDEV
application: the connection services available to users.
An application must define the role of different Access may vary according to the user. For example:
contributors. Several access levels can be defined 1. On the "Project" tab, in the "Project" group, click • BaaS User Groupware: This option allows you
• administrative assistants can see the price list
according to the user. "User Groupware". to integrate a BaaS (Backend as a Service) User
and create orders.
Groupware and manage rights via a server.
All users have different responsibilities and • sales representatives can see the price list, place 2. In the description window of the current project
If this option is selected, two specific tabs are
requirements. Their field of action must therefore orders and create new customers. configuration, in "User Groupware: Disabled", click
displayed:
be more or less limited. "Change".
• sales directors have access to all options. • the "BaaS" tab, which allows you specify the
Let’s take a simple example: a sales management 3. The User Groupware settings window allows you
To manage these access levels in your WINDEV characteristics of the BaaS server, the user
application that offers the following features: to enable the User Groupware and define:
applications, simply integrate the User Groupware. accounts and the URLs of the administration
• View prices, In just a few clicks, a standard application can be sites.
• Modify prices, transformed into an application that manages • the "Email" tab, which allows you to customize
• Enter orders, several access levels. This feature can be easily the messages to be sent to users (registration
implemented. validation or password reset emails).
• Entering customers.
When starting the application, the manager will be BaaS User Groupware: Required configuration:
able to create users (identified by their username
Two cases may occur:
and password) and give them access to some
application features. • If you are using a PCSCloud platform: the
required elements are installed by default on your
platform.
2 How does User Groupware work? Reminder: PCSCloud is a paid, turnkey solution.
For more details, see PCSCloud.
An application that uses the User Groupware has The configuration window allows the supervisor to: • The type and start mode of the User Groupware. • If you are not using a PCSCloud platform: install
two levels: • start the application. the following elements:
• The type of customization.
• user level. • configure the groupware. • an HFSQL server,
• The type of database and the location of the User
• supervisor level. Configuring the groupware consists in creating Groupware data files (Standard User Groupware). • the reserved server, including the modules for
and associating users and groups, and managing the Mobile User Groupware (WDBaaS).
2.1 User level • The user authentication mode (Standard User
the rights granted to each user (or group) on each Groupware). For more details, see Configuring a BaaS server
The user logs in to the application and accesses the window of the application. Rights can be defined (User Groupware and Private Store).
• The use of a specific connection service
available features. for menu options, groups of controls and controls.
(Standard User Groupware). Starting the User Groupware
Remark: You can also log in using an LDAP directory. The supervisor can gray out these elements, make
them inactive or invisible. These configurations take • The BaaS mode settings. Several start modes are available:
2.2 Supervisor level precedence over any configuration defined in the Type of User Groupware
program. There are various types of groupware:
The supervisor logs in to the application and
accesses an advanced menu to configure users and For more information on the groupware
their rights, or to start the application. configuration defined by the supervisor, see
Configuring the application that uses the User
Groupware.
• The "Automatic start" option indicates that the
Remark: The information regarding the users and User Groupware is started at the same time as
their rights is stored in data files in HFSQL format the application.
(Classic or Client/Server). • Standard User Groupware: The User Groupware The User Groupware login window is started
will be integrated in its "Standard" version: the before any other window of the application. The
User Groupware will be associated only to your project initialization code is executed once the
application, and the rights will be defined from login window is opened and validated.
the application. • The "Manual start (programmatically)" option
If this option is selected, two specific tabs are allows you to define when the User Groupware
displayed: should be started.

128 Part 4: Advanced concept Part 4: Advanced concept 129


The login window will only be opened if gpwOpen • Full customization (expert mode) - Standard User 3.3 Options specific to the standard User • Windows authentication:
(or gpwLogin) is used. This option can be used Groupware only: Groupware In this case, the username and password
to execute the project initialization code before The programming of the User Groupware is correspond to those defined for Windows.
If you use the standard User Groupware, the "Files"
opening the login window. This option is useful for automatically included in your application. The Remark: You can also use a unique authentication.
tab allows you to configure:
a multilingual application for example: a window internal component named WDGPU is included In this case, the username and password will be
can be displayed to ask for the application runtime in your project. This component contains an • the type of database used (these options are requested only once per session.
language. analysis as well as all the windows, queries, available in "Automatic start" mode only).
Depending on the option chosen, additional options
classes and procedures required to manage the • the type of authentication: may be available:
3.2 User Groupware options (standard User Groupware. This allows you to customize all • Authentication managed by the WINDEV User • Login window only (no management of rights):
and BaaS mode) the windows used by the User Groupware. Groupware. This option is only available for LDAP and
There are multiple User Groupware customization The option "Apply project skin template to non- • Authentication from an LDAP directory. Windows authentication. If this option is checked,
modes: customized windows at runtime" applies the skin • Windows authentication. no groupware data file will be created. If the
template of your project to the windows specific application is started in automatic mode, the user
to the User Groupware if they have not been Database type
will need to log in. If the user is saved in the LDAP
customized. In "Standard User Groupware" mode, the User directory, the application will start; otherwise,
The security options are as follows: Groupware uses several specific data files. These it will be closed. A supervisor cannot configure
data files are mainly used to manage users, groups, the rights on the windows. If this option is not
• Allow opening windows and reports by default:
rights and elements in the application. The standard checked, only the users in the LDAP directory
This option allows all users to open windows and
User Groupware can be used: will be able to log in. You can set the rights on the
reports by default. In this case, simply specify
which elements will not be accessible when • with HFSQL Classic data files. In this case, you windows.
configuring the rights. can specify the location of the data files via the • Single authentication (SSO): This option
"Default directory" link. allows you to enter the password only once per
• Allow editing reports and queries in "Reports
and Queries": If this option is checked, the • with HFSQL Client/Server data files. In this case, Windows session.
application will use "Reports and Queries" for all you can define the parameters for accessing the The "OAuth" tab allows you to authorize the use
the reports and queries. HFSQL Client/Server database as well as the file of a specific connection service. For the specified
Remark: This option is identical to "Enable directory by selecting "Click here to enter the service, it is necessary to specify the corresponding
’Reports and Queries’", in the "Advanced" tab of server parameters". identifiers (provided when registering the
• No customization: the project description. Type of authentication application with the selected service).
WINDEV takes care of everything. You just need The option "Automatic login for test mode" allows The standard User Groupware includes several user
to start the application to configure user access. you to specify the username and password to be authentication modes:
The windows of the User Groupware can used in the "Automated test" mode. This information
automatically use the skin template of the • Authentication entirely managed by the User
will be used if an automated test is run on the
application. Simply check "Apply project skin Groupware:
application.
template to non-customized windows at The username and password are saved in the
By default: User Groupware data files.
runtime".
To get the same appearance for all the windows • data files are in English. To use data in French, • Authentication from an LDAP directory or
of the application, it is recommended to always simply check "Data files in French". Active Directory:
check this option if you use the User Groupware • User Groupware data files have a specific If the company of your customer uses an LDAP
in non-custom mode. password. This password is: "PCSGPW2001". directory, you can enable the User Groupware
To change this password, enter the new on this directory. Simply click the link "Click here
• Customize login UI:
password in the "Options" tab of the User to enter the server parameters" to specify the
3.4 Options specific to the BaaS User
The login/register window is automatically
Groupware description window. Characters are characteristics of the LDAP directory (server,
Groupware
integrated into your application. The internal
component named WDGPU is included in your shown as bullets. port, base DN, etc.). Therefore, the account When using a BaaS User Groupware, the "BaaS" and
project. This component contains the login Remark: This password is used when re-indexing and the password in the LDAP directory will be "Email" tabs allow defining specific options.
window and the associated procedure. You can or opening data files with WDMAP for example. automatically requested to the user. For more The "BaaS" tab allows you to define:
customize the connection to the User Groupware. For more details, see the online help. details, see the online help.
• the location of the User Groupware application
server. You can select a PCSCloud platform or a
Network or Internet server,
• the user account management mode,
• the URLs of the administration sites.
The "Email" tab allows you to write the messages for
registration confirmation or password recovery.

130 Part 4: Advanced concept Part 4: Advanced concept 131


3.5 Testing the application 3.6 Creating the WINDEV executable 2. Select "Configure groupware". The user can be defined as supervisor of the
application.
When an application that uses the standard User When creating an executable that uses the standard
Groupware is tested, the first window that appears User Groupware ("Generate" option on the "Project" You can also modify or delete users. When you
is the login window (regardless of the first window tab), the wizard will show a screen specific to the delete a user, you can delete the entire user or their
defined in your application). standard User Groupware. rights only.
A single user is created by default: the supervisor. This allows you to define the location of the User Users can be grouped.
To log in as supervisor, simply enter the following Groupware data files. To associate a user with a group, simply drag the
information in the login window: user and drop it onto the selected group.
• Name : SUPERVISOR 3.7 Installing an application that uses the A user can be associated with several groups.
User Groupware
• Password: SUPERVISOR Remarks:
An application that uses the User Groupware is 3. The User Groupware management window
You can test your application, or configure the User • It is recommended to change the supervisor’s
installed like any other application: on the "Project" appears. This window is used to:
Groupware. password the first time you use the application.
tab, in the "Generation" group, click "Setup • manage users and groups,
• If you use an LDAP directory, you can import the
Remarks: procedure". • manage rights, users form the directory to manage their rights.
• To set a first window other than the login The wizard displays a screen specific to the standard • display statistics,
window in your application, select "Manual start User Groupware to set the location of the User • migrate data coming from a User Groupware 4.2 Managing rights
(programmatically)" in the "General" tab of the Groupware data files. version 17 and earlier.
User Groupware options. Simply use gpwOpen to The supervisor can manage the rights granted to
Remarks: each user (or group of users) on the elements of the
open the login window.
• If the User Groupware data files have been 4.1 Managing users project windows.
• The User Groupware management windows are configured for your client, they must be selected The user management consists in: A specific state can be defined for all the elements
executed before the project initialization code. when preparing the setup. Therefore, the list of • creating users, of a window associated with a user.
• The window of your application defined in the setup files must be customized.
project will be opened after the login window (if • creating groups, The elements in the windows, internal windows and
• If the groupware data files have not been window templates are as follows:
the user is not the supervisor). • associating users with groups.
configured, the Supervisor will be the only user in
• In the "Options" tab of the User Groupware • controls.
the application the first time it is started.
configuration window, you can define the • groups of controls.
Tip: If you do not configure the different User
username and password to be used for the test Groupware use levels for your clients, we • menu options.
mode. The password will no longer be requested recommend that you provide them with a document
when you click GO to test the window or project. The following states are available for each element:
listing all the controls used in your windows in order
• Default: the element behavior corresponds to the
to get an optimized configuration.
default behavior, defined in the application.
• Inactive: the element is displayed but no input
can be performed.
4 Configuring the application that uses the standard User Groupware • Grayed: the element is grayed. No input can be
performed.
When the application is deployed, the standard To configure the standard User Groupware, simply:
To create a new user, you must specify: • Invisible: the element is not displayed.
User Groupware is configured by the application 1. Start the application (executable or test from
supervisor. • the user’s last name.
WINDEV) and log in as supervisor:
• the user’s first name.
4.3 Displaying statistics
This configuration consists in creating users and • Name : supervisor
groups of users, and granting them specific rights • the username (mandatory). This username is the You can get application usage statistics by user for a
• Password: supervisor specific period.
for each control in each window of the application. identifier used to log in to the application.
These rights are used to gray controls, groups of • the user’s password. This password is optional
controls or menu options, and to make them visible
4.4 Migrating data
and can be entered by the user the first time they
or invisible. log in (check the corresponding option). From version 18, the User Groupware has been
optimized. The data files used by the User
Groupware have changed.
The User Groupware administrator can migrate
the existing data to the new format and therefore
automatically retrieve the data used in the earlier
versions. This migration can be performed
regardless of the data format: HFSQL Classic,
HFSQL Client/Server or Native Connector.

132 Part 4: Advanced concept Part 4: Advanced concept 133


5 Tips for an application that uses the User Groupware
Multilingual
5.1 Using groups of controls 5.2 Visibility of controls
applications
To simplify the configuration of the groupware When developing your application, you can define
management according to the users, it is the visibility options of the elements in your A multilingual application can be distributed in multiple languages. WINDEV Mobile takes into
recommended to use groups of controls. windows: account the different languages of the application during the entire development cycle.
You can create groups of controls in your windows • in the element description (7-tab window). The main steps for developing a multilingual application are as follows:
according to the controls to be displayed for a • through programming (State or Visible
specific user.
The ability to associate a control with several
properties).
When configuring the User Groupware, the
1 Choose the languages
- Project
groups of controls increases the number of possible supervisor can define different visibility options. - Analysis
combinations. The options defined by the supervisor have priority.
These groups of controls can be created in your For example, a button is used to make a control
application for managing the groupware, no specific active. This control was grayed out by the
programming is required. supervisor. Your code will be ignored and the control
will not be active. 2 Translate the project elements

- Direct translation
5.3 Defining rights - Translation via WDMSG, WDINT,
WDTRAD, ...
To define the rights corresponding to the features of
your application, it is recommended to:
• set the rights according to the application
user’s requirements before creating the setup
procedure. Simply add the groupware data files 3 Programming
- Choose the application language
Data files
- Choose the character set
when you create the application setup. (Nation function) (ChangeCharset function)
- Choose the character set - Take the character set into account when
• provide a technical documentation that includes (ChangeCharset function) creating the files (HCreation* function)
the names of controls, groups of controls and - Choose the keyboard language - Take the character set into account when
options that must be configured according to the (ChangeKeyboard function) reindexing (HIndex function)
usage level defined for the application.

4 Executable
Choose the library languages

5 Setup program
- Available languages
- Translate the setup program

134 Part 4: Advanced concept Part 4: Advanced concept 135


Multilingual applications in practice Language options
The "Languages" tab of the project description also
The different languages set in the analysis will be
available:
allows you to define all language-specific options: • when configuring the shared information of the
number, currency, date, etc. items. The description of the controls bound to
1 Overview The parameters used by default are the ones the items (options, captions, etc.) can be entered
defined in the Windows language options in the different languages supported by the
A multilingual application can be distributed in Remarks: (accessible from the Windows control panel). analysis. When generating a "full RAD" or window
multiple languages. The different languages of the When an Edit control or a Table control column that RAD, this information is automatically used for
• If the operating system supports several
application will be taken into account during the shows numeric data (number, currency, date, time, all languages common to the analysis and the
languages (Hebrew, Arabic, Greek, etc.), the
different development steps. etc.) is created, it will automatically use the input project.
corresponding character set will be automatically
The main steps for developing a multilingual used when translating to these languages. mask defined in the project language options. This • for the information printed in the technical
application are as follows: option is available in the windows. documentation (notes of data files or items).
• If your application is multilingual, this feature
1. Choosing the languages supported by the project must also be supported in the User Groupware At runtime, when an Edit control or a column in a • for the information managed by "Reports and
and the analysis. and the automatic HFSQL error handling Table control has a mask "Defined by the project", Queries". If "Reports and Queries" is provided
windows. For more details, see the online help. the input/display mask will automatically adapt with your WINDEV application, you can translate
2. Writing the different elements (window, code,
according to the options selected in the project for the names of the data files and the items. Users
etc.) in the different languages of the project. • Unicode is available in the HFSQL data files,
the language displayed at runtime. will be able to use the names in the desired
3. Defining the project language programmatically. window controls and WLanguage code.
Remark: The language options also allow you to language when creating their reports and queries.
4. Managing specific character sets in the data define the writing direction and the character set This information can be entered in the "Reports
files. used ("Miscellaneous" option). and Queries" tab of the data file and item
5. Creating the executable and the setup program. Executable program description.
When creating the executable file, you can specify 2.3 Languages supported by the different
2 Choosing the languages supported by the project and the analysis the languages that will be included in it. You can project elements
create a different executable file for each language
supported by the project. By default, the different elements of the project
2.1 Languages supported by the project The selected languages will be available for all This feature is used to reduce the executable size. (windows, reports, code, classes, sets of procedures,
multilingual resources that can be translated etc.) support the same languages as the project in
The different languages supported by the project
(captions of controls, menu options, help messages 2.2 Languages supported by the analysis which they were created.
are defined in the project description:
associated with a control, etc). An element can support more languages than
1. On the "Project" tab, in the "Project" group, click If your project uses an analysis, the languages
When changing the project language, changes will the project (when the element is shared between
"Description". The project description window supported by the analysis are selected in the data
be automatically taken into account: several projects that support different languages,
appears. model editor. The same analysis can be shared
for example).
• for each new element or object created in the between different projects that do not use the same
2. In the "Languages" tab, you can add or delete the
WINDEV editor, languages. Therefore, the analysis might use more
languages supported by the project.
• for each new element or object opened in the languages than the project.
WINDEV editor. To configure the languages supported by the
The main language corresponds to the language analysis:
used by default at runtime. 1. Open the project analysis in the editor.
2. Open the analysis description window: on the
"Analysis" tab, in the "Current element" group, click
"Description".
3. Select the "International" tab in the description
window of the analysis.

136 Part 4: Advanced concept Part 4: Advanced concept 137


3 Translating the interface into multiple languages Automatic error handling System menus
By default, automatic error handling windows are WINDEV includes a default context menu for Edit
Exporting and reintegrating the available in English and French. To translate them and Table controls. This menu allows users to easily
When the different languages supported by the
information to translate into another language, you must: perform several operations.
application have been selected, the information
displayed by the application must be translated into WDMSG is a stand-alone tool used to extract all the 1. Include the default error windows in your To translate these menus, you must have WDMSG.
these different languages. messages of a project (control captions, tooltips, application. You will find examples of these
Several elements must be taken into account to windows (with their WLanguage code) in \ 3.4 Translating WLanguage code mes-
etc.) and reintegrate them once they have been
create the UI in different languages: Programs\Data\Preset windows\Assertion - Error sages
translated.
• The selected translation mode. Contact PC SOFT Sales Department for more - Exception. In your code, several WLanguage functions allow
• The supported languages (with or without a details about the conditions for using this product. 2. Translate the different messages (see previous you to communicate with the user via character
specific character set). paragraph). strings. These messages must also be translated
3.2 Languages that use a specific charac- into the different languages of your application.
• The use of specific windows (User Groupware, ter set User Groupware
automatic HFSQL error handling, report viewer, To translate a character string typed in the code
By default, the User Groupware is available in
etc.). If your application supports languages that use editor:
English and French.
specific character sets (Greek, Russian, etc.), the 1. Select the character string to be translated.
• The messages displayed through programming. To translate an application that uses the User
different messages must be translated using these 2. Select "Translate" in the context menu of the
Groupware, you must choose a custom integration
3.1 Translation method character sets.
when configuring the User Groupware in your selection. The window for translating messages is
WINDEV allows you to automatically manage the displayed.
WINDEV includes different translation modes: application.
use of specific character sets in the editor. 3. Type the translation and validate.
• Automatic translation of the UI via a specific Reminder: To configure the User Groupware, go to
When the text cursor is located in the input area of the "Project" tab, "Project" group and click "User 4. The line of code is displayed in the editor. An icon
translation tool, installed on the development
a language that uses a specific character set, the Groupware". appears to the right of the translated message.
computer. This translation is performed in the
corresponding input language (character set used This icon indicates that the current message has
WINDEV editor. During the custom integration, the different
by the keyboard) is automatically enabled. multiple languages. The icon allows you to quickly
• Export all the messages via WDMSG and elements of the User Groupware are included via an
Therefore, if a caption is entered in the Russian internal component. access the translation window.
reintegrate them once they have been translated.
section of the caption description, the keyboard will
You will only need to translate these elements when
Translating the UI automatically switch to the Russian character set.
you translate the project.
The description window of each element has Reminder: To use specific character sets, the files
Remark: If necessary, when configuring the User
different tabs with multiple multilingual areas. These corresponding to the desired character sets must
Groupware, in the "General", tab, select "Manual
multilingual areas allow you to enter information in be installed in the Windows region settings (control
start": this allows you to display a window to select When the icon is hovered over, a tooltip shows the
the different languages supported by the project. panel).
the language of the application before the login different translations found for the string in all the
To translate this information from WINDEV: window.
3.3 Translating specific windows project languages.
1. Go to the WINDEV options to configure the
Handling HFSQL errors Report viewer Remark: To convert all the messages in your code
translation options of the software used: on the into multilingual messages, go to the "Code" tab,
"Home" tab, in the "Environment" group, expand By default, HFSQL error handling windows are By default, the report viewer window is available in
English and in French. "Languages" group, expand "Translate strings"
"Options" and select "General options of WINDEV". available in English and French. To translate them and select "Convert simple strings into multilingual
2. In the "Translation" tab, you can define: into another language, you must: To translate this window, you must integrate the
messages".
1. Include the default error windows in your project. windows corresponding to the report viewer
• the default translation tool.
You will find examples of these windows (with into your application. You will find examples of
• the source and destination languages. these windows (with their WLanguage code) in \
their WLanguage code) in \Programs\Data\Preset
3. If a translation tool is specified, a "Translate" Programs\Data\Preset windows\Preview. For more
windows\HFSQL - Automatic help windows.
button will be displayed in each element containing details, see the online help.
information to translate. This button is used 2. Customize error handling to use HFSQL error
handling windows (HOnError). Then, all you have to do is translate these windows.
to translate the selected text via the specified
translation tool. 3. Translate the different messages (see previous
4. Select the text to be translated and click paragraph).
"Translate".

138 Part 4: Advanced concept Part 4: Advanced concept 139


4 Choosing the language through programming
Optimizing an
A multilingual application can be distributed in
multiple languages. The user will be able to choose
• include an option (menu option or button, for
example) to allow users to change the language
application
the language used by the application at runtime. You while the application is running.
can for example: WINDEV includes multiple methods to optimize your applications:
• prompt the user to choose the runtime language • The performance profiler, which allows you to quickly identify time-consuming processes. You
the first time the application is started can then optimize the desired process.

5 Defining specific character sets in HFSQL data files Application test


When an application displays or saves data in HFSQL If the application is used in a country that uses a Analyze the performance of the application
data files, this data is typed in the current language. specific character set, this character set must also during a test and view the longest processes
If the application is used in a country that uses a be supported by the data files. This means that
to optimize the source code.
Latin character set, no specific configuration is search, sort and other operations will be performed
according to the selected character set.
To start the performance profiler, go to the
required.
"Project" pane, "Audit and performance"
group, expand "Analyze performance" and
6 Unicode and specific character sets select "Analyze performance".

WINDEV includes two modes: The Unicode options can be set in the current
• single charset mode ("Use ANSI strings at configuration ("Unicode" tab in the configuration
runtime"): In this mode, if your application description window).
includes languages that use specific character Important
sets (Greek, Korean, etc.), change the following • The static audit of the project, which points out potential programming issues (empty groups,
If you change your projects to Unicode, the ANSI/
elements through programming: orphaned elements, etc.) as well as large files that can cause abnormally long loading times.
Unicode combination generates some constraints:
• the character set used by all the fonts used on Data must be converted when changing from one
the screen (ChangeCharset). This character
set can also be used for the data saved in the
encoding system to another. Any data exchange Static audit
must be adapted depending on how strings are
HFSQL files. For more details, see the online represented in memory (in Unicode, 1 character
help (keyword: Multilingual). Audit report, analysis of the library (to detect
is encoded on 2 bytes, while in ANSI, it is encoded
• the language of the keyboard used by the on 1 byte): for example, calls to APIs, read from large files) and analysis of the setup package.
application users (ChangeKeyboard). or write to the disk to exchange data, read from To start the static audit, go to the "Project"
• full Unicode support ("Use UNICODE strings at or write to sockets containing strings, etc, ...
pane, "Audit and performance" group, expand
runtime"): This mode can be used for non-Latin If you change your projects to UNICODE, a wizard
"Edition audit" and select "Trigger edition
character sets. In this mode, ChangeCharset starts automatically to measure the impact of this
and ChangeKeyboard don’t have any effect. The change.
audit".
character set is automatically changed based
on the language options defined in the project
description. You can also combine different
character sets.

140 Part 4: Advanced concept Part 4: Advanced concept 141


Distributing "Reports and
Queries"
• The dynamic audit of the project, which detects loss of resources, unprocessed errors and
slowness of the application in its production environment.

Dynamic audit
With "Reports and Queries", which can be freely distributed with your applications, users will be
Analyze the performance of the application able to freely customize the reports you provide. Of course, only the reports you have selected can
during a test, view processes containing be customized.
exceptions and errors that are not properly
handled. WINDEV project
To start the dynamic audit, on the "Project"
pane, expand "Test mode" and select "Debug 1 Project description

the project while the audit is enabled".

Reports/Queries

2 Describe the reports & queries

Programming
RunReportsAndQueries function

3 Start “Reports & Queries” (optional) Use the “?” menu (automatic)

Start from the preview (by default)

Executable

4 Create the executable

Create Setup

5 Install "Reports & Queries"

142 Part 4: Advanced concept Part 4: Advanced concept 143


UMC: User Macro-
User Macro-Code: UMC in practice
Code
The User Macro-Code (UMC) allows end users to enter their own WLanguage code and include it in
1 What is the UMC?
an existing application. UMC is an option that allows advanced users to Multiple WLanguage functions are available to
create their own processes in an application. End the users. However, the developer can set certain
Let’s consider the following case: users can type WLanguage code and include it in an restrictions. For example, do not allow the use of file
A window for entering a customer form requires an email address but it does not check its format. existing application. management functions. To maintain data integrity,
The user wants to check if the "@" character is in the address. The new processes can be sent to the developer so the commands to update or add records are not
that they can be added to the source code of the available to the users.
application.

2 How to enable/disable the UMC?


This feature can be disabled for a window or for the Two options are available if you allow it:
entire application. • Allow the use of HFSQL commands
To disable the UMC on a window, check "Forbid the (HReadFirst, HFilter, HAdd, etc.).
use of U.M.C." in the "Details" tab of the window • Accept the suggestions made by the users.
description. The second option allows the application to send
To set the UMC on the project: an email when the user creates a macro code. The
1. Open the project description window: on "*.MCU" file corresponding to the macro code is
An icon at the top of the window allows the the "Project" tab, in the "Project" group, click sent as an attachment. This allows you to easily
user to customize the processes. "Description". retrieve the suggestions made by the users and
2. Go to the "Advanced" tab. Click the "User automatically include them in your project! WINDEV
Macro-Code" button to allow or prevent users from includes an option for importing "*.MCU" files (on
The UMC configuration window is entering User Macro-Code in the entire application. the "Project" tab, in the "Project" group, expand
displayed. A new action can be added by "Import" and select "User Macro-Codes...").
the user for this window. In this case, the
email address is checked.

The user types the WLanguage code. The F1


key is used to display the WLanguage help.

To enable this feature (which is disabled by default), simply specify that the project supports the
UMC:
• in the project description,
• when creating the executable.

144 Part 4: Advanced concept Part 4: Advanced concept 145


Available Debugger:
tests concepts
WINDEV includes multiple methods to test applications. The table below presents the different WINDEV includes a debugger to help you optimize your code.
modes available. With the debugger, you can run your applications step by step, view the WLanguage code being
executed, the content of variables, etc.
Type of test Description

Test of the entire project Runs the application like the executable file would. Tests
the entire application, even if it is not fully developed.
When a problem occurs during the execution of the
project, you can start the debugger to identify and fix the
problem.
Remark: If the number "64" appears on the "Go" icon, it
means that the test will be run in 64-bit mode in a 32-bit
editor.
Test of the current element Tests an element once it has been developed.
You can start the debugger when a problem occurs in
reports and windows.
Remark: If the number "64" appears on the "Go" icon, it
means that the test will be run in 64-bit mode in a 32-bit
editor.
Test of a project step by step Allows you to start the debugger when the application is
(via the debugger) run. This solution is used to monitor the operating mode
of the application via the debugger.
You can also debug a specific executable file, a running
executable or an executable file running on another
computer.
Unit test Tests windows, procedures and classes in an application
at different stages of development.
The test scenarios are automatically generated in
WLanguage from the application test or from the Debugging the current project
element test. The scenarios can be directly modified in
1. Using breakpoints in the code editor.
the code editor.
The debugger will be automatically started when the line preceded by a breakpoint is run.
Regression test Used to make sure that an element did not cause any To insert a breakpoint, simply click to the left of the line of code: a red dot appears.
regressions between different versions of an application.
To do so, select (or create) the test scenario that will be
run.

146 Part 4: Advanced concept Part 4: Advanced concept 147


Unit tests/Automated
tests
2. Using the STOP keyword in the WLanguage code
The debugger will be automatically started when this line of code is executed.
3. Using the "Debug project" option
The debugger is launched at the same time as the application test. The option "Debug project" can
be found on the "Project" tab, under "Test mode". Unit tests (also called automated tests) are used to test windows, procedures and classes in an
application at different levels of development.
4. Pressing Ctrl + Pause during the window or project test To do so, select (or create) the test scenario that will be run.
The debugger starts with the action performed after using Ctrl + Pause. Test scenarios are generated in WLanguage and can be directly modified.
These scenarios can be found in the test editor. The test editor analyzes the result of the unit tests
Debugging an executable and calculates the validation rate of the application.
Using a test scenario
WINDEV also allows you to debug the executable file associated with the current project. This Creating a test scenario (classes and procedures)

1 1
executable file can:
• be run from WINDEV, on the development computer. WINDEV window in the editor Display test editor

• be currently run on the development computer.


• be run from WINDEV, on a remote computer.
• be currently run on a remote computer.

Debugging a component 2 Record test scenario 2 Run test

A component is debugged from the component project. You can:


• Test the component from the component project.
• Test the component by running another project located on the development computer. This Correction

3 3
allows you to test the component from the project that uses it.
• Test the component by running an executable file located on the development computer. This WLanguage code of test scenario Result of the test
allows you to test the component directly from the executable file that uses it.

To create a unit test on the current window, go to the "Automated tests" tab, "Tests" group, expand
"New" and select "Record a new scenario".
To create a unit test on a procedure or on a class method, select the procedure or class method in
the "Project explorer" pane and select "Unit tests .. Create a unit test" in the context menu.

148 Part 4: Advanced concept Part 4: Advanced concept 149


Unit tests on the
Testing an application
executable
The unit tests created with WINDEV can be run on a deployed executable, via the test robot.
1 Overview
WINDEV includes multiple methods to test The test of a single report runs the current report
1
Configuration of
the test robot applications: only. This allows you to test a report once it has been
4
Save the result
in the database • test of the entire project, developed. Like for the project test, the debugger
can be started if a problem occurs.
Test robot of Control Centers • test of a single window,
• test of a single query (see the online help for
- Executable path more details), The step-by-step project execution allows you to
- Path of test data start the debugger when starting the application.
• test of a single report (see the online help for
This solution allows you to monitor the application
more details),
progress.
• step-by-step project execution,

3 Results of the tests • application performance test,


• regression test/automatic test.
The performance test checks and optimizes the
execution time of your application.
WD2XXTest.DLL
By testing the project you can simulate how The regression test (or automated test) is based on
the application will run when launched from an the execution of scripts. It checks that the existing

2
Start the executable executable. This allows you to test the entire features are still supported when running the
deployed in test mode. The application, even if it is still being developed. If a
test data is used. applications.
problem occurs, you can start the debugger to
identify and fix the problem.
In addition to these methods, WINDEV also provides
Executable deployed Test data a "Code coverage" tool to measure how many tests
The window test is used to run the current window have been executed on your application. For more
with: with: only. This allows you to test your project from a
- Its framework details, see the online help.
- The test library (WDL) given window or to test a window once it has been
- Its data files - The test data (“Data of automatic finished. Like for the project test, the debugger can
tests” directory)
- The data files used for the be started if a problem occurs.
tests (if necessary)
The test of a single query runs the current query
only. This allows you to check the operating mode of
a query once it has been developed.

150 Part 4: Advanced concept Part 4: Advanced concept 151


2 Testing and debugging a WINDEV project (development computer) 3 Testing and debugging a WINDEV project on the user computer
WINDEV includes multiple methods to test and Two features are available:
2.1 Overview In this case, the code executed comes from the
debug a project on the development computer.
libraries (and not from the code in the elements on • Running and debugging the executable on a
The test of the entire project allows you to simulate However, in some cases, you may have to debug remote computer,
the computer). Therefore, the code from the current
the start of the application with the executable. directly on the end-user computer (connected over
project and the code from the executable may be • Debugging an application currently running on a
This allows you to test the entire application, even the network or via the Internet).
out-of-sync: the out-of-sync code is highlighted in remote computer.
if it is still being developed. When a problem occurs You can, for example, debug an application executed
pink during the debug operation. For these two features, a specific configuration of
during the execution of the project, you can start the in Taiwan from your office in Paris. The debugging
This test mode is used to run a specific executable the remote computer is required.
debugger to identify and fix the problem. is performed remotely, directly on the user
installed on the development computer and to Remark: to debug a WINDEV application remotely,
WINDEV includes an extensive set of application configuration.
debug it directly. the application must include the WD280CPL.DLL
tests that can be run from the development
For more details, see the online help. library in its framework.
computer:
For more details, see the online help.
• Test and debugging of the current project in the 2.4 Debugging an executable already run
editor. on the development computer
• Execution and debugging of the executable
Some problems can only be reproduced when 4 Testing a window
corresponding to the current project.
testing the executable in real-use conditions.
• Debugging of an executable already run on the
development computer. This test mode allows you to find a problem that only 4.1 Testing a window from the editor 4.2 Stopping the window test
occurs at runtime (and not in test mode).
Remark: The test of a project can be run regardless To test a window from the editor: There are multiple methods to stop the test:
of the current element in the editor. The principle is simple:
1. Open the window to be tested. • 1st method:
• The developer starts the executable on their
2. Click in the quick access buttons (or press
2.2 Testing and debugging the current computer and directly goes to the desired Close the application being tested. WINDEV goes
F9). The editor is automatically minimized and the
project location in the application. back to editor that was open when the test was
window is run. started.
To test a project from the editor, go to the "Project" • In WINDEV, the developer opens the project that
During the test, all window features can be run. You • 2nd method:
tab, expand "Test mode" and select "Debug project" correspond to the executable and establishes a
will be able to open other windows, for example. • Go back to the editor via the taskbar or press
(Ctrl + F9). The editor is automatically minimized and connection with it.
the project is run. • The WINDEV debugger monitors the execution Alt + Tab.
of the program step by step. • Stop the test. WINDEV goes back to editor that
2.3 Testing and debugging the executable was open when the test was started.
on the development computer
In this case, the code executed comes from the
Some problems can only be reproduced when libraries (and not from the code in the elements on
testing the executable in real-use conditions. This the computer). Therefore, the code from the current
test mode allows you to debug an executable once it project and the code from the executable may be
is installed on the development computer. out-of-sync: the out-of-sync code is highlighted in
pink during the debug operation.
For more details, see the online help.

152 Part 4: Advanced concept Part 4: Advanced concept 153


5 Tracing a project Creating a trace file

DateTimeTrace is DateTime
DateTrace is Date
During long processes (batch processing, etc.), to
TimeTrace is Time
check the operating mode of the program, you must
5.1 Debugging principles Remark: For more details on the limitation of the keep a physical trace of the processes run (a text
DateTimeTrace = SysDateTime()
debugger, see the online help. DateTrace = MyDate.Date
Debugging an application consists in: file, for example). TimeTrace = MyDate.Time
To debug this type of applications, you may want The following procedure allows you to define how
• checking the operating mode of a process, fWriteLine(File,
to monitor the changes of a value, how different the trace will be displayed: DateToString(DateTrace) + ...
• understanding the operating mode of an existing procedures are called, etc.
program, • on the screen (/DEBUG parameter in command " - " +
This information can be: line). TimeToString(TimeTrace))
• checking the values of variables, fWriteLine(File, StringToTrace)
• displayed on the screen. • in a text file (default mode).
• checking the operating mode of special cases in fWriteLine(File, " ")
• stored in a trace file.
an application. PROCEDURE MyTrace(StringToTrace) fClose(File)
Caution: If the information is displayed on the FilePath is string END
The debugger is used to perform these operations.
screen, it must be displayed during the application FilePath = fDataDirUser() + END
Remark: WINDEV also includes multiple trace tools tests only. ProjectInfo(piProjectName) + ".txt"
(trace window, dialog box, etc.). For more details, see File is int Remarks:
Displaying information
the online help. DebugMode is boolean = False • The trace file is created by default in the user
Two tools can be used to display information: IF Position(CommandLine(), "/DEBUG") data directory. The name of this file is the
5.2 Debugger overview • the dialog boxes: WLanguage Info function. > 0 THEN same as the project name. This file contains
Caution: When displayed, dialog boxes block the DebugMode = True the information to trace during the program
The debugger monitors WLanguage programs so
application. END execution.
they can be improved.
• the trace window: WLanguage Trace function. The information is completed by the date and
The executed source code appears on the screen. IF DebugMode = True THEN
The trace window appears in the upper-left time of each "Trace". This allows you to detect a
The processes run are sorted in hierarchical order in Trace(StringToTrace)
corner of the screen, without interrupting the potential problem during the process.
the "Debugger" pane. ELSE
program. • Example of trace file content:
The value of the variables is displayed: File = fOpen(FilePath, foCrea
• individually in the on-hover tooltip of each Displaying the debug information teIfNotfound + foWrite + foAdd) 01/12/2015 - 10:53:25:20
Displaying the debug information on the screen is IF File <> -1 THEN Customer name: Montgomery
variable.
• in the "Debugger" pane. useful in test mode only.
Any unsuitable display must be removed before
5.3 Debugger features distributing an application. 6 Performance test
The debugger is used to: To avoid any oversight, it is recommended to
• view the call stack,
manage how the debug information is displayed via 6.1 Overview 6.2 Starting the performance profiler
a global procedure. For example:
• view the content of variables or expressions, The performance profiler checks and optimizes the To start the performance profiler, go to the "Project"
• execute the code step by step with the possibility PROCEDURE MyTrace(StringToTrace) execution time of the application. tab, "Audit and performance" group, expand "Analyze
to skip code blocks, IF InTestMode() = True THEN The principle is straightforward: When you test your performance" and select "Analyze performance".
• use conditional breakpoints, Trace(StringToTrace) application, the performance profiler keeps track The project is automatically run in test mode. The
END of all the actions performed and the corresponding process to optimize can be run in your application.
• modify the code while continuing the execution,
In this code, depending on the result of InTestMode, processes executed. To go back to the editor, simply close the application.
• etc.
the trace window appears during the application At the end of the test, the performance profiler The performance profiler displays the result of the
5.4 Debugging without debugger test only. displays: analysis.
In some cases, running a program with or without This procedure prevents trace windows from being • the 10 most time-consuming operations Remark: It is recommended to use the performance
debugger may be different. The debugger sets displayed on end-user computers, even if they are • all actions performed in the application that was profiler to optimize the application (before it is
pauses in the execution of the processes, during called in the code of the application. tested, sorted by duration (from the longest to distributed, for example).
which Windows performs multiple tasks. For The call to this trace procedure is identical to the use the shortest action).
example, the debugger cannot be used in a of Trace: You can select a process to analyze its processing
procedure called by a timer, nor in the code of a time and optimize it.
Scrollbar control. MyTrace("Customer: "+ ...
Customer.CustomerNum)

154 Part 4: Advanced concept Part 4: Advanced concept 155


6.3 Reading the performance profiler
results
code % Percentage of code run outside
the call to a WLanguage
PART 5
The performance profiler presents the result of the function or outside the call to a
analysis in several tabs: custom function or procedure.
• the "Summary" tab shows the ten longest Parent Process that called the function.
processes.
• the "Mapping" tab shows a graphical view of the Remarks:
main processes. • "Full execution" represents the total execution
• the "Details" tab shows all the processes run time of the application test in the performance
during the test of the application (from the profiler.
slowest to the fastest). • "Total for XXX Window" represents the total
• the "Calls" tab shows the details of the operations execution time of a given window (from the
performed in a process. moment it is opened until closed).
The following information is displayed for each 6.4 Choosing a process to optimize
process:
The processes to be optimized are chosen based on
Function Function, event, process or
procedure run.
several criteria:
• the process execution time. The longest Setup
Total time Function execution time. processes must be optimized.
• the percentage of time used by the function
Nb of calls Number of calls made to the or procedure. The higher this percentage is, the
function (procedure, event or greater the number of processes that can be
process). optimized in the code.
Time 1 call Execution time of a call to the Remark: If the process corresponds to a WLanguage
function (procedure, event or function, it is fairly hard to optimize it.
process).

7 Regression tests

7.1 Overview The following elements can be tested:


To test a window from the editor: • WINDEV windows.
1. Open the window to be tested. • sets of procedures.
2. Click in the quick access buttons (or press • classes.
F9). The editor is automatically minimized and the • WINDEV executables.
window is run. Each test is associated with a WLanguage code: the
During the test, all window features can be run. You test scenario. This scenario can be viewed in the
will be able to open other windows, for example. code editor. The code of the tests can be modified.
The tests and their code are not included in the
7.2 Automated tests executable and are not provided to the end users.
Each test contains a scenario that can be directly Therefore, the number of tests has no impact on the
edited in the development environment. This size of the application available to end users.
scenario is written in WLanguage and can be For more details, see the online help (keyword:
modified at any time. "Automated test").
These tests can be run before creating the
executable to make sure the application runs
properly.

156 Part 4: Advanced concept


The WINDEV
Framework
The WINDEV Framework is the set of libraries (.DLL files) required to run a WINDEV application.
When creating the executable, you can choose:
• a Framework-dependent executable,
• a self-contained executable,
• the common WINDEV Framework.

Using a Framework-dependent executable


When using a Framework-dependent executable, the libraries are installed in the directory of each
application. Therefore, each WINDEV application uses its own version of the libraries. Libraries can
be renamed when you use a Framework-dependent executable.

Advantages of using a Framework-dependent executable:


• Each application can use a different version of the Framework DLLs.
• The Framework of a given application can be updated without affecting other applications.
• The Framework can be renamed.

Using a self-contained executable


When the Framework is included in the executable file, it is a self-contained executable. The
Framework DLLs are not extracted when the executable file is run.

Advantages of using a self-contained executable:


• Self-contained executable.
• The Framework DLLs are not extracted.

Remark : Depending on the features used by the application, it may not be possible to use a self-
contained executable.

158 Part 5: Setup Part 5: Setup 159


Modes to install an
Using the common WINDEV Framework
When you use the common Framework, the libraries are installed in a common directory. These
application
libraries are shared between all the WINDEV applications installed on the same computer.

Advantages of the common Framework:


Individual setup
• The disk space used by the Framework (about 30 MB) is shared between all the applications.
• The Framework is updated only once for all the applications installed. The individual setup consists in creating a setup program that will be installed on each user
• The common Framework can be renamed. computer via a setup media.

Remark : When you use the common Framework, you can replace one or more DLLs (if a specific
version is required, for example).

Development Computer
computer of User 1
Create the
Setup
executable

Setup media
(CD-ROM,
Create the Use the
USB key, ...)
setup program application

This setup mode is compatible with:


• data files in HFSQL Classic format installed on the user computer,
• data files in HFSQL Classic format installed on a network and accessible from the user
computer,
• data files in HFSQL Client/Server format installed on a server.

160 Part 5: Setup Part 5: Setup 161


Network setup (with automatic update) HTTP setup (with automatic update)
The network setup consists in creating a setup program that will be installed on a server. All the The HTTP setup consists in creating a setup program that will be installed on a Web server.
user computers that will install the application must start the application setup via the network. All the user computers that will install the application must start the application setup via an HTTP
URL.
If an update is available on the Web server, users will be prompted to update the application on
startup.

Development Computer
computer of User 1
Create the Use the
Development Computer
executable application computer of User 1
Create the
executable

Create the
Use the
setup program
application

Create the setup


program

Install the
application
Setup via
setup media
Application via network

server
Install
the reference Setup Web Install the
version
(client
via setup
media server application
by Internet
setup)
Install the reference
If an update is available on the application server, users will be prompted to update the application version (client setup)
on startup.

A network setup allows for better management (versions deployed, mandatory updates,
disconnection of users, etc.).

This setup mode is compatible with:


• data files in HFSQL Classic format installed on the user computer,
• data files in HFSQL Classic format installed on a network and accessible from the user
computer,
• data files in HFSQL Client/Server format installed on a server.

162 Part 5: Setup Part 5: Setup 163


Multisite setup (with automatic update) Push network setup
The multisite setup allows you to install an application on different sites (a site can represent a The network setup consists in creating a setup program that will be installed on a server.
subsidiary, for example). Using WD1xxAdminExe, the network administrator installs the application from the server on the
client computers.
The multisite setup consists in creating a setup program that will be installed on a Web server.
All the sites that will install the application must start the application setup via an HTTP URL. In this
case, the setup program will be installed on a server of the site.
Development Computer
All the user computers that will install the application must start the setup via the network.
computer of User 1
This setup combines the advantages of the network setup and the HTTP setup by allowing a large-
Create the
scale deployment as well as a better control of local setups.
executable

Development Computer Use the


computer of User 1 application
Create the
executable Create the
setup program
Use the
application
Create the
setup
program

Application
Setup
server Install the
via setup application
Install the
Setup Web Application Install the mediat on the user
reference
via setup
server Setup server
application computer
media by Internet via network version
via network
Install Install the (client setup)
the reference reference
version (client version (client
setup)
WDAdminExe:
setup)
Run the setup on
Ask for setup
(via a Web page)
one of the user
computers
If an update is available on the Web server, the application is automatically updated on the
application server.

Network administrator

A Push setup can be updated either in Push mode, or as part of a network setup.

164 Part 5: Setup Part 5: Setup 165


Deploying a WINDEV application 1.2 Tools for creating the setup program
Different tools are available to create, maintain and
When developing an application, one of the • in the different setup modes (single computer or customize the setup program.
important steps consists in deploying this network).
Wizard WDInst setup editor WDSETUP
application on the user computers. This chapter briefly describes the different types customization
WINDEV optimizes this deployment by proposing a of setup proposed by WINDEV and their specific
large choice: features. Create a standard setup program (in X (recommended) X
• in the setup media. For more details, see the online help. French and in English by default)
• in the tools used to create the setup program. Maintain a setup program X X
Customize a setup program (the X X (multilingual
1 Setup: Summary table program that is started on the user setup for example)
computer)

1.1 Setup media Start mode On the "Project" On the "Tools" tab, in WDSETUP
tab, in the the "Utilities" group, project available
Depending on the setup media used (Internet, in- "Generation" click "WDInst". in the "Examples"
house network, etc.), WINDEV offers multiple setup group, click "Setup subdirectory of
generation modes. procedure". the WINDEV setup
To optimize your setup, choose the recommended directory.
generation mode.
1.3 Different types of setup • The reference application is installed on the
Setup generation modes offered by WINDEV
server. The reference application corresponds
Two types of setup are available in WINDEV:
Self-extracting Multiple Single directory CD ROM/DVD to the setup program of the application on the
• Individual setup: recommended for single-user user computers.
executable directories ROM
applications.
• The final application is installed on each user
X The setup program installs the application on the
Internet computer by running the setup program found
(recommended) user computer.
on the server. The updates will be automatically
X • Setup with automatic update: recommended for performed when the reference application
CD ROM/DVD (recommended) multi-user applications. changes on the server.
Supports X X The setup with automatic update is performed in
ROM Autorun
possible two steps:

In-house X
network
X X
(recommended)
X
2 Creating the setup program
Individual setup • Compact setup
Different types of setup are available: A standard setup is performed. However, the
• Standard setup setup program is smaller because it does not use
The setup program is independent of the specific DLLs and some customization options
application. All the files required by the are not available.
application are installed on the user computers. • Setup via MSI package
To take an update into account, this update must A standard setup that uses the features of the
be run on each user computer. integrated Windows installer is performed.

166 Part 5: Setup Part 5: Setup 167


Setup with automatic update • Setup via HTTP (on a proprietary server or 2.2 Installing a WINDEV application Setup with automatic update in
Different types of setup are available: in the CLOUD). A first setup of the application PUSH mode
will be performed on an HTTP server. The users Standard, compact or MSI setup To install your application in PUSH mode:
• Setup in local area network (LAN) with "Push"
possibly enabled. A first application setup will be will connect to a Web page to download the To install your application, simply start the 1. Start your reference version setup program
performed on the network, in a shared directory. application setup program. application setup program on the user computer. from a user computer. The files required by the
This directory will contain the setup program This setup is used to: The files required by the application are installed in reference application are installed in the specified
used by the end users and the reference version • manage the automatic update of the the specified setup directory. setup directory. The reference application
used to manage the updates. application installed on an HTTP server. To install an update of your application, simply run corresponds to a client setup program.
This setup is used to: • configure the location of the files required the update setup program on the user computer. 2. The program for managing the network
• manage the automatic update of the by the application. Different cases can be The application files modified by the update are applications is automatically started.
application installed on the network. managed, for example: replaced.
3. Select the network computer on which the setup
• get the characteristics of the users connected • Installing all the application files on the Setup with automatic update will be performed.
to the application at a given time. server. To install your application:
• configure the location of the files required • Installing the database on the server and the 1. Start your reference version setup program To install an update of your application in PUSH
by the application. Different cases can be files required to run the application (".EXE", from a user computer. The files required by the mode:
managed, for example: ".WDL", ".DLL", ...) on each user computer. reference application are installed in the specified 1. Start your reference version setup update
• Installing all the application files on the • Installing part of the database on the server setup directory. The reference application from a user computer. The files of the reference
server. and another part on each user computer. corresponds to a client setup program. application modified by the update are replaced.
• Installing the database on the server and the The files required to run the application 2. Run the client setup program from each These replaced files can be saved.
files required to run the application (".EXE", (".EXE", ".WDL", ".DLL", etc.) are also installed user computer. The files required by the client 2. Start the program for managing the network
".WDL", ".DLL", ...) on each user computer. on each user computer. application are installed in the specified setup applications.
• Installing part of the database on the server • Multisite setup. This setup is the combination directory. 3. Select the network computer on which the
and another part on each user computer. between a local network setup and an HTTP
To install an update of your application: update will be performed.
The files required to run the application setup. The HTTP setup is used to update the
reference setup on the local network. 1. Start your reference version setup update
(".EXE", ".WDL", ".DLL", etc.) are also installed
from a user computer. The files of the reference
on each user computer.
2.1 Creating a setup program application modified by the update are replaced.
• If the "Push" is taken into account, this setup These replaced files can be saved.
also allows you to: To create a setup program allowing you to:
2. When the application is started from a user
• deploy a new application on a network from • deploy a WINDEV application, you can:
computer, the application update is automatically
a single management computer. • use the setup program creation wizard directly proposed.
• deploy an update for the application on from WINDEV (on the "Project" tab, in the
a network from a single management "Generation" group, click "Setup procedure").
computer. This wizard allows you to create the different
types of setup programs.
• use the WDInst setup editor (on the "Tools"
tab, in the "Utilities" group, click "WDInst").
This editor is used to customize the setup
program.
• provide other files, you must use the setup
program creation wizard, started from the setup
editor WDInst ("File .. New" from WDInst).
Reminder: To start WDInst, go to the "Tools" tab,
"Utilities" group and click "WDInst".

168 Part 5: Setup Part 5: Setup 169


Monitoring your
applications PART 6
An application depends on several external parameters: Website, HFSQL server, network, etc. To
optimize the management of incidents, WINDEV allows you to use a monitoring robot.
The monitoring robot, which is composed of three executables running on different computers, is
used to run different tests: Internet connectivity check, network tests, etc.
If a problem occurs during a test, the monitoring robot sends you a message using one of the
following methods:
• Message sent via PC SOFT’s messaging tool (WDBAL).
• Email.
• Via a third-party program.
Furthermore, a sound alert can be implemented on the monitor.

Communication
Configures
User computer: Computer 1:
Monitor Monitoring robot

- Manages tests - Runs tests on a regular basis


- Configures robots - Sends a message if a problem
- Can directly run tests occurs

Monitoring
Configures
test
Computer 2:
Counter-Robot

- Tests the monitoring robot on a regular basis


- Sends a message if a problem occurs

Available types of tests

Internet test Test of HFSQL Network test


(test of a Web site) Client/Server servers (SNMP)

Test of FTP Test of news Test of WINDEV


server server application

Custom test ...


(in WLanguage)

170 Part 5: Setup


Managing
emails
WINDEV includes multiple methods to manage emails:
• POP3 or IMAP and SMTP (most common method).
• the "Simple Mail API (also called SMAPI or Simple MAPI)".

POP3 or IMAP and SMTP


These are the standard Internet protocols used to manage emails. They are standardized by the
RFC 1939, 3501 and 5321 documents. These protocols allow you to directly communicate with the
server, available at your ISP.

Local computer Email server


(User) (Hosting company)

POP3/IMAP
WINDEV application service

POP3/IMAP SMTP service


SMTP protocol
Send emails protocol
Receive emails

Remote access

• POP3 (Post Office Protocol) is a protocol for reading emails.


• IMAP (Internet Message Access Protocol) is a protocol for reading emails remotely.
• SMTP (Simple Mail Transfer Protocol) is a protocol for sending emails.

172 Part 6: Communication Part 6: Communication 173


Transferring files via
"Simple Mail API (also called SMAPI or Simple MAPI)"
This email management mode is used by most Microsoft applications, especially MS Exchange.
FTP
FTP (File Transfer Protocol) is a protocol for transferring files from one site to another. This protocol
allows you to exchange files via TCP/IP or the Internet.

Local computer Email server Principle


(User) (Hosting company)
To handle files on an FTP server from a WINDEV application, you must follow these rules:
1. Connect to an FTP server (FTPConnect).
WINDEV application POP3 service

SMTP service
User computer FTP server
Disconnection
Simple MAPI WINDEV application

User
profile
2. Send and retrieve files (according to the connection mode). For a passive connection, the
WINDEV application must request the authorization from the FTP server before any operation is
performed on the server files. You can also:
• get the characteristics of the files located on an FTP server: attributes, size, etc.
• handle files on an FTP server: create, delete...
• list files from a directory located on the FTP server by running a procedure that starts a
process for each file found.

174 Part 6: Communication Part 6: Communication 175


Managing
sockets
User computer FTP server WINDEV includes advanced socket management functions.

1
Ask for A socket is a communication resource used by applications to communicate between two
authorization
Passive connection Passive connection computers regardless of the type of network.
(Firewall on the FTP server) (Firewall on the FTP server) This communication mode can be used, for example, to establish a communication between
computers connected by Internet.

2
WINDEV application
Validation
Different modes

3 Action
WINDEV applications can manage sockets according to different modes:
• WINDEV Client application: the application connects to any server and exchanges data via a
socket.
• WINDEV "Simplified server" application: the WINDEV application is a server that exchanges
Action information via a socket with a single client computer.
Active connection Active connection
• WINDEV "Standard server" application: the WINDEV application is a server that exchanges
WINDEV application
information via a socket with multiple client computers.

How a client application works


3. Close the connection to the server (FTPDisconnect). A client application of a socket server connects to a standard server to exchange information via a
socket.

Example: A WINDEV client application can connect to a standard news server on the Internet.

User computer FTP server Step 1: Connecting to the server


To connect to a server socket, use SocketConnect. This function makes a connection request to
Disconnection the server. The socket is identified by its port and address.
WINDEV application
Step 2: Exchanging data
Once two machines have connected their sockets, a communication channel is established
between them. These two machines can read from and write character strings to the socket.
To read from and write to the socket of the server, the WINDEV client application must use
SocketRead and SocketWrite.

Step 3: End of communication


To end the communication, close the socket from the client machine with SocketClose.

176 Part 6: Communication Part 6: Communication 177


WINDEV and
telephony
The different steps can be represented as follows:

WINDEV allows you to easily manage incoming and outgoing phone calls via the WLanguage
Client computer Server phone functions. These functions allow you to manage a voicemail, an answering machine (or

1
other) directly in a WINDEV application.
Connection
SocketConnect function

2
Read/
Write
SocketWrite and

Client computer
SocketRead functions

SocketClose function
Disconnection
3 WINDEV
application - Call detection
- Identification of calling number
Remark: the SocketXXX functions can also be used to manage secured sockets according to the
SSL protocol. To do so, use SocketCreateSSL and SocketConnectSSL.
Modem

Automatic dialing

Required configuration:
To use the telephony features, you must have:
• a modem.
To save and play recordings, this modem must include voice support.
To identify the caller, the modem must support Caller ID.
• the Tapi 3.1 protocol.

178 Part 6: Communication Part 6: Communication 179


Webservices:
concepts PART 7
WINDEV allows you to easily use Webservices (or XML Web services). A Webservice is an
application available on the Web. WINDEV allows you to access both SOAP (Simple Object Access
Protocol) and REST (Representational State Transfer) Webservices.

Any WINDEV application can use an existing Webservice.


To use a SOAP Webservice, you just need to get the Webservice address and import its
description into the application.

Development Web Appendices


computer server
Import the
service
description

Webservice
Use the
Webservice
WINDEV executable

To use a REST Webservice, you only need to get the Webservice characteristics and use RESTSend.

Remark: you can also provide one or more sets of procedures of a WINDEV application as a SOAP
or REST Webservice. To do so, you must:
• create a specific project configuration,
• for a REST Webservice, create a description of the REST Webservice,
• generate the Webservice,
• deploy it on a WEBDEV Application Server.

180 Part 6: Communication


Components provided with
WINDEV
WINDEV is provided with projects that contain components. These projects include:
• a project configuration corresponding to the component.
• a project configuration corresponding to the use of the component.
• an internal component.

The list of the main components provided with WINDEV is as follows:

WD BGInfo This example explains how to write information on the


background screen of a computer (IP address, name of the
computer, today’s date, etc).

WD Communication Used to establish a communication between two applications.


These two applications can be:
• On remote computers. The communication is performed via
sockets.
• On the same computer. The communication is performed
via the Windows messages.

WD Email address Used to simplify the input of emails.


autocomplete

WD EventLog Used to:


• List and read the events saved in the event log of Windows.
• Add an event into the event log of Windows.

WD Explorer Bar Used to manage an address bar similar to the address bar of
the Windows Vista explorer.

WD Extraction Used to extract and store the content of several documents


(Open Office, Word 2007, ...) in order for them to be found by
the full-text search.

WD Floating Windows Used to display temporary information to the user without


interrupting his work.

WD Glossary Used to organize and store the written expressions regularly


used by a customer.
This allows you to propose an access to a “Glossary” that can
be easily customized by the customer himself All the glossary
entries can be organized in tree-like categories.

WD HTML Page Import Used to import HTML pages with the WLanguage functions.

WD LastDocuments Allows you to propose a menu option used to open the last
documents opened in the application.

182 Part 7: Appendices Part 7: Appendices 183


WD Limitation Used to limit an application by different methods: WD Signature Allows you to easily include a ready-to-use ‘Signature’ control
• Time limitation (the application can be used during a 30-day in your WINDEV applications. This control is very useful for
period). the applications intended to operate on touch-screen devices,
• Limitation to a single computer (the application can be run TabletPC in Windows XP, interactive devices, ...
only on a single computer).
WD Simplexe Used to perform calculations from the Simplexe algorithm.
• Limitation on the number of users (the application cannot
be run by more than n users). WD Sockets Used to establish a communication between two applications
by using sockets.
WD Managing Logs Used to define, for an application, a configuration for the
runtime logs: WD SystemInfo Proposes three categories of functions used to group
• number of log files that must be stored, information about the current computer, the user and the
• maximum size for each log file, network to which the current computer is connected.
• information that must be logged.
WD Touch Screen Used for interfacing a tactile screen that can replace the
This example simulates different processes to observe standard keyboard. This keyboard allows you to use a WINDEV
the management of log files (.wlog files). application on a computer not equipped with a keyboard.
WD Photocopier Used to photocopy documents via a scanner and a printer. WD Trace Socket Allows you to trace a communication via socket, on a given
address, on a given port. This allows you to understand the
WD PrintModel Used to manage print profiles. principle of dialog via socket between two applications.
WD Printout Parameters Presents the use of iParameter. This function is used to In the applications that dialog via socket, you will be able to
retrieve the different settings defined for a specific printer. see all of the exchanges performed on the socket even if no
The printer used is defined by iConfigure(Printer Name). trace option was specified by the developers.
This component is used to modify different settings: This example also allows you to better understand the
operating mode of network protocols based on sockets:
• The paper orientation,
POP3, SMTP, FTP, HTTP, etc.
• The scale,
• The management of TrueType fonts,
• The number of copies,
• The management of color (color or black/white print),
• The double-sided,
• The output style (sheets grouped by copy or by page
number).

WD PrintSpooler Defines the list of less used printers in order to perform one or
more prints.

WD Progress bars Used to automatically manage a simple or dual progress bar


that displays the remaining time or the number of process
steps.

WD Select RTF Used to perform all types of searches in an RTF control. You
have the ability to search for:
• the words in bold,
• the words in italic,
• the words of a specific color,
• a character string containing specific words.

184 Part 7: Appendices Part 7: Appendices 185


Examples provided with
WINDEV WD HTTP Proxy This example is a simplified HTTP proxy. You have the ability to
save the connections and to find out the pages that have been
viewed.

The examples provided with WINDEV are intended to help you learn the features of WINDEV. WD Live Messaging Presents the functions for managing the sockets.
Their source code is clear and includes comments.
WD Loan Enables you to simulate loans and to:
WINDEV is provided with multiple examples:
• calculate the amount of monthly payments according to the
• Full examples: these examples correspond to full applications that can be used without any amount of the loan.
adaptation.
• calculate the amount that can be borrowed according to the
• Training examples: these examples illustrate a specific feature. amount of a monthly payment.
These examples can be opened directly from the WINDEV home window: • calculate the interest on investment from a monthly deposit.
• If the example is not installed on the computer, it will be automatically downloaded (from a PC For each case, you have the ability to print the depreciation
SOFT server) and opened. schedule corresponding to your parameters.
• If the example is installed on the computer, a copy is automatically created in "My projects\My
examples". WD Magnifier Used to zoom a section of the screen via a magnifier. The
The open example corresponds to the copy of the original example. This allows you to work or zoom value can be multiplied by 8.
make changes to this copy. The original example can be kept unchanged. Every time you open the
example (via the "Open an example" option), you can work on the copy or on the original version. WD Mail This application is a full email client. It is based on the Email
objects. This email client is used to send and retrieve emails by
Let’s see the features of some examples provided with WINDEV.
using the POP, IMAP and SMTP protocols.

Full examples WD Manager of task DotNet Used to list the applications and processes via the .NET
functions.
Used to perform different processes on the applications and
WBSetup Used to create customize the setup by physical media of a on the processes.
WEBDEV site.
WD Managing a computer Allows you to manage a computer fleet. For each computer,
WD Burner Lite Used to burn data CDs, DVDs or Blue-Ray disks. fleet you have the ability to define its characteristics, its
components and its users.
WD Burner Used to burn data CDs, DVDs or Blue-Ray disks.
These features are implemented via the use of queries,
WD File Synchronization Used to synchronize two file directories. reports and combo boxes.
After the synchronization, the destination directory is identical WD Managing Contacts Used to manage contacts and to send emails to them.
to the source directory. The comparison is performed on the
You also have the ability to synchronize these contacts with
presence and on the date of the files.
the ones found on the mobile device linked to the PC and with
WD FTP File Transfer This example is a full FTP client allowing you to store several the ones of Outlook.
FTP servers. Then, you have the ability to perform multi-file
WD Multimedia Enables you to read and play:
transfers from the local computer to the server or from the
FTP server to the local computer. To do so, we are using the • videos (AVI, MPEG, ...),
standard functions of WLanguage (FTPConnect, etc). • sound files (MP3, WAV),
• audio CDs,
WD Gantt Presents an advanced use of a Gantt chart.
• Flash animations.
Used to create a Gantt chart with tasks, links, cumulative tasks
and milestones. WD Office Image Editor This example presents the operating mode of Image Editor
The tasks can be edited in a specific window. control of WINDEV.
The created chart can be saved in a file in order to be reloaded
thereafter. WD Office PDFReader This example presents the operating mode of PDF Reader
control of WINDEV.

186 Part 7: Appendices Part 7: Appendices 187


WD Office Spreadsheet This example presents the operating mode of Spreadsheet WD WebCam Presents the integration of a Web Camera in a WINDEV
control of WINDEV. window.
You can:
WD Office Word Processing This example illustrates the operation of the Word Processing
• View the image broadcasted by the camera,
control of WINDEV.
• Perform an immediate capture,
WD Organizer Used to synchronize the appointments in your Outlook, Lotus • Capture the scene broadcasted as a Windows animation
Notes and Google calendars. (“AVI” file).

WD Outlook Enables you to read and write in the Outlook folders:


WD Zip Used to create and read compressed archives in “WDZ”
• Messaging, format (WINDEV ZIP).
• Calendar,
• Contacts, WDSETUP This example explains how to create a custom setup
• Tasks. procedure for your application with WINDEV.
This example is intended to operate with the standard version
of Outlook supplied with Office. Training examples
WD Password Presents a “box” of passwords. It can be used to manage the
passwords created when using the Internet sites but also in WD Active Directory DotNet Allows you to view the content of Active Directory. This
applications or in everyday’s life (codes, ...). viewing is performed via .NET objects found in the System.
It can also be used as a generator of passwords to produce DirectoryServices assembly.
secure passwords.
WD Animated Menu This example proposes different menu animations.
WD POP3Proxy This example presents a POP3 proxy. In this example, the
proxy is used to automatically archive the emails in a HFSQL WD Auto Error Management This example is an educational example about the automatic
database. management of errors.
This example presents the case of fatal errors, non-fatal
WD RSS Reader Presents the use of classes for reading the RSS streams. errors, errors on several levels.

WD Sales Management A “trendy” application for sales management that includes WD Bluetooth This example presents the use of the Bluetooth functions:
dynamic tabs and ribbon. • to list the accessible Bluetooth devices,
WD Schedule Used to create a schedule containing click areas. • to list the services proposed by a device,
• to connect to a Bluetooth device,
WD Simple Internet Browser This example presents the features of WINDEV’s HTML • to send a file to a device via the “OBEX” functions of
control and includes a simplified web browser with browsing WLanguage.
history, favorites, etc.
WD ChainedList Supplies the tools for building chained lists with simple
WD Telephony Uses the telephony functions of WINDEV: chaining. A list with simple chaining is used to store and
• To dial a phone number, browse in organized way a set of ordinary values.
• To detect and identify the incoming calls.
WD Changing Skin Templates This example presents a solution allowing the users to
WD Video Conference Used to start a conference with a remote user. dynamically change the skin templates.
Used to send a file to a recipient and to establish a dialog with WD Chart This training example explains how to use the chart control. All
him. the available types of charts are presented.

WD Coloring Search This example explains how to highlight the sought words in
the results of a Full-Text search.

188 Part 7: Appendices Part 7: Appendices 189


WD Controlling Excel Used to control Excel via OLE Automation. All the Excel WD DOTNET WMI The WMI (Windows Management Instrumentation) is used
functions can be used. to exhaustively manage the applications and the devices.
The WMI can be compared to a database that groups various
WD Controlling LibreOffice Used to control LibreOffice via OLE Automation. All the information about a computer.
LibreOffice functions can be used.
WD Drawing on Chart This example is based on the use of an internal component
WD Controlling Outlook Used to control Outlook via OLE Automation. All the Outlook allowing you to draw elements on a chart control: Min/Max
functions can be used. areas, Various areas, Flags, Plots and monitoring trackers,...

WD Controlling Spreadsheets This example explains how to control the OpenOffice Calc WD DuplexPrintout This example presents a solution for double-sided printing
spreadsheet and the Excel spreadsheet with a generic code. that can be disabled, which means that the back sides may not
be printed.
WD Controlling word The purpose of this example is to propose a universal
processor interface used to control these applications without having to WD Duplication This educational example explains how to duplicate a
worry about the application to control. database on a server.

WD Controlling Word Used to control Word via OLE Automation. All the Word WD Evaluation period Allows you to limit the use of an application to a given period
functions can be used. (trial period).

WD Dashboard The “WD Dashboard” example explains how to use the WD Example of unit test This example presents the use of the test editor supplied with
Dashboard control. WINDEV via two different cases:
• the test of a window.
WD DataBinding The “WD DataBinding” example explains how a control can be
linked to a WLanguage variable. • the test of a global procedure.

WD Detecting HFSQL Errors Presents the module for assisted management of HFSQL WD Extended Map This example shows the different features of the Map control
errors: in desktop (Windows) and mobile (Android, iOS) devices
• the default operating mode, WD Flowchart This example is used to create organization charts.
• the customization options.
WD Gallery Control This example demonstrates the use of the "Image Gallery"
WD Device Opening This example is used to add or delete an application into/from control.
the automatic opening system for the removable devices by
programming. WD Graphic Objects This example is an editor of graphic objects.
You can:
WD DirectoryObserver This example presents the use of the .NET delegates (.NET
• move, resize the objects,
events) in WLanguage.
• perform selections with the lasso or with the mouse,
WD DirectX This example allows you to use DirectX 9.0 in your WINDEV • cut/copy/paste the objects,
applications. • delete/duplicate the objects,
• save the created documents and print them..
WD Discovering MVP - Part 1 This training example explains how to implement an MVP
architecture (Model View Presenter) in a project. WD Handling the Organizer Example for using the Organizer control. The following
control features are used: Creating an appointment, Saving an
WD Discovering MVP - Part 2 This training example explains how to implement an MVP
organizer, Restoring an organizer.
architecture (Model View Presenter) in a project for a simple
analysis (Customer - Order - Order line - Product). WD HFSQL Explain Analyzer Visually represents the details of the execution plane of a SQL
query via SQL EXPLAIN.
WD DOTNET Delegate This educational example explains how to interact with the
.NET delegates. WD HotKey Used to define your own keyboard shortcuts.

190 Part 7: Appendices Part 7: Appendices 191


WD HTML Export Manages the external files. Also explains how to handle the WD Multitouch This example is using an internal component that gives you
files in HTML format. the ability to use the Windows Touch features in a WINDEV
application.
WD Input checks Checks the data typed by the user (name, company, city, zip
code, email address, etc.) in a form window. WD Multi-Windowing Used to understand the principle of multi-windowing in
WINDEV.
WD Interactive Application Presents the use of WinEdXXX function in an interactive
application. WD Network frames The analysis of the frames that circulate on the network
This application is used to mange a connected house (switch allows the administrators to audit the network and to detect
the lights on, find out the temperature). inconsistencies. To listen to the network, the application is
based on the Winsock 2 API and on the RAW Socket.
WD JAVA Calls Presents the call to the methods of classes of a JAR archive
via the WLanguage JavaExecuteFunction function. WD OAuth The example proposes to connect to Google and Microsoft via
It also explains how to fill a memory table (same operating the AuthIdentify function and the OAuth2Parameter type.
mode in Java and in Windows).
WD Object Detection This example shows how to use AIDetect.
WD Java Chart Designer This example explains how to create charts via the drawing
WD Office365 This example presents the connection to Microsoft Office365
functions.
APIs and it allows you to use the Outlook contacts.
Three types of charts are presented: column, scatter, line.
WD OLEDB Used to access external databases via OLE DB.
WD JavaMail Used to create an applet that can be used in an Internet page.
This applet is used to read and send emails. WD OPC UA This example shows how to communicate with an OPC UA
server.
WD JSON This example shows how to use the JSON format with
WINDEV: type of variable, type of item, import/export, ... WD OPC Presents the implementation of OPC protocol in WINDEV.

WD Jump lists JumpList in Windows 7 WD OpenGL Allows you to interface OpenGL and WINDEV. OpenGL is a
A JumpList is a menu accessible from the Start menu or from software interface used to draw three-dimensional objects
the application icon in the taskbar. (3D).

WD Lasso Uses a selection lasso in an Image control to perform a zoom WD OSD OSD means: On-Screen Display. It is the name given to the
in a preview control. interfaces that appear on the computer or television screens
for example. They are often used to perform settings. These
WD Mailshot Used to send a “mailing” by Internet. types of menus are displayed above all the elements found on
the screen. This example explains how to create this type of
WD Managing HFSQL Errors This example presents the management of HFSQL errors interface in WINDEV.
(duplicate, integrity).
This example explains how to customize the process when an WD PC Info Used to find out the language of the computer on which the
error occurs. application is run.

WD Managing the Java errors This training example explains the operating mode and the WD Persistence This example presents the use of InitParameter,
implementation of the mechanism for managing the WINDEV LoadParameter, SaveParameter. These functions are used to
errors. configure the backup of controls, variables and parameters.

WD Multiple Clipboards This example automatically manages a multi-level clipboard WD PivotTable This example presents the use of the Pivot Table control.
between all the WINDEV applications started on the This Pivot Table control is used to display dynamic statistics
computer. by performing groupings. These statistics are calculated from
the database.

192 Part 7: Appendices Part 7: Appendices 193


WD PowerPoint Generation This example explains how to generate a PowerPoint WD Service This example presents the creation of a “service” application
presentation from: with WINDEV.
• the data found in a WINDEV application such as the data
found in tables, charts. WD SharingMemory This example explains how to use the functions for sharing
memory.
• and from a base PowerPoint document (.pptx).
WD Simple OOP Example about the OOP with WINDEV.
WD PowerShell This example allows you to run a powershell script from a
WINDEV application and retrieve the result and the report. WD Syntactic Coloring This example proposes a base class used to perform a
syntactic coloring on a text.
WD Printing TreeViews Allows you to print a TreeView. This example uses a “TreePrnt”
class that can be easily re-used in any treeview control. WD SystemAPIs Presents the use of Windows APIs.
WD Queries Allows you to perform calculations, to pass parameters or to WD Text-To-Speech This example explains how to perform a speech synthesizer in
print the result of a SQL query on a HFSQL data file. a WINDEV application by using the SpeechSynthesizer class
of the .NET framework.
WD Reflexive link Uses a “reflexive” link to manage the family trees: each person
has several parents and several children All these records are WD Timeline Proposes an internal component used to handle a ‘Timeline’
stored in the same file. control template. A timeline is used to display in a linear way a
set of events that occurred over a given period of time.
WD RemoteControl Used to implement the remote control of a WINDEV
application. WD Toasts This example shows how to use the ToastDisplay and
ToastDisplayIW functions as well as Toast variables. A Toast
WD Reports This example presents the different methods for creating a
is a temporary message used to inform the user without
report:
interrupting the application.
• prints based on different data sources (queries, variables, ...).
• prints based on controls (Table, Spreadsheet, PVT, ...). WD Transaction Illustrates the operating mode of transactions when placing
• printing composite reports. an order.
• specific prints (portrait/landscape, report with watermark,
WD TreeMap Uses the TreeMap control in order to view the content of a
report with bar code, ...).
directory and the space occupied by each file included in this
WD Riak WD Riak presents an example for using the Riak database in directory.
WLanguage.
WD Trigger Used to enter the expenses for the contributors of a company.
WD RibbonSearch The “WD RibbonSearch” example proposes a solution to find Two modes are available:
an element in a Ribbon control from its caption and tooltip. • View with ability to perform modifications (read/write),
• Read-only,
WD SchedulerWithBreak The “WD SchedulerWithBreak” example proposes a solution The triggers are used to check the access to the files
for managing breaks in a Scheduler control. according to the selected mode.
WD Screen Saver Used to manage a screen saver via the management of timers WD Two-factor This example shows how to use two-factor authentication to
and Windows events. Authentication secure access to user accounts. It uses TOTP authentication,
which generates a 6-digit code every 30 seconds.
WD Search Control This example explains how to manage an edit control used to
perform “Google” FullText searches in your database. WD Universal Replication Explains how to synchronize the data of different sites by
using the universal replication.
WD Search On Composite Presents the use of filters and the use of composite keys in
Keys order to optimize the search times on a HFSQL data file. WD User Groupware Presents the operating mode of User Groupware.
WD Server trigger This example presents the use of server triggers.

194 Part 7: Appendices Part 7: Appendices 195


WD Using DotNET classes Allows you to use the .NET classes in WLanguage. Used
to:
• analyze a character string,
• configure the dialog boxes displayed.

WD Using DOTNET Used to convert a currency into other currencies.


The basis of this project (the cEuro class) is used to create a
.Net assembly.

WD Using sockets Presents the use of sockets in client/server mode.


Each socket is handled via a thread.

WD WDSETUP Plugin This project contains the elements required to create a setup
plugin (or “extension”) for WDSETUP.

WD Webservice Client This example illustrates the use of WebServices.

WD Webservice Server This example illustrates the use of the WebServices.

WD Website automation This example shows how to automate a website using


WINDEV’s HTML Control and the WLanguage HTMLxxx
functions

WD Who is locking Signals to the users of a HFSQL database in network who is


locking a record.

WD WindowsUpdate This example explains how to manage the updates available


on Windows Update.

WD Wizard Manages a “Wizard” window.

Additional examples will be available on our website (www.windev.com).

196 Part 7: Appendices Part 7: Appendices 197

You might also like