6 Replies Latest reply on Dec 28, 2010 8:35 PM by Nikolay Elenkov

    Java application framework like Seam

    Todd Morrison Newbie

      Seam is awesome.


      The configuration is simple. Transaction management is a breeze. Dependency injection does not require ugly hurdles.


      I would like to use some of Seam's features in a desktop (AWT) client.


      Can anyone make any suggestions on what client frameworks are available that are as far along as Seam?


        • 1. Re: Java application framework like Seam
          Nikolay Elenkov Master

          Todd Morrison wrote on Dec 26, 2010 17:08:


          Seam is awesome.

          The configuration is simple. Transaction management is a breeze. Dependency injection does not require ugly hurdles.


          You are obviously still in your honeymoon period with Seam or you haven't written a really complex application yet :)



          I would like to use some of Seam's features in a desktop (AWT) client.


          Did you really mean AWT? And not Swing? Do people actually still use this?!



          Can anyone make any suggestions on what client frameworks are available that are as far along as Seam?


          Spring :) Weld/Seam 3 has some support for desktop Java, but that still alpha stage, give it a try though,
          might fit your needs.

          • 2. Re: Java application framework like Seam
            hantsy bai Master

            I think the Exadel Flamingo project can help u.


            http://exadel.org/flamingo

            • 3. Re: Java application framework like Seam
              Nikolay Elenkov Master

              hantsy bai wrote on Dec 26, 2010 23:21:


              I think the Exadel Flamingo project can help u.

              http://exadel.org/flamingo


              How so? Flamingo makes it easy to access Seam server side logic from your Swign/JavaFX, etc application. It does not provide Seam services (injection, transaction management, etc) for your desktop applications. If all you want to do is create a Swing frontend for your Seam app it might be usable, but that's it.

              • 4. Re: Java application framework like Seam
                Todd Morrison Newbie

                Nikolay:


                The Spring Framework (3) is what I was looking for.


                Was able to get going in a few hours by binding the Session Component Scope to thread. The inject framework and Transaction Management through the Application Context is pretty nice.


                Kind of lame that we have to have setters with @Autowired everywhere, but still better than keeping track of instances ourselves.


                ------


                SWING and AWT are both widely used. I know SAS products are the future but there are still millions in retail sales for desktop products in both Java and .NET.


                ------


                Not in Seam Honeymoon period.


                More like, had 5 bad marriages with ASP, ASP.NET, ASP.NET MVC 1,2,3, Silverlight, ATL Server
                (you can throw Entity Framework on that list, compared to Hibernate)


                The large-scale projects I have been involved with using Seam have not been full of road-blocks.
                Usually, it is just training hurdle for developers that abuse component contexts (which dramatically effects performance/persistence patterns)


                Now that I see the similarities between Seam and Spring's Component model, I am even more impressed and can imagine a good integration path for Seam 3.


                -----


                Thanks again for the help!

                • 5. Re: Java application framework like Seam
                  Todd Morrison Newbie

                  I take back the 'lame' comment about the @Autowired...


                  I was using an old doc.


                  @Autowired
                  private MyComponentType myComponent;


                  Works just fine.


                  I love it!

                  • 6. Re: Java application framework like Seam
                    Nikolay Elenkov Master

                    Todd Morrison wrote on Dec 28, 2010 16:21:


                    @Autowired
                    private MyComponentType myComponent;

                    Works just fine.



                    Yes, field injection is supported. You may still want to use setter injection to make testing easier in some case though. BTW, @Autowired is a huge step forward compared to earlier releases, where you had to write every single dependency in the XML file.


                    I haven't seen a pure AWT application in like 10 years, but I guess there is a niche for that too. Still I find it strange that someone would choose AWT when AFAIK Swing is available for every platform AWT is. While I agree that there is a lot of market for .NET, Java on the desktop is pretty much done with, except for in-house applications. Anyway, that's just my opinion and it is getting way off topic.


                    Good luck and a happy new year!