如何设计和构建 Java/Java EE Web 应用程序?

问题描述:

我是 Java 开发人员,在 Struts、Spring 和 Hibernate 方面拥有近 5 年的经验.

I am java developer with almost 5 years of experience on Struts, Spring and Hibernate.

我们将在几天内推出一个新项目.我们有完整的需求,我们将使用 Spring MVC、Spring 和 Hibernate 来完成这个项目.

We have a new project coming up in few days. We have the complete requirements with us and we will be doing this project using Spring MVC, Spring and the Hibernate.

我被要求设计和构建整个 Web 应用程序.设计和创建建筑师是我职业生涯中至今还没有做过的事情.我不知道我该怎么做,从哪里开始,使用什么工具等等.我什至不知道设计和建筑的 A、B、C.

I have been asked to design and architect the entire web application. Designing and creating an Architect is something which I have not done till now in my career. And I don't know how do I go about this and where to start, what tools to use and so on. I don't know even the A,B,C's of design and architecture.

你可能想知道为什么我什至被要求做这件事.问题是我有机会这样做,在每个阶段我都会受到监控,我会让我的前辈审查设计.

You may be wondering why I was even I asked to do this at first place. The thing is I was given an opportunity to do this and at every stage I will be monitored and I will have my seniors reviewing the design.

欢迎提出任何建议、想法和开始和继续的步骤.

So any suggestion, ideas and steps to start and go ahead are welcome.

我可以根据自己的经验加上 2 美分(虽然它更多的是开发最佳实践的汇编,但您可能会发现将它们牢记在心是有用的,同时设计您的应用程序):

I can add my 2 cents from my own experiences (although its more of a compilation of development best practises, you might find it useful to keep them in mind while designing your application):

  • 没有一刀切的设计
  • 尽量让应用程序保持轻量级.
  • 使用Maven/Gradle管理依赖
    • 不要过度依赖 IDE.确保您的项目在没有 IDE 的情况下构建(如果您使用的是 maven/gradle,它将:) 尝试使用 IDEA、Netbeans 和 Eclipse 打开您的项目.
    • 然后决定是否需要缓存.
    • 您是否会使用应用服务器集群.
    • Tomcat/Jetty 在大多数情况下绝对没问题