Non Gamstop CasinosNon Uk Casino SitesBest Non Gamstop CasinosNon Gamstop Uk SitesCasinos Not On Gamstop

Cut down Flex in a Week

Watch the videos, indicated by the icon;
then do the exercises indicated by the icon.

You should do all of these before the timetabled workshop so that you can do the independent task at the end of this page during the workshop with the lecturer.

Section 3: Data handling and manipulation

Extending events

Sending remote data

Remote Data: author php and flash

Another set of my videos putting what you've learned above into context and showing it in action

Independent Task

These tasks you can do in class if you want, having first followed the videos and exercises above in your own time.

Task Overview

The tasks will require you to implement an extension to your AuthorServicePipe to call an Author class update method to modify author details stored in the database, then to modify your display/edit form in Flash Builder so that it will send information back to the main program using a custom event containing the updated Author object. The main program will invoke an author http service sending appropriate parameters to the updated AuthorServicePipe php script. In other words you're going to implement exactly what the three videos above demonstrate.

php serverside

  1. Modify the AuthorClassPipe to include an update action in which it will get the appropriate values from the request stream to enable you to update the author information (you'll need ID, surname, forename and phone). Check those values aren't blank before..
  2. Modify the Author class constructor to allow ID, surname, forename and phone but with default values of null -remember this is important else your other php code will break since pdo doesn't send values to the constructor.
  3. Make your update action in the AuthorClassPipe create a new Author class instance using the values sent in the request stream.
  4. Modify the AuthorService update method to take an author instance passed as a parameter and, using prepared statements, create and execute the appropriate sql statment using named placeholders.
  5. Test your AuthorServicePipe.php works correctly by manually typing in values in your URL - as shown in the screencast.

Flash Builder project

  1. You should already have an AuthorDisplay component that uses a form with a drop down list to choose authors and which displays author data in TextInput boxes - the screencast has more detail.
  2. Make sure also that you have an Author class in a valueObjects package that you have made Bindable
  3. Create a new project, named authorInfo-withCustomEvents and copy and paste all the source code and directories (components and valueObjects) from the earlier version completed as part of the last set of Flash Tasks. By the way, you can do this directly from inside Flash Builder by clicking on the directories within src from the left pane and choosing copy and then pasting into the src directory of the new project.
  4. Create a Custom Event, named as in the screencast, that will receive an instance of Author as demonstrated in the screencast.
  5. Modify your AuthorDisplay component to add a Save button, create a Save button click event handler inside of which you will create an Author instance and dispatch it to an instance of your AuthorEvent class.
  6. Modify your main program to listen for the authorEvent and, inside a handler for that event, create the appropriate parameters to pass to a new HTTPService request object.
  7. Modify your program so that after a successful update operation the new updated author information is correctly displayed.
  8. Implement the appropriate code so that the save button is only active if the user has edited the data.

Quality sites