Transcript SQL Plugin

SQL Wiki Plugin
Team Wirox
Team

RIT






Eugene Marcotte
Chris Daniels
Paul Yates
Matt Blackwood
J. Scott Hawker
Xerox


Tim Luksha
Peter Alfvin
History





Atlassian began in 2002 specializing in issue
tracking and collaboration software
Created Confluence Wiki in 2004
Original SQL Plugin was written by Bob Swift
(released Sept. 2006)
Currently a supported plugin for Atlassian
Confluence
Xerox uses a confluence wiki for internal
communications
Bob Swift’s SQL Plugin


Existing plugin only allows the viewing of
results
Usage


{sql-query:dataSource=TestDS|output=wiki}
select * from test {sql-query}
Xerox wishes to add more functionality to
the plugin to enhance their internal
workflow

The goal is to modify the plugin to allow wiki
users to edit database table contents
Project Requirements



Extension for the plugin which would provide them with
the basic functionality to perform row operations on
queries that are embedded in wiki pages
Row Operations
 Update
 Insert
 Delete
Time permitting the project might include
 Multi-row operations
 Advanced data type support
 Table scrolling
 User-specific database sessions
Scope

In scope 




Modify existing plugin to add required functionality
Integrate with Bob’s repository
Specific Data type handling (varchar2, number,
integer, decimal, float, precision, dates and
possibly timestamps)
Single and possibly multiple row transactions
Out of scope


Fixing existing plugin bugs
Handling datatypes other than those specified
Technologies Used









Java
Servlets
Velocity
XML
JavaScript
jQuery
Confluence
Maven
MySQL / Oracle
Testing




JUnit
HTTPUnit
Atlassian Integration Testing
Emma
Process (overview)

Scrum w/ XP engineering



Requirements Workshop
Two week Sprints
Sprint Planning Meeting






In Person & Remote meetings
Post-mortem reflections
Product & sprint backlogs
Scrums, scrum meetings
Pair programming
Group Design
Process (sequence)
http://en.wikipedia.org/wiki/Scrum_(development)
Process (Estimation /
Planning)





The team establishes underlying tasks
for a given user story
As a team we assess story points for
user stories
We also estimate time for tasks within
user stories
Delphi method for refining estimations
Product owner prioritizes user stories
User Story Example
Process (Design)




Initial refactoring of plugin
Typically for each User Story we allot a
task for designing and refactoring
Initially the macro was a “God object”
Through refactoring we have split the
functionality into more cohesive units
Process (Development)

Daily <15 minute Scrum Meeting






What you did since last meeting?
What you will do today?
Impediments?
Split into pairs for pair programming
Each pair takes on a task from a user story
During development update sprint backlog
SqlMacro
Tomcat
HTTPServlet
-MODULE
-FALSE
-HTML_TABLE_START
-HTML_TABLE_START_LENGTH
-RENDER_MODE
-bandanaManager
+getMacroName()
+getExtension()
+setBanadaManager()
+execute()
+generateOutput()
+stripQuote()
+getSqlColumnTypeAsChar()
Confluence
ScriptMacro
SqlQueryMacro
+getMacroName()
Wirox – SQL Wiki Plugin
Utils
UpdateServlet
+convertToJSMap()
+ConvertToArray()
+setUpHTMLVelocityContext()
+exceptionToString()
RefreshServlet
-serialVersionUID
-serialVersionUID
+doGet()
+doPost()
+getExcemptionXML()
+doPost2()
+getSetString()
+getWhereString()
+perform()
+lookUpColumn()
+getAffectedRows()
+getAffectedQuery()
+doGet()
+doPost()
HTMLOutputGenerator
HTMLTableOutputGenerator
+generateOutput()
+generateOutput()
Results
DBManager
-MACRO_NAME
+getDatabaseConnection()
+cleanConnection()
+convertTransactionIsolation()
+getResults()
+getDataSourceString()
+lookUpDataSource()
+setStatementInputParameters()
+lookupDataSourceWithMacroInfo()
+getSqlStatementFromMacroInfor()
+convertTransactionIsolation()
+cgetSqlColumnTypeAsChar()
+getPrimaryKeyColumns()
-jndi
-datasource
-sql
-columnTypes
-columnNames
-columnData
-primaryKeyColumns
+getters()
+setters()
«interface»
OutputGenerator
+abstract generateOutput()
UpdatableSqlMacro
-MODULE
-FALSE
-bandanaManager
+getMacroName()
+getExtension()
+setBandanaManager()
+execute()
Metrics






Coverage
User Story Status / Impediments
Burn-down Chart
Burn-up Chart
Velocity
Test Pass / Fail
Sprint Charts
Sprint One
Sprint Two
EMMA Test Coverage
Risks (Top Ten)
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Testing Environment
Role Mapping
Database Support Issues
Technical Design Issues
Javascript / jQuery
Confluence Wiki
Communication
Integration
Flow of Events
Virtual Machine
What has not gone well…




Restricted time slots
Automated Integration testing
Concrete roles (one exception)
Development Environment


Netbeans
Eclipse
What has gone well…





Process choice
Communication
Pair programming
Wiki for team coordination and project
tracking
Consistency
Status / Future Plans






On target for completion
Extras are possible
No “show-stoppers”
Better development times
Plugin integration
Handball and Table Tennis
Demo / Questions