developing a documentation portal on heroku
DESCRIPTION
TRANSCRIPT
![Page 1: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/1.jpg)
Developing a Documentation Portal
on Heroku
Steve Anderson, salesforce.com, Information Architect
@sanderson_sfdc
![Page 2: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/2.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/3.jpg)
Even the Simplest UI
Needs Documentation
![Page 4: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/4.jpg)
Creating a Help System
Takes Time Away From
Your Project
![Page 5: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/5.jpg)
Let Us Do It For You!
![Page 6: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/6.jpg)
Heroku Doc Portal
![Page 7: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/7.jpg)
Hosted on Heroku
![Page 8: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/8.jpg)
Written in Ruby
![Page 9: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/9.jpg)
Contents stored in
CouchDb
![Page 10: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/10.jpg)
Search powered by Solr
![Page 11: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/11.jpg)
Format controlled by
oocss
![Page 12: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/12.jpg)
Project available on
github
![Page 13: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/13.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/14.jpg)
Demo
![Page 15: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/15.jpg)
Let’s dig in
![Page 16: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/16.jpg)
Keeping it simple
Everything is done using
RESTful HTTP actions
![Page 17: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/17.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/18.jpg)
A Simple Sinatra Route
![Page 19: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/19.jpg)
A More Interesting Sinatra Route
![Page 20: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/20.jpg)
Sinatra Supports Complex Routes
![Page 21: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/21.jpg)
Views
HAML (HTML Abstraction Markup Language ) is used to define
the views
![Page 22: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/22.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/23.jpg)
Define the Model
![Page 24: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/24.jpg)
Document in CouchDB
![Page 25: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/25.jpg)
Views in CouchDB
![Page 26: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/26.jpg)
Retrieve Using a View
![Page 27: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/27.jpg)
Let’s Put It All Together
![Page 28: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/28.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/29.jpg)
Solr Schema
![Page 30: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/30.jpg)
Search with Solr
![Page 31: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/31.jpg)
Search Flow
![Page 32: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/32.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/33.jpg)
Static Files
• PDFs, images for your CSS, JavaScript, etc.
• All are stored in the file system
![Page 34: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/34.jpg)
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](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/35.jpg)
Steve Anderson
Information Architect,
@sanderson_sfdc
![Page 36: Developing a Documentation Portal on Heroku](https://reader034.vdocuments.site/reader034/viewer/2022051411/545c1025af7959be098b4627/html5/thumbnails/36.jpg)