开发者

Using MVVM design pattern in .Net 3.0

I have been looking into MVVM design patterns with WPF for a project. I have so far looked at MVVM light, MVVM Foundation, and the WPF Model-View-ViewModel Toolkit. I have a requirement to keep it to .Net 3.0 and not 3.5. I was wondering what framew开发者_JS百科orks outside of the MVVM Foundation samples use the design pattern or something similiar without using Linq? I do appreciate the help. thanks.


It is indeed possible to use the MVVM pattern without the requirement of .NET 3.5 or later frameworks. Although you a limited to the kind of things you can do with regards to functionality in .NET 3.0 but you must understand the the MVVM pattern is completely language/implementation independent.

I first recommend that you study and understand the MVVM pattern and how it works thoroughly. By using pre-built MVVM toolkits does same you a lot of headache but you can literally build your own MVVM toolkit (I know I did).

Basically, you need to cover your bases in the Model-UI notification and messaging side of things (i.e INotifyPropertyChanged and Command) and the rest you can use in your code behind if it is limited by the .NET 3.0 framework.

Remember the MVVM pattern is still one way to do things (though some will argue that it is the only/correct way) the reality is we software developers must work to constraints and just have to make do with what we can.

Having said that, the requirement of keeping to .NET 3.0 seems a bit illogical to me. There is no reason why you cannot upgrade to 3.5 especially now that 4.0 is already out.

Happy coding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜