Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SDN Mentor Hands On - Exercise 2

1,396 views

Published on

Brief intro slides before Exercise 2 of the Mentor Hands On Session

Published in: Technology, Education
  • Be the first to comment

  • Be the first to like this

SDN Mentor Hands On - Exercise 2

  1. 1. Flex Component 101 dan mcweeney
  2. 2. What’s Flex <ul><li>“… is a cross platform, open source framework for creating rich Internet applications that run identically in all major browsers and operating systems, and now the desktop with Adobe AIR” </li></ul><ul><li>Runs just on the Flash Player </li></ul><ul><li>“ Flash content reaches 99.0% of Internet viewers” </li></ul>
  3. 3. What’s Flex <ul><li>“… is a cross platform, open source framework for creating rich Internet applications that run identically in all major browsers and operating systems, and now the desktop with Adobe AIR” </li></ul><ul><li>Runs just on the Flash Player </li></ul><ul><li>“ Flash content reaches 99.0% of Internet viewers” </li></ul><ul><li>Makes Pretty Uis easy </li></ul><ul><li>Integrates with SAP </li></ul><ul><ul><li>Web Services </li></ul></ul><ul><ul><li>Java via BlazeDS </li></ul></ul><ul><ul><li>Flash Islands </li></ul></ul>
  4. 4. <ul><li>Point of reuse in the Flex Framework for UI components </li></ul><ul><li>Mostly written in AS but can be created in MXML </li></ul><ul><li>Skinable through CSS </li></ul>Flex Components
  5. 5. Flex Applications <ul><li>Created with many components </li></ul><ul><li>Stitched together using Actionscript </li></ul><ul><li>The actual run-able unit </li></ul>
  6. 6. Flash Islands <ul><li>Allows Flex Applications to talk to the Web Dynpro Framework </li></ul><ul><ul><li>Set Data </li></ul></ul><ul><ul><li>Get Data </li></ul></ul><ul><ul><li>Receive and Fire Events </li></ul></ul><ul><li>Why the hell are you talking about Components!?!? </li></ul>
  7. 7. Flex Basics <ul><li>MXML (backronymed to Magic eXtensible Markup Language) </li></ul><ul><ul><li>XML based markup for defining UI and components </li></ul></ul><mx:Button fillColors=“[blue,blue]” color=“red” label=“This is a button”> </mx:Button>
  8. 8. Flex Basics <ul><li>Actionscript 3 </li></ul><ul><ul><li>Object oriented language similar to Javascript, both adhere closely to ECMAScript standards </li></ul></ul>package { import mx.controls.Button; public class MyButton extends Button { public function MyButton() { super(); setStyle( &quot;fillColors&quot;, [&quot;blue&quot;,&quot;blue&quot;]); setStyle( &quot;color&quot;, &quot;red&quot;); label = ”This is a button&quot;; } } }
  9. 9. Actionscript Cheat Sheet <ul><li>Class Syntax </li></ul><ul><li>package i.could.be.useful { </li></ul><ul><li>public class Foo extends Bar { </li></ul><ul><li>public var imPublic:XML; </li></ul><ul><li>protected var imProtected:Number; </li></ul><ul><li>private var imPrivate:String; </li></ul><ul><li>public function Foo() { </li></ul><ul><li>super (); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  10. 10. Actionscript Cheat Sheet <ul><li>Traverse XML </li></ul><ul><li>private function traverseXML(xml:XML):Boolean{ </li></ul><ul><li>for each ( var node:XML in xml.collectionToTraverse){ </li></ul><ul><li>trace ( &quot;do something with the name&quot; ); </li></ul><ul><li>} </li></ul><ul><li>return true ; </li></ul><ul><li>} </li></ul><ul><li>Get an attribute of a XML Node </li></ul><ul><li>[email_address] </li></ul>
  11. 11. Actionscript Cheat Sheet <ul><li>Binding </li></ul><ul><ul><li>Bindings allow you to connect a component to a data set </li></ul></ul><ul><ul><li>Data bindings are one way in Flex, from the data to the control. The control has event[s] to allow you to update the data item e.g. “ changed ” </li></ul></ul>
  12. 12. Actionscript Cheat Sheet <ul><li>Setters and Getters </li></ul><ul><ul><li>Flex has public properties but also setters and getters </li></ul></ul><ul><ul><li>The standard way </li></ul></ul><ul><li>package { </li></ul><ul><li>public class Foo{ </li></ul><ul><li>private var _myString:String; </li></ul><ul><li>public function Foo(){ } </li></ul><ul><li>public function get myString():String{ </li></ul><ul><li>return _myString; </li></ul><ul><li>} </li></ul><ul><li>public function set myString(o:String){ </li></ul><ul><li>_myString = o; </li></ul><ul><li>} </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  13. 13. Actionscript Cheat Sheet <ul><li>Component Methods you might need </li></ul><ul><li>addChild(child:DisplayObject):DisplayObject </li></ul>
  14. 14. Actionscript Cheat Sheet <ul><li>Print to Console </li></ul><ul><li>trace(“this will make it to the console to help you debug”); </li></ul><ul><li>Alert Window </li></ul><ul><li>Alert.show(“This is the text”,”this is the title”); </li></ul>
  15. 15. Flex Components <ul><li>Point of reuse in the Flex Framework for UI components </li></ul><ul><li>Mostly written in AS but can be created in MXML </li></ul><ul><li>Skinable through CSS </li></ul>
  16. 16. Mnemonics
  17. 17. Mnemonics - Introduction Mnemonics are the small square graphics used as application icons in product and to represent Adobe’s products and technologies in marketing materials. Mnemonics occasionally change, so please be sure to consult Brand Center (www.adobe.com/brandcenter) to make sure you are using the latest versions. Do NOT create your own mnemonics or alter them in any way. CS3 vs. CS4 style CS3 style mnemonics have white lettering. CS4 style mnemonics have dark lettering. As of the publishing date of this deck, CS4 products have not launched, so only use the CS4 mnemonics when talking about the future version of the product.
  18. 18. Mnemonics – Using the mnemonics in PPT PowerPoint-ready versions (PNG files) of the mnemonics can be found on Brand Center in two versions - with and without a drop shadow. You may choose to use the version with a drop shadow to help make them stand out from the background. If your slide has a lot of design, it might be cleaner to use the version without a drop shadow. The mnemonics should always be visually tied to the product name. Please note: The EPS files on Brand Center are not for use in PowerPoint. They will have a white (not transparent) background in PPT. Also, the PNG files will keep your overall file size down. No shadow With shadow EPS file PNG file
  19. 19. Mnemonics - Sizing Mnemonics are perfect squares and should always be resized proportionally so they never loose their square shape. The minimum size for the mnemonic is .25&quot; and it should not be scaled over 4&quot;. 4” 4” .25”
  20. 20. Color Palette
  21. 21. Color Palette R - 108 G - 142 B - 62 R - 191 G - 215 B - 149 R - 75 G - 137 B - 132 R - 100 G - 148 B - 172 R - 204 G - 0 B - 0 R - 200 G - 131 B - 80 R - 0 G - 0 B - 0 R - 192 G - 192 B - 192 R - 221 G - 221 B - 221 Main Extended R - 230 G - 186 B - 122 R - 235 G - 221 B - 183 R - 175 G - 200 B - 213 R - 140 G - 176 B - 194 R - 166 G - 182 B - 86
  22. 22. Charts and Graphs
  23. 23. Graph Before Conversion Relevant Bullet $X
  24. 24. Graph Before Conversion Relevant Bullet $X
  25. 25. Graph Before Conversion Relevant Bullet $X
  26. 26. Pie Charts Relevant Bullet XXX XX% XXX XX% Standard 53% Pie 1 for two categories, gradients OK Pie 2 for three or more categories, use solid colors XXX XX% XXX XX% XXX XX% XXX XX%
  27. 27. Financial Highlights ($Millions) Q104 Q404 Q105 Revenue $000 $000 $000 Operating Margin $000 $000 $000 EPS 00% 00% 00%
  28. 28. Financial Highlights Relevant Bullet ($Millions) Q104 Q404 Q105 Revenue $000 $000 $000 Operating Margin $000 $000 $000 EPS 00% 00% 00%
  29. 29. Block Diagrams Nesting One Two Three Four Five Six
  30. 30. Point A Point B Point C Point D Nesting One Two Three Four Five Six Point A Point B Point C Point D Nesting One Two Three Four Five Six Resizing a box is an annoying task. After enlarging the whole object, you have to ungroup and manually resize the shadow and highlight, and adjust the corner radii on all three objects Changed the color of the arrow to add emphasis to a point Shadows can be added on lighter backgrounds – remember to only add a shadow to the base object, and not the reflection or shadow Due to the nature of the diagonal gradient, semi-transparent shadows are the way to go when nesting. That way you can use the same shadow color for all boxes and it will look right
  31. 31. Diagram Blocks
  32. 32. Guidelines for using imagery
  33. 33. Image Guidelines <ul><li>Adobe must own the rights to the image </li></ul><ul><li>You can find photography on Brand Center on the product page the image was intended to represent. Always follow specified usage rights /expiration dates. </li></ul><ul><li>If you need to buy new images, send them for review to [email_address] before purchasing. </li></ul><ul><li>Image should be simple, and have a professional look </li></ul><ul><li>Image ideally should be >5.49” (or 800px) tall, and >96dpi - scaling down in PowerPoint is OK, but scaling up past 100% is bad </li></ul><ul><li>No, and I mean NO clip art – seriously </li></ul><ul><li>Don’t use a title slide with no image – if nothing else, use the default Adobe corporate image </li></ul><ul><li>No cheesy pictures (overhead shots of people looking up at you are out) </li></ul>Clip art: BAD! Cheesy: BAD! Blurry: BAD!
  34. 34. Making Your Own Title Slide Image (1 of 2) <ul><li>Crop your image to 5.49” Tall by 4.34” Wide </li></ul><ul><ul><li>Make sure you are on the slide with the red crop guide box (should be two slides after this one) </li></ul></ul><ul><ul><li>Insert your photo (Insert>Picture>From File...) </li></ul></ul><ul><ul><li>Select just the photo, and in the Draw toolbar (probably located at the bottom of your screen), click the Draw menu, select Order, and choose Send to Back – if you don’t see the Order option, click the double-down arrows at the bottom to expand the menu </li></ul></ul><ul><ul><li>Resize your image (never resize the crop guide!) so the crop guide can completely sit within the image (if the image becomes fuzzy or distorted, consider a different image, or find a higher-resolution version of the image you chose) </li></ul></ul><ul><ul><li>Place the crop guide on the image, and move it around until you’re happy with the new crop (continued on next slide) </li></ul></ul>Step 3 – Draw Toolbar Step 5 – Crop Guide on image Crop Guide 5.49” Tall by 4.34” Wide Double- down arrows
  35. 35. Making Your Own Title Slide Image (2 of 2) <ul><ul><li>Hold the Control key and press G (Ctl-G) – the grid and guides window will appear </li></ul></ul><ul><ul><li>Make sure “Snap objects to other objects” is checked, and all other checkboxes are not checked – You may wish to turn this off again when you’re done with this tutorial, as all objects will now snap to other objects </li></ul></ul><ul><ul><li>Click just your image – the Picture toolbar should appear somewhere on the screen </li></ul></ul><ul><ul><li>Choose the crop tool - black handles should appear at the four corners of your image, as well as in the middle of each side </li></ul></ul><ul><ul><li>Drag these handles toward the crop guide until they snap to the crop guide’s edges. When you’re done, delete the crop guide (make sure to save your presentation as something else so you don’t lose the crop guide forever) </li></ul></ul><ul><ul><li>Right-click the image and choose “Properties” (or double-click the image) – then click the Size tab and verify that the image is 5.49” tall by 4.34” wide </li></ul></ul><ul><ul><li>Now click the position tab – Set the image’s position to 5.66” horizontal and 1.01” vertical, both from the top left corner </li></ul></ul>Step 6 – Grid and Guides Step 8 – Picture toolbar Cropped image
  36. 36. Title Slide Crop Guide Feel free to move the crop guide around for cropping purposes, but NEVER resize it Crop Guide 5.5” Tall by 4.3” Wide
  37. 38. Copyright 2008 Adobe Systems Incorporated. All rights reserved.

×