启动 Java 项目 - IDE、框架等 -
我需要支持以加快开发进程。我收到一个开始使用java技术开发网站的请求。我通常使用 C# - ADO for Entities - ASP.NET MVC - MSSQL 服务器 - Visual Studio 进行开发。其中最好的选择是: - C# 智能感知。 - ORM。 - 完善的用户、角色安全管理。 - 将关注点分离到 MVC 中。
我想知道是否有任何可以帮助我根据这些前提确定最佳的 Java MVC 框架 - DB - IDE,开始一个项目: - 用户、角色的集成安全性 - MVC
为了阐明更多内容,复制相同的功能,我每次使用 C# ASP.NET MVC 2 项目启动网站时都可以拥有相同的功能。示例 http://nerddinnerbook.s3.amazonaws.com/Images/image020.png
I need support in order to speed up development process. I received a request to start developing a website with java technology. I usually develop in C# - ADO for Entities - ASP.NET MVC - MSSQL server - Visual Studio. Best of these choices were:
- C# Intellisense.
- ORM.
- Complete Security Management of Users, Roles.
- Separation of Concerns into MVC.
I was wondering if any can help me to determine best Java MVC Framework - DB - IDE based on these premises, Start a project with:
- Integrated security for users, roles
- MVC
To shed more light, to replicate same functionalities I can have each time I start a website using C# ASP.NET MVC 2 project. example http://nerddinnerbook.s3.amazonaws.com/Images/image020.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
首先,我们来讨论 IDE、ORM、安全性和 DB:在我看来,最好的 Java IDE 是 IntelliJ IDEA。它来自为 Visual Studio 开发 Resharper 的同一个人。它拥有所有 Java IDE 中最强大的编辑器,并且内置对许多流行 Java 框架的支持。
ORM:Java 中最强大的 ORM 库是 Hibernate。 Hibernate 本身是 Java Persistence API (JPA) 标准的实现。 EclipseLink 是 JPA 的另一种实现,但在我看来 Hibernate 是更好的选择。
安全性:Spring Security 可能是 Java 世界中最强大的安全(身份验证和授权)框架。
DB:如果您对 SQL Server 感到满意,那么就继续使用它。但是不要使用 Microsoft 的 JDBC 驱动程序。而是使用 DataDirect 中的驱动程序: http://web.datadirect.com/products/jdbc /index.html。如果您不想使用 SQL Server,MySQL 是一个很好的 FOSS 选择,Oracle、DB2 等也是其他选择。
对于Web框架,有以下几种选择:
选项1:如果您想要RAD风格的框架,请选择Grails。 Grails 与 Ruby on Rails 类似,但使用 JVM 和一种名为 Groovy 的类似 Java 的动态语言。 Grails 的 ORM API 称为 GORM,它构建在 Hibernate 之上,但更易于使用。 Grails 还使用 Spring Security 来管理安全性。
选项 2:如果您想要企业级框架,请选择 JBoss Seam + JavaServer Faces。 JSF 是一个基于组件的 MVC 框架,并且有很多优秀的 JSF 库可供使用:RichFaces、OpenFaces 等。Seam 将 JSF 与 EJB 集成在一起,它们共同构成了一个优秀的企业框架。然而,它有一个陡峭的学习曲线。
选项3:使用Spring + SpringMVC + JPA。
选项 4:使用 Struts 2 。
最后备注:如果您正在寻找易于学习的 MVC + ORM 框架,请使用 Struts 2 + JPA。如果您正在寻找 RAD 且易于使用的 MVC + ORM 框架,请使用 Grails。如果您正在寻找一个强大的企业级(但不易学习)框架,请使用 JBoss Seam。
First, let's discuss IDE, ORM, and security, and DB: In my opinion, the best Java IDE is IntelliJ IDEA. It's from the same folks who have developed Resharper for Visual Studio. It has the most powerful editor of all Java IDEs and has built-in support for many popular Java frameworks.
ORM: The most powerful ORM library in Java is Hibernate. Hibernate itself is an implementation of Java Persistence API (JPA) standard. EclipseLink is another implementation of JPA, but Hibernate is a better option IMO.
Security: Spring Security is probably the most powerful security (authentication and authorization) framework available in the Java world.
DB: If you are comfortable with SQL Server, then keep on using that. However don't use Microsoft's JDBC drivers. Instead use a driver from DataDirect: http://web.datadirect.com/products/jdbc/index.html. If you don't want to use SQL Server, MySQL is a great FOSS choice and Oracle, DB2, etc. are other options.
For the Web framework, there are several options:
Option 1: If you want a RAD style framework, choose Grails. Grails is similar to Ruby on Rails but uses JVM and a Java-like but dynamic language named Groovy. Grails' ORM API is called GORM, which is built on top of Hibernate, but is much easier to use. Grails also uses Spring Security for managing security.
Option 2: If you want an enterprise-grade framework, choose JBoss Seam + JavaServer Faces. JSF is a component-based MVC framework, and there are plenty of great JSF libraries available for use: RichFaces, OpenFaces, etc. Seam integrates JSF with EJB and together they make a great enterprise framework. However it has a steep learning curve.
Option 3: Use Spring + SpringMVC + JPA.
Option 4: Use Struts 2 .
Final remarks: If you are looking for an easy-to-learn MVC + ORM framework, use Struts 2 + JPA. If you are looking for a RAD and easy-to-use MVC + ORM framework, use Grails. If you are looking for a robust and enterprise-grade (but not-easy-to-learn) framework, use JBoss Seam.
不仅是 Spring MVC,整个 Spring 生态系统都会让您以最少的意外启动并运行。您还可以下载 Spring Tool Suite(专为 Spring 定制的预配置 eclipse 版本) 来获取集成开发环境,了解所有 Spring 内容。
但是 Spring - Spring MVC - Hibernate - Spring Security 和 STS 似乎可以满足您的需求,并且将为完成该项目提供良好的基础,而不会带来太多不好的意外。这使您能够专注于客户并跳转到 Java。
之后,您可能会考虑 Java 领域的不同选择,因为还有许多其他框架各有优点。但从短期来看,最好限制移动部件的数量
Not only Spring MVC but the whole Spring eco system will get you up and running with the least surprises. You can also download the Spring Tool Suite (a preconfigured eclipse version tailored for Spring) to get an integrated development environmanet which knows about all spring stuff.
But Spring - Spring MVC - Hibernate - Spring Security and STS seems to cover your needs and will provide a sound basis to do the project without too many bad surprises. This leaves you to focus on the customer and the jump to Java.
Afterward you might consider different options in the Java space, as there are plenty of other frameworks available with their strong points. But in the short run it is better to limit the number of moving parts
标准的、最常见的框架/orm 设置是 spring/hibernate。不幸的是,这些年来,这两种工具都发展到了荒谬的极端,因此它们的大小似乎令人望而生畏,但对每种工具进行简单的设置比查看各自网站上的所有选项要容易得多。
最好的建议是按照步骤进行基本的 spring/hibernate 设置,然后对其进行扩展。有一次,我有一个像这样的原型项目,我用它来生成一个“启动器集”来引导项目。
顺便说一句,我还建议一个简单的 ant 构建脚本。有些人可能会建议使用 Maven,但它非常庞大且非常(我认为过于)复杂,并且您将有足够的新工具来满足您的需求,以避免必须学习另一个大型命令集。
The standard, most common framework/orm setup is spring/hibernate. Both of these tools have unfortunately been grown to ridiculous extremes over the years, so they may seem daunting in size, but a simple setup with each is much easier than it may seem from looking at all of the options on their respective sites.
Best suggestion would be to follow a step-by-step to get a basic spring/hibernate setup going and just expand off of that. At one point I had a prototype project like this I'd use to generate a "starter-set" to bootstrap projects.
BTW, I'd also suggest a simple ant build script. Some people may suggest maven, but it's enormous and very (imo overly) complex, and you're going to have enough new tools to wrap your head around to want to avoid having to learn another large command set.
欢迎来到 Java 世界。 Java 领域最好的事情(在某些情况下也是最糟糕的事情)是您可以根据您的需求创建自己的堆栈。您不必像 .NET 域中常见的情况那样受限于单个供应商。
既然您似乎处于新手状态,您可以:
采用 Sun/Oracle(JSF/EJB3 + NetBeans/JDeveloper + Glassfish/Weblogic + MySQL/Oracle)或 IBM 等大型商业供应商的 Web 开发堆栈
采用 JBoss 等小型开源供应商的 Web 开发堆栈, SpringSource。
看看 JBoss Seam 和 SpringSource Grails 和 Roo (后两者基于经常提到的 Spring/Hibernate 框架)
根据上述内容和您的要求混合搭配您自己的堆栈。尽管这需要对可用的各种技术、框架和工具有深入的了解。
如您所见,您有很多选择。现在,既然您对以生产力为中心的堆栈感兴趣 - 我怀疑是开源堆栈 - 并且您没有任何遗产,我推荐 Grails或Roo。其中 Roo 可能是最容易使用的一种,因为您不必学习 Groovy。如果您不喜欢生成工具,我建议您坚持使用 Spring 堆栈并采用 Spring/JPA/等。
Welcome to the Java world. The best thing (and in some cases also the worst thing) about the Java domain is that you can create your own stack based on your requirements. You're not necessarily bound to a single vendor as is commonly the case in the .NET domain.
Since it seems you're in a greenfield situation you can:
Adopt the webdevelopment stack of a large commercial vendor like Sun/Oracle (JSF/EJB3 + NetBeans/JDeveloper + Glassfish/Weblogic + MySQL/Oracle) or IBM
Adopt the webdevelopment stack of a smaller open source vendor like JBoss, SpringSource.
Take a look at JBoss Seam and SpringSource Grails and Roo (the latter two are based on the frequently mentioned Spring/Hibernate frameworks)
Mix and match your own stack based on the above and your requirements. Although this requires deep knowledge of the various technologies, frameworks, tools available.
You have lots of options as you can see. Now since your interested in a productivity focused stack - and I suspect an opensource one - and you have no legacy I recommend either Grails or Roo. In which Roo is probably the most accessible one since you don't have to learn Groovy. If you don't like the generation tooling I advice you the stick to the Spring stack and just adopt Spring/JPA/etc.
至于 IDE,恕我直言,唯一值得信赖的 Java IDE 是 Eclipse 和 Netbeans,特别是因为它们都是免费的。使用 Eclipse 以获得可扩展性和易用性,如果需要快速开发 GUI,请使用 Netbeans。
As for IDE, the only Java IDEs worth their salt IMHO are Eclipse and Netbeans, especially since both of them are free. Use Eclipse for extensibility and ease-of-use, use Netbeans if you need to rapidly develop a GUI.