22
Second Annual Enterprise Flex Symposium August 7, 2009, New York City Star6ng a new Enterprise Flex Project Equipping

Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Second Annual Enterprise Flex Symposium 

August 7, 2009, New York City 

Star6ng a new Enterprise Flex Project  Equipping 

Page 2: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Formula of Successful RIA project 

• The right project manager 

• The right team 

• Good tools 

Page 3: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

If you are a Project Manager 

•  Be very picky with staffing. Never accept pre‐staffed team. Be harsh in interviewing. 

•  Become a virtuoso of MicrosoI Project or a similar planning tool 

Page 4: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Staffing Flex Projects 

• Web Designers  

• Flex GUI developers • Flex Component developers 

• Flex architect 

Page 5: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

 Convince me that I need to hire all those specialists  

Page 6: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Flex Architect’s ResponsibiliTes  •  Design the enTre applicaTon structure by deciding on how many modules and 

libraries should be used. •  Select frameworks, component libraries and uTliTes •  Decide on communicaTon protocols to be used for communicaTon with the server 

Ter •  Enhance the applicaTon protocols if need be •  Arrange for the performance and stress tests to ensure that the applicaTon is 

loaded as fast as possible even if the users are siXng at the slower Internet connecTon 

•  Deal with  on applicaTon security issues, authenTcaTon/authorizaTon •  Act as a technical lead providing guidance to  developers.  •  Communicate with the server side developers, decide on protocols and data formats. •  AcTvely work with managers on project plans •  Promote use of coding best pracTces and perform code reviews  •  Conduct technical job interviews 

Page 7: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Handy Tools 

Page 8: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Web Monitoring: Charles 

For tracing AMF calls use  Charles: h]p://www.charlesproxy.com  

Charles is an HTTP proxy and monitor that allows a developer to view the HTTP traffic between a Web browser and the Internet. 

Charles’ ability to simulate modem speeds by thro]ling your bandwidth and introducing latency is invaluable.   

Page 9: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Charles shows download sequence and Tming 

Use it for emulaTng slow networks too 

Page 10: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Web Developer Toolbar  

Web Developer toolbar for Mozilla browser available at h]p://chrispederick.com/work/web‐developer/.   

IT allows you enable/disable browser’s cache, cookies, popup blockers, validate CSS, inspect DOM, images, and more. 

Page 11: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Junc6on 

Your team members may work against different servers… 

SoI links in Windows environment can be implemented with the  junc%on uTlity: 

h]p://www.microsoI.com/technet/sysinternals/FileAndDisk/JuncTon.mspx  

For example: 

junc&on c:\serverroot   "c:\ Tomcat 6.0\webapps\myflex” 

junc&on c:\flexsdk "C:\Program Files\Adobe\Flex Builder 3 Plug‐in\sdks\3.0.0" 

Page 12: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Automa6ng Build Scripts Crea6on 

•  An enterprise project consists of several Flash Builder projects. Each needs a build script 

• WriTng Ant build scripts manually is a Tme consuming process.  

•  Use Fx2Ant from Clear Toolkit: h]p://sourceforge.net/projects/cleartoolkit  

•  Fx2Ant creates opTmized build scripts  

Page 13: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Logging with Log4Fx import mx.logging.Log; import mx.logging.ILogger; private var logger:ILogger = Log.getLogger(”MyStockPorgolio”); 

Say, you are considering adding this trace statement in the funcTon getPriceQuotes(): if (Log.isDebug()) logger.debug(”GeXng price quote for IBM"); 

This message will be sent to the specified desTnaTon selected with the Logging Manager.  If a user calls producTon support complaining about some unexpected behavior,  ask her to press Ctrl+ShiM+Backspace – the logging manager will pop‐up: 

Page 14: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Logging with Log4Fx – sample output 

You can set the output desTnaTon as RemoteLogging to watch  the log info from any computer connected to the Internet 

Page 15: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Tes6ng Flex RIA The sooner you start tesTng your applicaTon, the shorter the development cycle will be. 

Because of dynamic nature of AcTonScript, Flex applicaTons have to be tested more thoroughly than Java ones. 

Types of tesTng: 

• Unit and IntegraTon TesTng 

• FuncTonal TesTng 

• Load TesTng 

Page 16: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Unit and Integra6on Tes6ng Unit tesTng is performed by a developer and is targeted at small pieces of code, i.e. a funcTon, to ensure that if you call a funcTon with parTcular arguments, it’ll return the expected result. 

Test‐driven development (TDD): write tester’s code first and then the applicaTon code. 

Create a class Shipment that will implement business logic and the class ShipmentTest that will test this logic.  Write a test that will assert that the shipping address is not null or the order quan&ty is greater than zero. 

FlexUnit is a unit tesTng framework for Flex and AcTonScript 3.0 applicaTons and libraries. 

h]p://opensource.adobe.com/wiki/display/flexunit/FlexUnit  

Page 17: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Unit and Integra6on Tes6ng (Cont.) FlexMonkey is an open source  tool from Gorilla Logic. h]p://code.google.com/p/flexmonkey/ 

It’s a unit and funcTonal tesTng framework for Flex applicaTons, which also and AIR automates tesTng of Flex UI funcTonality. 

FlexMonkey can record and play back UI interacTons. This screenshots was taken aIer entering the name of the manager and selecTng a date. 

It also generates test script in AcTonScript. 

Page 18: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

FuncTonal TesTng FuncTonal tesTng (a.k.a. black‐box,  QA, or acceptance tesTng) is aimed to find out if the applicaTon properly implemented business logic.  

For example, if the user clicks on a row in the customers data grid, the program should display a form view with specific details about the selected customer. 

QuickTest Professional (QTP) by HP (formerly Mercury). During the recording phase, QTP creates a script in VBScript language.  The checkpoints included in the script are used for comparison of the current with expected values. 

FlexMonkey 1.0 supports funcTonal tesTng for Flex and AIR applicaTons 

Page 19: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Load TesTng 

Response Tme of your applicaTon should be well defined in the Service  Level Agreement (SLA), which should state what’s acceptable from the  users perspecTve. 

For example, the SLA can include a clause staTng that the iniTal  download of your applicaTon shouldn’t take longer than 30 seconds  for the users with DSL connecTon (500kbps). 

Neoload is a commercial stress tesTng tool: h]p://neotys.com/  

WebLoad 8.3 is a commercial stress tesTng soIware:  h]p://www.radview.com/. It includes reporTng and allows to enter SLA into the tests.      

Page 20: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Load Tests with NeoLoad 

Page 21: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Con6nuous Integra6on The term con&nuous integra&on has been introduced by MarTn Fowler and Ma]hew  Foemmel. It recommends creaTng scripts and running automated builds of the applicaTon  at least once a day. 

We recommend using an open source framework called CruiseControl for establishing a  conTnuous build process: h]p://cruisecontrol.sourceforge.net/.   

Report on the results of each build are being  automaTcally emailed to  producTon support group.   

Page 22: Second Annual Enterprise Flex Symposiummyflex.org/yf/FlexSymposium2/StartingfFlexProject.pdf · Second Annual Enterprise Flex Symposium August 7, 2009, New York City Starng a new

Contact info and useful links Email: [email protected]  

Web site: h]p://www.faratasystems.com 

Flex Blog:  h]p://flexblog.faratasystems.com 

Clear Toolkit Framework:  h]p://sourceforge.net/projects/cleartoolkit/   

O’Reilly Book “Enterprise Development with Flex” (rough cuts):  h]p://my.safaribooksonline.com/9780596801465 

(c) Farata Systems