Tuesday, July 10, 2007

Supermarket anti-pattern

Consider the following scenario:
- dozens of classes used to define the object model
- one class to manage their update
- one class to manage their creation
- one class to manage their deletion
When the model had only 3 objects the class did not look so bad. But let's see what happen when the model was extended to 20 objects:
- nobody thought of refactoring the classes
- these classes have now 40-60 public methods

Problems:
- they have almost no cohesion
- almost unreadable
- full of duplicated code
- unstable

What the project achieved by doing it like this:
- one big class which does all
- few code dependencies; the rest of the code has to depend on only one class :)

I call this kind of "design" a Supermarket anti-pattern because we have everything in one single place :).

Don't do this in your projects!!

Thursday, June 28, 2007

Jazoon '07 - day 3

Keynotes:

Eclipse way to Jazz
Eric Gamma(do I know him from somewhere? … hmm … GoF ?
J) presented the development process that his team is using in developing different Eclipse projects.
The motivation of Jazz is to reduce the “boring tasks”. He said “devs do not like to read”
J. It is so true.

The features of Jazz are quite interesting:

- Management of release plans

- Management of deliverables

- Management of builds

- Cooperation support for devs

- Nice web and desktop interfaces

I look forward to test Jazz. I will check if it is able to use another tool stack than that presented by Eric: Equinox, Derby and Tomcat.

I was nicely surprised to see Eric’s interest in defining and implementing a development process. I hope that I can make our clients more aware of the need of the process. The like Eclipse, so it would be a good reason to develop the project in the same way as Eclipse is developed. I see at least a light in the darkness.

Technical presentations

Persistence with EJB 3.0
It was a good presentation with expressive examples about how can we should use the new JPA in our projects as ORM.

Spring 2.1
Juergen presented some nice features from Spring 2.1 such as:

- annotation configuration

- auto-wiring via annotations

- component scanning

He also pointed out that a lot of performance improvements and fixes had been included I this release. So if you use Spring in your project keep an eye on the release date and switch to the new version.

Java FX
I am not a UI developer. I can say that I am not too enthusiastic about the way in which Java supports UI development, BUT JAVA FX IMPRESSED ME.

It is not yet another scripting language. Here is why:

- It is simple, powerful,

- has a syntax close to Java,

- can use Java objects easily

- can produce extremely nice examples

I do not say these because the speakers had said it, BUT because they shown us.
Flash is dying, long live Java FX!!!

Die hard 4
The organizers had a surprised for us: Die Hard 4, the movie. It was nice to relax after 3 days of conference. I am not a movie critic, but I would say that it is more violent and has more special effects than the previous one. By coincidence or not, the action from the movie is related to IT and hackers J. So go and see Die hard 4 if you like Bruce Willis and you want to see an action movie J.

Conclusions:
The third day was the best one, because of the topics and the speakers ;).

As a summary I would say that it was a nice experience to participate to this Java conference; there were a lot of new things that I had found. Some things to improve:

- extend the time for one presentation – 40 minutes in some cases is to less

- invite known speakers;

- do not accept some presentations only because the company is a sponsor

- do not feel the gaps with a lot of useless presentations from sponsors employees

Tuesday, June 26, 2007

Jazoon '07 - day 2

Keynotes:

A little REST and Relaxation
The author of the HTTP spec made a good presentation about his latest creation REST
He presented it as a good alternative to the SOA. It curios to have a look to it and the current implementation.
I look forward to get his presentation to check some details.

Fighting the Java heterogeneity - a system integrator's perspective
The speaker presented his company technology’s stack used to implement the enterprise project.
It is almost the same stack that we are using, so we are on a good track ;)

Technical sessions:

A developers guide to SOA
Presentation was held by a lead developer of JBOSS BPEL.

He pointed out:
- SOA is not Webservices

He shown some nice practices to reuse by SOA some existing components developed in a "smilo" way.
I found out a new buzzword :): SMILO. It seems to be known on american industry for defining the "old" way of doing web application with 2/3 tiers.

Even if the guy was from JBOSS he was pretty objective and presented implementation using also Spring :).


Are Open Source SOA stacks ready for prime time?
It started with an exaggerated presentation of the company. I would like to get this kind of information on private if I would be interested to find out.

Some of the ways of making moneys from open source, since the Iona sustains a lot of open sources:
- proprietary offerings
- dual licenses
- subscription
- value-added services

Some good strategies about how can be evaluated the OSS. I should consider them when I will decide in the future which OSS I will use.

The following stacks have been presented:
- LAMP (Linux, Apache, MySQL, Perl/PHP/Python). See: onlamp.com
- CAMEL != Apache Camel
- Mule based one

It is good to know about them and to consider them when a new project is started.

The new Hibernate Search API was presented.
He presented a life example about how easily can be replace the common Hibernate query usage with the new Hibernate Search - Apache Lucene.

It seems to help a lot the implementation of full text seach features. The usage and configuration of the new tech is pretty easy.

It is good that they have released it ;).


Webservice security with Java
The presentation was held by a SUN representative which is involved in defining security standards.
He pointed out the pros/cons of using SSL around the SOAP and the WS-Security.
He provided a comprehensive description of the WS-Security.
He exposed the features of the XWSS 2.0.
The quality of the presentation was under-average :(. He had a lot of deep knowledges, but he should improve his presentation skills.(e.g get ride of "You know" usage. A funny used expression: You know that you know ... :)). It was pretty hard to follow him :(; that was bad since the topic seemed to be interesting.


Ajax for enterprise applications

It was a very nice presentation about the current Ajax frameworks and the new jMaki framework developed by SUN.

They shown the strengths of the new framework comparing with the existing ones. For me seems to be a framework more oriented to JavaScrip devs and for designers than for Java developers. He said that GWT is not as good, but I think that was only propaganda. Anyway I will look forward to play a little bit with jMaki.

BOF
It was pretty strange to see that a BOF session with Juergen Hoeller gathered only 4 people and a JUG BOF gathered 15 people.
What are they doing? Java? ... I do no know, maybe that are telling jokes :(.

Anyway I am happy that I am one of those 4 which met Juergen. We had a very interesting discussion opened by my question about how will react Spring on Juice.

Juergen prefaced the presentation that he will keep tomorrow, and told us some of the nice features provided by Spring 2.1.
Then we discussed about how to migrate a given existing application to a new version, of course using Spring.
One of the discussion members asked Juergen to summarize for him, which is new to Spring, the main features of Spring.
I really enjoyed how he explained some of the most important ones.
For sure, it worth to meet Juergen, which is a Spring evangelist, but not an aggressive one.
I look forward to see his presentation from tomorrow.


Conclusions
Overall, the presentations from today were better than those from yesterday. I think that my strategy to go only to known speakers, or speakers from known companies was a success. I would say that 80% of the presentation was OK from my point of view.

Monday, June 25, 2007

Jazoon '07 - day 1

The conference started with an exciting presentation of Ted Neward about “Why the Next Five Years Will Be About Languages”. He talked about the Java language history, his cousins(Ruby, Groovy, .NET, etc) and feature perspectives. He summarized the efforts needed to develop a new language and shown the biggest challenges and creating a good one. It seems that in the next years it will be hard to appear new languages build from scratch, but the existing one will evolve and some will be created on top of existing ones.


What's wrong with Java? A look over the horizon.
The speaker seems to be Ruby, Groovy evangelist.
He gave some "Nice" example of using Groovy, Ruby:

- you do not need to write gettter/setter ... they now properties and Java not yet. What a big deal :)?

The given an example about how to write a simple web application to implement a simple knowledge base

- Java + Hibernate 3.2 -> 4 Kloc, 1 week

- Ruby - 1 Kloc, 1 week

- Groovy - <>

His examples were forced to reduce the power of Java and the need of effortless development languages. I would say this is a poor marketing strategy L.

I think he is one of the Groovy authors or he does not know java :). I am joking, I appreciate his interests in new languages, but I had expected more from the topic. I did not expect to see marketing material at such core topic.


UI Automated Testing of Java Applications
Poor guy, it was stressed about the presentation, that was not really able to keep the presentation cursively. It was embarrassing for me to leave the room, but I thought that I can find another presentation more interesting than this one kept by an inexperienced speaker.

Sun SPOTs
Nice presentation and demos about the SUN Spots. I know now which will be my next wished present: “Spot development kit”. Look to: http://www.sunspotworld.com/. This is a real cool technology; for sure I will like to play with some of the new gadgets.

Enterprise application testing using Open Source tools
It was a very good presentation about functional and UI testing. It were presented the following frameworks:

- fitness

- selenium

Java SE 7

The estimated release of Java SE 7 is end of 2008; but I guess it will be beginning of 2009.

Cool features in Java SE 7.0:

- JavaFX

- Powerfull and performant Swing

- JAM

- Super packages(expose only specific interface to the client of a package)

- Modular JRE

- Quick starter for JRE

My impressions after the first day:

- very good organization

- some good speaker

- some amateurs (SUN came with a bunch of devs from Praga. Some of them are really unexperienced)

- a lot of marketing. I did not expect this from such conference

Let’s hope that tomorrow more interesting topics will come.

Monday, May 28, 2007

JSeamless

It seems that my view about having an abstract UI framework which make transparent the target device, it is shared by other people to.

Just have a look to: http://www.jseamless.org

They claim that you should not worry about the target device when do a UI. I will try it to see if the same UI can be used for:
- web
- j2me
- desktop

I will come back with my remarks after I will complete a small test.

Tuesday, April 17, 2007

Next UI framework

My idea about having a UI framework which should be able to define the UI without having in mind the underlaying device is still hot.

Let's see which are the features expected from a UI framework:
- able to draw UI widgets like: buttons, lists, combos etc.
- draw a view composed from UI widgets based on a model
- capture the user behaviour and sent it to the business component

Do you see any other important features for a UI framework?

If these is enough, then why not having an abstract framework to let us define the UI without having in mind the real UI device.

For example:

I want to create a button.
Button ok = new Button();
...
window.add(button);
button.addListener(myListener);
...

Having this code, is it really important the device?

I think now.

Question: Has sense to try to define an abstraction for the UI, and then to provide several implementations?

Here are some advantages:
- design once, display everywhere .... :) this should be a trademark, isn't it
- avoid duplicating UI code

Disadvantages:
- can not hack the code for a specific device ... is this so bad ? just think to the current UI widgets 80-90% are available to all devices
- maybe some overhead will be added by abstraction

Inventing this abstraction is so bad?

Saturday, March 17, 2007

What is a good developer?

For some years I am asking myself what is a good developer?
Maybe a better question is what are the knowledges need to be a good developer?

Here is what I consider need to be a good developer:
- strong OOD & OOA - apply them in all the code that is written. There is no GOOD reason to produce bad quality
- strong knowledge of the programming language used in projects
- respect for written code and for application(do not crash the entire design and principles ONLY because a pushy client wants the code ready yesterday)
- understand the whole architecture applied into the project
- learn new techs, principles day by day .... do not wait for someone to tell you what you should learn ...
- ability to clarify the requirements for the assigned tasks
- ability to estimate the tasks
- ability to keep the deadline
- ability to organize his tasks considering the dependencies of other's tasks
- ability to manage the communication with the client
- the guts to say NO
- teamplayer
- know what should be asked ... not to much dummy-questions to overkill the communication, but enough questions to clarify a situation
- direct communication - keep all the unclarities up-front, do not hide them. Say what is wrong when you see it, even if this is hard to be accepted by the person which you are in dialog
- accept criticisms, accept failures -- nobody is perfect

More to come ...

Saturday, March 10, 2007

Unify the UI frameworks

On Java community there are a lot of options to be chosen when you want to start implementing an application that has a UI.
Depending on the type of the client you can choose frameworks like:
For web clients:
- struts 1.x, 2.0
- tapestry
- MyFaces
- Ajax based one: GWT, RAP
etc.

For desktop clients:
- Swing
- Eclipse RCP
etc.

There so many doing basically the same things but using different approaches.

When you want to implement an application having clients which use the application from:
- web
- mobile phones
- desktop
then you are in big trouble.

Which are your options:
- decide for each client the framework to be used
- do 3 times the same client UI using 3 frameworks ...
Pretty good right? And also "extremely efficient" ;(.


I have some questions:
- why should we have 3 different implementations?
- is the UI so different depending on the client type?

I think that answering to the second one, I have the answer for the first one :(.

From the development point of view, it should be only one implementation of the View which is used by the client, the differences are given by the implementation of the view using the capabilities of the client UI.

Let's see what I want from a client UI:
- using some UI controls to display the information to user, and to collect the interaction of the user
- combining these UI controls to have complex views

Here is my proposal"let's abstract more the UI and define a framework having the following characteristics" :
- define a standard collection of the UI controls(e.g: window, buttons, checkboxes, etc)
- collect the user actions into a Event based manner
- assure a good performance
- native support for MVC

Additionally:
- provide addapters of these abstract framework for:
- desktop clients
- web clients
- mobile clients

Having all of these we get the following:
- reduce the pain of implementing the UI for different types of clients
- reduce the leaning effort


Am I right, or I just start a discussion about another useless Java framework :(?

Why blogging?

I was wondering why a lot of people keep blogs.
Here are some possible answers:
- experience the writing skills
- express thoughts
- fun
- just being cool

I think I will do it for the first 3 reasons.

I am a little bit upset because my preferred names are taken by someone else. :(

I am going to post on my blog thoughts about:
- technologies
- life