Click here to Skip to main content
15,908,834 members
Home / Discussions / C#
   

C#

 
GeneralRe: What's the responsibility of controller? Pin
calendarw14-Apr-09 21:58
calendarw14-Apr-09 21:58 
Some of that is already applied but the controller is too large, I think it contains a lot of "Get Data from Model and Give it to View" code in the controller.

e.g.
for payment, the view should load all PaymentMethod, all Branch and all division for user selection and bound the Payment object with Payment details, so the controller for this case contain GetAllPaymentMethod(), GetAllBranch(), GetAllDivision() for user selection

Some of other part of the application contain more then three GetXXX() so it become too large, so I want to clarify about it.

1. Should controller handle object creation method? I have already separated a Factory Class for object creation, but should view directly call the factory or call the controller to create object from factory?

2. Should controller handle GetAllXXX() method for user selection? or let view call it directly?

3. Should controller handle flow between object and DAO? e.g. Update(Payment obj) { PaymentDao.Update(obj);}

4. Should controller provide interface for domain model method? e.g. ShipOrder(Order obj) { order.Ship(); orderDao.Update(order);}

Thanks
QuestionUpside down printer Pin
damichab14-Apr-09 20:48
damichab14-Apr-09 20:48 
AnswerRe: Upside down printer Pin
benjymous14-Apr-09 22:08
benjymous14-Apr-09 22:08 
GeneralRe: Upside down printer Pin
damichab15-Apr-09 0:36
damichab15-Apr-09 0:36 
GeneralRe: Upside down printer Pin
benjymous15-Apr-09 2:07
benjymous15-Apr-09 2:07 
QuestionHow to export images to Excel Pin
prajeesh14-Apr-09 19:41
prajeesh14-Apr-09 19:41 
AnswerRe: How to export images to Excel Pin
Christian Graus14-Apr-09 19:52
protectorChristian Graus14-Apr-09 19:52 
GeneralRe: How to export images to Excel Pin
prajeesh14-Apr-09 21:36
prajeesh14-Apr-09 21:36 
GeneralRe: How to export images to Excel Pin
Christian Graus14-Apr-09 22:16
protectorChristian Graus14-Apr-09 22:16 
QuestionCreated setup for C# windows application which should also install .net runtime incase not installed Pin
ptr_Electron14-Apr-09 19:08
ptr_Electron14-Apr-09 19:08 
AnswerRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
Abhijit Jana14-Apr-09 19:31
professionalAbhijit Jana14-Apr-09 19:31 
GeneralRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
ptr_Electron15-Apr-09 0:00
ptr_Electron15-Apr-09 0:00 
AnswerRe: Created setup for C# windows application which should also install .net runtime incase not installed Pin
Christian Graus14-Apr-09 19:51
protectorChristian Graus14-Apr-09 19:51 
QuestionIn C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 19:06
Naruki14-Apr-09 19:06 
AnswerRe: In C# Express, what's best way to get IP Address from user? Pin
benjymous14-Apr-09 22:14
benjymous14-Apr-09 22:14 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Luc 64801114-Apr-09 22:26
Luc 64801114-Apr-09 22:26 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 23:01
Naruki14-Apr-09 23:01 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Skymir15-Apr-09 7:54
Skymir15-Apr-09 7:54 
GeneralRe: In C# Express, what's best way to get IP Address from user? Pin
Naruki14-Apr-09 22:32
Naruki14-Apr-09 22:32 
QuestionFile transfer Pin
yesu prakash14-Apr-09 18:07
yesu prakash14-Apr-09 18:07 
AnswerRe: File transfer Pin
Christian Graus14-Apr-09 18:42
protectorChristian Graus14-Apr-09 18:42 
GeneralRe: File transfer Pin
yesu prakash15-Apr-09 2:59
yesu prakash15-Apr-09 2:59 
GeneralRe: File transfer Pin
buachaill cliste15-Apr-09 3:58
buachaill cliste15-Apr-09 3:58 
JokeThat was a dumb answer. Pin
Naruki15-Apr-09 15:16
Naruki15-Apr-09 15:16 
GeneralRe: That was a dumb answer. Pin
yesu prakash16-Apr-09 17:55
yesu prakash16-Apr-09 17:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.