File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Which is best IDE for JavaEE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Which is best IDE for JavaEE?" Watch "Which is best IDE for JavaEE?" New topic
Author

Which is best IDE for JavaEE?

Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

I am now at 53 chapter of javaee6 tutorial from oracle site. It is the last chapter. I am inspired by incredible case studies!
Tutorial recommends to use NetBeans and I use it so far.
I don't like about NetBeans IDE that I need to deploy my application each time I made some changes to code when I use Maven project!!!

NetBeans has Deploy on Save feature. But it is working only with Ant which I don't know so far. I want to work with Maven and NetBeans doesn't have even option "Deploy"
for maven web application.

Does anybody know good IDE for Maven together with JavaEE? Does it support "deploy on save" and drag-and-drop operation for JSF components?


True person is moral, false is right!
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31074
    
232

NetBeans is very tied to Ant. The other big IDEs are Eclipse and IntelliJ. I don't use hot deploy much in Eclipse though. I spend most of my time in unit tests when changing Java code and only do rapid reloads when changing the view.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Hello!

Thank you for response!

Why do I need unit tests? I saw title of word 'unit' in your response and I think it is not good.
I think that you need to write extra code to test something while at redeployment you try your real ready project.

Can Eclipse do hot redeployment in maven project? I tried a few times to organize maven example in Eclipse and I remember I had problems with jsf components. It doesn't
show code completion in .xhtml file even though I had jsf libraries included in namespace.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Why do I need unit tests?

Unit tests are crucial in verifying that your code works as you expect before you deploy it. It also helps as a regression test when you make changes or add features. I recently inherited a project at work and am spending most of this development cycle on getting a decent set of unit tests put together (as well as fixing up the integration tests). Too many of my colleagues think that ad-hoc testing of new features is sufficient; I don't accept new code into Subversion until comprehensive unit or integration tests are written. (For a description of the different tests types, see difference unit integration tests).

Can Eclipse do hot redeployment in maven project? I tried a few times to organize maven example in Eclipse and I remember I had problems with jsf components. It doesn't
show code completion in .xhtml file even though I had jsf libraries included in namespace.

Did you install the Eclipse bundle labelled "Eclipse IDE for Java EE Developers"? (The EE part is important.) Did you install the m2eclipse plugin? The problems you had with jsf probaby doesn't have anything to do with the Maven integration, more with Eclipse itself. And I'm with Jeanne - I rarely if ever deploy anything from Eclipse. I use Eclipse mainly as a glorified text editor. All my builds are done at the command line. And I deploy manually to a separate text VM where I have an environment set up that simulates a production environment, and I do my integration tests there. Of course, my unit tests run as part of the Maven build.

JBoss In Action
Volodymyr Levytskyi
Ranch Hand

Joined: Mar 29, 2012
Posts: 505
    
    1

Thank you for explanations!

I found on the Internet that unit test is test of individual method (only one method). After all your methods seperately are tested you can proceed to integration test.
Integration test is test of multiple methods that run together to perform one task( when one task cannot be implemented only in one method ).

Unfortunately I have really poor understanding how can I write my own integration test for web application.
Why can't I just make my web project, build, deploy it and try it out as it is on my web browser without testing? By the way I have been working for some time on Java Swing
and I did no tests and I saw real problems and corrected them. I didn't correct my testing mistakes but program which is ready to be built and used by everybody.
Anyway I should know those tests!

Please, if you can, give me great example of javaee web application which uses unit and integration tests!
If you have and it is not available on the Internet send it to my email - <code>volodiaL1989@mail.ru</code>

Thank you in advance!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Volodymyr Levytskyi wrote:
Why can't I just make my web project, build, deploy it and try it out as it is on my web browser without testing?


Because "Try it out" is Integration testing. However, it's not a very disciplined method of testing (for most of us) and it requires a person to actually test it. It's better if you have a formal test suite and (ideally) automated software to run it. There are a number of products that can assist here, ranging from ones that actually access JEE application internals up to automated "browser drivers" such as Selenium.

Actually, there's often more layers of testing than that. I have a major app where I not only unit-test single methods, but test entire subassemblies. My "unit test" framework drives these tests, but they're not technically "unit" tests.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: Which is best IDE for JavaEE?