Social Enterprise JavaApps
Safe Harbor StatementSafe harbor statement under the Private Securities Litigation Reform Act of 1995.This presentation ma...
@forcedotcom , #forcewebinar, @Heroku,@anand_bn, @_JamesWardDeveloper Force Groupfacebook.com/forcedotcomfacebook.com/hero...
Anand B NarasimhanSenior Product Manager, Herokuanand@heroku.com@anand_bnJames L WardPrincipal Developer Evangelist, Herok...
- Paul CheesbroughCIO, News International
In this webinar… What is a “Social Enterprise App” Heroku – a short intro Hands on with Java on Heroku Building a Soci...
The Social Enterprise                                                          Customer                                   ...
Market = Engage = Heroku           5 Years Ago                    Today    Static, Passive Marketing   Relevant, Active Ma...
What are the    building blocks          of aSocial Enterprise App ?
Enterprise Apps                      Failover, Clusteri            App Server                              ng, Load Availa...
Forget                Run                   See              Trust &  Servers             Anything             Everything ...
Heroku                                               User                                                 •   Web browser ...
Social Enterprise App Architecture   Polyglot &                Process                    Real time                 Addons...
Getting started            with     Spring MVC app         on Heroku( http://java.heroku.com )
DEMO / HANDS ON
Building a Social Enterprise            App            WithHeroku and Salesforce.com
Integrating with Salesforce.com1.Setup OAuth2.Update dependencies3.Switch Entity to JSON4.Switch DAO to Force REST API5.Sw...
Dyno                          1. Build                          2. Slug Compile                          3. Deploy to Dyno...
Spring MVC app With Heroku &Salesforce.com      And Chatter APIs
What’s possible…              SocialFeeds, Recommendatio                 Real time/ Push                 ns               ...
is GAJava
Heroku Labs• WAR deployment (http://bit.ly/war-deploy )• Jenkins plugin for Heroku(http://bit.ly/heroku-ci  )• Heroku.jar-...
Coming Soon+        =    like
Coming Soon               All dayHEROKU ENTERPRISE DEVELOPER         WORKSHOP  Email anand@heroku.com if you are          ...
Resources Getting Started -     http://java.heroku.com     http://bit.ly/heroku-java Toolbelt (http://toolbelt.herokua...
Upcoming Events•   June 12 – Visualforce CodeTalk     http://bit.ly/codetalkheroku•   June 13 – How Salesforce.com Uses  ...
Survey:                 http://bit.ly/herokujavasurvey   Heroku Devcenter: http://devcenter.heroku.com James Ward @_JamesW...
SFDC Integration StepsAPPENDIX
1. Setup OAuthi.   Salesforce.com > Setup > Develop >     Remote Accessii. Add Remote Access for Dev & Prod     •   Dev Ca...
2. Update dependencies<repositories>  <repository>    <id>force-rest-api</id>    <name>force-rest-api repository on GitHub...
2. Update dependencies<dependency>    <groupId>com.force.api</groupId>    <artifactId>force-rest-api</artifactId>    <vers...
3. Switch Entity to JSON@JsonIgnoreProperties(ignoreUnknown=true)public class Person {   @JsonProperty(value="Id")   priva...
4. Switch DAO to Force RESTAPIprivate ForceApi getForceApi() {    SecurityContext sc = ForceSecurityContextHolder.get();  ...
5. Spring Config + OAuth<fss:oauth>  <fss:oauthInfo endpoint="http://login.salesforce.com"    oauth-key="#{systemEnvironme...
6. Add Servlet Filter for Oauth<filter>  <filter-name>springSecurityFilterChain</filter-name>  <filter-class>    org.sprin...
7. Add Oauth Keysexport OAUTH_CLIENT_KEY=CQ3gmEE53MVG99OxTyEMal8ytj1E3NF7...export OAUTH_CLIENT_SECRET=0905539091246761180...
Social ent. with java on heroku
Social ent. with java on heroku
Upcoming SlideShare
Loading in …5
×

Social ent. with java on heroku

2,279 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,279
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Intros.
  • It’s all about the Cloud.
  • Collaborate, Work, Extend, Sell, Service, Market = Engage = Heroku
  • it is a little paradoxical, but there is more to the idea of a social app than just the overtly social stuffif you think about the canonical social apps in the consumer space, apps like Facebook, Twitter, 4Square, today’s hot darling Pinterest, and othersAnd you look across them to see what they have in common, you’ll see there is more going on than easily fits within the dictionary definition of “social”it’s broader than thatAnd when you think about social enterprise apps, you need to layer in the needs of business, and you need to think even a bit more broadlyI break it down into these six characteristicsCollaboration, mobility, social UX, Interoperability, Rea ltime, and AgilityIf you really want to build a great social enterprise app, you need to think about all of them, though they will not all apply equally to every appLet me talk a little bit about each
  • Heroku can complement your force.com/db.com apps to extend your cloud applicationsWhat are my use cases for Heroku and force.com/db.com?
  • This is how you’re the same Java application looks in Heroku. As you can see not much changes i.e. your application is very much portable to another environment if you choose to do so.
  • Social ent. with java on heroku

    1. 1. Social Enterprise JavaApps
    2. 2. Safe Harbor StatementSafe 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 suchuncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materiallyfrom the results expressed or implied by the forward looking-statements we make. All statements other than statements ofhistorical fact could be deemed forward-looking, including any projections of product or service availability, subscribergrowth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for futureoperations, statements of belief, any statements concerning new, planned, or upgraded services or technology developmentsand 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 newfunctionality for our service, new products and services, our new business model, our past operating losses, possible fluctuationsin our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, theoutcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immaturemarket in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employeesand 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 thatcould affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-Q for the most recent fiscalquarter ended. This documents and others containing important disclosures are available on the SEC Filings section of theInvestor Information section of our Web site.Any unreleased services or features referenced in this or other presentations, press releases or public statements are notcurrently available and may not be delivered on time or at all. Customers who purchase our services should make the purchasedecisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend toupdate these forward-looking statements.
    3. 3. @forcedotcom , #forcewebinar, @Heroku,@anand_bn, @_JamesWardDeveloper Force Groupfacebook.com/forcedotcomfacebook.com/herokuDeveloper Force – Force.com Community
    4. 4. Anand B NarasimhanSenior Product Manager, Herokuanand@heroku.com@anand_bnJames L WardPrincipal Developer Evangelist, Herokujw@heroku.com@_JamesWard
    5. 5. - Paul CheesbroughCIO, News International
    6. 6. In this webinar… What is a “Social Enterprise App” Heroku – a short intro Hands on with Java on Heroku Building a Social Enterprise Heroku app Coming soon to an IDE near you Q&A
    7. 7. The Social Enterprise Customer Social Network Social Profile Collaborate MarketWork Service Extend Sell
    8. 8. Market = Engage = Heroku 5 Years Ago Today Static, Passive Marketing Relevant, Active Marketing
    9. 9. What are the building blocks of aSocial Enterprise App ?
    10. 10. Enterprise Apps Failover, Clusteri App Server ng, Load Availability Admins, Network Balancers, SSL Admins Domains YOUR APP App crashes,Alerts, Logs mining Servers: Web Servers, App Servers, Database servers Visibility etc Infrastructure Ops, System Admins, App serverProduction support Admins, DBAs DR,Rollback, Replication Redundancy DBAs, Admins System
    11. 11. Forget Run See Trust & Servers Anything Everything Manage$ heroku create worker: java –jar .. $heroku logs --tail $heroku ps
    12. 12. Heroku User • Web browser Acces Architecture • API access http(s) Elastic Load BalancingDeveloper Control Surface APIsCode•Java•…Deploy REST•GITManage•Heroku CLI•Scaling•Monitoring
    13. 13. Social Enterprise App Architecture Polyglot & Process Real time Addons Open Model Visibiility Social API Data API Metadata API Access Management Identity Profiles Permissions Record-Level Filtering Data Business Data Metadata Files
    14. 14. Getting started with Spring MVC app on Heroku( http://java.heroku.com )
    15. 15. DEMO / HANDS ON
    16. 16. Building a Social Enterprise App WithHeroku and Salesforce.com
    17. 17. Integrating with Salesforce.com1.Setup OAuth2.Update dependencies3.Switch Entity to JSON4.Switch DAO to Force REST API5.Switch Spring Config to Force REST + OAuth6.Add Servlet Filter for Oauth7.Add Oauth Keys to the environment
    18. 18. Dyno 1. Build 2. Slug Compile 3. Deploy to Dyno Embedded Container WAR $ git push herokuDependencies pom.xml $ mvn install Your code Under the
    19. 19. Spring MVC app With Heroku &Salesforce.com And Chatter APIs
    20. 20. What’s possible… SocialFeeds, Recommendatio Real time/ Push ns Notifications Social Enterpris e App Streaming Analytics Data
    21. 21. is GAJava
    22. 22. Heroku Labs• WAR deployment (http://bit.ly/war-deploy )• Jenkins plugin for Heroku(http://bit.ly/heroku-ci )• Heroku.jar- Java Wrapper (http://bit.ly/heroku- jar )• Atlassian Bamboo plugin for Heroku (Email anand@heroku.com for more details) you can try these out now. We would love your feedback
    23. 23. Coming Soon+ = like
    24. 24. Coming Soon All dayHEROKU ENTERPRISE DEVELOPER WORKSHOP Email anand@heroku.com if you are interested
    25. 25. Resources Getting Started -  http://java.heroku.com  http://bit.ly/heroku-java Toolbelt (http://toolbelt.herokuapp.com ) Heroku Dev Center : http://devcenter.heroku.com Heroku Add-ons: http://addons.heroku.com Git: http://help.github.com/ Webinar Source code:  Spring MVC - Force.com : http://bit.ly/KZB68y  Chatter - http://bit.ly/KgMlPP  Pusher integration - http://bit.ly/KMVInx
    26. 26. Upcoming Events• June 12 – Visualforce CodeTalk  http://bit.ly/codetalkheroku• June 13 – How Salesforce.com Uses Hadoop Webinar  http://bit.ly/hadoopheroku• June 26 – Mobile CodeTalk  http://bit.ly/mct-wr
    27. 27. Survey: http://bit.ly/herokujavasurvey Heroku Devcenter: http://devcenter.heroku.com James Ward @_JamesWard Anand Narasimhan @anand_bnDeveloper Evangelist at Heroku Sr. Product Manager at Heroku jw@heroku.com anand@heroku.com
    28. 28. SFDC Integration StepsAPPENDIX
    29. 29. 1. Setup OAuthi. Salesforce.com > Setup > Develop > Remote Accessii. Add Remote Access for Dev & Prod • Dev Callback URL: http://localhost:8080/_auth • Prod Callback URL: https://some-app-1234.herokuapp.com/_auth
    30. 30. 2. Update dependencies<repositories> <repository> <id>force-rest-api</id> <name>force-rest-api repository on GitHub</name> <url> http://jesperfj.github.com/force-rest-api/repository/ </url> </repository></repositories>
    31. 31. 2. Update dependencies<dependency> <groupId>com.force.api</groupId> <artifactId>force-rest-api</artifactId> <version>0.0.15</version></dependency><dependency> <groupId>com.force.sdk</groupId> <artifactId>force-oauth</artifactId> <version>22.0.8-BETA</version></dependency><dependency> <groupId>com.force.sdk</groupId> <artifactId>force-springsecurity</artifactId> <version>22.0.8-BETA</version></dependency>
    32. 32. 3. Switch Entity to JSON@JsonIgnoreProperties(ignoreUnknown=true)public class Person { @JsonProperty(value="Id") private String id; @JsonProperty(value="FirstName") private String firstName; @JsonProperty(value="LastName") private String lastName;
    33. 33. 4. Switch DAO to Force RESTAPIprivate ForceApi getForceApi() { SecurityContext sc = ForceSecurityContextHolder.get(); ApiSession s = new ApiSession(); s.setAccessToken(sc.getSessionId()); s.setApiEndpoint(sc.getEndPointHost()); return new ForceApi(s);}// Add ContactgetForceApi().createSObject("contact", person);// Query ContactsgetForceApi().query("SELECT Id FROM contact", Person.class);// Delete ContactgetForceApi().deleteSObject("contact", id);
    34. 34. 5. Spring Config + OAuth<fss:oauth> <fss:oauthInfo endpoint="http://login.salesforce.com" oauth-key="#{systemEnvironment[OAUTH_CLIENT_KEY]}" oauth-secret="#{systemEnvironment[OAUTH_CLIENT_SECRET]}"/></fss:oauth><security:http use-expressions="true"> <security:intercept-url pattern="/people/*" access="isAuthenticated()" /></security:http><!-- https redirect support --><property name="redirectHttp10Compatible" value="false" />
    35. 35. 6. Add Servlet Filter for Oauth<filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class> org.springframework.web.filter.DelegatingFilterProxy </filter-class> <init-param> <param-name>contextAttribute</param-name> <param-value> org.springframework.web.servlet.FrameworkServlet.CONTEXT.spring </param-value> </init-param></filter><filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern></filter-mapping>
    36. 36. 7. Add Oauth Keysexport OAUTH_CLIENT_KEY=CQ3gmEE53MVG99OxTyEMal8ytj1E3NF7...export OAUTH_CLIENT_SECRET=0905539091246761180heroku config:add OAUTH_CLIENT_KEY=CQ3gmEE53MVG99OxTyEMal8yt...heroku config:add OAUTH_CLIENT_SECRET=0905539091246761180

    ×