Fostering Friendships - Enhancing Social Bonds in the Classroom
J query aosddemo_2004
1. Software Practices Lab. -- The University of British Columbia
JQuery:
Finding your way through
scattered code
Andrew Eisenberg, Doug Janzen,
Kris De Volder, Ryan Wannop
Software Practices Lab. -- The University of British Columbia
2. Software Practices Lab. -- The University of British Columbia
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
JQuery: Motivation
Most modern IDEs can help with all of this,
but…
3. Software Practices Lab. -- The University of British Columbia
JQuery: Motivation
Explosion of browsers
Package Explorer
Search
Call Hierarchy Inheritance Hierarchy
Browsers are
too specific
Poor use of
screen Real-
Estate
Exploration
itself is
scattered
and tangled
4. Software Practices Lab. -- The University of British Columbia
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.
Choose New
Browser
Start with
Package
Browser
5. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Abstract
Class
Browser
Both views in
same window
Package Browser
Bundled with many more
browsers
6. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Incrementally perform the exploration by
extending each view with a sub-view
1. Select extension point
7. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Incrementally perform the exploration by
extending views with a new extensions
1. Select
extension point
2. Choose sub-
query
8. Software Practices Lab. -- The University of British Columbia
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. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• double-click
10. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• Edit query
11. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Filtering by regular expression
Search for “Figure”:
• Open query dialog
• Edit query
• Close dialogue
(query
automatically re-
executes)
12. Software Practices Lab. -- The University of British Columbia
JQuery: How it works
Filtering by regular expression
Browser is now filtered by “Figure”
Can customize queries
in many other ways too.
13. Software Practices Lab. -- The University of British Columbia
JQuery: An Example
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.
Task:
14. Software Practices Lab. -- The University of British Columbia
JQuery: The Plan
Rectangle Text
??????
Frame No Frame
Menu
Change
Pen Color
15. Software Practices Lab. -- The University of British Columbia
JQuery: Executing the Plan
Menu
Change
Pen Color
Rectangle Text
Frame No Frame
Change
Attribute
Command
Found by
regex
search for
*Attribute*
??????
??????
Step 1: Find
menu
creation
Step 2: Find
relationship
to frames
16. Software Practices Lab. -- The University of British Columbia
JQuery: Executing the Plan
Change
Attribute
Command
Rectangle
??????
Text
Frame No Frame
Determined that Pen
Color sets Menu
FrameColor Attribute
execute
creates
Draw
Application
createColorMenu
calls
createAttrMenu
17. Software Practices Lab. -- The University of British Columbia
Attribute
Figure
setAttr
implemented by
JQuery: Executing the Plan
Change
Attribute
Command
Draw
Application
Rectangle Text
Frame No Frame
sidetrack to explore
FigureAttributes
getAttr
execute
Figure setAttr
callscreateAttrMenu
drawFr
dataflow
createColorMenu
creates
calls
Determined that Pen
Color sets
FrameColor Attribute
18. Software Practices Lab. -- The University of British Columbia
JQuery: Executing the Plan
Change
Attribute
Command
Rectangle
Figure
Text
Figure
change this
method
Figure
Attribute
Figure
getAttr
drawFr
setAttr
setAttr
drawFr
implemented by
drawFr
execute
Draw
Application
createAttrMenu
createColorMenu
calls
creates
implemented by
calls
dataflow
sidetrack to explore
FigureAttributes
Determined that Pen
Color sets
FrameColor Attribute
19. Software Practices Lab. -- The University of British Columbia
JQuery: Versatile Code Navigator
1. Browsing structural views
2. Searching for a specific pattern
3. Following relationships
Current IDE’s:
“explosion” of
disconnected views
loss of context
disorientation
JQuery:
within a single
navigation view
retain context
reduce
disorientation
Browse Scattered Code
20. Software Practices Lab. -- The University of British Columbia
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. Software Practices Lab. -- The University of British Columbia
JQuery: De-tangling searching
Why use 4 browsers when you can
use 1?
22. Software Practices Lab. -- The University of British Columbia
Questions?
Google:
Download JQuery (new release out soon):
Prevents tangled and scattered
searches
Reduces disorientation of complex
exploration
Maintains context
Andrew Eisenberg:
ade@cs.ubc.ca
Editor's Notes
Good morning JQuery---plugin for eclipse integrated code browser
Particularly cross-cutting
If this looks ugly, well that shouldn’t be surprising. Even relatively simple change tasks involve exploring many different links and relationships between code artifacts. Performing such a task using standard IDE browsers exemplifies this explosion of browser problem I mentioned earlier. No way of remembering which tasks have already been completed and why.
If this looks ugly, well that shouldn’t be surprising. Even relatively simple change tasks involve exploring many different links and relationships between code artifacts. Performing such a task using standard IDE browsers exemplifies this explosion of browser problem I mentioned earlier. No way of remembering which tasks have already been completed and why.
If this looks ugly, well that shouldn’t be surprising. Even relatively simple change tasks involve exploring many different links and relationships between code artifacts. Performing such a task using standard IDE browsers exemplifies this explosion of browser problem I mentioned earlier. No way of remembering which tasks have already been completed and why.
Particularly cross-cutting
If this looks ugly, well that shouldn’t be surprising. Even relatively simple change tasks involve exploring many different links and relationships between code artifacts. Performing such a task using standard IDE browsers exemplifies this explosion of browser problem I mentioned earlier. No way of remembering which tasks have already been completed and why.
If this looks ugly, well that shouldn’t be surprising. Even relatively simple change tasks involve exploring many different links and relationships between code artifacts. Performing such a task using standard IDE browsers exemplifies this explosion of browser problem I mentioned earlier. No way of remembering which tasks have already been completed and why.