Appliweb

All dimensions of your web developments

Affichage des articles marqués idea

Following the first post about « using Netbeans for an IDEA user », I would like to add some more informations about maven support.

Skipping unit tests:

Each time I compile my maven project in Netbeans, it runs the unit tests, even for small changes. Fortunately, you can easily tell Netbeans to avoid unit test during compilation. Simply right-click on the project, then select Properties. You can check the « Skip tests » control like in the dialog above:

Importing a maven Web project:

I have successfully opened a Maven project that generates a .war file into Netbeans. It is recognized as a web project, you simply by sets the target application server, and then you can run and debug your web application.

It generates the .war file using Maven, and deploys it automatically to the application server.

The neat feature with Web projects:

It’s easy to use, and great for day-to-day web development: It’s tedious to wait for Maven to generate the war and deploys it each time you modify a .jsp or a .xhtml page. So Netbeans automatically deploy the webapp resources files when you save them. Great ! And IDEA does it too.

s you may know, I was using the trial version of IntelliJ IDEA to develop Appliweb.

Alas, the version expired, so I decided to switch to Netbeans 6.5.1. No I’m not using Eclipse, because I don’t like how it is organized.

I will try to highlight the differences I see between the 2 IDEs.I’ll try to stay neutral, so that you can choose which you prefer.

Today we talk about Maven support:

  • IDEA imports maven pom.xml files to recreate it’s own project, whereas netbeans uses directly the maven files. Netbeans compiles using maven, not IDEA. It imports correctly sub-projects, and sub-sub-projects.
  • Completion in pom.xml file seems to be the same. Maybe Idea completes a little more data.
  • Changes you made in pom.xml files are faster to import in Netbeans. Almost immediate.
  • Netbeans uses Maven when building or Running a Unit test. That’s a good and a bad thing.
  • Good thing: More often than not, you get the unit tests running in your IDE and not in Maven. With Netbeans, you’re sure that it works in maven, hence in the Integration servers.
  • Bad thing: In netbeans, each build runs all the unit tests by default (sloooow), and running a unit test class takes a long time because it is run with maven.

I’m really pleased for now by the overall behavior of Netbeans, kudos for the maven support.

GC.

Hi,

I found some other neat things while editing Spring files in my project using IDEA.

1- Searching for the Usage of a class shows  where it is used in Spring XML files:

Here you can see it has found that DbHelper is used in several spring xml files. Cool !

2- Completion works for .properties values

When you edit a Spring file, you can  set values by referencing a property defined in a .properties file.
For example, in the screenshot below, by using ${DbSchema.commun} as a value of an bean attribute, Spring can be instructed to load the masteri.properties file, and replace  ${DbSchema.commun} with the value defined there.

IDEA is so smart (well it’s development team is), that code completion will display the properties defined in the .properties files!

Another very handy feature….

GC

Hello,

In my work, I still spend much of my time doing development.

A lot of people now uses Eclipse but in all companies I work in, I asked them to buy me IDEA. Most of the time, they don’t want to buy it, mostly because they find stupid using any other thing than the free Eclipse.
It’s quite hard to persuade people about the many little things that are better in IDEA than in Eclipse.

Now, as release 8.0 is out, I will use it for 30 days (the free evaluation time) for Appliweb development. Each time I will see some great (or small) features I like, I’m going to tell you about it, I hope this will help you understand it’s usefullness.


I use maven for all my java projects, so I was pleasantly surprised to see that we can create directly a Maven project using IDEA, It will create it’s directories and project files  Even better, you can choose archetypes ! (archetypes are template projects for maven):


For the development of the GUI editor of Appliweb, I need to write HTML, CSS and javascript. IDEA is primary a Java source code editor, but I found nice little things for web editing.

Like the underlined link to a missing file. Nice to fix for typos.

The XHTML parser understand it’s a link to a file, and the file is missing from the project !


Even better, it can suggest to create the file:

Only using Alt+Enter keys, it will suggest and create the file for you !


Editing a CSS file, while adding a color to a CSS rule, I see that IDEA displays a little square at the left showing you what color it is:

Once again, a really small little thing  very pleasant to see….

The Appliweb project will involve lots of Javascript development.

I’m not really a fan of Javascript coding, because:

- I used to do some in 1997-1998, where it was impossible to write javascript compliant with I.E. and Netscape. Even between same versions of I.E. on different desktop you had a different behavior

- No debugger at that time, and very light ones years after.

I really code-as-you-think, so I really need a good debugger to see what’s going on.

I hope that now, years after my previous experiences, I will find some good ones. Here is a list I’ve found:

- FireBug: Waouw, seems to be a great tool, with html and css editor, maybe close to what I would like to do with Appliweb GUI editor. I will try that one first

- Venkman debugger:  I used it in 2005 to fix some hard to find javascript bug in a web application developped in Java Server Faces. It has worked great, but the tool was not pleasant to use.

- Yaldex: Seems only working in Windows, as my development computer is Linux…. It has a free edition though….

- Netbeans: Yep, netbeans, the java IDE. Last version has support for  javascript debugging. As a Java developper I know netbeans well, it’s free, and if the editor/ debugger is ok, maybe I’ll use it. It seems to support debugging under firefox and I.E. A Nice feature for crazy compatibilities issues between these two browsers.

- IntelliJ IDEA: My favourite Java IDE. It now supports javascript debugging too ! I’m sure they’ve done first class support for that, and I would be happy to use it, but it’s not free, and my current company don’t want to buy it…. Too bad really.

Here is a short roundup of the javascript debuggers I stumble upon. If you have any advice (I’m considering myself as a new guy in javascript development), please feel free to insert your remarks. I will test them and give the result in next post….

Bye.

GC.