ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WEBDEV 2024 feature!
Help / WEBDEV Tutorial / Tutorial - Webifying a WINDEV project
  • Overview
  • Importing a WINDEV project: Webifying a project
  • Overview
  • Opening and webifying the project
  • Conclusion

Tutorial - Webifying a WINDEV project

We will cover the following topics:
  • Different import/export modes.
  • Webifying a WINDEV project.
Durée de la leçon 10 min
Overview
WEBDEV offers various import and export options.
First of all, you have the possibility to import "existing" WEBDEV elements into your project. All types of WEBDEV elements can be imported:
  • pages, reports,
  • classes, components,
  • procedures,
  • etc.
To import existing elements into the current project, go to the "Project" tab, "Project" group, expand "Import" and select "WEBDEV elements and their dependencies...".
For more details, see Importing elements into a project.
You can also export elements from your project to another directory. These elements can be reused in other projects.
To export elements from your project, go to the "Home" tab, "General" group, expand "Save" and select "Export .. To a directory...".
For more details, see Exporting elements to a directory.
In this tutorial, we will focus on another type of import: importing a WINDEV project, also referred to as "webification".
Importing a WINDEV project: Webifying a project

Overview

A widespread need today is to transform Windows applications (or parts of applications) into dynamic websites.
WEBDEV's webification wizard allows you to:
  • convert windows into pages,
  • adapt the WLanguage code.
To test the webification of a WINDEV application, we will use a WINDEV project.
A WINDEV application can only be webified:
  • using a version of WINDEV 2024 that includes WEBDEV 2024.
  • using WEBDEV 2024.

Opening and webifying the project

To convert an existing WINDEV project into a website:
  1. Go to the WEBDEV home page (Ctrl + <).
  2. On the home page, click "Tutorial", then in "Tutorial - Webify a WINDEV project", double-click "Webify a WINDEV project - Exercise".
  3. There are two options available depending on the IDE used:
    • If you are using a version of WINDEV that includes WEBDEV, on the "Project" tab, in the "Webification" group, expand "Webify" and select "Webify".
    • If you are using WEBDEV, the webification wizard starts and indicates that a WEBDEV project configuration will be created. Proceed to the next step of the wizard.
  4. The wizard shows the different elements to convert. In our case, select all the elements.
    To webify a WINDEV project, it is recommended to start by converting one or two windows. You can convert the other windows as you go along.
  5. Go to the next step.
  6. The wizard shows the elements that can be integrated into the website. In our example, keep the report. Keep the default options and go to the next step.
  7. The wizard is finished. Click "Finish".
  8. The project audit for page conversion starts automatically. This audit makes it possible to deal with certain compilation errors by suggesting solutions. We need to fix all these errors to fully webify the application. Some errors may be related to processes or features that are not available on the web, unavailable WLanguage functions, etc. In our example, the audit shows the following problems:
We will examine the different problems one by one:
  1. Our WINDEV application printed a report in "Report viewer" mode. This option is not available on WEBDEV websites. The code must be modified to create a PDF file.
    • Double-click "Click (server)" next to "Errors". The click code with the error is displayed.
    • First, we're going to modify the page loading mode. In the header of the "Click BTN_Print_quote" event, click "Minimal page reload (AJAX)" and select "Full page reload".
    • Then, we need to use the code to print a PDF file. Replace the code with:
      (server)
      iDestination(iGenericPDF)
      RPT_OrderForm.Print()
      FileDisplay(iLastFile, mimeTypePDF, iLastFile)
      fDelete(iLastFile)
    • Refresh the audit window: all print errors have disappeared.
  2. The following problem is related to processes that are not supported in websites. Simply check the behavior of the element and move or delete the corresponding WLanguage code, if necessary.
  3. The last problem detected is related to the use of fSelect. File pickers cannot be used in websites. It is preferable to use an Upload control. We have already seen this type of control in part 3 (in the "Managing the product image" paragraph).
This small example allowed us to see the simplicity and assistance provided by WEBDEV to convert a WINDEV project into a website.
Remark: In some cases, you may need to develop new features to adapt the application's behavior to websites. For example, if the application used a Word Processing control, it may be necessary to use an HTML control and adapt the analysis to manage HTML.
Conclusion
In this lesson, we saw how to easily webify a WINDEV application. For more details on the webification of a WINDEV project, see Convert your WINDEV applications into websites.
WEBDEV offers other import modes that can be very useful, for example:
Table of contents
Minimum version required
  • Version 2024
Comments
Click [Add] to post a comment

Last update: 12/11/2023

Send a report | Local help