Building a Java Play! App on Heroku using Database.com

17
Building a Java Play! App on Heroku using Database.com The subtitle goes here Cory McIlroy, Appirio, Community Architect @coryio

description

 

Transcript of Building a Java Play! App on Heroku using Database.com

Page 1: Building a Java Play! App on Heroku using Database.com

Building a Java Play! App on Heroku

using Database.com

The subtitle goes here

Cory McIlroy, Appirio, Community Architect

@coryio

Page 2: Building a Java Play! App on Heroku using Database.com

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 l itigation, 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: Building a Java Play! App on Heroku using Database.com

Appirio Helps Enterprises Power Their Business with Public Cloud Solutions

Technology-enabled professional services, supported by 500 cloud experts and

a 50,000+ cloud developer community

Helping Enterprises Become:

Efficient Effective

5 years, 300 enterprises, 1.5M users moved to the cloud

Social Mobile

Agile

Page 4: Building a Java Play! App on Heroku using Database.com

Agenda

Introductions

Describe the sample app

Quick intro to Heroku and Play

Walkthrough: Heroku/Play

Walkthrough: Force.com

Q&A break

Scala in Play teaser

Page 5: Building a Java Play! App on Heroku using Database.com

Introductions

Who I am

• Cory McIlroy (yes, like the golfer, but with a 'C')

• Live in St. Louis, MO

• Work at Appirio (Force.com, Heroku, CloudSpokes)

Who You are

• Java and/or Force.com developers?

• Admins, Architects, Managers interested in the platform?

Page 6: Building a Java Play! App on Heroku using Database.com

Consider this example....

Softball League Manager- an Existing Force.com Application.

Comes with all the great things about force.com...

• Security and Sharing

• Reporting

• Simple but powerful data management

• Extensibility

Roster Management

Stats Tracker

League Fees

League Rankings

Page 7: Building a Java Play! App on Heroku using Database.com

Extending the App with Heroku

We want some new features...

Public “Leaderboard”

• High Volume, especially during playoff season

• Need elastic platform, heavy caching

Manager “Sub Finder" app

• Fast filter tool

• Mobile-friendly

• Fetch contact info from force.com

Page 8: Building a Java Play! App on Heroku using Database.com

How They Fit Together

Two touchpoints between the Heroku app and the force.com

REST API, slightly different flavors.

Fetch Free-Agents List

• Standard "query" REST call

• "Index" into Redis for filtering

Fetch Standings

• custom apex REST Service

• "pass through" JSON

Page 9: Building a Java Play! App on Heroku using Database.com

Heroku at a Glance

A scalable polyglot platform in the cloud

Scalable & Flexible

• Datastore options, right tool for the job

• Other Heroku addons

• Polyglot support

Better cost model for this application

• Scale up/down seasonally

Utilize our java expertise

Page 10: Building a Java Play! App on Heroku using Database.com

Why the Play Framework?

A web framework for the asynchronous age

Light, Fast, Scalable

Easy to work with => Dev Productivity

Designed towards fully Async HTTP model

Type checking, even in routes & view templates

Comprehensive, extensible build system

Powerful, Scala-based templating engine

Play 2.0 is a high-productivity Java and Scala web application

framework that integrates the components and APIs you need for

modern web application development.

Play is based on a lightweight, stateless, web-friendly architecture

and features predictable and minimal resource consumption

(CPU, memory, threads) for highly-scalable applications thanks

to its reactive model, based on Iteratee IO.

-- http://www.playframework.org/documentation/2.0.3/Home

Page 11: Building a Java Play! App on Heroku using Database.com

Leaderboard overview

Page 12: Building a Java Play! App on Heroku using Database.com

Sub Finder overview

Page 13: Building a Java Play! App on Heroku using Database.com

Heroku Code Walkthrough

Directory Structure

Routes File

Build.scala (deps)

OAuth helper

Controller(s)

Model/Managers

Force.com REST helper (“Jesper”)

demo: play compile / git push

Page 14: Building a Java Play! App on Heroku using Database.com

Force.com Code Walkthrough

REST service (composition)

OAuth config

Page 15: Building a Java Play! App on Heroku using Database.com

Resources

https://github.com/mcilroyc/play20_force_league_manager

https://github.com/jesperfj/force-rest-api

Page 16: Building a Java Play! App on Heroku using Database.com
Page 17: Building a Java Play! App on Heroku using Database.com