Help

A developer new to Java EE posted in the Weld forum asking for advice on getting started learning EE 6. I've decided to promote part of my response in the forum to the blog.

So, what should I start learning. Java EE 5 and Seam? Java EE 6 and Weld? Is there any learning material about 6 and Weld right now?

Unless you plan on putting your system into production inside the next 2-3 months, you should start learning CDI and Weld. CDI defines the basic infrastructure you'll use to get the various kinds of Java EE components working together (and much more).

You also need to decide what web framework to use. This is the hard bit for most people.

  • You could use plain servlets and JSP, which in EE 6 both include out-of-the-box CDI integration. However, most people prefer to use something with more features. But honestly, if you're new to enterprise Java, it's not a bad place to start. The latest servlet spec lets you use annotations, which is a big step forward in usability.
  • JSF2 is included as part of the platform, and is integrated with CDI out of the box. Many people find JSF difficult to learn. We believe that for some kinds of applications, it pays off in the end. Unfortunately, most of the books and articles about JSF make it appear much more complex than it actually is. In particular, the specification is horribly written and not worth reading (so I won't link to it). Take a look at the Weld examples to get a taste of what JSF2 is really like.
  • An option we recommend is Wicket. Wicket is an alternative to JSF that is easier to learn. Weld comes with Wicket integration.
  • There are many other possibilities including about a thousand frameworks which are basically alternatives to the servlet API. Struts2 and Stripes seem like popular options. I don't find any of these kinds of frameworks very interesting or sexy, but they're usually easy to learn. It should be very relatively easy to integrate any of them with Weld.
  • A final option worth mentioning is GWT. GWT is an entirely different beast, with its own Java to JavaScript compiler. It's great for certain kind of application. We should have GWT integration for Weld available very soon.

My personal view is that you should start out by looking at either JSF and/or Wicket, unless you're truly a beginner at this, in which case start with writing some plain servlets. If these options don't suit your needs, cast a wider net.

You'll also need a persistence solution. For most people writing EE 6 applications that means JPA2. There are at least three excellent implementations of this specification to choose from, including ours. You'll probably want to use JPA2 together with Bean Validation.

Once you've got a handle on CDI, JPA2, and whatever web framework you decide to use, take a look at EJB 3.1, and the more advanced functionality it offers for integrating with data stores and messaging, and managing asynchronicity. Unfortunately, the EJB spec itself is quite hard to read, so you should probably try to find a good tutorial. Be careful, there is still a lot of information about EJB 2 out there on the web. EJB 3.1 is a quite different beast.

28 comments:
 
17. Nov 2009, 04:12 CET | Link

How come no mention of Seam 3? Or does Weld/JSF 2 already contain most of what current Seam 2/JSF 1.2 apps would need?

ReplyQuote
 
17. Nov 2009, 04:25 CET | Link
Drew Arrigoni

How is the tooling for these different beasts?

 
17. Nov 2009, 04:47 CET | Link
Matthew Lieder wrote on Nov 16, 2009 22:12:
How come no mention of Seam 3? Or does Weld/JSF 2 already contain most of what current Seam 2/JSF 1.2 apps would need?

Weld + JSF2 contains a lot of the core value of Seam2. Of course, there's still plenty left for Seam3 to do. But it's not exactly the first thing that someone new to the platform needs to learn. Especially since it doesn't exist yet ;-)

 
17. Nov 2009, 04:53 CET | Link
Drew Arrigoni wrote on Nov 16, 2009 22:25:
How is the tooling for these different beasts?

Obviously there's going to be a bit of a wait for tooling for the new EE 6 technologies. But since there's so much emphasis on type safety in a lot of the new stuff, and such a movement away from XML, you get a lot of the benefits of tooling from the compiler and IDE, without the need for special-purpose tooling.

 
17. Nov 2009, 11:55 CET | Link
Alex

Does it really make sense to start a new app on the new stack of a sophistication where Seam is appreaciated without Seam 3? Maybe you could touch on the gap between where Seam 2.2 is versus the state of the new stack. What are we missing from Seam that we depend on most: page navigation, tags, security? Is there a way to straddle the line for a few months? Sitting on the fence with Seam 2.2 and JBoss 5.1 isn't shear bliss either with the issues surrounding hot deploy and Seam. I have been able to regain hot deploy with a 5.2 beta build for xhtml pages, which makes it tolerable.

I did see another post suggesting that RichFaces 3.3 will probably get a brushup to operate under JSF2.

Thanks. I think you and colleagues are clearly on the verge of something really special.

 
17. Nov 2009, 13:41 CET | Link
Nik

Personally, I think once the SMPC, security and navigation (JSF 2 has conditional navigation but Seam2+ is still one step up) is CDI-modularized, I'll try sneaking something small into production. And hey, that will enable me to fix Seam-stuff while at work ;-)

 
17. Nov 2009, 22:57 CET | Link
defuudexx

This is really great to learn from the masters and pioneers....even a few words that you share on what path to take is worth more than a book .....I hope to always get nice guidelines from u....

 
18. Nov 2009, 04:25 CET | Link
Alex wrote on Nov 17, 2009 05:55:
Does it really make sense to start a new app on the new stack of a sophistication where Seam is appreaciated without Seam 3? Maybe you could touch on the gap between where Seam 2.2 is versus the state of the new stack. What are we missing from Seam that we depend on most: page navigation, tags, security?

Well, here's an overview of what we do and don't have:

What we do have:

  • the basic CDI bean model, with scopes, dependency injection, lifecycle callbacks, interceptors, decorators and modularity
  • request, session, conversation and application contexts
  • Unified EL-based integration with JSF and JSP
  • events
  • support for JavaBeans, EJBs and producers
  • basic Ajax support in JSF2
  • support for GET requests, page parameters and conditional navigation rules in JSF2
  • integration between Bean Validation and JSF2
  • Asynchronous methods in EJB3

That's more than enough to build some very interesting applications.

What we don't have yet:

  • support in JBoss Tools
  • a tool like seam-gen for CRUD applications
  • Seam Security
  • conversation-scoped persistence contexts
  • transaction and persistence context management outside Java EE
  • jBPM integration and the business process context
  • a stateful navigation model (jBPM pageflows)
  • XML-based bean configuration
  • natural conversation ids
  • nested conversations
  • workspace management
  • EntityHome and EntityQuery objects
  • JMS message sending ease-of-use
  • internationalization and themes
  • PDF, Excel, RSS, email and Seam Text support
  • Seam Remoting
  • Drools integration
  • GWT integration
  • Hibernate integration
  • Spring and Guice integration

Now, obviously, even though some of the things on the don't have list look like showstoppers, many of them aren't. Some of those things are even more like interesting experiments that I'm not sure we even want to port to Seam3.

And a some of the more useful things on the don't have list are going to be easy to port across to run on CDI over the next couple of months. Some of them, you could easily implement yourself as a stopgap, using a portable extension.

But what we really need to do is get the Seam2/CDI interoperability layer into your hands, so that you can start migrating your application to CDI incrementally.

 
18. Nov 2009, 12:04 CET | Link

Hi, I recently did some analysis on J2EE/JEE spec documentation. Interesting to see, how much documentation a beginner has to keep up with. About 6000 pages spec and half of this is considered core .. more here

 
19. Nov 2009, 01:26 CET | Link

I'm having a look around at the moment with different things, and one of the current frustrations I have is the fact that all this new shiny stuff (Glassfish v3, Jee6, JBoss AS with Weld, JSF 2, EJB 3.1, JSR 299 , well I guess just JEE 6 in general) is soooo close to being ready, and yet it is all unusable together at the moment.

JBoss 5.2 Beta isn't deploying Weld Ear files without errors and doesn't support Jee 6 (EJBs in WAR files), Richfaces isn't working with JSF 2, there are problems injecting stateless beans into passivating managed beans, glassfish v3 is prone to hanging on redeploys, Netbeans with the nice JSF editor likes to freeze too often, JBoss Tools isn't JSF 2 ready and eclipse doesn't help edit xhtml files by default. This isn't meant to be a whine and I know most of this stuff is developer/beta release level at the moment and it is the cutting edge.

It's just frustrating that all this stuff is so close but not ready and the best current working standard stack is JSF 1.2, Richfaces 3.x, JPA 1, Jee5, Glassfish v2 / JBoss 5.x. Getting any of the new (dev/beta) stuff working completely is a pain right now, so I can't imagine what it would be like for someone new to JEE. I'm trying to blog some 'Intro to Weld' stuff, but can't get a working stack together to demonstrate it (except maybe Eclipse and Tomcat/Weld with no EJBs).

However, a good post, it's nice to see someone draw a line in the sand and give an informed opinion.

Also, I was looking at the EJB 3.1 spec yesterday and found it to be littered with EJB 2.1 stuff to the point that it was impossible to read. I think the problem is that it is a spec and if you are writing an EJB App Server, it probably is core. However, I think in practical terms, as a developer, the 80-20 principle probably applies. 20% of the spec is relevant or could be expressed in a document a fraction of this size.

 
19. Nov 2009, 02:22 CET | Link
all this new shiny stuff ... is soooo close to being ready, and yet it is all unusable together at the moment.

Yes, it will take a few more weeks to pull everything together into a working AS release. Both the JBoss and GlassFish teams are hard at work on this.

JBoss 5.2 Beta isn't deploying Weld Ear files without errors

On the current nightly builds, I'm deploying and running the Weld example w/o error. Not saying there aren't bugs, just that it's working at some level.

Richfaces isn't working with JSF 2, ... Netbeans with the nice JSF editor likes to freeze too often, JBoss Tools isn't JSF 2 ready

Yes it will take a little while to get all the tooling uptodate with JSF2.

Also, I was looking at the EJB 3.1 spec yesterday and found it to be littered with EJB 2.1 stuff to the point that it was impossible to read.

Yeah, that's unfortunate. The spec is overdue for reorganization. It's not as bad as the JSF spec, however, which needs to be just completely rewritten.

However, I think in practical terms, as a developer, the 80-20 principle probably applies. 20% of the spec is relevant or could be expressed in a document a fraction of this size.

That's correct.

 
19. Nov 2009, 07:50 CET | Link
Gavin King wrote on Nov 18, 2009 20:22:
Richfaces isn't working with JSF 2, ... Netbeans with the nice JSF editor likes to freeze too often, JBoss Tools isn't JSF 2 ready Yes it will take a little while to get all the tooling uptodate with JSF2.

JSF 2 support were added in M3 and even more in M4 JBoss Tools release.

Please try it out and let us know if there are some JSF 2 feature we aren't supporting properly.

i.e. M4 supports composite components in code completion and the visual rendering and openons understand the resource lookup mechanism in JSF.

 

--max

 
19. Nov 2009, 14:14 CET | Link

BTW, Max, is there some wiki-brainstorming-page where we can toss around features we'd like to see in Weld Tooling?

 
19. Nov 2009, 18:51 CET | Link

The current way is to open feature requests in JBIDE jira under the CDI component.

Feel free to create a wiki and point us to it if you prefer that approach.

 

--max

 
11. Apr 2012, 23:26 CET | Link

Are there any updates to this? I noticed the latest comment is from November 2009. How would you rewrite this blog entry now? What about frameworks like PrimeFaces and IceFaces? What's the best framework that can easily interact with JavaScript libraries like jQuery?

 
02. Sep 2014, 10:50 CET | Link
jack

Fantastic blog post. The post affects a lot of urgent challenges ac company coral gables of our society. We can not be uninvolved to these challenges. This post gives good ideas and concepts. Very informative and practical.

 
08. Sep 2014, 11:07 CET | Link
brushes

Make sure to clean out your brushes and combs, and wash them periodically. A good rule of thumb is to clean them with soap and water around once a week. This will minimize the amount of build up that you will incur on your hair follicles and you will have healthier revitol hair removal cream.

 
08. Sep 2014, 11:42 CET | Link
carbohydrates

Try to consume some carbohydrates and proteins prior to going to sleep. The calories that you obtain will cause your body to reduce the rate at which it breaks down proteins while you are sleeping. Eating a small portion of cheese and a fruit is a great way to do this. You should also eat something soon after you wake up. somanabolic muscle maximizer

16. Sep 2014, 09:25 CET | Link
michael kors outlet online sale,michael kors,kors outlet,michael kors outlet,michael kors handbags,michael kors outlet online,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors

, oakley vault,oakley sunglasses,oakleys,oakley sunglasses cheap,oakley.com,sunglasses outlet,cheap oakley,cheap oakley sunglasses,oakley outlet,cheap sunglasses,oakley prescription glasses,fake oakleys,oakley sunglasses outlet,oakley glasses,oakley store,fake oakley,oakley sale,cheap oakleys,discount oakley sunglasses, tory burch outlet,tory burch,tory burch handbags,tory burch shoes,tory burch sale,toryburch,tory burch sandals,toryburch.com,tory burch flip flops, ray ban sunglasses outlet,ray ban,ray ban sunglasses,rayban,ray bans,ray ban outlet,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,rayban sunglasses,cheap ray ban, oakley sunglasses,oakley vault,oakleys,oakley sunglasses cheap,oakley.com,sunglasses outlet,cheap oakley,cheap oakley sunglasses,oakley outlet,cheap sunglasses,oakley prescription glasses,fake oakleys,oakley sunglasses outlet,oakley glasses,oakley store,fake oakley,oakley sale,cheap oakleys,discount oakley sunglasses, burberry outlet online,burberry,burberry outlet,burberry handbags,burberry factory outlet,burberry sale, polo ralph lauren outlet online,ralph lauren,polo ralph,polo ralph lauren,ralph lauren outlet,polo shirts,ralph lauren outlet online,polo ralph lauren outlet,ralphlauren.com,polo outlet,ralph lauren polo, gucci outlet,gucci handbags,gucci belts,gucci shoes,gucci,gucci belt,gucci sunglasses,gucci bags,cheap gucci, polo ralph lauren outlet,ralph lauren,polo ralph,polo ralph lauren,ralph lauren outlet,polo shirts,ralph lauren outlet online,polo ralph lauren outlet online,ralphlauren.com,polo outlet,ralph lauren polo, michael kors outlet,michael kors,kors outlet,michael kors handbags,michael kors outlet online,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors, toms shoes,toms outlet,toms shoes outlet,toms.com,tom shoes, cheap oakley sunglasses,oakley sunglasses,oakley vault,oakleys,oakley sunglasses cheap,oakley.com,sunglasses outlet,cheap oakley,oakley outlet,cheap sunglasses,oakley prescription glasses,fake oakleys,oakley sunglasses outlet,oakley glasses,oakley store,fake oakley,oakley sale,cheap oakleys,discount oakley sunglasses, louboutin,christian louboutin,red bottom shoes,louboutin shoes,red bottoms,louboutin outlet,christian louboutin shoes,christian louboutin outlet,red bottom shoes for women,louboutins, michael kors outlet online,michael kors,kors outlet,michael kors outlet,michael kors handbags,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors, michael kors outlet,michael kors outlet online,michael kors,kors outlet,michael kors handbags,michael kors outlet online sale,michael kors handbags clearance,michael kors purses,michaelkors.com,michael kors bags,michael kors shoes,michaelkors,cheap michael kors, ray ban sunglasses,ray ban,rayban,ray bans,ray ban outlet,ray-ban,raybans,ray ban wayfarer,ray-ban sunglasses,raybans.com,ray ban sunglasses outlet,rayban sunglasses,cheap ray ban, louboutin outlet,louboutin,christian louboutin,red bottom shoes,louboutin shoes,red bottoms,christian louboutin shoes,christian louboutin outlet,red bottom shoes for women,louboutins, michael kors handbags clearance,michael kors handbags,michael kors bags,michael kors purses

 
18. Sep 2014, 13:12 CET | Link
beginning

Learn to budget. No matter where you get your money as a college student, you need to make sure your money lasts as long as you need it. Make a list of your expenses and think of how you can cut corners so that you can do what you need to do without going broke.

As you read earlier in the article, beginning college can be very stressful. However, if you use the advice given in this article you are well on your way to enjoying some of the best years of your life. Just keep in mind that you'll be able to look at the past and remember it fondly later. tao of badass pdf

 
23. Sep 2014, 06:31 CET | Link
jassica

A big difference between rugby union and rugby league is how each code handles what happens when the ball goes forward off one of the players. To the casual observer what happens after is the same as both use the scrum. However Rugby union

 
30. Sep 2014, 09:56 CET | Link
Hasan

Which a single-second-positive/six-second-negative cadence does some good items, starting with myofibrillar tension for some tenderness. Cimande: Poekoelan Tjimindie ought to not be mistaken for the Tjimande/Cimande founded by Pak Embah Kahir. Skin Care Gorgeous and flawless skin is one thing that tends to make any person look very good, even with no any makeup. Students understand to defend themselves from any position standing or on the ground. Colonialism begins to figure imperative of beggar to the needs of labour production. old school new body pdf

 
17. Dec 2014, 04:18 CET | Link

You may post on the professional credentials for the blog owner. You could express it's outstanding. Your blog experience can springboard your click through.

 
17. Dec 2014, 04:25 CET | Link
archiearnold

After read a couple of the articles on your website these few days, and I truly like your style of blogging. I tag it to my favorites internet site list and will be checking back soon. Please check out my web site also and let me know what you think. La Liga Spanyol

 
17. Dec 2014, 14:27 CET | Link
worry

You need not worry if this is the standard workouts don't suit your lifestyle.Biking is another great low impact alternative to running. Biking can be a great way to burn some exercise in and save some gas. what is the grow taller 4 idiots program

Try different types of exercise classes to stay motivated and motivated. Try out a dance or dancing. Keep in mind that you do not have to stick with each class if you hate it, while losing weight all the while.

 
17. Dec 2014, 16:08 CET | Link
surroundings

Your surroundings can make all the difference in the world when you are trying to study. A dorm room is not usually a good place for you to study. A library is always be your best bet. If you have to study in your dorm, get a pair of headphones that cancel noise. what is the text your ex back system

 
17. Dec 2014, 22:39 CET | Link
xcxcx

These meals have high amounts of fat and a lot of bad fats. Buy and meat fresh and cook them yourself to gain the most health benefit.

Those learning about nutrition have not been highly milled into their diet. Is it wise to do this while buying fiber pills or wheat germ to make up for the nutrients thrown away in the milling process?

One aspect of healthy lifestyle can be done by monitoring the sugar you consume daily. Many people make the mistake of thinking that fruit juice is a healthy replacement for sugary soda drinks. This sometimes is not always true considering many fruit juices have a higher sugar content than regular soda. what is penis advantage program

Post Comment