Discussions

Web tier: servlets, JSP, Web frameworks: Flex on the Front but Spring or Seam on the Back?

  1. 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.
  2. 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...
  3. 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.
  4. Not so great for Business Layer[ Go to top ]

    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.
  5. 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?
  6. 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.
  7. And practically?[ Go to top ]

    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
  8. 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!
  9. 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/
  10. 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.
  11. 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:)
  12. Exadel Flamingo is integration of JBoss Seam and Flex: http://code.google.com/p/exadel-flamingo/ Your project will have virtually no configuration :)
  13. Has any one tried using lates WebLogic Workshop Studio release? Flex and Spring is already in their technology stack.
  14. 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.
  15. 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)