Archive for the ‘Java - J2ee’ Category

Little useful frameworks - JSoup

Tuesday, January 10th, 2012

In several cases, I needed to parse html pages and extract data from specific tags.

For instance, I had to build a wiki migration, or to transform and import massively pages to a CMS.

JSoup, a Java framework, makes easier these operations.

Based on html5 elements, JSoup parses an Url, a String or a file with CSS selectors, or DOM transversal and gives facilities to manipulate the result found: you can easily replace some content, wrap with HTML tags.

REST with SpringMVC 3

Tuesday, October 19th, 2010

I know JavaEE is hot and Spring is Old-School! So, it’s the best time to talk about one component in SpringMVC 3 that I find quite nice & useful.

REST (REpresentational State Transfer) , as a Resource Oriented Architecture interested me specially for the URI functionalities. RESTful features in Spring MVC 3.0 are very convenient for that purpose.
You can manage your url directly within your controller. Thus, you can get as close as you want to your business terms within the url:


@Controller
public class ProjectController {
...
@RequestMapping("/{section}/{project}/index.html")
public String getProject(@PathVariable String section, @PathVariable String project, Model model) {
...
}
}

See also : rest-in-spring-3-mvc
See also RestTemplate : rest-in-spring-3-resttemplate

If you doubt GWT, check UIBinder

Tuesday, October 5th, 2010

If the GWT concept is nice, its use was frusterating : the code generated by the core framework was mostly composed of … Html Tables, which is just a headache to render properly. And most of all, what I did not appreciate with GWT was how people introduced it: “with GWT you don’t have to work with Html”. In my opinion, if your aim is not to deal with Html, then don’t work in web technologies. As a matter of fact, web is Html and Html5 is not Xml yet…

I talked about that with a friend of mine who is my GWT psychologist (thank you Nicolas!) . He told me to have a look to UIBinder, a framework integrated into the official GWT since 2.0.

What I find really exciting in that framework is the possibility to define exactly what you expect as rendering.

But UIBinder brings the real solution: add the component that you expect, add any Css styles you need and bind it to your data. That’s it! The View implementation is very easy and efficient: a template made in xml, a widget class that is bound to your different fields with annotation. You can have the benefit of the whole GWT Engine combined with the best use of the browser with Html and Css.

I hope the GWT Team will integrate that in their best practices, because for me it is the best way to work with the GWT client.

Maven2 Lifecycle

Friday, May 28th, 2010

Little something which I always forget: the maven2 lifecycle

maven2 lifecycle

Source : http://www.eclipse.org/articles/Article-Eclipse-and-Maven2/images/lifecycle.png

My first Agile post-its

Monday, February 15th, 2010

agile methods postit

My current project is beeing managed in Agile Software Development.
I must admit that I was quite a little suspicious but my first steps are positive.

The main point, as part of the Game Team, is that i know far more about the activities of my collegues: it’s a Team Play. During the Stand-Up Meeting, everyone talks about his work yesterday and his plans today. It’s the moment to communicate on your trouble, most of the time others met them too. Usually, you are working on a functionality close to your collegue next door and you don’t even know. Or maybe you have a brillant idea that may interest. Anyway, your daily work is clear for the team. So, priorities can be followed.The development team follows “as much as possible” the Extreme programming best practices as Continuous Integration, Test Driven Development, Pair Programming, Design Patterns.
But I have also discovered some limitations. The functionnal specifications are divided in pieces into greenpeppers. Therefore, it is hard to build a global specification interpretation and get into the project.
Key Words: Greenpepper, Hudson, Checkstyle, Cobertura, PMD, FindBugs

A Subway map to clarify the CMS and Portal technologies

Wednesday, October 14th, 2009

CMS and Portal Subway Map

I have seen many confusing maps that try to “cluster” web technologies and have learned not to pay attention on them.

But CMSWatch has just created a drawing that classifies different CMS and Portal technologies in a simple and funny Subway Map. I found it interesting because of the apparent simplicity of the form and the correctness of the classification.

Gwt & Design Patterns

Saturday, August 1st, 2009

Last month i started a little open source project with google code
infrastructure. It is pretty exciting. The project is hosted in google code. It
includes a wiki,  a bug tracker, and you work on its svn repository.
We decided to work with Google App Engine which supports Java now. It
is the biggest benefit of this cloud. You can now deploy Java web
applications on the internet in few minutes!
The presentation layer is being done in Gwt. The gwt/gae Eclipse
plugin makes develpment easier. Since my first experience in Gwt,
there has been improvements in many fields and the community tries to
suggest useful design patterns as
Commands packaging asynchronous calls, Bus Events to resolve communication between widgets.
One best practice that is suggested is MVP, Model-View-Presenter and
not an MVC, Model-View-Contoller for the interaction is easier to
apply test cases.
The Dependency Injection is resolved with Guice framework or maybe
closer to Gwt: Gin which is being finalized.

Links:

JBoss Portal welcomes eXo Portal

Wednesday, June 10th, 2009

As i said beforewhen i tested eXo Porta, i found it was an impressive portal with sophisticated functionalities and User Interface, nicely coded.But, it really seemed not used that much in the communities and thus not very  for the future.

That point seems to be corrected today!! eXo and Jboss Portal will be one and only project.

Now IT IS EXCITING to follow!

http://blog.jboss-portal.org/
http://blog.exoplatform.org/2009/06/10/exo-jboss-partnership/

Scrum Paris JUG Presentation

Sunday, April 19th, 2009

This week took place the Paris Java User Group (JUG). It’s more and more crouded there and it’s a good place to be to know more about the hottest subjects around Java… This week the subject: SCRUM.

Three weeks ago, i had a two days training of some classical Project Management where we discussed about Product Breakdown Structure, Work Breakdown Structure, Pert Diagram, Gantt Diagram etc. Very interesting. It is interesting to realize that the same process can be applied in Aeronautics, Architecture, Automobile or in Software development. It sounds possible but it also sounds logical to thing that it can imply unnecessary costs when applied as a routine.

1st thing that catches my attention in Scrum is that some experts from software development asked them-selves: ok, but can we build some models optimized for some management of software development projects?
2nd : the Agile Manifesto focuses on communication. Here, communication is not mail or document written but people talking to each other.
3th : Scrum is based on iterative incremental process (N Sprints) with the recognition that the client will change its mind during the process

Roles:

  • Product Owner: the voice of the customer, it is not always a same person.
  • The Team (developers, but also architects!)
  • A Scrum Master

Inconvenients:

  • It is far from the classical company structure and people could be afraid of loosing their position in this new hierarchy. Are the Product Director or the Product Owner ready to see anything else than a Microsoft Project Chart? A Burn Down Chart which is a far more simple Chart compared to the Microsoft Project Gantt Chart is not always accepted…
  • It requires that the client should be a weekly or daily actor of the project. But what if the client can not do that or does not want to have this responsibility?

The second part of the JUG Presentation discussed about use cases with some main questions that Scrum has to answer.

The main idea that interests me is that experts in Scrum do not consider a classical project as fake. They realize that frontiers are not easy to change and Scrum should represent sets of practices maybe some “Best Practices” that one can bring in to one project if needed.
For example, one method that i would try in involving users, customers, the Team is the “the Daily Standup”. It is a short meeting where people talk in few words about what they did yesterday, what they are doing today and if they find difficulties. This approach is clearly the Best. The Product Owner, if present, has a live feedback and the Scrum Master knows if everyone is accomplishing its goal. This meeting is timeboxed and should take only 15 minutes.

It was a pleasure to discuss with people who are experts and not fanatics!

Spring in Automn

Friday, December 5th, 2008

logo Spring Source

Last week event was the Spring Source Conference in La Défense.
It was organized by Julien Dubois (SpringSource France) and Didier Girard (Sfeir).
It answered some of my questions as:

  • Why Spring Source bought support for Apache?
  • Did they really change their release policy?!
  • What’s next? Roadmap etc…

One main concept explained by Peter Cooper ( SpringSource)  was a 3 steps concept: Development, Deployment and Support.

Spring Source aims the 3 fields.

For example, a Tomcat Source Commiter from SpringSource gave a brillant demonstration of Tomcat Tunings: launch parameters depending on the server CPU, maxThread etc.

The Enterprise package is quite simple: they offer the hole services in One Package.
Some improvement i noticed in Spring3:

  • Hibernate Model Validation
  • REST support
  • More and more Annotation facilities in configuration files and classes.

And of course the main buz: SpringSource acquires G2One (Groovy and Grails)!