Skip to Content
0
Former Member
Oct 25, 2004 at 02:43 PM

MVC Design Issue

24 Views

Hi,

After about 2 1/2 months of dabbling with MVC, I come up with a basic question(as Ulli has already noticed, I have headaches with MVC).

Nevertheless, I started designing a small portal on the lines of BSP_MODEL. It has a left controller(which controls the left hand side of the page) called action.do and right controller called action_details.do

The page starts with main.do which calls main.htm

main.htm has two statements, one which calls action.do and one that calls action_details.do

action.do calls action.htm and it has a tree with hyperlinks for eg. My Details, Polls, Discussion, Transport etc...

On clicking any of the hyperlink, the respective controller is called i.e. if My Details is clicked, DO_REQUEST of action_details. do calls mydetails.do which in turn calls mydetails.htm

Till this point, it is coded exactly as BSP_MODEL, apart from in the latter, it calls .htm and I call the controller.

Assuming we have clicked on My Details, DO_REQUEST of action_details.do calls controller mydetails.do and in that the page is shown. In My Details page , user fills details and clicks on Submit.

Now is the best part, the control now goes to DO_HANDLE_EVENT of mydetails.do , DO_FINISH_INPUT and goes all the way back to DO_REQUEST(previously I had written DO_INIT) of MAIN.DO, and I am not able to retain the original values of MyDetails, because it creates the controller afresh.

In this case, question is should

a) I create sub-controller my_detail.do(because of too many subcontrollers--> complexity increaseas and eventually headaches -- but if it can be done effectively, let me know) or

b) should I have many views and handle all the events in action_details.do !!!

If you have come to this point of this message, Thank You for patiently reading through it.

Solution for this would be highly appreciated (by rewarding points).

In case certain parts, require elaboration, let me know.

Regards,

Subramanian V.

Message was edited by: Subramanian Venkateswaran