Subscribe: Posts / Comments / Email


RSS

Adobe Flex – Amfphp Tutorial

Wed, Oct 15, 2008

Flex, Tutorials

I put together this little walk through for the visual learners out there. We do the whole process of setting up AMFPHP to creating our server side objects and services. It is a really good thing to watch to get up to speed with Flash Remoting.

We create a application called Flex Contacts, a desktop based contact manager built with Adobe Flex.

There is two parts of this tutorial, part 1 which is the server side and part 2 which covers the client side bringing together another CRUD Flex application using AMFPHP and Flex.

Before you watch the videos here is the source files for both, and make sure you use this SQL before getting started.

   1: CREATE TABLE `contacts` (
   2:   `contact_id` int(11) NOT NULL auto_increment,
   3:   `contact_fname` varchar(200) NOT NULL,
   4:   `contact_lname` varchar(200) NOT NULL,
   5:   `contact_email` varchar(200) NOT NULL,
   6:   `contact_url` varchar(200) NOT NULL,
   7:   PRIMARY KEY  (`contact_id`)
   8: ) TYPE=InnoDB  AUTO_INCREMENT=6 ;

 

Here is the video link and source files for Part 1 (server side)

 

Here is the video link and source files for Part 2 (client side)

 

Here is a working example of what we are going to create.

Tags: ,

10 Comments For This Post

  1. Terry Says:

    Thank you for sharing all of your hard work and effort with us!

  2. Nathan Says:

    Excellent tutorial. I receive this error when trying to run the final app. Any ideas?

    Error: No class registered for interface ‘mx.styles::IStyleManager2′.
    at mx.core::Singleton$/getInstance()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\Singleton.as:111]
    at mx.styles::StyleManager$/get impl()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\styles\StyleManager.as:78]
    at mx.styles::StyleManager$/http://www.adobe.com/2006/flex/mx/internal::initProtoChainRoots()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\styles\StyleManager.as:144]
    at index/http://www.adobe.com/2006/flex/mx/internal::_index_StylesInit()[C:\xampp\htdocs\userManager\src\index.mxml:0]
    at index()[C:\xampp\htdocs\userManager\src\index.mxml:0]

    Also, the second video crashes after consuming all of my systems memory (continues to climb and use more than 50% CPU through the whole thing. Doesn’t happen on the first video)

  3. Jonnie Says:

    Damn Adobe Captivate, Im sorry about that, anyways you are getting an error when trying to run? Are you sure you have the exact same source?

  4. Karl Macklin Says:

    Nice tutorial. Captivate is a bitch to use though, screen gets red after a while and forced reload of the page. Also noticing the CPU usage going crazy.

    I went to the working example, and couldn’t manage to save an entry. I did manage to delete your only post in there, so sorry about that.
    The delete function is working perfectly though.

  5. Nathan Says:

    Thanks. I figured out my problem. I had a problem with the way Flex was installed. Hope adobe patches Captivate, this was a VERY userful tutorial. Thanks!

  6. jalal Says:

    nice tutorial

  7. Stix Says:

    Hi Jonnie
    I have a question about this tutorial.
    Why do you handle the object received by php from amfphp as an array?
    Isn’t it supposed to be an object and to be handled as such?
    I’m sure I’m missing a piece here.

    Please help me, as I have been banging my head aginst the wall for several days now.

    Thanks
    Stix

  8. Jonnie Says:

    You handle it as an array because php is not a typed lang, there for reading from flex isn’t always pretty, and this is the way I have been doing it for awhile, I guess it just works.

  9. Gary Millott Says:

    @eric i guess you are right because this youtube video proves the point made http://www.youtube.com/watch?v=1NVuUAr4MMs

  10. Hindi Sms Says:

    One of my school mate said me about your website yesterday.Even i like your article very much.We are currently doing an project on this particluar topic.I believe we will get good marks because of your post thank you very much sir.

Leave a Reply