Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting started on application

Status
Not open for further replies.

haggisns

Programmer
Jan 28, 2005
1
CA
Hi,

I am designing and developing a asp.net application written in VB.

I have been reading Craig Larman's Applying UML and Patterns.

I am trying to design how to break my app into classes (responsibility objects)

The confusion is the controller pattern.

When a webform is first loaded and contains listboxes filled with data from various sources, and the user starts to manipulate these listboxes and some interactions cause postback page reloads before the actual submission (submit button) should all this been done using classes?

should I create a class to be the information expert of the state of the form or should I just write and retain all my variables in the code behind pages?

Also, if I do create interface class eventually I have to send this information to my submitlistboxoptions_handler class which will then (or so I understand) send it almost immediately off to another perform_logic class to determine
what to do with this information.

After that is finished, results are sent to my output_class
which creates the output in the form of an excel spreadsheet and sends it back to the browser.

I am basically confused on the controller class: Larman says that normally a controller should delegate to other objects and it controls or coordinates the work, but not a lot of work itself. IF this is the case what benefit does my controller of my interface provide me if all it does is immediately send data from the interface to another class to interpret the interface.

this program basically takes all the options in a web form and generates a sql statement (likely all done using a stored procedure in SQL Server)

thanks,

I hope this is not too confusing.
 
hi haggisns ,
can i ask where you have found the asp.net programming guides to help you with this task. any reference to resources is apprecited.
 
Accepted wisdom is that it makes sense to have a controller class, which updates the model and then delegates to view classes that handle the display. Struts uses this pattern (It's a Java J2EE framework) for its Action classes.

ASP.NET uses the page controller pattern, which kind of stymies this by giving control to the code-behind for the page each time, rather than to the controller. So you can either write your own front controller and discard all the .NET stuff (not recommended) or just live with it. I heard a rumour that ASP.NET v2 was going to allow the front controller pattern, but that was a few months back and I haven't seen any evidence of it so far.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top