开发者

Starting a Java project - IDE, Framework, etc. -

I need support in order to speed up develo开发者_StackOverflow社区pment 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


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.


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


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜