Let the Plugin Coding Begin!
On Friday, we posted the Community Plugin Toolkit to the community.openatrium.com site. This “toolkit” is a set of documentation (with code examples to follow) describing how to build Plugins for Open Atrium 2.0 in Drupal 7.
For the past several months, Phase2, with help from some wonderful sponsors, have worked to build a solid architecture and framework for Atrium 2.0. To make community contribution as productive, valuable, and easy as possible, we focused on the API and framework first. Now that we have a stable core and solid architecture, we are excited for the community to start working on Plugins that will provide much of the end-user functionality of Open Atrium.
Getting Started with Open Atrium 2 Development
Open Atrium 2 (OA2) was architected to make it very easy to develop your own Plugins. An OA2 Plugin is just a Drupal module, whether it comes from Apps, Features, or is just a regular module. The Community Plugin Toolkit (CPT) describes how you hook your module into the Groups and Sections that provide the structure and access control for OA2. Your Plugin can define new Content Types, Views, Panes, Blocks, Boxes, Menus, or most any other normal piece of Drupal content.
For example, let’s say you want to add an Event Calendar plugin to Open Atrium 2. You simply create an Event content type, then add some Date fields for the Start/End of the event. Then add a Google Map Address field for the Event Location. Then you add the Calendar module and create a View of your event calendar. Using the Features module, you export all of this into your own “Event Module”. Once your module is enabled in Open Atrium, you add the Group and Section fields to your Event content type as described in the Community Plugin Toolkit. Then you create a new Panelizer layout for a Section Page called Events. On this page layout you add the Calendar view to the main content region, then add an Upcoming Events view to the right sidebar.
Voila! You now have a rudimentary Event calendar landing page (Section) for a Group. The Group Admin can create a new Section using your Event layout. Members of the Group can create Event content that is assigned to their group. You can even create multiple calendars with different levels of access control, such as a private calendar within a private Section of your Group.
The built-in message and notification system in Open Atrium 2 will automatically generate messages when Events are created, updated, or deleted. You can add your own custom hooks to create a new type of message to remind members when an event is about to begin using custom email templates. You can also create templates to control how your custom event message is displayed in the OA2 Recent Activity “river”.
Creating Plugin functionality for Open Atrium isn’t much different from creating normal Drupal functionality. The steps to integrate your content types into OA2 Groups and Sections are easy to follow. You still have all of the power of Drupal, along with the enhanced content organization and access control of OA2. This architecture allows you to easily re-use your existing Drupal modules within Open Atrium.
Contributing to the Community
While Phase2 Technology continues to maintain the core components of Open Atrium 2, this distribution is open source and community-driven; so most of the functionality will come via community plugins. For example, Open Atrium 2 doesn’t have any “CaseTracker” functionality as part of the core. There are a variety of Project Management tools that different people might need, from simple “To-do” list, to Issue Tracking, to integration with 3rd party ticketing systems such as JIRA. Open Atrium does not want to dictate a specific solution hard-coded into the core project, but wants to allow different Plugin solutions to better meet customer needs.
The new architecture should make it relatively straightforward to integrate your existing modules and functionality into Open Atrium 2. By sharing your Plugins with the community you will be helping to build a world-class Open Source solution for Collaboration, Project Management, and Communications. Eventually, we will have an “App” model that can be used to easily share your Plugins throughout the Open Atrium community. We will have a Plugin browser area on the Open Atrium community site to provide a way to share information about your plugins. For now, just use Drupal.org and submit your modules as normal Drupal Projects. With the Drupal.org Sandbox functionality, any developer can get started and post their own OA2 Plugins.
Where is the code?!
We know it is difficult to start Plugin development without the actual Open Atrium 2 code base to play with. We hope to have the OA2 code put into the Drupal.org Open Atrium Project space within the next week or so. This will be very early Alpha code, but will at least give the community something to start with. Once this code is posted keep in mind that it will be missing functionality and have plenty of bugs. We will eventually enable the Issue Tracker on Drupal.org to handle patches and issues.
In the meantime, feel free to post questions or plugin announcements to the Development group on the community.openatrium.com site or contact us directly at email@example.com.
Sign up for the Phase2 newsletter for exclusive content and news.