Discussions
Web tier: servlets, JSP, Web frameworks: Flex on the Front but Spring or Seam on the Back?
-
Flex on the Front but Spring or Seam on the Back? (14 messages)
- Posted by: Neil Chaudhuri
- Posted on: April 04 2007 16:27 EDT
I am about to start a fairly large-scale development effort, and I was all set to use JSF, Seam, and JPA as the primary technologies. However, Flex has gained a lot of momentum here, and I am assessing whether this will be the better choice for us instead of JSF. Even if I do go with Flex, I would prefer to use it only as the view technology and have it be completely separate from the business logic and persistence implemented with POJOs. I am just not sure which framework, Seam or Spring, is better suited to integration with Flex. There are a good number of resources on Flex-Spring integration and none on Flex-Seam integration, but I believe that is more a function of Spring's age, power, and popularity than any real technological superiority. Does anyone have experience leveraging either Spring or Seam with Flex? Is there a better choice? Thanks.Threaded Messages (14)
- Re: Flex on the Front but Spring or Seam on the Back? by Jeryl Cook on April 06 2007 08:56 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Neil Chaudhuri on April 06 2007 14:29 EDT
-
Not so great for Business Layer by Sean Edwards on April 06 2007 04:24 EDT
-
Re: Flex on the Front but Spring or Seam on the Back? by Neil Chaudhuri on April 11 2007 12:32 EDT
-
Re: Flex on the Front but Spring or Seam on the Back? by Jeryl Cook on April 16 2007 01:48 EDT
- And practically? by Stefan Frank on May 24 2007 10:15 EDT
-
Re: Flex on the Front but Spring or Seam on the Back? by Jeryl Cook on April 16 2007 01:48 EDT
-
Re: Flex on the Front but Spring or Seam on the Back? by Neil Chaudhuri on April 11 2007 12:32 EDT
-
Not so great for Business Layer by Sean Edwards on April 06 2007 04:24 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Jeryl Cook on April 06 2007 19:27 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Neil Chaudhuri on April 06 2007 14:29 EDT
- My two cents... Just try it. Go here for FLEX-Spring Test Drive by Rene Muniz on June 23 2007 09:04 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Gary Lamperillo on December 18 2007 18:16 EST
- Re: Flex on the Front but Spring or Seam on the Back? by kristian j on December 19 2007 05:49 EST
- Re: Flex on the Front but Spring or Seam on the Back? by Igor Polevoy on March 18 2008 02:49 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Deha Peker on March 19 2008 23:37 EDT
- Re: Flex on the Front but Spring or Seam on the Back? by Cameron Ingram on June 15 2008 07:58 EDT
- Flex on the Front but Spring or Seam on the Back? by Sonjoy chakraborty on March 16 2010 15:33 EDT
-
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: April 06 2007 08:56 EDT
- in response to Neil Chaudhuri
just talked about Flex with a follow developer yesterday.. spring has nothing to do with Flex., unless your talking about Spring MVC. you could easily use Spring,EJBs,etc.. on the back end..Flex is front in User Interface components... -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Neil Chaudhuri
- Posted on: April 06 2007 14:29 EDT
- in response to Jeryl Cook
Thanks, Jeryl, but I am aware that Spring and Flex are distinct technologies. However, Adobe is targeting Java developers with Flex and has built several compelling features to make integration between Flex and Java middleware much easier. It seems to me Flex Remoting can theoretically talk to any Java middleware, but I was asking if anyone had experience with using Spring or Seam with Flex and if there was a distinct advantage to using one or the other. By the way, Spring MVC also has nothing to do with Flex. There may be a way to plug Flex in as the view into Spring MVC, but that is certainly not possible out of the box. -
Not so great for Business Layer[ Go to top ]
- Posted by: Sean Edwards
- Posted on: April 06 2007 16:24 EDT
- in response to Neil Chaudhuri
I would recommend putting minimal business logic in flex. From experience, all calls using web services/post are asynchronous, and there is no ability to "Stop" (Flex is single threaded) until some other action has completed, so transactions our complicated business logic becomes very difficult. -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Neil Chaudhuri
- Posted on: April 11 2007 12:32 EDT
- in response to Sean Edwards
As I mentioned in my original message, that strategy is precisely what I hope to pursue--Flex purely as a view technology and all the business logic and services like persistence, security, and transactions in Java. Given that, my question is whether Spring or Seam compares more favorably as the appropriate Java middleware. Is there a distinct advantage to using one or the other as the Java middleware? -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: April 16 2007 13:48 EDT
- in response to Neil Chaudhuri
I only know Spring, just giving you my perspective on Spring and Flex. But again.., Spring,EJB,Seam,all the rest of the middle tier frameworks,etc... i personally cannot see any disadvantage of using one of them with Flex simply because they are not coupled at all. -
And practically?[ Go to top ]
- Posted by: Stefan Frank
- Posted on: May 24 2007 10:15 EDT
- in response to Jeryl Cook
Sure, flex is a front-end technology, seam a backend, and they theoretically should work together: And practically?! Has anyone actually done this? what techniques work for exchanging data, how do you propagate conversation-contexts, how do you serialize/de-serialize stuff betwenn flex and seam - I mean: Not "There should in a perfect world be a more or less complicated way to do this somehow" but actually: This is how you it. So, here is an ad-hoc approach for pushing charting data into flex for display: In Flex: Make up a HTTPService: and initialize a bindable Collection in your callback: [Bindable] private var topicStatistics:ArrayCollection = new ArrayCollection(); private function statisticsRPCResult(event:ResultEvent):void{ topicStatistics = event.result.statistics.topics.topic; In your xhtml simply produce xml: <?xml version="1.0" encoding="UTF-8"?> #{topicStat.topicName} #{topicStat.right} #{topicStat.wrong} #{topicStat.unanswered} In seam: use a pages.xml to map any request-parameter and prepare any objects you might need for producing the xml. Things to note here: -sessiondata is conserved: The flex call also submits the cookies for keeping session-data together - if you want to ensure, that communication happens under a certain conversation, push the conversationId into flex using a flashvar and add the conversationId as a parameter to the httpRequest. This works exceptionally smooth, but of course, it is only a start. I'm still looking for more efficient examples for actually calling methods from within flex. Something similar to SeamRemoting, but for flex: - using REST for exchanging data - using JAXB for serialization/de-serialization - flex also supports json for exchange, but seam does not - any workarounds for that? - hey, what about webservices and conversations?! Does this work with flex and seam? And again: I know this is theoretically doable - but has anyone done it and it worked?! Cheers stf -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Jeryl Cook
- Posted on: April 06 2007 19:27 EDT
- in response to Jeryl Cook
right we are on the same page :).. the reason i said Spring has nothing to do with flex, is because if you use Spring as simply the Application framework..it really is not coupled to the presentation at all(Flex). in a nutshell i dont think u will have any issues using Spring and flex together...i just downloaded the trail myself..not going to use it for any "professional" projects yet..but it looks great, let the community know how you like it when u used in on ur project! -
My two cents... Just try it. Go here for FLEX-Spring Test Drive[ Go to top ]
- Posted by: Rene Muniz
- Posted on: June 23 2007 09:04 EDT
- in response to Neil Chaudhuri
If you are still interested in test driving FLEX with Spring. I recommend this installation of tomcat that ships with samples of FLEX and Spring, as well as other technologies, right out of the box, here is the URL. http://coenraets.org/blog/2007/01/flex-test-drive-server-for-java-developers-tomcat-based/ -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Gary Lamperillo
- Posted on: December 18 2007 18:16 EST
- in response to Neil Chaudhuri
Gavin has mentioned that he would like to use other views, other than JSF. Using Seam with Flex makes alot of sense to me, We use Flex without the Flex Data Services, which means that we use web services with Flex to integrate our services. Using the JBossWS integration with Seam components(ie, now you have conversational web services), you should be able to take care of problems that would arise, if the contextual state was not managed. For example, use a seam component that is a stateful session bean with extended persistence context and a conversation scope, in this case, the backing entity does not need to worry about state inconsistencies. -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: kristian j
- Posted on: December 19 2007 05:49 EST
- in response to Gary Lamperillo
hi, I just got Flex/Seam integration working using Adobes new BlazeDS for remoting. I haven't had time to test this more yet, but at least you can access the java methods with Flex mx:remoteObject directly wihout basically any changes on the java side. I'm fairly new to Java - on our project I'm working on the frontside with richfaces/jsf - and I'm more Flash- than Java developer anyway- but I wrote a small tutorial about the process, please see here And please let me know about errors or if some points need more clarification- not only I'm new to Java, but also to writing tutorials:) -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Igor Polevoy
- Posted on: March 18 2008 02:49 EDT
- in response to Neil Chaudhuri
Exadel Flamingo is integration of JBoss Seam and Flex: http://code.google.com/p/exadel-flamingo/ Your project will have virtually no configuration :) -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Deha Peker
- Posted on: March 19 2008 23:37 EDT
- in response to Neil Chaudhuri
Has any one tried using lates WebLogic Workshop Studio release? Flex and Spring is already in their technology stack. -
Re: Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Cameron Ingram
- Posted on: June 15 2008 07:58 EDT
- in response to Neil Chaudhuri
You can try GraniteDS and Tide(www.graniteds.org). It provides full support for Seam with very little code. Configuration consists of just copying a few files to the correct dir. The code is simple and easy to use. -
Flex on the Front but Spring or Seam on the Back?[ Go to top ]
- Posted by: Sonjoy chakraborty
- Posted on: March 16 2010 15:33 EDT
- in response to Neil Chaudhuri
Hi Neil,
in case, you use JBOSS 5 or higher, then, better go with SEAM framework with RIA - Statefull session development. Otherwise, with any other server, better proceed with ADOBE FLEX as view set only. (only front end).
- Sonjoy.
(+91 - 9642555913)