Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
phpstructure [2019/03/18 10:20]
aducomadmin [PHsPeed Application structure]
phpstructure [2019/03/18 10:25] (current)
aducomadmin [Main.php]
Line 12: Line 12:
 ===== Main.php ===== ===== Main.php =====
  
-When you create your first application within a new project than by default, a '​main.php'​ application is generated and set as the first application to run on your web server. If you create a new module, you can define some default components that need to be on your design panel. ​By default ​that would be a form and a root component, and if you want to create a database-aware application,​ a database connector. ​No problem ​if you have not selected ​the right choices, after generating you can always correct ​that by removing or defining components from the designer.+When you create your first application within a new project than by default, a '​main.php'​ application is generated and set as the first application to run on your web server. If you create a new module, you can define some default components that PHsPeed creates for you, on your design panel. ​For a standard module ​that would be a form and a root component, and if you want to create a database-aware application,​ a database connector. ​Don't worry if you have set the wrong options, after generating ​the module; ​you can always correct by removing or defining components from the designer.
  
-the root component+**the root component**
  
-Other PHP applications ​used within the same project are not meant to be called directly from the browsers ​unless you design them to. You can control this, by setting the property '​CanRunStandalone'​ to true in the '​root'​ component. The root component is responsible for the basic behavior of the application. By default, this property is set to '​no,'​ causing a warning on main.php when you generate your application. A project must have at least one runnable applicationif that is not the case, '​main.php' ​will be automatically released by the generator.+Other PHP applications ​that are part in your PHP project are not meant to be called directly from the browser ​unless you design them to. You can control this, by setting the property '​CanRunStandalone'​ to true in the '​root'​ component. The root component is responsible for the basic behavior of the application. By default, this property is set to '​no,'​ causing a warning on main.php when you generate your application. A project must have at least one runnable applicationif that is not the case, PHsPeed will release the defined ​'​main.php.'
  
 For each PHP project, there'​s only one application in control. This application will handle the initial setup, will handle CRUD situations and ajax calls. For each PHP project, there'​s only one application in control. This application will handle the initial setup, will handle CRUD situations and ajax calls.
  
-While developing your screen, you will use components that you need to pick from the toolbar. PHsPeed will generate PHP modules (= class) for each component you have used. These modules follow an '​autoload'​ PHP rule. You can have only one class in a PHP file, and the name of the file and PHsPeed will automatically include these classes because of this, so you don't need to use '​include(_once)'​ to load these. All generated PHP component files contain a class with constructor,​ destructor and processing code, all inherited from their basic classes in the runtime. There is **no** mixed HTML code in the PHP programs. Instead, the rendering process will retrieve the HTML blocks from (generated) templates, will generate HTML for components depending on properties, modify it where necessary by the __render PHP method and then produce the page. During this process, several events are fired to allow the programmer to intercept in the process and apply  custom code.+While developing your screen, you will use components that you need to pick from the toolbar. PHsPeed will generate PHP modules (= class) for each component you have used. These modules follow an '​autoload'​ PHP rule. You can have only one class in a PHP file, and the name of the file and PHsPeed will automatically include these classes because of this, so you don't need to use '​include(_once)'​ to load these. All generated PHP component files contain a class with constructor,​ destructor and processing code, all inherited from their basic classes in the runtime. There is **no** mixed HTML code in the PHP programs. Instead, the rendering process will retrieve the HTML blocks from (generated) templates, will generate HTML for components depending on properties, modify it where necessary by the __render PHP method and then produce the page. During this process, several events are fired to allow the programmer to intercept in the process and apply your custom code. 
 + 
 ===== Application flow ===== ===== Application flow =====