1. Trang chủ
  2. » Công Nghệ Thông Tin

JQuery finding your way through scattered code

22 255 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 22
Dung lượng 602,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

JQuery: How it worksIncrementally perform the exploration by extending each view with a sub-view 1.. JQuery: How it worksIncrementally perform the exploration by extending views with a

Trang 2

Typical ways to explore scattered concerns:

Browse structural views

- package structures, inheritance hierarchy

Search for a specific pattern

Trang 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

Start with Package

Trang 5

JQuery: How it works

Abstract Class Browser

Both views in same window

Package Browser

Bundled with many more browsers

Trang 6

JQuery: How it works

Incrementally perform the exploration by

extending each view with a sub-view

1 Select extension point

Trang 7

JQuery: How it works

Incrementally perform the exploration by

extending views with a new extensions

1 Select

extension point

2 Choose

sub-query

Trang 8

JQuery: How it works

Incrementally perform the exploration by

extending views with a new extensions

Trang 9

JQuery: How it works

Filtering by regular expression

Search for “Figure”:

• Open query dialog

• double-click

Trang 10

JQuery: How it works

Filtering by regular expression

Search for “Figure”:

• Open query dialog

• Edit query

Trang 11

JQuery: How it works

Filtering by regular expression

Search for “Figure”:

• Open query dialog

• Edit query

• Close dialogue

(query automatically re- executes)

Trang 12

JQuery: How it works

Filtering by regular expression

Browser is now filtered by “Figure”

Can customize queries

in many other ways too.

Trang 13

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:

Trang 14

JQuery: The Plan

???

Frame No Frame

Menu Change

Pen Color

Trang 15

JQuery: Executing the Plan

Menu Change

Pen Color

Frame No Frame

Change Attribute Command

Found by regex search for

Step 2: Find

relationship

to frames

Trang 16

JQuery: Executing the Plan

Change Attribute Command

???

Frame No Frame

Determined that Pen

Color sets Menu

Trang 17

Attribute Figure

setAttr

implemented by

JQuery: Executing the Plan

Change Attribute Command

Trang 18

JQuery: Executing the Plan

Change Attribute Command

Rectangle Figure

Text Figure

change this

method

Figure

Attribute Figure getAttr

drawFrsetAttrsetAttr

implemented by calls

dataflow sidetrack to explore

FigureAttributes

Determined that Pen

Color sets

FrameColor Attribute

Trang 19

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

Trang 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!

Trang 21

JQuery: De-tangling searching

Why use 4 browsers when you can use 1?

Trang 22

Google:

Download JQuery (new release out soon):

Prevents tangled and scattered

Ngày đăng: 24/10/2014, 11:51

TỪ KHÓA LIÊN QUAN