English 中文(简体)
哪些是、哪些不属于伙伴关系。 NET MVC 2 地区夹?
原标题:What does and does not belong in an ASP.NET MVC 2 Area folder?

视力演化工具将在任何新的伙伴关系中产生“模型”、“声音”和“电动器”。 NET MVC 2 Area.

“Areas>

怎样才能进入这一方面? 您(例如)是否将习惯模型Binder列入<代码> 地区/地区 只有在<代码>上注明的,方可在<0>上注明。 MyReallyGreatArea?

什么是最佳做法?

最佳回答

是的,当我在<代码>MyReallyGreatAre上的习惯时,正如你所建议的那样,我只把它放在该领域的多个方面,例如Areas/MyReally 大Area/Binder。 当<代码>ModelBinder后来被一个不同的区域使用时,则将其移至一个名为<代码>的夹中。 地区/共有/合并或类似。 这样,我就把班子放在接近其使用的地方。 为什么要与客户签订<代码>ModelBinder? 地区没有使用?

所有其他情况也是如此。 如果使用<代码>MyReallyGreatArea,则该编码将设在该地。 如果与另一个区域分享,则I将其编为<代码>。 地区/共享(并可能在其中适当标明子夹)。

虽然如果你独自开展这一项目,或项目规模仍然很小,这很可能只是一个次要问题,但随着项目的发展,或者作为一个较大的团队在项目上开展工作,精心思考的结构就会消失。 在某些情况下,不同的小组甚至在不同的领域开展工作。

问题回答

然而,我个人希望尽可能地把这些领域划为精干,但这取决于你们的项目规模。 如果你有一个大型的网络项目,那么你很可能想把自己的模型/组合器和其他简单物体保留在适当的图书馆,以适应你的商业逻辑,或者说,如果你只拥有几个领域,而且不需要其他几门课,那么我就喜欢把你的地区特定约束器放在这个领域。

我不喜欢在网络项目周围布设的通俗班,而且这些班子应当存放在适当的图书馆,但你的代码可能不足以证明这一点。





相关问题
ASP.Net MVC - Handle Multiple Checkboxes

Ok, I have a role based permission system in place and would like admin s to be able to edit the permissions for each role. To do this I need to load lots of checkboxes, however I m struggling with ...

Entity Framework error when submitting empty fields

VS 2010 Beta 2, .NET 4. In my ASP.NET MVC 2 application, when I submit a form to an action method that accepts an object created by the entity framework, I get the following error: Exception Details:...

ASP.Net MVC Architecture - Location of ViewModels

We have a decent sized MVC project running well at the moment, i ve started to look at some re-factoring and I have a question. At the moment the Data Layer and Service Layer is stored in a seperate ...

ASP.Net MVC Go To Declaration On view

Is there anyway when in an MVC view to right click a function call and get to the declaration? Like you can do in the code behind/controllers

ASP.NET MVC 2 Beta - Default Model Binder

I m experiencing some different behavior after switching from ASP.NET MVC 1.0 to ASP.NET MVC 2 Beta. I checked the breaking changes but it s not clear where the issue lies. The problem has to do with ...

Asp.net MVC Dynamic Menu System

In our current Asp.net MVC application we have 2 menu systems one accross the top and one on the left hand side. Now we have a partial view that renders the menu, however is the only way for this too ...

热门标签