我有一个客户,他已经在生产中拥有一些应用程序,因此已经就下一个项目的生产环境做出了一些决定:
- Sun iPlanet 6.1 SP7 (w/ apache)
- JDK 1.6
- Oracle Weblogic 10 MP3
- Oracle 10g
- 1024 -bit SSL
他们还有一些针对 Web 应用程序的企业标准:
- Tomcat
- Struts
- 与 Safari、Firefox、IE6、IE7 的兼容性
我还被告知该应用程序可能不需要完整的 Java EE 5 环境(可能只需要一个 Web 容器) ,但需要通过客户端 EJB 等与托管在单独的 weblogic 实例上的实例进行通信,并对其他企业服务执行各种 Web 服务调用。
我的任务是就这个新团队的开发和测试环境做出一些决定(规模很小,可能包括我在内的 2 到 3 个人,但可能会在未来几个月内扩大)。我想创建一个这样的环境,人们可以使用他们喜欢的 IDE,并在本地主机上获得良好的开发体验,但仍然可以顺利地在测试环境中进行部署,然后再部署到生产环境。我的想法是,在本地工作站上,http 没问题,但集成测试服务器应该看起来与生产服务器完全一样,并且所有流量都应该是 https,以确保我们能够准确描述产品的情况。
知道开发人员的本地工作站会有很大差异,并且可能在其本地工作站上运行 Mac OS X 10.6 (Snow Leopard) 或 Windows 7,但还需要指定一个通用的测试服务器:什么技术堆栈将为我们提供从本地开发、测试到生产的顺利路径?
编辑:抱歉,当我说技术堆栈时,我的意思是 Ant + JBoss + Tomcat + Oracle XE 与 Maven + Geronimo + Derby。基本上是我们需要在每台开发机器和测试服务器上安装的具体规范实现的列表,它为我们提供了灵活的开发环境,并平滑过渡到测试和生产环境。
EDIT2:可能值得一提的是,这个应用程序,如果它需要保留任何信息(我假设将是这种情况),无论它是什么肯定不会很复杂。它很可能类似于基本的产品数据库。
I've got a client who already has some applications in production and therefore has already made some decisions about what their production environment will be for this next project:
- Sun iPlanet 6.1 SP7 (w/ apache)
- JDK 1.6
- Oracle Weblogic 10 MP3
- Oracle 10g
- 1024-bit SSL
They also have some corporate standards for web apps:
- Tomcat
- Struts
- Compatibility with Safari, Firefox, IE6, IE7
I'm also told that this app will likely not need a full on Java EE 5 environment (probably only a web container), but will need to communicate with one hosted on a separate weblogic instance via client EJB's etc as well as perform various web service calls to other corporate services.
I've been given the task to make some decisions about what our development and test environments will look like for this new team (small, probably 2 or 3 people including me, but may grow over the coming months). I want to create one where people can use the IDE they love and have a good development experience on localhost, but still have a smooth path to deployment in a test environment, and then again to the production environment. My thinking is that on local workstations http is fine but the integration test server should look exactly like the production server, and all traffic should be https to make sure we are getting an accurate portrayal of what prod will be.
Knowing that devs local workstations will be highly varied and may be running Mac OS X 10.6 (Snow Leopard) or Windows 7 on their local workstations, but a common test server would also need to be spec'd out: what technology stack would give us a nice smooth path from local development, through test, and into production?
EDIT: Sorry, when I say technology stack I mean for example Ant + JBoss + Tomcat + Oracle XE vs. Maven + Geronimo + Derby. Basically a list of the concrete specification implementations that we will need to install on each development machine and the test server that gives us a flexible dev environment, and a smooth transition to test and production environments.
EDIT2: It's probably worth mentioning that this app, if it needs to persist any information at all (which I am assuming will be the case), whatever it is will definitely not be complicated. In all likelihood it will be something akin to a rudimentary product database.
发布评论
评论(3)
我会选择:
如果您打算使用不同的 IDE,那么 Maven 可能是一个好主意,因为它允许从 pom 配置每个 IDE .xml(在 IntelliJ/NetBeans 中效果很好)。但我能给你的最好建议就是这个。
快乐黑客
I would go for:
If you are going to use different IDEs then Maven might be a good idea, since it allows each IDE to be configured from the pom.xml (works great in IntelliJ/NetBeans). But the best advice I can give you is this.
Happy hacking
当你说“技术堆栈”时,真的不清楚你到底在问什么,你是指服务器、库、构建工具吗?不管怎样,这里有一些轻率的建议:
It's really not clear what exactly you're asking about when you say "technology stack", do you mean servers, libraries, build tools? Anyway, here are some flippant recommendations:
测试环境应该完全复制生产环境。还要在测试环境上进行性能测试。如果硬件是一个问题并且需要限制集群中服务器的数量,那么在测试上创建较少数量的服务器,但复制与产品上相同的环境,即 iplanet (apache ) + weblogic + oracle db 等等....
就本地环境而言,您可以使用Tomcat(因为您只需要Web容器),对于ejb客户端,您可以捆绑jar并进行远程调用(如果您正在对某些远程应用程序进行远程调用)。如果您通过本地 ejb 进行本地调用,那么您将必须在本地盒子上使用 weblogic 进行开发。
尝试使用相同的 IDE(尽管这主要是开发人员选择的问题)。就操作系统而言,这并不重要,因为如果您使用兼容的 IDE,您将仅从中构建代码。
还要确保 IDE 与 tomcat(如果使用的话)或 weblogic 紧密结合,以便在调试模式下运行代码。
一件非常重要的事情,首先决定代码结构,然后在版本控制中签入,以便用户从任何 ide 都以相同的结构签入/签出。因此,所有开发人员共享相同的结构。
在每个版本中对 cvs 或版本控制中的代码进行分支,然后从 head 检出。同样非常重要的是使用单个构建文件并维护安装文档以在本地机器上构建环境。
另外,关于使用的框架,请选择您在编码和维护方面最熟悉的框架。这样您将减少代码中的错误数量。现在大多数人都使用 Spring/Hibernate 组合,但这取决于它是否适合您的项目。
希望这有帮助。
Test environment should exactly replicate production. Also do performance testing on the Test Environment.If hardware is a concern and number of servers in the cluster need to be limited then create less number of servers on Test but do replicate the same env as you have on prod i.e to say iplanet (apache) + weblogic + oracle db so on....
As far as local environment is concerned you can use Tomcat (as you need only the web container), and for the ejb client you can bundle the jar and make remote calls (if you are making remote calls to some remote app).If you are making local calls via local ejbs then you will have to use weblogic in development on local box.
Try to use the same IDE(though its mostly a matter of choice of developers).As far as OS is concerned it doesnot matter since if you are using a compatible IDE you will be building the code from that only.
Also make sure that IDE is tightly couple with either tomcat (if you use that) or weblogic so as to run the code in debug mode.
One very important thing, first decide on a code structure and then checkin that in version control, so that from any ide the user checks in / checks out in the same structure.So that same structure is shared across all developers.
Branch the code in cvs or version control in every release and then checkout from head.Also very important use a single build file and maintain a setup document to build the environment on local box.
Also regarding Framework to use choose the one that you are most comfortable with in coding and maintenance.That way you will reduce the number of bugs in the code.Mostly nowadays people using Spring/Hibernate combination but it depends whether it suits your project.
Hope this helps.