Reply to Kent Tong’s post about scala’s getters and setters: http://agileskills2.org/blog/2010/01/applying_scala_to_solving_real_1.html

This post is a reply to Kent Tong’s post about scala’s getters and setters: http://agileskills2.org/blog/2010/01/applying_scala_to_solving_real_1.html:
You may also use the @BeanProperty annotation to generate Java-compatible getters and setters instead of weird methods with space and equal . . . → Read More: Reply to Kent Tong’s post about scala’s getters and setters: http://agileskills2.org/blog/2010/01/applying_scala_to_solving_real_1.html

About classes and separation of concerns

The object oriented programming paradigm involves developers to design code as classes.  Classes associate data and behavior into one single abstraction.

That’s OK, but… how should one design code that only has behaviour or that only has data?

Is the class abstraction still the good one for cases where there is only behaviour?  In this case, provided I . . . → Read More: About classes and separation of concerns

More flexibility with JEE servers and web containers

This article explains my point of view on what the JEE’s integration with web containers’ future should look like. . . . → Read More: More flexibility with JEE servers and web containers

ServletContextListener initialization issue

This week at my client’s offices, I discovered, with another IT consultant from a concurrent firm, a strange behaviour of ServletContextListeners.

The specification doesn’t state much about them.  They are classes which implement the ServletContextListener interface, and they are instantiated with their default constructor during the webapp loading, in the same order as specified in the web.xml.

The . . . → Read More: ServletContextListener initialization issue

About classes

One thing many developers forget about OO design is the purpose of classes.

A class consists in the association of data structure and behaviour!  Many people forget the behaviour.

This is really important when defining class hierarchies and applying the Liskov Substitution Principle (LSP).

Behaviour is at least as important as data structure. But it becomes complicated to analyse . . . → Read More: About classes

When should method arguments be validated in Java?

Only during development and tests, as in later steps the code has already been tested and validated?
Always, even in production?

This was a debate I had with another developer at the YaJug (Luxembourg Java User Group).

My opinion is that they always have to be executed especially in production environments.  But wait: argument checks usually throw IllegalArgumentException, which . . . → Read More: When should method arguments be validated in Java?