More Related Content Similar to A Look At Flex And Php Similar to A Look At Flex And Php (20) More from Michael Girouard More from Michael Girouard (14) A Look At Flex And Php1. A Look at Flex and PHP
Central Florida PHP
1 2. A Look at Flex and PHP
• Background Information
• Flex: “Flash for Developers”
• MXML
• Building an Application
2 17. MXML vs. XHTML
• MXML is to Flex as XHTML is to WWW
• XHTML is interpreted
• MXML is Compiled (into SWF)
17 18. MXML vs. XHTML
• In MXML and XHTML you can
• Define structure of data and layout
• Define behavior or logic
• Define presentation of information
18 19. MXML is XML
<?xml version=quot;1.0quot; encoding=quot;utf-8quot;?>
<mx:Application xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
backgroundColor=quot;#FFFFFFquot;>
<mx:WebService id=quot;srvquot;
wsdl=quot;http://coenraets.org/services/ProductWS?wsdlquot;
showBusyCursor=quot;truequot;/>
<mx:DataGrid dataProvider=quot;{srv.getProducts.lastResult}quot;
width=quot;100%quot;
height=quot;100%quot;>
<mx:columns>
<mx:DataGridColumn dataField=quot;productIdquot; headerText=quot;Product Idquot;>
<mx:DataGridColumn dataField=quot;namequot; headerText=quot;Namequot;/>
<mx:DataGridColumn dataField=quot;pricequot; headerText=quot;Pricequot;/>
</mx:columns>
</mx:DataGrid>
<mx:Button label=quot;Get Dataquot; click=quot;srv.getProducts()quot;/>
</mx:Application>
19 26. Installing Flex
• Unpack the SDK to a permanent location
• Install the Debug Player
• Add the compiler to your PATH
• Windows: bin/mxmlc.exe
• Mac: bin/mxmlc
26 27. Write the Code
Binding.mxml
<?xml version=quot;1.0quot; ?>
<mx:Application
xmlns:mx=quot;http://www.adobe.com/2006/mxmlquot;
horizontalAlign=quot;centerquot; verticalAlign=quot;centerquot;
>
<mx:Panel title=quot;{textInput.text}quot;>
<mx:TextInput id=quot;textInputquot; width=quot;250quot; text=quot;Data Bindingquot;/>
</mx:Panel>
</mx:Application>
27 30. Useful Links
• Flex.org
• http://flex.org/
• Flex Documentation
• http://www.adobe.com/support/documentation/
en/flex/
30 31. Useful Links
• Flex Quickstart Tutorials
• http://www.adobe.com/devnet/flex/?
tab:quickstart=1
• Try Flex Online
• http://try.flex.org/
• Flex Labs
• http://labs.adobe.com/technologies/flex/
31 32. Useful Links
• Adobe Developers of Greater Orlando
• http://adogo.us/
• RIAPedia
• http://www.riapedia.com/
• Flex Team Blog
• http://weblogs.macromedia.com/flexteam/
32