在 ASP.NET MVC 中启动应用程序的好方法
当您开始在 ASP.NET MVC 中创建应用程序或站点时,在输入第一行代码之前您会做什么?
我个人喜欢创建一个新的 ASP.NET MVC Web 应用程序项目,然后清理控制器/视图,直到获得本质上是空白的项目(即它可以运行但不提供功能)。然后我开始处理我的模型并根据需要添加控制器/视图。
我还阅读了有关入门套件和示例应用程序的信息,但我尚未开始积极使用其中任何一个。然而,在我的阅读中,我看到作者建议从现有模板开始并在其基础上构建可能会更好。
我正在尝试确定是否有更好的方法来启动项目,以便节省时间和/或最终交付的质量更高。
When you start creating an application or site in ASP.NET MVC, what do you do before typing in that first line of code?
I'm personally fond of creating a new ASP.NET MVC Web Application project and then cleaning out controllers/views until I have what is essentially a blank project (i.e. it runs but doesn't offer functionality). Then I start working on my model and adding controllers/views as needed.
I've also read about starter kits and sample applications but I have not yet started actively working with any of them. However, in my reading I have seen authors suggest that it might be good to start off with an existing template and build on it.
I'm trying to determine if there are better ways of starting off a project such that time is saved and/or the resulting deliverable is of higher quality.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我做的其他事情(我还清除了控制器/视图等)
将 IOC 放置到位。
将 ELMAH 放入项目中。
然后我喝了杯咖啡,写了我的第一个测试。
善良,
丹
PS:在某个时候,我将抽出时间为此创建一个模板,这样我就不会每次都重做。一旦我决定了我最喜欢的国际奥委会。 :-)
The other things I do (I also clear out the controller/views etc)
Put an IOC in place.
Put ELMAH into the project.
Then I grab a coffee and write my first test.
Kindness,
Dan
PS: At some point I shall get around to creating a template for this so I don't redo it everytime. As soon as I decide upon my favourite IOC. :-)
我通常也会清除 Content 文件夹,并放置一个漂亮的 CSS 重置文件和/或 CSS 框架,例如 960格
I usually clear out the Content folder as well and put in place a nice CSS reset file and/or a CSS framework like the 960 grid
在开始任何类型的项目之前,您必须知道自己想做什么。因此,拿一张纸并开始在此处书写:
Before starting any type of project you must know what you want to do. So take a sheet of paper and start writing on here: