LlbGenPro and MVC

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 11-Jul-2005 11:43:37   

hiya, I have downloaded the Northwind C# adapter project. ( I understand that it is a good demo to get up and running)

I want to convert it to a more MVC. I "dabbled" several times in UIP and might go back to that architecture for: 1) controller functionality 2) wizard-functionality

eg, in the Customermanager.cs form, there is a customerOnfo section at the top of the winform.I have put all this UI into a userCtrl...."ucCustomerInfo"

Now, there is a button on this form that launches a new form "CustomerSelector.cs" Obviously, the userCtrl should not be aware of this form, that Is why I am thinking of re-visiting the UIP...So that I can assign controllers to the winforms and userCtrls

Can anyone comment? I'm hoping that there's scope for a wee bit of MVC chat. sunglasses

many thanks,

yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 11-Jul-2005 20:29:40   

Converting it to MVC will require some work I think simple_smile , as the example is setup without any thought on MVC at all.

Frans Bouma | Lead developer LLBLGen Pro
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 11-Jul-2005 20:48:21   

thanks Frans, I understand that it will require a bit of work on my part.The way I see it is, if I am adopting a good DAL strategy, I might as well incorporate it into a good implementation of MVC :-) I was hoping that a few people would have already done this, and be willing to share a few words on the subject.Maybe discussing MVC here is a bit "off-topic"? If so, no problem..I appreciate that the main motivation of these forums should be the discussion of the product...

cheers, yogi

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 12-Jul-2005 11:52:05   

MVC is not a pattern you'd see a lot in .NET code I think, MS doesn't preach it, so almost no-one will use it (well, they probably do a bit, but don't realize it wink ).

MVC is nice, though in some situations it creates a lot of overhead for no particular reason other than 'it looks nice on paper'. For example, if you use databinding, MVC is only in your way, most of the time, as you have to write a bindable controller, or fiddle with the MVC specs in such a way that you can declare the code-behind of a form/winform as teh controller, the grid as the viewer and the data as the model simple_smile

Frans Bouma | Lead developer LLBLGen Pro