简体   繁体   English

Web开发设置

[英]Web-development setup

I am in the process of setting up a complete web-development environment. 我正在建立一个完整的Web开发环境。 For now, there are two developers, one dedicated to backend programming (C#, .NET) and one dedicated to frontend development (HTML, CSS, XSLT). 目前,有两个开发人员,一个致力于后端编程(C#,.NET),另一个致力于前端开发(HTML,CSS,XSLT)。

Each have an installation of MS Visual Studio 2008 and shared source via Visual Source Safe 2005. They both checkout files and develop locally. 每个都通过Visual Source Safe 2005安装了MS Visual Studio 2008和共享源。它们都签出文件并在本地开发。

I have setup a test-server where it is the plan that the merged, and tested, code should finally end up, and that server should allways be the "correct" version. 我已经设置了一个测试服务器,它是合并的,经过测试的代码应该最终结束的计划,并且该服务器应该总是“正确”的版本。

Each of the 3 installations share the same databases. 3个安装中的每个安装共享相同的数据库。

I think this setup should scale a bit, as I'm preparing for more developers, but we have quite a lot of problems with file syncing and easy access for quick changes. 我认为这个设置应该扩展一点,因为我正在为更多的开发人员做准备,但是我们在文件同步和快速更改的轻松访问方面存在很多问题。 Often we need to change some layout and designs pretty quickly and end up copying files out to the testserver manually (I don't want any .NET/C# code-files on the webserver), and the site fails :-( 通常我们需要快速更改一些布局和设计,并最终手动将文件复制到测试服务器(我不希望网络服务器上有任何.NET / C#代码文件),并且网站失败:-(

We use a standard CMS to build all of our frontend work, and it really slows things down if this is included in the source-safe. 我们使用标准CMS来构建我们的所有前端工作,如果它包含在源安全中,它确实会减慢速度。

I would like all of our frontend work to be kept completely separated from our backend code so It's easy to make changes. 我希望我们所有的前端工作与我们的后端代码完全分开,因此很容易进行更改。

Eg. 例如。 we would like to make a few changes in the design and deploy it quickly to our production environment, without thinking about the .NET code. 我们希望对设计进行一些更改,并将其快速部署到我们的生产环境中,而无需考虑.NET代码。

Are there anyting I'm missing, or what is the best practice for setting up an web-development environment? 我有什么遗漏,或者建立网络开发环境的最佳做法是什么?

Looking forward for some help/experiance :-) 期待一些帮助/体验:-)

/Thomas /托马斯

You should probably look into a more-capable version control system. 您应该研究一个功能更强大的版本控制系统。 SVN has great tool support (including AnkhSVN and VisualSVN for VS2008 integration), and distributed version control systems like Mercurial, Git, or Bazaar will give you even more options and the price of much more basic tool support. SVN具有出色的工具支持(包括用于VS2008集成的AnkhSVNVisualSVN ),Mercurial,Git或Bazaar等分布式版本控制系统将为您提供更多选项和更基本工具支持的价格。

You may need easy branching, and managing the relevant resources using the version control system is made much easier if you can deploy them easily to production (ie run "svn up"). 您可能需要轻松分支,如果您可以轻松地将它们部署到生产环境(即运行“svn up”),则使用版本控制系统管理相关资源会变得更加容易。

Each of the 3 installations share the same databases. 3个安装中的每个安装共享相同的数据库。

This seems like a poor decision. 这似乎是一个糟糕的决定。 If dev1, dev2 and test are all using the same database, then how can dev1 experiment with changing the schema without interfering with dev2 and test (assuming the code for working with the experimental schema is not checked in yet). 如果dev1,dev2和test都使用相同的数据库,那么dev1如何在不干扰dev2和测试的情况下尝试更改模式(假设尚未检查用于处理实验模式的代码)。

Also, the DB becomes a single point of failure, so if somebody accidentally deletes/truncates a crucial table, then all work grinds to a halt. 此外,DB成为单点故障,因此如果有人意外删除/截断关键表,那么所有工作都会停止。

Ideally, each environment should have it's own DB. 理想情况下,每个环境都应该拥有自己的数据库。 I guess if you're using a non-free DB like Oracle, then you may not be able to afford to give each environment it's own server, but at least each environment should have it's own schema. 我想如果您使用像Oracle这样的非自由数据库,那么您可能无法承担为每个环境提供自己的服务器,但至少每个环境都应该拥有自己的架构。

I can not help you with information about how to handle CMS content, but I have setup or used a couple of buildservers. 我无法帮助您处理有关如何处理CMS内容的信息,但我已经设置或使用了几个构建服务器。

Having worked with Visual Source Safe in a lot of projects and Team Foundation Server in some, I stay away from it if I can. 在许多项目中使用Visual Source Safe和在某些项目中使用Team Foundation Server,如果可以的话,我会远离它。

Our recent buildserver consists of Nant scripts that check out the source from a Subversion-repository. 我们最近的构建服务器由Nant脚本组成,这些脚本可以从Subversion-repository中查看源代码。 The build itself is done by MSBuild. 构建本身由MSBuild完成。 The result of the build is then xcopied to stage and production. 然后将构建的结果复制到舞台和制作。

There should be an easy way to transfer database changes from development to stage and production. 应该有一种简单的方法将数据库更改从开发转移到阶段和生产。 We have a tool ( http://www.codeplex.com/ScriptDB ) that scripts the dev-Database. 我们有一个脚本dev-Database的工具( http://www.codeplex.com/ScriptDB )。 The result is checked into Subversion. 结果将检入Subversion。 Its easy to see what changed in the log of Subversion. 很容易看出Subversion的日志中发生了什么变化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM