developing a documentation portal on heroku

36
Developing a Documentation Portal on Heroku Steve Anderson, salesforce.com, Information Architect @sanderson_sfdc

Upload: salesforce-developers

Post on 07-Nov-2014

323 views

Category:

Documents


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Developing a Documentation Portal on Heroku

Developing a Documentation Portal

on Heroku

Steve Anderson, salesforce.com, Information Architect

@sanderson_sfdc

Page 2: Developing a Documentation Portal on Heroku

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties

materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results

expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be

deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other

financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any

statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new

functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our

operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of

intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we

operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new

releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization

and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of

salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2012. This

documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of

our Web site.

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently

available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based

upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-

looking statements.

Page 3: Developing a Documentation Portal on Heroku

Even the Simplest UI

Needs Documentation

Page 4: Developing a Documentation Portal on Heroku

Creating a Help System

Takes Time Away From

Your Project

Page 5: Developing a Documentation Portal on Heroku

Let Us Do It For You!

Page 6: Developing a Documentation Portal on Heroku

Heroku Doc Portal

Page 7: Developing a Documentation Portal on Heroku

Hosted on Heroku

Page 8: Developing a Documentation Portal on Heroku

Written in Ruby

Page 9: Developing a Documentation Portal on Heroku

Contents stored in

CouchDb

Page 10: Developing a Documentation Portal on Heroku

Search powered by Solr

Page 11: Developing a Documentation Portal on Heroku

Format controlled by

oocss

Page 12: Developing a Documentation Portal on Heroku

Project available on

github

Page 13: Developing a Documentation Portal on Heroku

Upload Your HTML, Add a

Table of Contents Written

in JSON, and You’re

Ready to Go

Page 14: Developing a Documentation Portal on Heroku

Demo

Page 15: Developing a Documentation Portal on Heroku

Let’s dig in

Page 16: Developing a Documentation Portal on Heroku

Keeping it simple

Everything is done using

RESTful HTTP actions

Page 17: Developing a Documentation Portal on Heroku

Sinatra

• Domain Specific Language (DSL) for defining RESTful HTTP

actions

• Every time a user visits a URL, a Sinatra route is triggered

• Each route returns something to the browser

• The content returned can be

• a HTML file from CouchDB,

• a simple page defined using HAML,

• a search results page that displays the SOLR data, or

• a static page

Page 18: Developing a Documentation Portal on Heroku

A Simple Sinatra Route

Page 19: Developing a Documentation Portal on Heroku

A More Interesting Sinatra Route

Page 20: Developing a Documentation Portal on Heroku

Sinatra Supports Complex Routes

Page 21: Developing a Documentation Portal on Heroku

Views

HAML (HTML Abstraction Markup Language ) is used to define

the views

Page 22: Developing a Documentation Portal on Heroku

CouchDB for Content Storage

• CouchDB is a document database

• The data is saved in a semi-structured key/value store

• Advantages of a document database for this project

• The data isn’t restricted by a schema

• Queries aren’t limited by the keys

• Use views for powerful data access

• Provided by Cloudant, CouchDB in the cloud

• Integrated with the application using couchrest_model

Page 23: Developing a Documentation Portal on Heroku

Define the Model

Page 24: Developing a Documentation Portal on Heroku

Document in CouchDB

Page 25: Developing a Documentation Portal on Heroku

Views in CouchDB

Page 26: Developing a Documentation Portal on Heroku

Retrieve Using a View

Page 27: Developing a Documentation Portal on Heroku

Let’s Put It All Together

Page 28: Developing a Documentation Portal on Heroku

Solr for Search

• Open source enterprise search platform from the Apache

Lucene project.

• full-text search

• hit highlighting

• faceted search

• Powered by WebSolr, Solr in the Cloud

• Integrated with the application using Sunspot

Page 29: Developing a Documentation Portal on Heroku

Solr Schema

Page 30: Developing a Documentation Portal on Heroku

Search with Solr

Page 31: Developing a Documentation Portal on Heroku

Search Flow

Page 32: Developing a Documentation Portal on Heroku

Look and feel - oocss

• Oocss (Object-Oriented CSS) is a BSD licensed CSS

framework

• It’s very easy to swap in your own favorite CSS framework

• https://github.com/stubbornella/oocss

Page 33: Developing a Documentation Portal on Heroku

Static Files

• PDFs, images for your CSS, JavaScript, etc.

• All are stored in the file system

Page 34: Developing a Documentation Portal on Heroku

What About the Table of Contents and Search

Facets?

• Each topic has an associated JSON (JavaScript Object

Notation) file stored in CouchDB.

• The facets are in a static JSON file

• They are displayed using Dynatree, a JQuery plugin

Page 35: Developing a Documentation Portal on Heroku

Steve Anderson

Information Architect,

@sanderson_sfdc

Page 36: Developing a Documentation Portal on Heroku