开发者

Web Application Organization/Structure?

I've used MVC before and really like the way it is organized but at times I have to go back to working on ASP.net Webform applications and really wonder what the best way to organize the code is.

Doe开发者_Go百科s anyone know of resources that deal with just that? I am pretty familiar with C# but would like to gain further insight.

An example would be a news article portion of a website. You'd have a web form to display the data to users and then one for administrators to post the articles. Do you simply do everything in the code behind or do you farm it out to another controller-like class you've created?


Break the logical components into separate modules, which could mean separate namespaces; so you might end up with separate assemblies as well.

You cannot code everything into the code-behind; especially if you are doing a large project. All you need to do is to decide on the data exchange contract between modules, or layers. You should clearly specify the module1 guy that you will need a method Foo(param1, param2, param2):bool, and you expect it to translate news into another language.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜