Question
Fusebox and MVC
HI, I'm new to fusebox and want to start to use it in my
newest project.
I will also implement the design pattern MVC (Model-View-Control).
But I have some questions about this.
1. I will have the fusebox to call a start circuit (Control). But in the name of MVC how should the structure be?
/Model
/View
/Control
Should I then have sub directory in these like
/Model/
/View/dsp_entry
/Contol/Entry
2.
Should it be /Control/Entry and then an entry in the circuit
or
Should it be /Control and then an entry in that Circuit (without the entry circuit subdirectory)
3. What about the structure of a login?
I think that the entry circuit should test if the user is loggedin (Control dir ?) and then call /View/dsp_login.cfm or /View/login/dsp_login.
4. When and how should sub dirs used?
5. Calling a model. I uses cfc's for database access. I have a cfc called food that handles all the select, update and deletes of foods. But where should that cfc be located? I know that it should be in the dir /Model. But Should it be in /Model/Food???)
I think that some of the questions may be a little uncleare. But maby will an answer for one of the questions answer the rest of my questions.
I will also implement the design pattern MVC (Model-View-Control).
But I have some questions about this.
1. I will have the fusebox to call a start circuit (Control). But in the name of MVC how should the structure be?
/Model
/View
/Control
Should I then have sub directory in these like
/Model/
/View/dsp_entry
/Contol/Entry
2.
Should it be /Control/Entry and then an entry in the circuit
or
Should it be /Control and then an entry in that Circuit (without the entry circuit subdirectory)
3. What about the structure of a login?
I think that the entry circuit should test if the user is loggedin (Control dir ?) and then call /View/dsp_login.cfm or /View/login/dsp_login.
4. When and how should sub dirs used?
5. Calling a model. I uses cfc's for database access. I have a cfc called food that handles all the select, update and deletes of foods. But where should that cfc be located? I know that it should be in the dir /Model. But Should it be in /Model/Food???)
I think that some of the questions may be a little uncleare. But maby will an answer for one of the questions answer the rest of my questions.
