• Overview
  • How can it be implemented?
  • Handling the different layers
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WindowsLinuxPHPWEBDEV - Código Navegador
AndroidWidget Android iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Procedimientos almacenados
The development in "3-tier" architecture is simplified.
What is the 3-tier?
The 3-tier architecture is designed to separate the 3 layers of an application: GUI, processes and data.
An application will include 3 independent layers:
  • presentation layer,
  • application (or process) layer,
  • data layer (which manages data access).
Specific functions (APIs in standard languages, advanced WLanguage functions) allow these 3 layers to communicate between themselves.
The reason for separating the layers is to make the layers independent in order to simplify the maintenance and future upgrades of the application (change of database system, transfer from a graphic environment to another one, ...).
This ensures better security because the access to the database is authorized by the Application layer only.
It also optimizes the teamwork and the multi-target development.
How can it be implemented?
The dialog between the different layers is performed via classes or structures that are automatically generated by WINDEV, WEBDEV and WINDEV Mobile.
1. You choose the data sources (data files or queries you want handle in 3-tier).
The different data files and queries are created in the data model editor and in the query editor.
2. WINDEV, WEBDEV and WINDEV Mobile automatically build the class diagram corresponding to the classes and structures that will be generated.
To do so, go to the "Análisis" pane, "Análisis" group, expand "Generación" and select "Generate the UML diagram corresponding to the analysis".
You also have the ability to create, in the UML editor, a class diagram corresponding to the analysis:
  • Click among the quick access buttons.
  • The element creation window appears: click "Architecture" then "UML".
  • The wizard for creating a UML diagram starts.
  • In the wizard, select "Class diagrams (reverse analysis, 3-Tier, ...)" and go to the next step.
  • Select "Build the class diagram corresponding to the database and to the queries ( 3-Tier architecture)".
  • Validate.
  • In the window that is displayed, choose the type of code to generate (procedural or object) and validate
3. The classes and structures are generated in WLanguage.
On the Generation pane, in the "Otras acciones" group, expand "Modelado UML" and select "Generate code". The sets of procedures and/or the classes are automatically generated.
4. You can provided "added-value" by developing your own methods in these classes.
The synchronization between the classes and the diagram is performed in real-time.
You can also modify the analysis and synchronize the UML diagram with the analysis.
5. These classes or structures allow the "Application" layer and the "Presentation" layer to communicate with each other.

Handling the different layers

  • For the "Data" layer:
    The standard functions for accessing the data can be handled: read, write, queries, transactions, ...
  • For the "Application" layer:
    Specific WLanguage functions can be used: FileToMemory and MemoryToFile. These functions are used to fill the members of the class from the items found in the corresponding data files (and conversely).
  • For the "Presentation" layer:
    The generated classes can be handled directly, no need to worry about the structure of the database.
  • For the communication between layers:
    Depending on the communication protocol between the 2 layers (component, Web service, HTTP, WEBDEV site, ...), the classes can be serialized in XML or in binary format (Serialize and Deserialize).
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Haga clic en [Agregar] para publicar un comentario