How to improve productivity when developing Java EE based web applications

前端 未结 14 1888
悲哀的现实
悲哀的现实 2021-01-29 19:47

I\'d like to know how you address the seemingly low productivity of Java EE-based web application development compared to other technology stacks (Seaside, Ruby on Rails, etc).<

14条回答
  •  天命终不由人
    2021-01-29 20:24

    It's often cited that RoR and similar frameworks based on dynamic languages are more productive environments, but I am really interested to know if there are hard data to back this up. This wouldn't be easy, as one should be made certain that she is not comparing apples with oranges. Things like type of project (web 2.0, enterprise application) and team size should be taken into consideration. However, for small projects it is more than evident that such frameworks are indeed far more productive than Java EE. So this is a short list of arguments used to support this and what you can do for them in the Java world.

    Ruby is a more intuitive and concise language. You can do the same thing with much less code.

    I don't think you can have the same thing in Java, unless of course you use a dynamic language that runs in the JVM (JRuby, Scala, Groovy). Otherwise, your IDE can help. In Jave an IDE is an essential tool and it will pay you back if you learn to use it well (code generation, snippets, refactoring). In fact there are many things you can do with a Java IDE that are simply impossible to do with a Ruby or Python IDE. Plus you have the benefits of a static typed language. It may take more time to type, but it helps you avoid common mistakes.

    Ruby is much more fun to use. Makes the developer happier and more productive.

    Same as above. Highly subjective argument in my opinion though.

    Convention over configuration makes things faster

    A dependency injection framework like Spring or Guice can help

    Scaffolding, MVC already there for you.

    Again Java MVC frameworks can help

    Databases made easy. Load database items as objects. Can change the database on the fly.

    Hibernate, iBatis or another ORM framework can help. With Hibernate Tools you can achieve similar functionality with what you have in RoR with yml files

    Load new modules instantly

    Maven or Ant Ivy can help

    Easy deployment for testing

    Your IDE or Jetty can help. In fact debugging is easier with Java

    Testing integrated with the framework. Use of mock objects facilitate testing

    A dependency injection framework can help with mock objects. JUnit was a pioneer of unit frameworks. I don't think that Java is less easy to test.

提交回复
热议问题