Compilation phase - folders and files
copy linkTranscription
Having defined some interface objects in the YouBb project we could see the result in execution; running an application includes:
In this lesson we discover what happens in the compilation phase; all components in the project, and used by the application, are checked and compiled (in the case of C # technology, a DLL is created for each component or JAR in Java mode). The last compiled object will always be the main application because the DLL / JAR libraries of the previously compiled components will be needed.
For the compilation of the single object (component or application that is), the Foundation meta-language is translated into C # code, Java; yes because the code we write in the project with the Visual Code Editor is a meta-language (similar to C) but that needs a final conversion.
Once the metalanguage has become real code, a Solution Visual Studio is created in the output directory and all the files of the basic application template are copied (html file, css, images, C # / Java code, Javascript code, DLL libraries etc.).
Then it's time for the Custom folder (remember? It is possible to customize the basic application template with a custom directory): all the files in the custom folder, which have the same 'path-name' as the original template files, are copied in the output directory, so as to overwrite the originals.
Would you like to customize the image which, in the application template is called images \ delete.gif ? It is possible to create a file with the same path inside the custom folder, then create a images folder and insert a file called delete.gif .
The output directory is ready for the final compilation: in case of correct compilation it is possible to go to the next step.
This is the story of what happens during compilation, now let's try to run it with the Edit Menu -> Compile Project item. In the compilation screen we will find as many cards as there are databases, components and applications in the project, but here is something that does not add up: there are only 2 cards but the objects in theory are 3.
Let's go out for a moment, look at the project tree and notice how the component icon contains two green slashes (by way of comment): this indicates not to compile or better not to display in the phase compilation . We reactivate the component on compilation, right click Activate compilation and go back to Edit -> Compile project .
Now we see all 3 cards that we would have expected even if, a small clarification: since the invisible card belonged to a component, it would have been filled in anyway, since it was essential for the execution of the application.
In this screen we therefore have, the database tab that we have already discussed, the application tab: we see the available options:
The Recompile all option indicates to recompile even everything that has not been changed since the last compilation. (the compilation phase will be slower but we will have everything recompiled).
I remove the Run application option and try to compile by clicking the OK button; if everything is correct we should find Project Compiled in the status bar, otherwise a message window would appear to warn us of the failure.
Compilation apparently carried out, we look inside the csharp folder of the application, we can open it from the project tree, on the application name right click Explore output directory.
All these files are the result of the compilation phase; the next step will be to run the application by starting a Test Web Server.
- a) A phase of compiling the code
- b) A real Execution phase
- c) And possibly a debug phase to check the operation
In this lesson we discover what happens in the compilation phase; all components in the project, and used by the application, are checked and compiled (in the case of C # technology, a DLL is created for each component or JAR in Java mode). The last compiled object will always be the main application because the DLL / JAR libraries of the previously compiled components will be needed.
For the compilation of the single object (component or application that is), the Foundation meta-language is translated into C # code, Java; yes because the code we write in the project with the Visual Code Editor is a meta-language (similar to C) but that needs a final conversion.
Once the metalanguage has become real code, a Solution Visual Studio is created in the output directory and all the files of the basic application template are copied (html file, css, images, C # / Java code, Javascript code, DLL libraries etc.).
Then it's time for the Custom folder (remember? It is possible to customize the basic application template with a custom directory): all the files in the custom folder, which have the same 'path-name' as the original template files, are copied in the output directory, so as to overwrite the originals.
Would you like to customize the image which, in the application template is called images \ delete.gif ? It is possible to create a file with the same path inside the custom folder, then create a images folder and insert a file called delete.gif .
The output directory is ready for the final compilation: in case of correct compilation it is possible to go to the next step.
This is the story of what happens during compilation, now let's try to run it with the Edit Menu -> Compile Project item. In the compilation screen we will find as many cards as there are databases, components and applications in the project, but here is something that does not add up: there are only 2 cards but the objects in theory are 3.
Let's go out for a moment, look at the project tree and notice how the component icon contains two green slashes (by way of comment): this indicates not to compile or better not to display in the phase compilation . We reactivate the component on compilation, right click Activate compilation and go back to Edit -> Compile project .
Now we see all 3 cards that we would have expected even if, a small clarification: since the invisible card belonged to a component, it would have been filled in anyway, since it was essential for the execution of the application.
In this screen we therefore have, the database tab that we have already discussed, the application tab: we see the available options:
- Create Source Code -> the meta language is translated into real code
- Compile Application -> Visual Studio Project compiles
- Run application -> The application runs
- Enable Debug -> The application will run with a debug mode that slows down its performance but allows us to analyze its operation in detail.
The Recompile all option indicates to recompile even everything that has not been changed since the last compilation. (the compilation phase will be slower but we will have everything recompiled).
I remove the Run application option and try to compile by clicking the OK button; if everything is correct we should find Project Compiled in the status bar, otherwise a message window would appear to warn us of the failure.
Compilation apparently carried out, we look inside the csharp folder of the application, we can open it from the project tree, on the application name right click Explore output directory.
All these files are the result of the compilation phase; the next step will be to run the application by starting a Test Web Server.
Changed on: 17/11/2023 / From version: 20.0.7800