Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Second Annual Enterprise Flex Symposium
August 7, 2009, New York City
Star6ng a new Enterprise Flex Project Equipping
Formula of Successful RIA project
• The right project manager
• The right team
• Good tools
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
Staffing Flex Projects
• Web Designers
• Flex GUI developers • Flex Component developers
• Flex architect
Convince me that I need to hire all those specialists
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
Handy Tools
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.
Charles shows download sequence and Tming
Use it for emulaTng slow networks too
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.
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"
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
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:
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
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
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
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.
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
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.
Load Tests with NeoLoad
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.
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