The Atlassian Platform is full of great technologies to make your life easier. Learn how to leverage UAL and ActiveObjects as well as FishEye/Crucible's public SPI, in order to develop awesome plugins such as the new FishEye/Crucible to Bamboo integration plugin.
Jason Hinch, FishEye & Crucible Developer
3. About Me
• FishEye/Crucible front-end team
• Java, Python and JavaScript
• 18 months at Atlassian
• Previously:
• Confluence Plugins
• Perl Development
3
4. Agenda
• Why ActiveObjects?
• What is ActiveObjects?
• Getting Started
• Defining an Entity
• CRUD with ActiveObjects
• Upgrade tasks
• Testing 4
5. The Idea
• Bamboo data and actions
from FishEye/Crucible
• Commit Graph
• Changeset
• Review
• Triggering Builds
5
7. The First Problem
• Fetching data from Bamboo
• Dependency on External System
• Large amount of data, fast
• Cache data in FishEye
• Storage
• Backup & Restore
7
10. ActiveObjects - What?
• Can refer to two different projects
• ActiveObjects Library
• Atlassian ActiveObjects Framework
10
11. ActiveObjects Library
• Lightweight ORM
• Annotation based DDL
• Create/Read/Update/Delete (CRUD)
• Upgrades
• Built on JDK Technologies
• Java Dynamic Proxies
• JDBC
11
12. ActiveObjects Framework
• Superset of ActiveObjects Library
• Plugin data in the application database
• Adds support for Atlassian application lifecycle
• Backup/Restore
• SAL Transactions
• Plugin lifecycle
12
13. AO Library vs Framework
• ActiveObjects Library
• net.java.ao*
• http://java.net/projects/activeobjects/pages/Home
• ActiveObjects Framework
• com.atlassian.activeobjects*
• https://studio.atlassian.com/wiki/display/AO
13
15. ActiveObjects Philosophy
• Implements Active Record Pattern
• Class/Interface maps to a table
• Object instance maps to a row in the table
• Ruby on Rails, Django, CakePHP use this pattern
15
47. Targeting a Database
• May have specific requirements
• Target all supported Databases
• Set database via a Java property
• -Dao.test.database=oracle
47
48. Takeaways
• Set up ActiveObjects in your plugin
• Build & evolve complex data structures
• Unit test it against specific databases
48