Unofficial Content

 

 

1.        Create a prototype / production model by selecting:

                        -         Language = .NET 
                        -         User Interface = Win

 
2.        Setup model properties:
-         General / .NET Specific / Access Method = ADO.NET|ODBC
 
3.        Setup DBMS options:
            -      Access technology to set: ADO.NET|ODBC
    -      Database name: <Database Name>
    -      Server name: <Server Name or IP>,<Port>
 
4.         Setup execution properties:
  -      Compiler directory : csc.exe (under framework instalation folder)
 
Name of virtual directory (Service used by default)
 
  1.  Run database creation (the database created is supposed to exist)
Build / Create Database
 
  1. Generate programs:
Build / Build All
  1.  Run execution dialog (F5). Compile main objects that you have, otherwise compile “Developer Menu”
  2.  Run main object compiled or “Developer Menu”
 
On compiling Wkp01 (Work Panel Main Object), the following is generated under the bin directory:
-      Uwkp01.exe Object and
-      uWkp01.dll o Fld01.dll assembly, where Fld01 is the name of the GeneXus folder where the object is located (this depends on the object Assemblies structure property).
The compilation output is sent to the Runout.log file.
 
If you execute from a network you must take into account steps 5 and 7 in Permisos .NET .
Generate developer Menu makefile
Application Namespace
StrongName
Version Number
Compiler Flag
Access Method
Assemblies Structure
This property determines the assemblies building mechanism in a .Net Win model   with access to ADO.NET database.
 
Values
   By folder: an assembly is created per each model folder object  
   By Main: an assembly is created per each model main object 
 
By folder is the way in which assemblies (dlls) are generated. This implies that, on moving an object from one folder to another, all the involved objects must be regenerated and compiled. 
By Main – creates a dll for the object and another one for the stub. This assemblies building method is more natural and is similar to the behavior of the other Gui generators.  
 
Default value: By Folder
 
Enabled Caching
Log level
Add/Update/Confirm/Delete Button Bitmaps
This property allows choosing to use bitmap for the 'Confirm' button instead of the Caption. 
Values
The default values are:
 transaction_configutation_section
To setup the execution of a .NET GUI application you must just define the compiler path (csc.exe), which is provided by the SDK framework and is located under the framework installation directory, at:  
 
                <NET frameworkpath>\Framework\v3.5\csc.exe
 

By default, it detects the last compiler installed, otherwise, to enter this property you can go to: “Preferences/generator/properties/BuildProcess”.

 
execution_properties_Xev1
Compiler path
It determines the compiler path (csc.exe). It is provided by the SDK framework and is located under its installation directory <NET frameworkpath>\csc.exe, being the < NET frameworkpath> = WINNT\microsoft.net\vx.x.xxxx
 
The objects generation process takes two stages: 
 
Generation
 
After specifying an object, on generating it, the generator creates the following per each object:  
-          An <object_name>.cs file with the source code in C# language.
-          An <assembly_name>.rsp file with the references enabling to build the assembly that includes the object. Depending on the Build Assemblies model property, the assembly is composed of all the elements of the folder that contains the object (provided “By Folder” is setup), or the entire calls tree, if it is a main object (provided “By Main” is setup).
-          If it is main a call_<object_name>.cs file is generated with the code required to instantiate the object within the corresponding assembly, and a   bld<object_name>.cs file that is in charge of compiling it to an exe.
-          The gxcommon.rsp file is created, and its purpose is building an assembly (with the same name) that includes those objects common to all the assemblies (SDTs, collections).
-          If the assemblies building is setup with the By Folder option, a gxobjects.rsp file is created whose purpose is building an assembly (with the same name) that includes the objects located in the main folder.  
 
The code is compiled (from the generator F5 dialog) and the log with the compilation result is displayed on the screen and saved in the RunOut.log file.
 
The following is generated, depending on the Assemblies structure property:
-          with By folder value, a dll (assembly) per each folder Object defined in the model and a gxobjects.dll object for the folder root,
-          with By Main value, a dll (assembly) per each Main Object.
Besides, an exe is generated per each main object that calls the assembly.  
The code is generated in a .NET (IL) common language, which is supervised in runtime by an interpreter (CLR) that allows its execution by turning it into a machine code.  
 
   trace generation
To enable the generation of the application trace (log file), you must add an entry in the client.exe.config file:.
 
<log4net threshold="Value">
 
where “Value” may have any of the following values: 
·         ALL
·         DEBUG
·         INFO
·         WARN
·         OFF
The selection of each value depends on the level of detail you want to visualize in the log file. 
The client.exe.config file is located in the model directory (DataXXX).
 
The output default value (“root appender”) is “RollingFile”, which means that a file will be generated. 
By default, the generated file will be client.log and will be generated in the DataXXX\bin directory.
 
If you want to execute the application from outside GeneXus, such as executing the object exe directly from the DataXXX\bin directory, you must setup the client.exe.config of this directory.   
 
It is possible to setup a group of properties of the Rolling File appender, such as the number of log backuped files (maxSizeRollBackups) and the size of each file (maximumFileSize).
E.g.: 
 
<appender     name="RollingFileAppender" … >
         <file value="server.log"/>
         <appendToFile value="true"/>
         <maximumFileSize value="9000KB"/>
         <maxSizeRollBackups value="4"/>
 
</appender>
Client.exe.config file
This file contains basically the information for the connection to the database, the information of the model properties and the “log” generation. 
 
It is located in “dataxxx” model directory and in “dataxxx\bin”. When the application runs from GeneXus, this configuration file is used. If it runs directly from the “exe” of “dataxxx\bin” directory application, the configuration file located in the same application directory is used.  
 
It has the following structure: 
<configuration>
   <configSections>
      <sectionGroup name="datastores">
 …
      </sectionGroup>
      <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
   </configSections>
   <datastores>
      <Default>
         <add key="Connection-Default-TrnInt" value="1"/>
      </Default>
   </datastores>
   <appSettings>
      <add key="MODEL_NUM" value="2"/>
   </appSettings>
   <log4net threshold="OFF">
      <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
       ….
      </appender>
      <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
      </appender>
      <root>
         <level value="DEBUG"/>
         <appender-ref ref="RollingFile"/>
      </root>
   </log4net>
</configuration>
 
GXResources.dll and Messages.<language>.dll files
GXResources.dll stores images. Messages.<language>.dll contains the texts information by language.
These are generated at compilation time. 
 
Production Cutover 
The .Net platform does not use the registry and allows setting up the dll versions to be used. Therefore, installing in the server means just to make an xcopy of the bin directory. 
Requirements
The requirements are similar to the development environment ones.
 
·         Win server
-          Visual J#
-          .Net Framework
 
·         Database server
-          Bear in mid permisos .Net for Network application
-          Connectivity to the database. 

 

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant