proteus sdk
DESCRIPTION
Andy Keller and Dave Shepperton, Traction Software. Traction User Group, Oct 15 2010, Newport RI. TUG 2010 Newport slides, agenda and more see www.TractionSoftware.comTRANSCRIPT
Proteus SDK
Andy KellerDirector of Engineering
Dave SheppertonSenior Software Engineer
2
What’s new in 5.x?
• <join> tag
• Proteus skin framework
• Tabbed navigation
• Entry types
• Entry decorators
• Entry labels
• XML forms
3
<join> tag
• Adds separators between chunks of output
• Doesn’t print at the beginning or end
• Doesn’t repeat separators
• Works through tags and functions
• Used for entry details, line breaks, sql query operators, and more<join separator=”,”>__join.separator__A__join.separator__<compare.equals a=”1” b=”2”>D</compare.equals>__join.separator__<compare.equals a=”1” b=”1”>B</compare.equals>__join.separator__C__join.separator__</join>
A,B,C
4
Proteus Skin Framework
The Proteus skin is like browser within a browser. It
uses the GWTRPC skin to generate the components
of the page:
5
Proteus Skin Framework (cont’d)
gwt.rpc.view SDL Tags Produce a Tree of ViewData
objects:
6
Customizing Proteus Navigation: Configurable Tabs
tabs#main-allprojects →
view.tabsjson SDL Tag →
Tab::evalJSONData →
tasks tab configuration →
tabs#server-tasks → JSON
rendering
7
Handling JavaScript Installation forWidgets in Proteus
Problem: Some widgets require JavaScript which
use document.write to install their own additional
JavaScript. You can’t do this in an already closed
HTML document! (Symptom: page goes blank,
spinner spins forever...)
Solution: Don’t let external JavaScript ruin the
current document. Instead, render an IFrame with a
link to a view that is its own HTML document that
includes the JavaScript.
8
Handling JavaScript Installation forWidgets in Proteus (cont’d)
e.g., googlemap token (in
plugins/com.traction.googlemap):
token → token configuration → SDL
renderer →IFrame tag →
type=googlemap View via view
configuration → HTML rendering
(with SCRIPT tag)
9
Entry Decorators
• Provide custom, context-sensitive renderings for
different kinds of entries
• Based upon the “custom entry type” of the Entry,
same as: com.traction.sdk.Entry::getCustomEntryType()__entry.customentrytype__
• Decorators are per token renderer set; currently
supported for the Proteus skin only (via the
GWTRPC render).
10
Entry Decorators (cont’d)
entry.content tag →
Entry::decorate method →
milestone decorator configuration
→ SDL renderer → HTML
rendering
11
Entry Labels
• An entry with a corresponding label
• Encoded as ::Project:-e:[entry#]
• Considered system labels
• Typically hidden from the interface
• Used for grouping entries with another entry, e.g. tasks with a
milestone and/or project, milestones with a project
• Added/removed with reclassifications
• References would require an edit
• Label history tracks changes
12
Entry Labels: used for PM
TaskTask
ProjecProjectt
MilestMilestoneone
Milestoneshave
Project
Tasks haveProject andMilestone
13
Entry Labels: new Java SDK methods
Entry and TractionId
LabelName getLabelName()
LabelName
String getDisplayName(CJournalRequest)
Item
LabelIterator getSystemLabels()
14
Entry Labels: new SDL tags
Entry
__entry.labelname__
LabelName
__labelname.displayname__
Item
<item.labels system=true> </item.labels>
15
Entry Labels: retrieving labeled content
Just like any other labeled entries
SDK - Journal
EntryIterator getLabeledEntries(...)
SDL
<entries type=cat cat=”__entry.labelname__”> </entries>
16
Entry Labels: special PM tags
<goal.milestones>
<goal.tasks>
<milestone.goal>
<milestone.tasks>
<task.goal>
<task.milestone>
These all put an entry or entries in scope