JQuery: Finding your way through scattered code - PowerPoint PPT Presentation

About This Presentation
Title:

JQuery: Finding your way through scattered code

Description:

Kris De Volder, Ryan Wannop. Software Practices Lab. -- The University of British Columbia ... Typical ways to explore scattered concerns: Browse structural views ... – PowerPoint PPT presentation

Number of Views:103
Avg rating:3.0/5.0
Slides: 23
Provided by: krisde
Category:

less

Transcript and Presenter's Notes

Title: JQuery: Finding your way through scattered code


1
JQueryFinding your way throughscattered code
  • Andrew Eisenberg, Doug Janzen, Kris De Volder,
    Ryan Wannop

Software Practices Lab. -- The University of
British Columbia
2
JQuery Motivation
  • Typical ways to explore scattered concerns
  • Browse structural views
  • package structures, inheritance hierarchy
  • Search for a specific pattern
  • regular expressions
  • Follow relationships
  • calls, instantiates, references

Most modern IDEs can help with all of this, but
3
JQuery Motivation
Inheritance Hierarchy
  • Explosion of browsers
  • Browsers are too specific
  • Poor use of screen Real-Estate
  • Exploration itself is scattered and tangled

Package Explorer
Search
4
JQuery How it works
Avoiding loss of context Problem Too many
browsers leads to loss of context. Solution
Support many views within a single tool.
5
JQuery How it works
Both views in same window
Bundled with many more browsers
6
JQuery How it works
Incrementally perform the exploration by
extending each view with a sub-view
7
JQuery How it works
Incrementally perform the exploration by
extending views with a new extensions
  1. Select extension point
  2. Choose sub-query

8
JQuery How it works
Incrementally perform the exploration by
extending views with a new extensions
  1. Select extension point
  2. Choose sub-query
  3. Continue exploration

Bundled with many more sub-browsers
9
JQuery How it works
Filtering by regular expression
  • Search for Figure
  • Open query dialog
  • double-click

10
JQuery How it works
Filtering by regular expression
  • Search for Figure
  • Open query dialog
  • Edit query

11
JQuery How it works
Filtering by regular expression
  • Search for Figure
  • Open query dialog
  • Edit query
  • Close dialogue (query automatically re-executes)

12
JQuery How it works
Filtering by regular expression
Browser is now filtered by Figure
Can customize queries in many other ways too.
13
JQuery An Example
Task
Make a enhancement to the JHotDraw codebase.
Non-trivial, but some details abstracted
away. Based on an actual task we performed with
little prior knowledge of the codebase.
14
JQuery The Plan
Change Pen Color
Menu
???
No Frame
Frame
Rectangle
Text
15
JQuery Executing the Plan
???
Change Pen Color
Menu
Step 1 Find menu creation
???
Step 2 Find relationship to frames
Frame
No Frame
Rectangle
Text
16
JQuery Executing the Plan
Change Attribute Command
execute
???
Frame
No Frame
Rectangle
Text
17
JQuery Executing the Plan
creates
Change Attribute Command
Draw Application
createColorMenu
execute
calls
createAttrMenu
getAttr
Frame
No Frame
Rectangle
Text
18
JQuery Executing the Plan
creates
Change Attribute Command
Draw Application
createColorMenu
execute
calls
calls
createAttrMenu
Figure
implemented by
setAttr
change this method
Attribute Figure
setAttr
dataflow
getAttr
drawFr
Rectangle Figure
Text Figure
19
JQuery Versatile Code Navigator
Browse Scattered Code
  1. Browsing structural views
  2. Searching for a specific pattern
  3. Following relationships

20
JQuery Customization
  • JQuery can do more
  • can create more powerful queries
  • can include data from other tools
  • has extendable menu items
  • virtual source files (in next release)

See our website!
21
JQuery De-tangling searching
Why use 4 browsers when you can use 1?
22
Questions?
JQuery
  • Prevents tangled and scattered searches
  • Reduces disorientation of complex exploration
  • Maintains context

Andrew Eisenberg ade_at_cs.ubc.ca
23
JQuery Executing the Plan
24
JQuery Executing the Plan
Change Attribute Command
Attribute Figure
Frame
No Frame
Rectangle
Text
25
JQuery How it works
Avoiding loss of context Problem Too many
browsers leads to loss of context. Solution
Support many views within a single tool.
results
queries
source code facts
26
JQuery How it works
Avoiding loss of context
The answer to a query prompts another query
results
query
source code facts
27
JQuery Finished!
Change Attribute Command
Step 1
Figure
Attribute Figure
Step 2
Text Figure
Rectangle Figure
Write a Comment
User Comments (0)
About PowerShow.com