Apr 30

I had a look at jBoss and wanted to validate its capabilities from a PaaS perspective.

First I prefer to have a kind of factory which includes the minimum software and tools to start. This does not include you JDK that should already be installed. This factory will include Eclipse (I use version Europa Winter (Java EE) 3.2 that you can download here) , maven2 (2.0.8 downloadable here) and jBoss (4.2.2 downloadable here ). I also create a folder in this factory for the eclipse workspace.

Install factory

I suggest to backup it, to reuse a copy of it for each project. Create a folder named factory. Download Eclipse, maven 2 and jboss. Then create a folder for eclipse workspace. You should have something like:

Here are some files (eclipse, vars) to put in the folder factory that will setup environment variables.
Add also a shortcut that will launch a command prompt and use the environement variables setup in vars.bat. Here his the value of the shortcut:

C:\WINDOWS\system32\cmd.exe /k “”vars.bat”"

(you should change only the windows folder according to your machine installation).
Now, update the vars.bat file for the line pointing to your JDK, the other lines should not be changed.

Done, yoiur factory is ready. Next step is to create and build your project.

Project and build creation

Create a folder named as you want (I will use C:\PaaS. Then copy the factory folder there (the factory folder is a sub folder of PaaS).

I’ve created a jBoss/Seam project containing : a webclient (for presentation logic of my application), a separated ejb folder (for business logique of my application), an ear to contain the projects.

Unzip this file mycompany.zip into the PaaS folder (mycompany should be asub folder of PaaS).

This project is based on MySql as RDBMS. You do not need to install it to make this sample working as this sample does not include any access to the database. bitewise, it will requires the jdbc driver. Here is the jdbc driver I used for MySql 5.1.6. I did not handle to include it in the factory, so you have to copy it into the lib folder of the jBoss deployment (factory > jboss-4.2.2.GA > server > default > lib).

Execute short cut that is in factory folder, it should launch a command prompt. Go in mycompany folder and execute folowing command line:

mvn clean install

Use Eclipse as IDE

Execute folowing command line:

mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavaDosc=true

Execute eclipse.bat that will launch eclipse with the right workspace. I then suggest you to declare the jBoss server.

Now import projects that are in mycompany folder. Deploy it and check it works.

Deployment

Go in platform folder and execute folowing command line:

mvn jboss:harddeploy

Go in http://localhost:8080/webclient …should be ok !!

Conclusion

There are 3 important points in that sample:

  • usage a factory to bootstrap a new project (I think this is the right direction for a PaaS approch, even if that requires lot more work…this is only a prototype…not more),
  • the maven2 pom.xml files which demonstrate how to separate business logic, presentation…and can be extended easily to host morte than one application,
  • the IDE is nicely included into the picture through maven, and the IDE is NOT the build process.

I will improve it and create a dedicated page on this blog and post updates using regular posts.

If you try it and have any question or see any problem, feel free to add a comment.

Apr 29

Every change in software code base is at risk. This risk is high or low depedending on the maintenability of your code, its simplicity and the knowledge of it by developers.
What about 3rd party?
Most of the development team are now reusing tones of open source 3rd parties. This is not a problem in itself, if you manage the impact on the software…but it’s at least more risky than on you own code base.
Usually, the source of the problem is a misunderstanding in the usage of an API or a class. Don’t blame on dev team, its really tricky in some cases to detect such problems. Trying to guess before the change if a new version will be compatible is simply unfeasable. That being said, there is only 1 choice: test your application. Of course if you have tons of automated tests…that will be much easier.
I defenitely think that automates test is getting more and more important. The usage of 3rd parties which is grown every year, is another clue.

Apr 23

…is a valid option to write a full software entreprise stack?

Even if JBoss is not listed in my CV, I had recently a looked at it to check its capabilities as of environemtn for a full software entreprise stack (I may update my CV now even if we do not use it…but I made some prototyping with it and have a clear view of its capabilities).

First, what we need?

  • container for decoupled applications
  • persistance
  • UI (web 2.0 would be a plus)
  • engines as workflow and scripting
  • scallable
  • …and more

Back to some fundamentals…

I had AOP

AOP that SoC ?

Beyond AOP…

I had a AOP

Their are 2 ortogonal (I like orthogonality :-) ) concpets: OOP and AOP.

OOP (Object Oriented Programing) is a software technic which is based on the concept of object (attributs and methodes) and inheritency (a car is a vehicul which is a tranportation mode…etc).

AOP (Aspect Oriented Programing) is a software technic ortogonal to OOP which help in “doing repetitive stuff” amongs objects in a simple manner as for example: logging, security, transaction management…etc (always the same examples).

In our case, the AOP is the entry point to get more…

AOP that SoC ?

AOP can also be used to do SoC (that I like too). SoC is Seperation Of Concern. The idea is to deintroduce decoupling between layers and services of the application stack. The trend is to use AOP as a support to do SoC.

Beyond AOP…

AOP as support to do decoupling…

  • some says IoC (Invertion of Control) … technical detail
  • some says DI (Dependency Injection) … I hate this wording
  • through a Service locator … Yes that’s it !

A service locator allows you to access services (transversal as logging, or not as an application) without bothering with wirering (managing dependencies) and creation (resolution).

You just request a specific service to your AOP system.

Back to jBoss…

So what jBoss is proposing?

  • Application Container: jBoss AS
  • Service Locator : jBoss IoC + ejb
  • Web UI : jBoss Seam (+ ajax4Jsf or RichFaces or IcesFaces for the Web 2.0)
  • Workflow engine: jBoss Seam + jBoss jBPM
  • Scripting engine: jBoss Seam + groovy
  • Rule engine: jBoss Seam + drool
  • Wizard engine: jBoss Seam conversation context
  • Persistance: jBoss + JPA + hibernate

It’s preatty amazing how jBoss is exhaustive. I may miss some important features … but that’s a good start.

Apr 15

Following spirit of Jeff Artwood’s post on development fallacies, here are some fallacies around RIA.

Responsiveness
Even if I agree on the fact that one of the main goal for RIA is to provide more responsiveness, this not always the unique path to achieve it. Ajax is the best example to demonstrate that: asynchronous requests provide a lot in the user experience perception for responsiveness.

MDI like support
MDI has been invented (I may be wrong) by Microsoft with its SDI vs. MDI environments. This is basically single vs. multiple document edition. In fact, IMHO, this concept is simply obsolete. First, in general, applications are not more only data access, but also include some processes. Process are even more common than data access, at least through navigation (yes, you could argue that navigation is not really a process). As a very large number of the applications are now available through a web interface, the hyperlinks just made the SDI vs MDI paradigm obsolete. The web app software developers knows about the hell of the back button and “open in new window”. RIA is not the right answer to this…or at least using RIA to solve these problems and implement an MDI interface is simply a mistake. Now, most of the web framework provides solution to these 2 problems (like jBoss seam, and other ajax frameworks).

Sexy interface
Yes, Silver Light or Flew provide support to write sexy interfaces. BTW, I think that a dev team with a talent Web Designer could do better job than some other teams using Flex or Silver Light. this is just a question of tools and requirement. Depending on your requirements, the application may not need the very advanced features of Flex (I will not repeat Silver Light all the time :-) ).

I’m not against at all RIA frameworks, just use them appropriately and be aware of your choice.
The main concern I have is on the language behind frameworks. I remember VP R&D saying (5 years ago) “language does not matter”. If they mean that a good developer should be good at any language…I agree. But if this is in the perspective of building software…I disagree. Your building software for years, you will have to support what you write and make the code evolve. The technologies are evolving a lot, the framework too…what’s remain is the language. Building your entire application in ActionScript is a choice that will prevent you moving to another framework. I prefer build the application on top of Java of C#, and build the presentation layer on top of Flex …but only the presentation layer.

RIA is definitely required and a strong suupport for lot of applications, but if applciations that already have a web interface…be aware of your choices.

Apr 15

In my last post I talked about the migration I made. I’ve made this migration to upgrade my previous installation of wordpress from 2.05 to 2.5: new features were really attracting.

I wanted also fix some minor problems as the url of my blog which was on www.sauvee/com/wp02 to www.sauvee.com/blog.

The problem I face’d was the links inside the post which were not migrated correctly as the full Url is used and was not updated during import. Maybe I made a mistake somewhere…maybe not, anyway it did not worked for me. I though a simple find & replace in the xml file to import would be enough to fix my blog url renaming.

The answer is “no” : the permalinks have to match. So if you do the same migration, do not forget to use the same permalinks.

Second point I wanted to redirect all access to my pevious blog to be redirected to the new blog. The solution I used was to use .htaccess file in my previous blog directory wp02. This works only if you are using an Apache web server.

Apr 07

I’ve finally upgraded my blog container Wordpress from 2.05 to 2.5.
The first difficulty is to transfer data from former blog. I used phpAdmin plugin for this…it just work fine!
…euh not really: all links to images or other media were broken (still referencing the previous blog).

Wordpress is so massively used that I bet I have certainly not be the only one with this problem. I googlelized on this and found absolutely nothing. Every articles were presenting the export/import as a feature working as a charm. Yes, it is simple & quick, but the end result not good. Am I the only one encounter this?

To solve this I had to:

  • I simply delete all my posts,
  • edit my exported xml file to do a find & replace on the urls to point to the new blog
  • copy the content/uploads folder in my new blog

Notice the default upload path of the new wordpress 2.5 installation was “content” and not “content/uploads”. Check this also!

At this stage I have restored all my posts and images and href are pointing correctly yo the new blog.

Wah’t remains: blogroll and pages like “About” page. For those; I will do it manually (few blogroll and only one page).

I think I will keep the former blog for a while till I check everything works fine.

Apr 01

shame.jpgI’ve heard recently :

“Muli-threading and ref counting are 2 totally different things!”

I won’t even try to convince him. Threading is for sure not wellknown, but that much….?