1 / 22

JQuery: Finding your way through scattered code

JQuery: Finding your way through scattered code. Andrew Eisenberg, Doug Janzen, Kris De Volder, Ryan Wannop. Software Practices Lab. -- The University of British Columbia. JQuery: Motivation. Typical ways to explore scattered concerns: Browse structural views

edward
Télécharger la présentation

JQuery: Finding your way through scattered code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JQuery:Finding 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. Call Hierarchy 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. Choose New Browser Start with Package Browser 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. Abstract Class Browser Package Browser JQuery: How it works Both views in same window Bundled with many more browsers

  6. Select extension point 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 • Select extension point • Choose sub-query

  8. JQuery: How it works Incrementally perform the exploration by extending views with a new extensions • Select extension point • Choose sub-query • 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. Found by regex search for *Attribute* Change Attribute Command 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. creates Draw Application createColorMenu calls createAttrMenu Determined that Pen Color sets Menu FrameColor Attribute JQuery: Executing the Plan Change Attribute Command execute ??? Frame No Frame Rectangle Text

  17. calls Figure implemented by setAttr Determined that Pen Color sets FrameColor Attribute Attribute Figure setAttr dataflow sidetrack to explore FigureAttributes drawFr JQuery: Executing the Plan creates Change Attribute Command Draw Application createColorMenu execute calls createAttrMenu getAttr Frame No Frame Rectangle Text

  18. Determined that Pen Color sets FrameColor Attribute sidetrack to explore FigureAttributes implemented by drawFr drawFr 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: within a single navigation view Current IDE’s: “explosion” of disconnected views retain context reduce disorientation loss of context disorientation JQuery: Versatile Code Navigator Browse Scattered Code Browsing structural views Searching for a specific pattern 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. Download JQuery (new release out soon): Google: Questions? JQuery • Prevents tangled and scattered searches • Reduces disorientation of complex exploration • Maintains context Andrew Eisenberg: ade@cs.ubc.ca

More Related