为 MVC2 设置开发团队的开发环境
因此,在工作中,我们可能会像你们大多数人一样设置环境。我们有一个集中的代码库(通过 SVN 控制),它在同一服务器上的数据库上运行(集成)。我们将此代码库下载下来并将数据库复制到本地以在我们的机器上使用。
这就是我需要弄清楚如何设置。我想在 SQL Server 2008 本地设置一个数据库,将其连接到我的 MVC 2 应用程序,并在 IIS 中本地设置它,这样我就可以测试它,而无需每次都进入调试器并在 VS2010 的开发服务器中运行。
到目前为止,我还没有真正找到任何文章或任何告诉如何设置它的文章,尽管我觉得这是最常见的事情(因为大多数软件商店都是这样设置的)。
任何来源或方向都会很棒。
谢谢!
我运行的是 Windows 7 Ultimate、Visual Studio 2010、SQL Server 2008 和 IIS(以 Windows 7 附带的版本为准)。
So at work we have our environment setup as most of you probably do as well. We have a centralized code base (controlled through SVN), which runs off a Database on the same server (Integration). We bring this code base down and copy the database down locally to work on our machines with.
This is what I need to figure out how to set up. I want to setup a Database in SQL Server 2008 locally, have it connected to my MVC 2 app, and also have it locally setup in IIS so I can test it without going into the debugger and running in the Development Server of VS2010 everytime.
So far searching I haven't really found any articles or anything that tell how to set this up, even though I feel like it is the most common thing to do (as most software shops are setup this way).
Any sources or directions would be awesome.
Thanks!
I am running Windows 7 Ultimate, Visual Studio 2010, SQL Server 2008, and IIS (whichever version comes with Windows 7).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
答案是“这取决于”。尽管大多数软件商店都是这样设置的,但设置中还是有一些调整。尤其是当涉及到数据库时。
我发现了 2 个案例:
在我工作的大多数情况下,我发现他们有一个 DEV 数据库服务器,开发人员可以访问整个团队工作的特定数据库。他们确实在开发计算机上安装了 SQL Management Studio,用于连接到服务器/数据库。
一些商店在每台开发人员机器上都安装了 SQLExpress,他们在其中维护数据库的本地副本(与您的相同)...这会带来同步多个数据库副本的额外麻烦。我们过去将它与 Visual Studion 数据库项目一起使用,在许多情况下,它就像魅力一样,我们用来获取“增量”更新并应用于服务器数据库。显然 - 这些更新是由了解 VS DB PRO 功能的人完成的,并给予了一些专门的时间来执行同步。
我仍然更喜欢“受控环境”,而不是#2,其中模式更改仅由少数人控制...
只需我的 2 美分...
The answer is "it depends". Although most of the software shops are setup like this there are tweaks in the setup. Especially when it comes to Database.
I found 2 cases:
In most cases where I worked, I found they have a DEV database server where the developers are given access on a perticular database which the entire team works on. They do install SQL Management Studio on the dev machines for connecting to the server/database.
Some shops have SQLExpress setup on each developer machine where they maintain a local copy of the database (same as yours)... This comes with additional headache of syncing copies of multiple databases. We used it with Visual Studion Database Projects in past and it worked like charm in many cases where we used to get "delta" updates and apply to server database. Obviously - these updates were done by someone who knew the VS DB PRO features and given some dedicated hours to perfrom the sync.
I still prefer a "controlled environment" as opposed to #2 where the schema changes are controlled by only a few...
Just my 2 cents...
这很大程度上取决于应用程序和本地详细信息。但我们一直在做同样的事情。首先也是最重要的,您需要开发一些关于环境的标准化和/或约定 - 如果每个人都同意他们应该在 .\SQLEXPRESS 上运行本地测试数据库,并且如果他们可以就本地的内容达成一致,那么事情会变得更容易。网址应该是。
也许帐篷中最高的杆子是自动化数据库设置——那里存在一些真正的挑战,特别是如果您的应用程序拥有大量需要可用的数据。我在这里还没有找到完美的解决方案,通常我们使用名为 sseutil 的实用程序的组合来创建数据库实例和 数据库迁移框架用于进行架构更改。像 RoundhouseE 这样的东西在这里看起来很引人注目。
Lots of this really depends on the app and local details. But we do the same sorts of things all the time. First and foremost, you'll want your develop some standardization and/or conventions about environment -- it makes life alot easier if everyone agrees that they should be running the local test DB at .\SQLEXPRESS and if they can agree on what the local urls should be.
Perhaps the tallest pole in the tent is automating the database setup -- there are some real challenges there, especially if your app has a significant amount of data it needs to be usable. I haven't found a perfect solution here, typically we use a combination of a utility called sseutil to create database instances and a database migration framework to make schema changes. Something like RoundhousE looks compelling here.