Create a new web project for hosting searchable, browseable and editable documentation for the APIs that are used in Ubuntu application development.

Rationale

Our API documentation is sparse and in static HTML. This makes it difficult to find specific documentation.

Required Functionality

Data Model

The API data will be parsed from many different sources, pre-rendered into HTML, and stored along with meta-data about it in the database.

Users will be able to contribute snippets, linked articles and images to expand upon the generated documentation.

updated_db_model.svg

Common Models

These models will be used to define the platform that application developers can target. A platform is the combination of libraries and APIs provided by a given release of a distribution.

Distribution

This model will represent a reusable reference to a distro (Ubuntu, Kubuntu, Xubuntu, etc)

Release

This model will represent a specific release of a distribution, and will be used to define what libraries and versions of them are available in that release.

PlatformSection

This model will be used to group PlatformItems by areas of focus, such as Graphical Interface, Filesystem, Multimedia, etc.

PlatformItem

This model is used to define a platform, it links API docs of a specific version to a specific Release

Language

Will represent one of the available programming languages in the system

API Doc Models

These models contain the API docs themselves, pre-rendered to HTML by the import process.

Namespace

This model identifies a programming namespace for a collection of Element records

Element

This model contains the pre-rendered HTML for an API element

Search Models

These models contain searchable meta-data about the API elements

Class

This model contains information about a programming language class, it's methods and properties

BitField

This model contains information about a programming language bitfield and it's available field names

Enum

This model contains information about a programming language enumeration and it's available value names

The frontend will have a number of Django models specific to Ubuntu, making use for the GDN data models.

Will link a tutorial or question on AskUbuntu.com to an api element

Snippet

Will contain short pieces of code demonstrating the use of an api element

Image

An uploaded image showing the visible result of an api element

Frontend

The web frontend should be built using Django templates, wrapping the pre-rendered HTML for each API element with a standard header, footer and other navigation.

Theme

This project should use the community Django theme as much as possible, with site-specific css and javascript being added to the above web frontend code.

URLs

Paths will have two parts, the first will contain the Distro, then DistroRelease and ProgrammingLang. After that will come the Namespace and Element name:

Views should contain anchor links to all API elements on the page:

Site Index

The main page of the site should provide a brief (on paragraph) text explaining the purpose of the site, followed by a list of DistroRelease records. This list will contain only supported releases (those that have not reached their expiration_date) ordered by release_date, with an associated screenshot.

Release Page

The Distro Release page will list all of the PlatformItem records for the DistroRelease, grouped by PlatformSection. Each item will be presented by the GDN Namespace name, followed by links for each of the languages supported by that Namespace as defined by the LanguageNamespace data models.

Initial PlatformSections for Ubuntu are:

Namespace Page

Here we break the library down into sections so the user can more easily browse them. We also provide a list of tutorials of general interest to GTK+ (these could be from the cookbook portion of the site. We may also want to include some general user-added documentation here (e.g. such as an introduction to GTK). A quick reference list of all the classes, enums and top-level functions is displayed on the left-hand side.

gtk.png

Element Page

When a user clicks on a class, enum or bitfield we see the information page. This page has a number of features:

dialog.png

Search Results Page

TODO: Define this page

search.png

Editing Content

To edit content users will need to be in a particular launchpad group (for example the docs team could be part of the group) and users who have permission will see small edit button next to each field (similar to Launchpad). There inline editing can occur:

http://farm9.staticflickr.com/8009/7463069484_05f7981be3_b.jpg

The site would support markdown format to make it easy for users to edit and submit content.

Management Commands

import-qt

Given a Qt library XML file (qdoc DITA output), import its data into the database. If a previous version of the same namespace if specified, forward copy all related records (snippets, tutorials, questions and comments.

create-release

Given a distro and previous release, create a new release record and forward-copy the previous release's platform items to it.

User stories

Work Items

Item

Section

Status

Notes

Management

Import Qt API metadata

Qt Parser

TODO

Need to identify what format we can get this data in

import-qt command

Qt Parser

TODO

Needs to process all Qt metadata docs in a directory

create-release command

Release Management

TODO

Needs to forward-copy platform defintions

Backend (Django)

Language model

Data models

DONE

Distribution model

Data models

DONE

Release model

Data models

DONE

PlatformSection model

Data models

DONE

PlatformItem model

Data models

DONE

Namespace model

Data models

DONE

Element model

Data models

DONE

Class model

Data models

DONE

BitField model

Data models

DONE

Enum model

Data models

DONE

Link model

Data models

DONE

Snippet model

Data models

DONE

Image model

Data models

DONE

Index view

Views

TODO

Provide a list of active Distro records

Distro view

Views

TODO

Provide a list of active DistroRelease records for a distro

Release view

Views

TODO

Provide a list of PlatformItems, grouped by PlatformSection, plus tutorials and questions for a release

Element view

Views

TODO

Provide class, methods, signals, properties, questions, tutorials, snippets and images

Search view

Views

TODO

Provide a list of classes, methods, signals or properties that match a search term

Text editing

Views

TODO

Accept data submitted from inline text editing

Frontend (HTML/CSS)

Base template

Templates

INPROGRESS

Use ubuntu-community-webthemes (See mockups)

Index template

Templates

TODO

List all DistroReleases with links to their Release page (See mockups)

Release template

Templates

TODO

Group Namespaces by section, providing links for each supported language (See mockups)

Class template

Templates

TODO

(See mockups)

Search template

Templates

TODO

(See mockups)

Text editing

Scripting

TODO

Allow inline text editing for those with permission

Images display

Scripting

TODO

Provide a popup/lightbox for viewing multiple images

Unresolved issues


CategorySpec

DeveloperNetwork (last edited 2013-05-27 17:36:58 by mhall119)