Intro to AnswerHub Development

Summary

AnswerHub is a developer engagement and community platform. By combining our core set of features and plugin options, you can create a custom, world-class developer ecosystem.

Product Overview

If you are unfamiliar with AnswerHub, or our features, check out more on our homepage, AnswerHub Product Overview.

Supported Browsers

We support the latest versions for the following browsers:

  • Chrome
  • Safari
  • Firefox
  • Edge
  • IE 11 - As IE 11 has entered maintenance mode, some features such as international strings and search may provide inconsistent behavior. As an alternative, Microsoft recommends the Edge browser.

Understanding the Platform

Servers, networks, sites and spaces that contain groups, users, and nodes make up the platform. These components all interact with one another to create a hierarchy of resources that you can fully customize to present each user, or group of users, with only the information and options relevant to them.

AnswerHub UI Hierarchy

From the server down to a sub-space, each layer of the default AnswerHub UI connects to, and nests within, the levels above it. Servers host networks that contain sites, which contain spaces and sub-spaces. These sites, spaces, and sub-spaces are all containers. By layering these elements, the AnswerHub platform creates a container-based, hierarchical content management system (referred to as the AnswerHub Hierarchy) that allows your site to be fully customizable at each level.

You can think of this hierarchy like the folder system on a computer, with each of the folders nested within a parent while holding other folders, and files (content), of its own.

AnswerHub Development Architecture

We built AnswerHub on a flexible and extensive, multi-layer Development Architecture. This architecture includes core services and abstractions, and a dynamic set of plugins that you can have installed and enabled to meet specific needs.

This AnswerHub Development Architecture, much like the AnswerHub UI Hierarchy, consists of many layers of interworking components that, when combined, form your AnswerHub site instance. The most important default layers of the Development Architecture include:

  • Models Layer: defined in package tree com.teamhub.models. Defines the entities modeled and managed by the application, such as users, questions, answers and many others.
  • Data-access Layer: defined in package tree com.teamhub.dao. Defines data-access objects (DAO), implementing the Repository Design-Pattern, to provide for the persistent storage of entity instances.
  • Manager Layer: defined in package tree com.teamhub.managers. Defines the services used by the other, higher layers of the Development Architecture. Managers enrich the services provided by DAO, with operations that may require multiple DAOs, and perform a variety of services and computations. Upper, presentation layers such as web-controller and rest web-service layer, typically use the manager layer as a front-end to the core platform services.
  • Infrastructure Layer: defined in package tree com.teamhub.infrastructure. Defines a large number of internal support modules and components required for the platform. This includes spring support, hibernate support, plugins support, support for content types, i18n localization support, security services, and theming support.

Some other features of the AnswerHub Development Architecture include:

  • The support for custom plugins. You can find definitions of supported plugin extension points in the com.teamhub.infrastructure.plugins package tree.
  • A Security infrastructure leveraged on Spring security with additional mechanisms such as the annotation-driven definition of Access Control Lists (ACL). These lists define the built-in security, based on the ACL Rules defined in package tree com.teamhub.aclrules.
  • Integration with Spring Framework and Hibernate ORM, and many other support services.

Customizing AnswerHub

There are two supported ways to customize your AnswerHub site instance: Plugins and Themes. When you are customizing your AnswerHub site, you will employ one, or for an extensive customization, possibly both methods. There are several important differences between plugins and themes, including when you should use each customization type.

What is a Theme?

An AnswerHub theme is a suite of templates, scripts and other files through which you can implement a change or addition to your AnswerHub User Interface (UI). Themes are more flexible, and involve less active development than plugins, allowing you to create or implement a pre-existing theme, in any circumstance in which you do not specifically need to change or add new Java code. Theming can help you change the appearance and functionality of the existing AnswerHub UI.

What is a Plugin?

An AnswerHub plugin is a suite of Java modules through which you can make an effective change or addition to the core AnswerHub functionality. For example, you can create, or implement a pre-existing plugin to perform a task where you had to change or add new Java code. A custom plugin will change how users can perform actions in your AnswerHub instance and change how the site handles those changes.

Which Method Should You Use?

The main deciding factor regarding which of these methods of customization to use is whether your AnswerHub site will need to change how your site accesses the site database. You can think of this as front- or back-end customization. If a user can see the changes you want to implement, but nothing changes about how your site functions in the background, then you can likely make your customizations in a theme. If the changes you are making will involve interaction with the backend (database) of AnswerHub, you need to design a new plugin for those changes to be in effect.

📘

NOTE:

Before creating a custom theme or plugin, please contact your dedicated Customer Success Manager to verify that the functionality you want doesn’t already exist.

The following is a table that shows different changes listed under the best customization type to use for implementation:

Plugin – Back EndTheme – Front End
JavaFreemarker
New Content TypesCSS
SSOi18n
Integration with other SoftwareJavascript
SearchHTML
Extra FilteringNavigation
New AwardsEmails
Extra Moderation StepsColoration
Reports from the DatabaseAppearance
New ActionsRewording Default Site Content