Dear Antonio,
I am using Genesis as Template for my program.
I insert some comments inside code for Ruth and Iris.
May I ask you help. Would you be so kind to look if this is correct what I write:
Can you please check the description of controller
Function of controller()
returns the args provided to Apache by the client if any if not default "browse"
Controller checks access:
cookies
user login and
requested content
depending on the AP_Method() GET or POSTan action is called ( cAction )
-----------------------------------------------------------
Controller calls view
case AP_Method() == "GET"
AP_RPuts( View( "default" ) )
|- Sends a value, converted into a string, to the client. Returns the number of bytes sent or -1 if there is an error
-----------------------------------------------------------
next step - ROUTER
state: user is logged in and made a valid request
Router() is used inside <body> to route to the selected view
here the program is routed to view - the "route" is passed through: cRoute parameter
-----------------------------------------------------------
Best regards
Otto
Understanding Genesis
Understanding Genesis
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Understanding Genesis
Dear Otto,
Yes, it is correct.
From a Model - View - Controller point of view:
1. Controller: It is the intermediate between the users requests and the views and data.
2. View: It is in charge of building the user interface.
3. Model: It is in charge of managing the data.
Users requests <---> Controller <---> Data and Views
We have an example of this in the first seamap.prg that was published:
https://github.com/FiveTechSoft/mod_har ... seamap.prg
Yes, it is correct.
From a Model - View - Controller point of view:
1. Controller: It is the intermediate between the users requests and the views and data.
2. View: It is in charge of building the user interface.
3. Model: It is in charge of managing the data.
Users requests <---> Controller <---> Data and Views
We have an example of this in the first seamap.prg that was published:
https://github.com/FiveTechSoft/mod_har ... seamap.prg
Re: Understanding Genesis
Dear Antonio,
thank you.
I will try to make a flow diagram for better understanding.
GENESIS is a very useful and very clean template. All that is needed for business APP is included.
Thank you so much.
Best regards
Otto
thank you.
I will try to make a flow diagram for better understanding.
GENESIS is a very useful and very clean template. All that is needed for business APP is included.
Thank you so much.
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
Re: Understanding Genesis
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************