Agility, Java programming, New technologies and more…
  • rss
  • Home
  • Management
  • Agile Programming
  • Technology
  • Linux
  • Event
  • Android app
  • Contact
  • About the author
  • English
  • Francais

Java EE & CDI vs. Spring

Fabian Piau | Thursday October 13th, 2011 - 09:58 PM
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • Pocket

 Version française disponible

Last Wednesday, I have attended to the “Stateful is beautiful” talk at Nantes JUG, introduced by Antoine Sabot-Durand.


Expert in Java EE for several years, Antoine has shared his vision for the Java landscape today, especially for Java EE (Enterprise Edition) and the Spring alternative.


Spring is a light-weight container that provides similar features to those found in a heavier Java EE application server. Spring only uses stateless beans, but Java EE also uses stateful beans.

To introduce those two notions, the classic example is the e-commerce application.

On one hand, the shopping “cart” object will be store in a stateful bean. Why? Because we need to maintain a conversational state between requests, from the time the customer has added a product to its cart to the time he would give its credit card information. On the other hand, the stateless state will be sufficient to look through the products catalog. To view a product, we do not care about the products the user has previously visited. Thus, a product will be stored in a stateless bean.


Java EE and old demons       

Antoine has made a review of the received wisdom on Java EE. Most of them belong to its history but still pursue it in the latest versions. At the time of J2EE (Java EE 4 and older – i.e. all Java EE releases until 2003), EJB 1.X – 2.1 included has suffered much Java community criticism. Heavy, complex to implement and tricky when your want to test your code, the Java platform dedicated Enterprise has not convinced…

Because of these lacks in Java EE, some Open Source alternatives have become popular such as Spring and Hibernate.


Now, the platform (renamed as Java EE) has evolved and has been simplified, the new EJB 3.X specification has became lighter and more competitive. This is especially true for the latest Java EE 6 release in late 2009. Indeed, it includes CDI (Contexts and Dependency Injection), the standard that it needed to compete Spring seriously. It also includes the “profile” feature that allows Java EE to be specialized. Broadly, you take only the components you need. For testing into the container, Antoine advised us to use Arquillian software.


       Spring logo

Spring has chosen not to implement the new CDI standard. Why? The answer is not so simple. Perhaps this implementation would have been impactful on the existing code and could slow down the development of the framework. At the same time, with a large number of users, maybe SpringSource has decided to continue its parallel development of Spring in the hope one day it will dethrone CDI definitely. In general, companies are not keen on changing their habits, knowledge and other best practices (replace Spring by CDI would be a very important investment). At the same time, this can be dangerous if CDI takes off in the coming years. Watch this space!

Note: Unlike Spring, Hibernate implements JPA for the persistence layer (which is the standard in Java EE) ensuring greater longevity.


As Antoine pointed out, the purpose of his presentation was not to denigrate Spring. On the contrary, he continues to use it and could hardly do without it. He has made a metaphor with a “golden hammer” I found rather interesting. Today, majority of Java developers do not ask themselves the good questions when they want to use dependency injection. At the end, they choose Spring spontaneously (we have a nail, oh I just need my Spring favorite hammer). However, we should be able to put the golden hammer down for a while and see what is existing around. Depending on the project, Spring is not always the most appropriate.


Today, the success of Java EE is still uncertain. Received wisdom won’t die, Spring still has a bright future. How much longer? Only time will tell… In the meantime, Antoine strongly advices us to try Java EE 6 and get our own opinion. At the end, he made a demo : a Java EE example project, created from a Maven archetype template and using stateful and stateless beans.

Related posts

Java 11A Java 11 migration successful story databaseManage a sequence database with Spring Java User GroupJava User Group – JUG springQCon London 2016 – Spring Framework 5 – Preview & Roadmap
Comments
No Comments »
Categories
Event
Tags
cdi, hibernate, java, java ee, jug, spring
Comments rss Comments rss

Changing the language in Firefox

Fabian Piau | Saturday October 1st, 2011 - 04:24 PM
  • Print
  • Twitter
  • LinkedIn
  • Facebook
  • Pocket

 Version française disponible

Note
To change the language of Firefox, you can reinstall it by choosing the language of your choice on the official page. But there is far better!

Firefox Multilanguages

Maybe your favourite browser is not in your own language or you want simply to change it. You can reinstall Firefox and select the package with the language you want. But this is not the best way.

This method can help you change any language from one to another in few seconds, like if you were just adding an extension.


Install the language of your choice

  • Firefox in french : https://addons.mozilla.org/en-US/firefox/addon/francais-language-pack/
  • Firefox in spanish : https://addons.mozilla.org/en-US/firefox/addon/espanol-espana-language-pac/
  • Firefox in english (United States) : https://addons.mozilla.org/en-US/firefox/addon/english-us-language-pack/
  • Firefox in german : https://addons.mozilla.org/en-US/firefox/addon/deutsch-de-language-pack/

If you want another language, go to the Mozilla Firefox’s add-ons website : https://addons.mozilla.org/en-US/firefox/language-tools/


Select your new language

Type “about:config” in the address bar and create a new key “intl.locale.requested” with a value of type string and set it to the abbreviation of your new language (“en”, “fr”, “es”, etc.).


You need to restart Firefox to see that the language has been changed !

Related posts

firefoxFirefox Nightly, Aurora, Beta, Desktop, Mobile, ESR & Co. firefox-extensionsList of my favourite Firefox extensions CaptureFoxCaptureFox : Screencasts recording with Firefox androidList of my favourite Android apps
Comments
19 Comments »
Categories
Technology
Tags
firefox, language
Comments rss Comments rss
Page 1 of 11
Download CarmaBlog App

RSS feeds

  • RSS Feed RSS - Posts
  • RSS Feed RSS - Comments

Most viewed posts

  • Changing the language in Firefox - 115,004 views
  • Using Google Forms / Drive / Docs to create an online survey - 61,842 views
  • FAQ – Online survey with Google Forms / Drive / Docs - 44,394 views
  • Customizing Gnome 3 (Shell) - 29,207 views
  • The meaning of URL, URI, URN - 16,127 views
  • Java EE & CDI vs. Spring - 14,894 views
  • Open Street Map, better map than Google Maps? - 13,869 views
  • Comparing NoSQL: Couchbase & MongoDB - 13,580 views
  • Firefox Nightly, Aurora, Beta, Desktop, Mobile, ESR & Co. - 12,757 views
  • First steps with Apache Camel - 11,793 views

Recent Comments

  • Fabian Piau on FAQ – Online survey with Google Forms / Drive / DocsBonjour, un formulaire ouvert avec Google est forc…
  • Aurélie on FAQ – Online survey with Google Forms / Drive / DocsBonjour J'ai créé il y a quelques temps un questio…
  • Fabian Piau on FAQ – Online survey with Google Forms / Drive / DocsBonjour, ce message de confirmation est commun à l…
  • Simon on FAQ – Online survey with Google Forms / Drive / DocsBonjour, J'ai une question concernant le message d…
  • Léooon on FAQ – Online survey with Google Forms / Drive / DocsJ'en suis même certaine... Très bien merci beaucou…

Recent posts

  • Flagger – Monitor your Canary deployments with Grafana - 9 months and 2 weeks ago
  • Flagger – Canary deployments on Kubernetes - 10 months and 3 weeks ago
  • Flagger – Get Started with Istio and Kubernetes - 11 months and 1 week ago
  • Expedia CoderDojo in London - 1 year and 8 months ago
  • Volunteering at Devoxx4Kids - 1 year and 11 months ago
  • A Java 11 migration successful story - 2 years and 3 months ago
  • Tips to make your WordPress website secure - 2 years and 6 months ago
  • Devoxx UK 2018 – Day 2 - 2 years and 10 months ago
  • Devoxx UK 2018 – Day 1 - 2 years and 10 months ago
  • TransferWise, Revolut and Monzo, a small revolution for travelers and expats - 3 years and 2 months ago
  • Autocomplete for Git - 3 years and 10 months ago
  • Swagger, the automated API documentation - 4 years and 1 month ago
  • Microservices architecture – Best practices - 4 years and 6 months ago
  • FAQ – Online survey with Google Forms / Drive / Docs - 4 years and 11 months ago
  • QCon London 2016 – Project Jigsaw in JDK 9 – Modularity comes to Java - 4 years and 11 months ago
Buy me a coffee

Language

  • Français
  • English

Follow me!

Follow me on Linkedin
Follow me on Twitter
Follow me on Stackoverflow
Follow me on Github
Follow me on Rss
Link to my Contact

Email subscription

Enter your email address to receive notifications of new posts.

Tags

.net agility android bash best practices blog cache cloud computing conference continuous integration css developer devoxx docker docs drive eclipse extreme programming firefox flagger forms google helm hibernate istio java job jug kubernetes london mobile computing overview performance plugin programmer qcon script sharing society spring tool ubuntu windows wordpress

Links

  • Blog Ippon Technologies
  • Blog Publicis Sapient
  • Blog Zenika
  • Classpert
  • CommitStrip
  • Coursera
  • Le Touilleur Express
  • Les Cast Codeurs Podcast
  • OCTO talks !
  • The Twelve-Factor App

Categories

  • Event (15)
  • Linux (3)
  • Management (7)
  • Agile programming (29)
  • Technology (44)

Archives

  • June 2020 (1)
  • May 2020 (2)
  • July 2019 (1)
  • May 2019 (1)
  • December 2018 (1)
  • October 2018 (1)
  • June 2018 (1)
  • May 2018 (1)
  • January 2018 (1)
  • May 2017 (1)
  • March 2017 (1)
  • October 2016 (1)
  • April 2016 (2)
  • March 2016 (1)
  • November 2015 (1)
  • May 2015 (1)
  • February 2015 (1)
  • December 2014 (1)
  • November 2014 (1)
  • September 2014 (2)
  • August 2014 (1)
  • July 2014 (2)
  • June 2014 (1)
  • April 2014 (1)
  • March 2014 (1)
  • February 2014 (2)
  • January 2014 (1)
  • December 2013 (1)
  • November 2013 (1)
  • October 2013 (3)
  • September 2013 (5)
  • July 2013 (1)
  • June 2013 (1)
  • May 2013 (1)
  • April 2013 (1)
  • March 2013 (2)
  • February 2013 (1)
  • January 2013 (2)
  • December 2012 (2)
  • October 2012 (1)
  • September 2012 (1)
  • July 2012 (1)
  • May 2012 (1)
  • April 2012 (1)
  • March 2012 (1)
  • February 2012 (1)
  • January 2012 (2)
  • December 2011 (1)
  • November 2011 (2)
  • October 2011 (2)
  • September 2011 (1)
  • July 2011 (1)
  • June 2011 (2)
  • April 2011 (1)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • November 2010 (2)
  • September 2010 (1)
  • August 2010 (1)
  • July 2010 (1)
  • June 2010 (1)
  • May 2010 (1)
  • April 2010 (1)
  • March 2010 (1)
  • February 2010 (1)
  • December 2009 (1)
  • November 2009 (1)
  • October 2009 (2)
  • September 2009 (2)
  • August 2009 (3)
  • July 2009 (1)
  • June 2009 (2)
Follow me on Twitter
Follow me on Linkedin
Follow me on Stackoverflow
Follow me on Rss
Link to my Contact
Follow me on Github
 
Fabian Piau | © 2009 - 2021
All Rights Reserved | Top ↑