Download presentation
Presentation is loading. Please wait.
Published byAlexandrina Marsh Modified over 8 years ago
1
Refactoring Tools – Proparse, Prorefactor, Prolint etc. Steven Lichtenberg Sr. Technologist Jenark Business Systems, Inc.
2
Steven Lichtenberg Fall 2005 VAPUG Goals Define Refactoring and why it is important to developers Explain the tools available for refactoring Progress code Demonstrate how these tools can provide better developer productivity
3
Steven Lichtenberg Fall 2005 VAPUG Agenda What is Refactoring? Introducing Proparse What is it Why is it useful Building off the base - Prolint Automated Code updates using Prorefactor Eclipse A new way to think about code Integrating Prorefactor into the New Eclipse IDE
4
Steven Lichtenberg Fall 2005 VAPUG What is Refactoring? “Refactoring is the act of improving source code without changing its behavior. It is often discussed within the same context as patterns. Some reference materials are Design Patterns (Gamma et al.), Patterns of Enterprise Application Architecture (Fowler), and Refactoring (Fowler). Refactoring is historically a manual activity, but recently many automated refactoring tools have begun to emerge. These have turned refactoring into something that happens extremely quickly, and with a vastly reduced risk of error.” -John Green, Joanju
5
Steven Lichtenberg Fall 2005 VAPUG Why Refactoring “Application source code must constantly be refactored, otherwise it decays to chaos. For a growing and evolving application, well designed, well written code does not stay that way on its own. After a few years and a dozen programmers have touched what was originally a work of elegance, you are left with something that is difficult to maintain and very expensive to expand upon.” John Green, Joanju
6
Steven Lichtenberg Fall 2005 VAPUG What is Refactoring - Remember Done every day Tools are available Patterns can be automated. Goal is not to alter functionality
7
Steven Lichtenberg Fall 2005 VAPUG What is Refactoring - Points Refactoring is often done in concert with functional changes Every time you modify a piece of code, it is to your advantage to evaluate the code structure to see if refactoring is appropriate
8
Steven Lichtenberg Fall 2005 VAPUG Agenda What is Refactoring? Introducing Proparse What is it Why is it useful Building off the base - Prolint Automated Code updates using Prorefactor Eclipse A new way to think about code Integrating Prorefactor into the New Eclipse IDE
9
Steven Lichtenberg Fall 2005 VAPUG What is ProParse? A commercial product http://www.joanju.com A single.dll A tool that PARSES Progress code Generates an in-memory process tree of each action statement The basis for many other automated tools for code management and processing Similar to COMPILE... PREPROCESS but better
10
Steven Lichtenberg Fall 2005 VAPUG What ProParse Isn't A compiler Proparse only knows about the database fields you tell it about Needs to be told explicitly about PROPATH variable A code writer Particularly interesting in and of itself
11
Steven Lichtenberg Fall 2005 VAPUG Why is this Useful? Replaces sed/awk/grep in finding expressions Understands preprocessor syntax and expands the text Understands {abc.i} and will do the substitution Provides a common base for more advanced code manipulation Simple API allows tool development AutoDox Prolint ProStyle etc.
12
Steven Lichtenberg Fall 2005 VAPUG How Do You Use ProParse? Easiest way to demo is to run launcher.w from the install directory EXAMPLES follow
13
Steven Lichtenberg Fall 2005 VAPUG Launcher.w
14
Steven Lichtenberg Fall 2005 VAPUG Sample Parse Output
15
Steven Lichtenberg Fall 2005 VAPUG Scan Listing
16
Steven Lichtenberg Fall 2005 VAPUG Token Listing
17
Steven Lichtenberg Fall 2005 VAPUG No-undo listing –This is interesting
18
Steven Lichtenberg Fall 2005 VAPUG Length Query
19
Steven Lichtenberg Fall 2005 VAPUG
20
Steven Lichtenberg Fall 2005 VAPUG Agenda What is Refactoring? Introducing Proparse What is it Why is it useful Building off the base - Prolint Automated Code updates using Prorefactor Eclipse A new way to think about code Integrating Prorefactor into the New Eclipse IDE
21
Steven Lichtenberg Fall 2005 VAPUG ProLint Automated source code review Written by Jurjen Dijkstra Available at http://www.prolint.org Free add-on to ProParse Allows for enforcement of standard coding practices Rules based code analyzer
22
Steven Lichtenberg Fall 2005 VAPUG ProLint - cont Can be set up to run from Pro*Tools Output to Display window or HTML document Very easy to use
23
Steven Lichtenberg Fall 2005 VAPUG ProLint
24
Steven Lichtenberg Fall 2005 VAPUG Agenda What is Refactoring? Introducing Proparse What is it Why is it useful Building off the base - Prolint Automated Code updates using Prorefactor Eclipse A new way to think about code Integrating Prorefactor into the New Eclipse IDE
25
Steven Lichtenberg Fall 2005 VAPUG Why Refactor Changes the structure of the code without changing functionality Allows for enhanced architecture Keeps code readable and maintainable over time Allows for code re-use not envisioned in the original design Prevent spaghetti code/code rot
26
Steven Lichtenberg Fall 2005 VAPUG When To Refactor All the time! You are already doing it Should be considered at design time Should be continuously applied When applying bug fixes When doing maintenance coding
27
Steven Lichtenberg Fall 2005 VAPUG Why ProRefactor Automating Refactoring assures it will happen Allows for consistency in code structure Better than awk/sed/grep Understands Progress syntax Can identify between v-customer and customer.customer Over time code is easier to read, maintain and understand
28
Steven Lichtenberg Fall 2005 VAPUG ProRefactor Built as an Eclipse plug-in Can run stand alone as well Written in Java Includes source New refactorings can be developed as needed
29
Steven Lichtenberg Fall 2005 VAPUG Agenda What is Refactoring? Introducing Proparse What is it Why is it useful Building off the base - Prolint Automated Code updates using Prorefactor Eclipse A new way to think about code Integrating Prorefactor into the New Eclipse IDE
30
Steven Lichtenberg Fall 2005 VAPUG Eclipse – What is it? “Eclipse is an open source software development project dedicated to providing a robust, full-featured, commercial-quality, industry platform for the development of highly integrated tools.” - The Eclipse Project
31
Steven Lichtenberg Fall 2005 VAPUG Eclipse – What is it? “The Eclipse Platform is an open extensible IDE for anything and yet nothing in particular. The Eclipse Platform provides building blocks and a foundation for constructing and running integrated software- development tools. The Eclipse Platform allows tool builders to independently develop tools that integrate with other people's tools so seamlessly you can't tell where one tool ends and another starts.” The Eclipse Project
32
Steven Lichtenberg Fall 2005 VAPUG Eclipse – What is it? Created by IBM as an integrated IDE for WebSphere development 2000 Open Source November 2001 Incorporated under the Eclipse Foundation in 2004 Represented by a consortium of industry companies (IBM,HP,Apple,Novell etc)
33
Steven Lichtenberg Fall 2005 VAPUG Eclipse – What is it? Written in Java Uses SWT classes for Native UI widgets Cross platform Industry Standard
34
Steven Lichtenberg Fall 2005 VAPUG Eclipse ProRefactor is a plug-in to Eclipse PSC will be using Eclipse as their IDE starting with 10.1 Fully customizable Allows for integration that is not available today Run Progress code directly from IDE Webspeed will run directly without major configuration Refactor the same code you are editing using ProRefactor in the same environment
35
Steven Lichtenberg Fall 2005 VAPUG ProRefactor And Progress IDE
36
Steven Lichtenberg Fall 2005 VAPUG Credits/Acknowledgements Special Thanks to John Green and Judy Huffman – Authors of Proparse/ProRefactor http://joanju.com Jurjen Dijkstra – Author of ProLint http://www.global-shared.com http://www.prolint.org Progress Email list – Proparse furum proparse@peg.com The Eclipse Foundation www.eclipse.org
37
Steven Lichtenberg Fall 2005 VAPUG Questions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.