Salesforce1 Platform ELEVATE LA workshop Dec 18, 2013

  • View
    105

  • Download
    2

Embed Size (px)

DESCRIPTION

Presentation from the Salesforce1 Platform ELEVATE workshop on December 18, 2013. The event took place at USC's Davidson Continuing Education Conference Center. Developer Evangelists Samantha Ready and Pat Patterson were on hand to present and lead attendees through various hands-on exercises.

Text of Salesforce1 Platform ELEVATE LA workshop Dec 18, 2013

  • 1. Developer Workshop Pat Patterson Developer Evangelist Architect @metadaddy ppatterson@salesforce.comSamantha Ready Developer Evangelist @samantha_ready sready@salesforce.com

2. Login and Get ReadyInternet Username / Password SF13 / SF13 http://bit.ly/dfc_beg_workbook 3. Be Interactive 4. http://developer.force.com/join Free Developer Environment 5. http://bit.ly/dfc_beg_workbookOnline Workbook 6. 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 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, 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, 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-K for the most recent fiscal quarter ended July 31, 2011. This document and others 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 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. 7. Introduction to the Salesforce1 Platform 8. Salesforce1 Platform APIsMobile ServicesCore ServicesSOAP APIsREST APIsBulk APIsTooli ng APIsMetada ta APIsAnalyti cs APIsSoci alET APIStreami ng APIsAPIsMobile SDKMobile PacksOffline SupportGeolocat ionCusto m Action sIdenti tyPrivate App Exchang eMobile Notificati onsVisualfo rce1Chatt erWorkflo wsAnalyti csApe xMultilangua geHeroku AddOnsEmail Servic esET 1:1ET FuelMultitenantCloud Databa seDatalevel Securit ySchem a BuilderSharin g ModelTranslati on Workben chSear chHeroku1Monitori ng 9. Build Employee Apps Fast with the Salesforce1 App All your past investments... All Your Apps All Your CRM...are now in the future Notifications Platform Flexible UIAll Your Customizations All Your DevicesDownload the Salesforce1 App today.Publisher Actions 10. Salesforce1 Platform6BLines of Apex500M API Calls Per Day4M+Apps Built on the Platform72B Records StoredSalesforce is a Platform Company. Period. -Alex Williams, TechCrunch 11. 1.4 Million 12. Data Modeling 13. Spreadsheet Versus ApplicationORRelational Data Validated data Process driven workflows Approval System Field Auditing Users, Profiles and Permissions Enterprise CollaborationWith the same amount of programming 14. Lets Build an App 15. Warehouse Application Requirements Track price and inventory on hand for all merchandise Create invoices containing one or more merchandise items as a line items Present total invoice amount and current shipping status 16. Warehouse Application Requirements Track price and inventory on hand for all merchandise Create invoices containing one or more merchandise items as a line items Present total invoice amount and current shipping status 17. Warehouse Application Requirements Track price and inventory on hand for all merchandise Create invoices containing one or more merchandise items as a line items Present total invoice amount and current shipping status 18. Warehouse Data Model Invoice NumberStatusCountTotalINV-01Shipped16$370INV-02New20$200MerchandiseInvoice Line Items LineMerchandiseUnits SoldUnit PriceValueINV-011Pinot115$20INV-012Cabernet510$150INV-013Malbec1020$200INV-021Pinot2050$200NamePriceInventoryPinotInvoice$2015Cabernet$3010Malbec$2020Zinfandel$1050 19. Chatter Social framework for the enterprise 20. Tutorial 100 Optional: Tutorial 110 21. DECLARATIVE LOGIC 22. Declarative Apps Creating business applications with clicks not code 23. Spreadsheet Versus Application 24. Formula Fields Operations for performing common logic 25. Excel style formulas Support for commons functions Math Text Date & Time Logical Can chain functions together: AND ( OR ( ISPICKVAL(StageName, "Closed Won"), ISPICKVAL(StageName, "Negotiation/Review")), ISBLANK(Delivery_Date__c) ) 26. Validation Rules Formulas which block data entry if evaluated as true 27. WHENIFRecord is being inserted or updatedFormula evaluates to trueTHEN Return error message 28. Roll-Up Fields Field type calculating on rows of child data 29. Child of Master-DetailCount or Aggregate 30. Workflows Event based business logic 31. When this happensMeets this Criteria? Perform These Actions 32. EmailTaskUpdate FieldOutbound Message 33. Approvals System to route approvals through an organization 34. Define CriteriaDefine ActionsTrack Approval History 35. Single/Multi/Skip step processes Route based on roles, or queues Approval via emails or Chatter 36. Security Identity, data security and user services 37. User Profiles Groups, Queues and Hierarchies Permission Sets SSO, SAML, OAuth 2.0Connected Apps 38. TUTORIAL 120 OPTIONAL: TUTORIAL 150 39. LUNCH:Downstairs 40. APEX 41. Apex Cloud based programming language 42. Apex Anatomy Class and Interface based Scoped Variablespublic with sharing class myControllerExtension implements Util { private final Account acct; public Contact newContact {get; set;} public myControllerExtension(ApexPages.StandardController stdController) { this.acct = (Account)stdController.getRecord(); } public PageReference associateNewContact(Id cid) { newContact = [SELECT Id, Account from Contact WHERE Id =: cid LIMIT 1]; newContact.Account = acct; update newContact; Inline SOQL } } Inline DML 43. DEVELOPER CONSOLE 44. Common Use CasesControllersCustom API and HTTP CalloutsScheduled and Batched TasksInbound/Outbound Email ServicesTriggers 45. Trigger Anatomy Object Definition Event Definitiontrigger MerchandiseTrigger on Merchandise__c (before insert, before update) { Merchandise__c[] merch = Trigger.new; if(Trigger.isInsert) { MerchandiseUtil.checkMerchandise(merch); } Trigger.old and new // Do more stuff... Bulkify code } 46. Unit Testing @isTest static public void testRequiredFields() { Merchandise__c m = new Merchandise__c(Name = 'Test'); try { insert m; System.assert(false, 'Shouldn't be able to insert Merchandise without + ' quantity & price!'); } catch (DMLException e) { // Expect to see an exception here all is good } m.Quantity__c = 0; m.Price__c = 9.99; insert m; } 47. Unit Testing public WarehouseCSVController() { Boolean dummy = ApexPages.currentPage().getParameters().get(dummy') != null; if (dummy) { allMerchandise = new List(); for(Integer x = 0; x < 1500; x++) { Merchandise__c m = new Merchandise__c( Name = 'Widget + String.valueOf(x), Quantity__c = 100, Price__c = 49.99); allMerchandise.add(m); } } else { allMerchandise = WarehouseDataQuery.getAllMerchandise(); } } 48. TUTORIAL 300 49. VISUALFORCE 50. Model View Controller Application design paradigm to divide data, logic and UI 51. Visualforce Cloud based component framework for interfaces 52. Visualforce AnatomyControllers StandardControllers Custom Custom Extensions Data bound components Controller Callbacks 53. }JavaScript Remoting @RemoteAction public static String updateMerchandiseItem(String productId, Integer newInventory) { List m = [SELECT Id, Total_Inventory__c from Merchandise__c WHERE Id =: productId LIMIT 1]; if (m.size() > 0) { m[0].Total_Inventory__c = newInventory; try { update m[0]; return 'Item Updated'; } catch (Exception e) { return e.getMessage(); $(".updateBtn").click(function() { } var id = j$(this).attr('data-id'); } var inventory = parseInt(j$("#inventory"+id).val()); else { $.mobile.showPageLoadingMsg(); return 'No item found with that ID'; } MobileInventoryExtension.updateMerchandiseItem(id, inventory,handleUpdate); } }); Access Apex from JavaScript Asynchronous ResponsesApex JavaScript in Visualforce 54. Custom Components 55. Page Templates

56. Chatter Components 57. Common Use CasesEmail TemplatesEmbed in Page LayoutsMobile InterfacesGenerate PDFsPage Overrides 58. TUTORIAL 330 59. INTEGRATION 60. OAuth Industry standard method of user authentication 61. OAuth2 FlowInvoke OAuth User logs in, Tokens sent to callbackRemote ApplicationSalesforce PlatformCall APIReturn DataMaintain session with refresh token 62. WORKBENCH 63. REST API API leveraging industry standard HTTP 64. REST API1. Authenticate login.salesforce.comMobile Application2. Access API /services/data/query?q= SELECT+Id,+Name+FROM+Account3. Get JSON or XML { Id : 001E0000002Jv2b