Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Having trouble with MVC

 
Jo�o Batista
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am struggling with the extensibility of my design concerning user interface.
Basically it is like this: Data layer -> Business Layer -> Controller -> View

The view publishes methods to retrieve information, such as the texts in textfields, etc, which the controller makes use to call the business layer.

I have the URLyBird assignment, and to aid on a date filter, I published a method in GUI that allows controller to check whether the date filter is on.

My question is: if other filters are added in the view, I must change the controller in order to access it. Does this counts in favor of extensibility?

I used strategy pattern to make the searching in Business more flexible (while maintaining Data implementation strict to DBMain, no extension in there). Would this be enough/too much?

Thanks in advance
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In general, if you have to change something to extend that something then that is reasonable so that changes do not back-propogate to the original design. It is what you change, how you change it and if we are talking about a design that was built to accomodate change as opposed to being an afterthought by the marketing committee two days after release.

We could, in general, design a program thus:

But what are these to be used for? Without some knowledge of an application's field of use and how that area works, just build a bare-bones skeleton and expect it to be sub-classed later.

If you have any are in which you have actually worked, write a Trivial class and program for that area of work - write it so that it can be extended.
[ June 02, 2008: Message edited by: Nicholas Jordan ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic