• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
itBooze Code Quality Tools for ActionScript by  Lena Petsenchuk
 

itBooze Code Quality Tools for ActionScript by Lena Petsenchuk

on

  • 1,298 views

 

Statistics

Views

Total Views
1,298
Views on SlideShare
838
Embed Views
460

Actions

Likes
0
Downloads
7
Comments
0

5 Embeds 460

http://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 143
https://jujo00obo2o234ungd3t8qjfcjrs3o6k-a-sites-opensocial.googleusercontent.com 119
http://it-booze.blogspot.com 109
http://www.itbooze.com.ua 80
http://itbooze.blogspot.com 9

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    itBooze Code Quality Tools for ActionScript by  Lena Petsenchuk itBooze Code Quality Tools for ActionScript by Lena Petsenchuk Presentation Transcript

    • CODE QUALITY FlexPMD Overview by Lena Petsenchuk
    • Agenda
      • FlexPMD
        • What is FlexPMD
        • Why FlexPMD
        • How to invoke
        • How does it work
        • Types of rules
      • FlexPMD plugin
        • Installation/Uninstallation
        • Configure FlexPMD plugin
        • Supported workflows
        • FlexPMD Outline
        • FlexCPD integration
        • Usage strategies
        • FlexPMD Ruleset Creator
        • Known issues
    • What is FlexPMD
      • FlexPMD is a tool that helps to improve code quality by auditing any AS3/Flex source directory and detecting common bad practices.
      • http://opensource.adobe.com/wiki/display/flexpmd/FlexPMD
      • “ Any fool can write code that a computer can understand.
      • Good programmers write code that humans can understand.”
      • ~Martin Fowler
      Why FlexPMD
    • Why FlexPMD
      • “ You can’t control what you can’t measure.”
      • ~Tom DeMarco
    • Why FlexPMD
    • Why FlexPMD
      • FlexPMD can detect:
      • Coding standards violations
      • Code duplication
      • Unused code (functions, variables, constants, etc.)
      • Over-complex code (nested loops, too many conditionals, etc.)
      • Over-long code (classes, methods, etc.)
      • Incorrect use of the Flex component lifecycle (commitProperties, etc.)
    • How to invoke
      • FlexPMD can currently be invoked from:
      • The command line
      • Maven
      • Ant
      • Automator on Mac OS X
      • Eclipse
      • FlexBuilder
      • TextMate on Mac OS X
      • FlashDevelop
    • How does it work
      • FlexPMD is delivered with a set of standard rules for Flex/AS development. Each source file that is processed is checked against every rule.
      • Currently, FlexPMD produces a XML report by default, plus an HTML report when invoked by the Maven site plugin. The XML report can then be consumed by any PMD reports pretty printers (like the PMD hudson plugin).
    • Types of rules
      • There are various kinds of rules:
      • Regular expression based : the rule will process each file line-by-line searching for the specified pattern, and detecting possible violations.
      • Abstract Synthax Tree (AST) based : the rule will analyze the abstract syntax tree for an ActionScript class to detect possible violations. For example, detecting a deeply nested if-statement.
      • XPath based : the rule will serialize the AST into an XML stream and then use an XPath expression to to detect possible violations.
    • FlexPMD Plugin
      • The FlexPMD Plugin is a plugin to streamline the development process in regards to FlexPMD violations
      • It analyses the code and marks the violations inline in the code so that developers can see them as they develop
      • It allows easy navigation between the list of violations and the associated code
    • Installation/Unistallation
      • The installation and uninstallation process follow Eclipse standard mechanisms
      • Installation
        • Help > Install new software
        • Use the following update site: http://opensource.adobe.com/svn/opensource/flexpmd/plugin/trunk/flex-pmd-eclipse-plugin-site
        • Select FlexPMD feature and proceed with the installation
      • Uninstallation
        • Help > Product Details > Installation Details
    • Configure FlexPMD plugin
      • Download FlexPMD command line tools ( http://opensource.adobe.com/wiki/display/flexpmd/Downloads )
      • FlexPMD command line . This is a mandatory field. You have to select the flex-pmd-command-line.jar you want from your hard drive.
      • FlexPMD custom ruleset . You can leave this field empty, if so a default ruleset will be used.
      • FlexCPD command line . You have to select the flex-pmd-cpd-command-line.jar you wish from your hard drive.
    • Supported workflows
      • FlexPMD plugin targets two different type of users with two different goals:
      • Code review workflow : As a code reviewer I want to be able to audit and review the quality of an entire project or any given functional area in terms of PMD violations.
      • Development workflow : As a developer I want to see PMD violations in the files I'm working in. If a file changes the violations should be updated immediately.
    • Code review workflow
      • Ideal for
      • Projects that didn’t use FlexPMD from the very beginning
      • Projects where not all developers use FlexPMD
      • Code or Application reviews to check the health of the code
      • Audit specific functional areas
      • Benefits
      • FlexPMD recommendations are displayed in a specific panel and can be sorted attending its relevance or violation type
    • Code Review workflow
      • Select any source folder in a project
      • Right click on it
      • Select FlexPMD > Run FlexPMD
    • Development workflow
      • Ideal for
      • Projects that start using FlexPMD from the very beginning
      • Teams that proactively want to promote Collective code and team best practices
      • Benefits
      • FlexPMD recommendations become a first class citizen during development.
      • During compilation FlexPMD errors can prevent the entire build to succeed and will be displayed in the standard Errors view
      • FlexPMD execute automatically on every compilation
    • Development workflow
      • Right click in a project
      • Select FlexPMD > Add FlexPMD Nature
      • Note: If at any point you want to remove the nature you can select FlexPMD > Remove FlexPMD Nature
    • FlexPMD Outline
      • In the FlexPMD Outline View you'll see the violations in the currently opened editor.
      • If the arrows button is toggled, whenever the file is saved FlexPMD will be re-executed on it and the Outline will be updated providing always up-to-date information to the developer with very little delay and without having to compile the entire project.
    • FlexCPD integration
      • FlexCPD can detect suspect copy/paste sections of code in your project.
      • Executes on demand
      • You can execute FlexCPD by right-click in a source folder and select FlexPMD > Find suspect cut & paste.
      • Creates a list of snippets of duplicated code
      • You can navigate to the source code file by double clicking on the item
    • Usage strategies
      • Fine tune your ruleset
      • Filtering problems
      • Projects with lots of violations
    • FlexPMD Ruleset Creator
      • http://opensource.adobe.com/svn/opensource/flexpmd/bin/flex-pmd-ruleset-creator.html
    • Build your ruleset – Prioritize the rules
    • Known issues
      • If when you run FlexPMD you get empty results or apparently it doesn't even execute these might be the causes:
      • You're not using the latest version of FlexPMD. You should be using 1.0.1 or above
      • The path to the command line jars contains spaces. See http://bugs.adobe.com/jira/browse/FLEXPMD-126
      • The path of your workspace or project contain spaces. See http://bugs.adobe.com/jira/browse/FLEXPMD-127
    • Summary