Video: Flex and Java

Here is the recording of a presentation I gave at the NLJUG a few weeks ago on Flex and Java. I hope you find this useful. Let me know what you think.

This entry was posted in BlazeDS, Flex, Java, LCDS. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

33 Comments

  1. Posted July 21, 2008 at 10:58 pm | Permalink

    Thanks James, the session was excellent with a lot of in-depth topics. Make sure to watch the recording if you missed the session :-)

  2. Kah Tang
    Posted July 22, 2008 at 12:23 am | Permalink

    Hey… I was there. :) Great talk, by the way.

  3. Posted July 22, 2008 at 6:54 am | Permalink

    Hey James. great preso. I was wondering, where can I get those cool adobe max wallpapers?

  4. Rob
    Posted July 24, 2008 at 4:05 am | Permalink

    Thanks for publishing the presentation! I attended it and it was really helpful to figure out how to include BlazeDS (and the Spring Framework) in a project I am currently working on. So it was not only fun, but also useful :-)

  5. Chris
    Posted August 24, 2008 at 9:18 am | Permalink

    Very interesting, but the stream stops at 22:23!

  6. Posted August 24, 2008 at 9:42 am | Permalink

    Hi Chris,

    That didn’t happen for me. See if you can download the whole thing here:
    http://content.screencast.com/users/jlward4th/folders/Default/media/71c196a4-a60d-4e13-b075-63b516a244f3/flex_and_java.swf?downloadOnly=true

    -James

  7. Chris
    Posted August 24, 2008 at 10:12 am | Permalink

    Stopped at 39% (44.9MB) in both Firefox and IE. I managed to watch the whole presentation on Effexts and skinning though…

    Thanks

  8. Posted August 25, 2008 at 5:34 am | Permalink

    Ok, it seems that Screencast.com does funky things with packets. So here is the download from my site:
    http://www.jamesward.com/downloads/flex_and_java.swf

    Let me know if that works.

    -James

  9. Chris
    Posted August 25, 2008 at 7:29 am | Permalink

    Yep – that seems to have worked.

    Thanks for your help – really useful presentation.

  10. Farhan
    Posted September 27, 2008 at 3:35 pm | Permalink

    This was by far most informative presentation I ever saw on Flex. It was very helpful and has gotten me excited about using flex in my next project. I tried downloading Flex 3 SDK, BlazeDS, Flex eclipse plug in, and LCDS. I want to use tomcat as the server. It would really help if you could post the steps on installation and configuration etc. Particularly, when I try to create a new flex project (J2EE type) it asks me for the flex server location. Where is that? I tried googling and could not find anything.

    Any step-by-step would help. A simple tutorial that walks me through where to download, what to download, how to setup and finally how to create a J2EE Flex project.

    If anyone knows where I could find such a tutorial, please let me know.

    Thanks for all this good stuff.

    Farhan.

  11. Posted October 1, 2008 at 12:07 am | Permalink

    Hi Farhan,

    Check out my tutorial about BlazeDS:
    http://www.infoq.com/articles/blazeds-intro

    -James

  12. Prem
    Posted November 16, 2008 at 6:47 pm | Permalink

    Hi James,

    It was a great and informative presentation. You were literally acting like a magician :-). Presentations like this will really help beginners like me to get motivated to learn more about new things like Flex which can do wonders.

    Thanks for the wonderful presentation.

    Prem

  13. Raju
    Posted January 9, 2009 at 4:06 am | Permalink

    Hi James,

    It was a great presentation.
    I am very new to Flex. I have learned so many things.

    Thanks,
    Raju Mahore

  14. Posted February 1, 2009 at 1:49 pm | Permalink

    William from Lagos :
    Hey James. great preso. I was wondering, where can I get those cool adobe max wallpapers?

    +1

  15. ag
    Posted April 5, 2009 at 5:25 am | Permalink

    Hi James,
    First of all thank you for this informational video.
    Actually I have a very similar requirement for Flex + Spring + LCDS/BlazeDS.
    I need to build a sample Spring application integrated with Flex.
    Following are my questions…

    1) Created a sample Spring application like http://localhost:9081/Flex/test.do... This shows me the (/WEB-INF/jsp/)test.jsp as configured in web.xml. In this test.jsp I have a configured FlexTagLib and I have used mxml code in this jsp. Application runs but flash is not displayed cauz the swf file is generated within the WEB-INF/jsp/(In my Spring beans xml view resolver is configured to /WEB-INF/jsp/=suffix and .jsp as prefix.) which the browser will not be able to detect.
    Plz give me a solution for this. If am able to solve this then only my basic setup would be ready i.e a web application built on Spring and Flex….

    2) Once my basic set up is up and running in my first page I need to have form fields(which would map to say UserVO.java) and when I submit the form I should be able to go the controller add the record in DB and get a list of users and dispaly the result in another jsp using .
    Basically I just need how to call a bean(adduser.do) configured in spring-beans xml and return a modelandview and in that jsp display the results.

    I know am asking too much but am struggling a lot. Just FYI I am very much comfirtable with Spring application new to Spring+Flex. Also I have the LCDS setup ready within my application.

    Sir, I would be waiting for your reply. If required you can also mail me to myextrawork@gmail.com.

    Thanks in advance.

  16. Posted April 5, 2009 at 6:38 am | Permalink

    Hi ag,

    I recommend a few resources:
    http://ria.dzone.com/articles/introduction-spring-blazeds

    http://coenraets.org/blog/2009/03/springblazeds-integration-test-drive-m2-update-available/

    Those should help answer your questions and provide examples for how to do this in Flex.

    -James

  17. ag
    Posted April 5, 2009 at 9:06 am | Permalink

    Hi James,
    Thanks for the reply.
    These links I had got from google last week itself :-) but this does not have the solution for my problem.

    My new basic dumb question is when we are developing a Flex+Spring MVC web application the url should be http://localhost:9081/Flex/test.do or http://localhost:9081/Flex/test.mxml Am 100% sure your answere would be the first one .do and thats how I have a basic application set up ready up and running.
    Now that I have a basic setup ready from my home page(adduser.jsp) I fill in a form data (firstName, lastName,….) and I click submit the request should to AddController (as configured in my spring beans Flex-servlet.xml). In the controller implement some logic create a list of users and return the list the ModelAndView object (As my controller would implement SimpleFormController my onSubmit overridder function would return a ModelAndView object say showAllUsers.jsp as success view) . In my next page in this eg. its showAllUsers.jsp I would like to display the ArrayList in mx:DataGrid format.

    I hope I have explained my issue clearly and sorry if its frustrating :-) but I need help of some expertise like you.

    Thanks again in advance…

  18. Posted April 6, 2009 at 5:52 am | Permalink

    Hi ag,

    I’m confused about what you are trying to do. Can you email me jaward at adobe dot com? Thanks.

    -James

  19. Kunal
    Posted April 13, 2009 at 7:45 am | Permalink

    Hi James,

    I am a Oracle Siebel CRM Analyst & Developer, novice to FLEX Builder. I am trying to do something similar to what you showed in the presentation here – only difference being I want to pull data from a Sybase iAnywhere database sitting on the local machine and present it on a Flex based UI.
    I have a similar Java program which connects to the database and is able to pull data. I am stuggling at the point of being successfully integrate Java with Flex and being able to show Java data in Flex. I believe I don’t have the same folder structure as yours in the IDE – Under my Java project, I dont see the ‘flex’ folder and all its child folders/files (including remoting-config.xml). Could you please tell what am I missing?
    I did install the plugin Flex plugin for Eclipse.

    I would greatly appreciate your time and response.
    Thanks!

    Regards, Kunal

  20. Sri
    Posted April 13, 2009 at 8:12 am | Permalink

    Hi James-

    We are trying to access local java class from flex, is it possible to implement without setting this class as a remote object.
    We are trying to instatiate a local database which resides locally and pull the data and display in flex

    Thanks
    Sri

  21. Posted April 14, 2009 at 9:31 pm | Permalink

    Hi Sri,

    Check out Merapi:
    http://www.merapiproject.net/

    -James

  22. Posted April 14, 2009 at 9:34 pm | Permalink

    Hi Kunal,

    You might want to try and follow this tutorial:
    http://www.infoq.com/articles/blazeds-intro

    -James

  23. Shail
    Posted July 2, 2009 at 10:39 pm | Permalink

    Hey James, which book would you refer for the beginners in order to learn flex java.

    -Shail

  24. Posted July 3, 2009 at 5:54 am | Permalink

    Hi Shail,

    First Steps in Flex by Bruce Eckel and myself has a chapter on Flex and Java which is a revised version of this article on InfoQ. Let me know if that helps.

    -James

  25. Posted September 18, 2009 at 6:54 am | Permalink

    Hello James,
    Really very nice and useful.
    Thanks a lot.

  26. Bil
    Posted October 27, 2009 at 2:57 am | Permalink

    Thanks for this very interesting tutorial !

    Could somebody please help me resolving this issue?

    I want to call a hidden form in a jsp page, and send it values from my flex application to finaly send the form to another site when jsp page is loading.

    For that, i use an HTTPService;

    to send a model object:

    123456
    10

    In jsp side, i have:

    …….

    <input type="hidden" name="CarId" value="”>
    <input type="hidden" name="CarName" value="”>

    To send the model object, i use in Flex side : myHTTPService.send(myCar); but i’am not been redirected to http://www.mysite/mypage.jsp where the form should be sent to http/newurl….

    I tried:

    myHTTPService.send(myCar);

    var urlRequest:URLRequest=new URLRequest(‘http://www.mysite/mypage.jsp’);
    navigateToURL(urlRequest,”_self”);

    But the jsp page could’nt get values from the flex application, all values are null

    Many thanks in advance,

    Bil

  27. Posted October 27, 2009 at 7:04 am | Permalink

    Hi Bil,

    Perhaps you should populate the form using the Flex Ajax Bridge?

    -James

  28. Bil
    Posted October 27, 2009 at 7:23 am | Permalink

    Hi James,

    Thanks for your reply.

    I’ll try this solution…

    Regards.

  29. jacjo
    Posted October 31, 2009 at 4:32 am | Permalink

    I have a problem with RemoteObject:
    PositionDA file:

    public List getPositions(){

    List lst = new ArrayList();

    try{
    String sql = “”;
    sql =”SELECT * FROM ChucVu “;

    PreparedStatement pre = getConnection().prepareStatement(sql);
    ResultSet rs = pre.executeQuery();

    while(rs.next()){
    //pos = new Position(rs.getString(“MaCV”).trim(),rs.getString(“MoTa”).trim());

    lst.add(new Position(rs.getString(“MaCV”).trim(),rs.getString(“MoTa”).trim()));

    //System.out.println(pos.strID + “:” + pos.strDescr );
    }

    }catch (Exception e) {
    e.printStackTrace();
    }

    return lst;

    }

    Service file:
    public List getPositions(){
    PositionDA posDao = new PositionDA();
    return posDao.getPositions();
    }

    Flex file:

    private function resultCall(event:ResultEvent):void {

    dg.dataProvider = event.result as ArrayCollection;

    }

    My method which get data form SQLServer, it work in Java but it is error for Flex?

    I am working wrong?
    Thanks!

  30. Posted November 2, 2009 at 11:06 am | Permalink

    Hi jacjo,

    What is the error?

    -James

  31. Tim Pham
    Posted December 2, 2009 at 9:23 pm | Permalink

    Great presentation, James! I can’t wait to try it out. Coming from Java side with JSF experience, I really like the push in Data Management Service.
    Thanks,

    Tim

  32. Scott
    Posted December 31, 2009 at 1:50 pm | Permalink

    James,

    Great presentation! Packed with info, and good to see examples done inside of Flex Builder.

    Question: could you point me to info specifically about hooking up a Flex front-end to an existing JSF app? We use JSP as our view tier, which we’d like to replace with Flex. I saw the example you did of a Flex app presenting data from a GET request to a JSP, very cool, but JSF requires POSTs in order to invoke backing bean methods, and I’d like to preserve as much of my backing bean code as possible. Can HTTPService submit POST requests? Are there any tools or projects you’re aware of that help provide a “bridge” from Flex to JSF?

    Suggestion: it was hard to hear the questions from the audience. If you had repeated the question after it was asked, it would have come through in the presentation audio better (or perhaps you could do some post-prod to boost the audio when the question is being asked or something).

    Thanks for the presentation,
    Scott

  33. Posted December 31, 2009 at 2:24 pm | Permalink

    Thanks Scott. You can definitely do POSTs with HTTPService.

    There are a few projects out there that might help you put a Flex front-end on top of JSF:
    http://code.google.com/p/jsf-flex/
    http://livedemo.exadel.com/fiji-demo/

    I hope that helps. Feel free to email me if you have other questions. jaward at adobe dot com

4 Trackbacks

  1. [...] Source [...]

  2. By Zeno Consulting Tech Blog: Fun With Flex on January 22, 2009 at 6:49 pm

    [...] That’s kind of why I got interested in Flex. One thing that intrigued me was this video demo of the Flex Lifecycle Data Services by James Ward. It is a long video, but if you have the time, it is worth [...]

  3. [...] is used the API in Flex is the same. If you’d like to see how to use those APIs check out this video I [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Subscribe without commenting

  • About James Ward



    View James Ward's profile on LinkedIn

  • First Steps in Flex by James Ward and Bruce Eckel




  • Twitter Updates


  • Tour de Flex