SlideShare une entreprise Scribd logo
1  sur  55
a smalltalk about       Salesforc    e with         architects




      June 30th, 2010        Yves Leblond Leblond
                                      Yves          @small_talks
                                                    @small_talks
2010                                      Chatter - VMforce
2009   67 900   1 500 000
2008   51 800   1 100 000        force.com “sites” - GoogleApps link
2007   41 000   850 000                VisualForce - force.com
2006   29 800   646 000                     App Exchange
2005   20 500   393 000
2004   13 900   227 000

2003   8 700    127 000
2002   5 700     76 000
2001   3 500     53 000          Fastest Growing Online CRM Company
2000   1 500     3 000      Salesforce CRM - the multi tenant architecture
           Founders launch salesforce.com in small San Francisco apartment
1999
                      “The End of Software” revolution begins

          June 30th, 2010                                Yves Leblond        @small_talks
Cloud computing ?




June 30th, 2010   Yves Leblond   @small_talks
Cloud computing ?
• everything as a service
  (and more)                        PAAS !
                                                  SAAS ! IAAS !
                                                    Cloud !




                                  Cloud SA          SaaS AG




• consider IT as a facility                 Cloud
                                          computing
                                        expert summit

  provided on demand
   June 30th, 2010            Yves Leblond          @small_talks
The great IAAS leap forward ;-)
        Before IAAS                     After IAAS

add some RAM, CPU, servers
   and see what happens...
                              I have the solution : provision
 but had to wait for budget,
                                 some virtual machines ;-)
  purchase and delivery... so
         think twice

Does anyone knows what this What is this virtual machine
 server is there for ? don’t for ? anyway, it costs ‘only’
         unplug it !         100!/month. don’t touch !.
    (even in big banks...)

     June 30th, 2010                  Yves Leblond     @small_talks
The owner point of
         view
                  more flexible
Cheaper




June 30th, 2010           Yves Leblond   @small_talks
What may happen if wild
      usages (as usual?)
                                       the more systems we
   Virtualisation                  have, the more we are happy !
is our new game !                The worst the software is, the most
   Give us more      System                we have work
        fun !     administrators     That will never change !




       June 30th, 2010                       Yves Leblond      @small_talks
“Good practices usage” is the key to cloud
computing implementation projects

• ITSM ‘in the IAAS cloud’ :
   new constraints, but stay rigorous (even more)

• Software design ‘in the PAAS cloud’:
   think scalability and cloud deployment

• Learn, then use best practices, cloud application
   frameworks, etc...

• Or...
   June 30th, 2010             Yves Leblond   @small_talks
Lets take the developer
(and user) point of view
IAAS (may be) part of the solution.
       but not the solution



                     SOFTWARE DESIGN
                   USER SOLUTION DESIGN


 June 30th, 2010                      Yves Leblond   @small_talks
June 30th, 2010   Yves Leblond   @small_talks
June 30th, 2010   Yves Leblond   @small_talks
Which IT components ?
                                                 SalesCloud
 Applications          SAAS                     ServiceCloud
                                                Custom apps
  Transaction/                 Google         Force.com
                       PAAS   AppEngine
Structured data                             Force.com sites

   Servers             IAAS   Amazon EC2         (VMForce)

   Massive
                              Amazon S3
   Storage
     June 30th, 2010             Yves Leblond       @small_talks
so let’s go !

1. force.com model
2. force.com multitenant architecture
3. force.com and java
4. VMforce (VMWare, force.com & java)

  June 30th, 2010             Yves Leblond   @small_talks
1. force.com model


June 30th, 2010   Yves Leblond   @small_talks
June 30th, 2010   Yves Leblond   @small_talks
force.com layers
• Custom Objects : your data
• Native GUI and customization
• Workflow, Rules, Security profiles, Dashboards,
   Reporting ...
• Apex Classes and Triggers : processing
• VisualForce : native MVC framework
June 30th, 2010              Yves Leblond   @small_talks
Basic Objects

• User, Contact, Account, ...
• Tasks, Notes, ...
• Mail, templates, ...

• ako of groupware layer
June 30th, 2010             Yves Leblond   @small_talks
Custom objects




June 30th, 2010   Yves Leblond   @small_talks
Native GUI and customisation




June 30th, 2010   Yves Leblond   @small_talks
Workflows, ...




June 30th, 2010       Yves Leblond   @small_talks
Apex language
trigger blockDuplicates_tgr on Lead bulk(before insert, before update) {
      /*
        * begin by building a map which stores the (unique) list of leads
        * being inserted/updated, using email address as the key.
        */
      Map<String, Lead> leadMap = new Map<String, Lead>();
      for (Lead lead : System.Trigger.new) {"
             if (lead.Email != null) { // skip null emails
             " /* for inserts OR
             "    * updates where the email address is changing
             "    * check to see if the email is a duplicate of another in
             "    * this batch, if unique, add this lead to the leadMap
             "    */
             " if ( System.Trigger.isInsert ||
             " "       (System.Trigger.isUpdate &&
                        "lead.Email != System.Trigger.oldMap.get(lead.Id).Email)) {
                        ""
"                       if (leadMap.containsKey(lead.Email)) {
"                             lead.Email.addError('Another new lead has the same email address.');
"                       } else {
"                             leadMap.put(lead.Email, lead);
"                       }
                "    }
             }
      }

      /* Using the lead map, make a single database query,
       * find all the leads in the database that have the same email address as
       * any of the leads being inserted/updated.
       */  June 30th, 2010                                    Yves Leblond             @small_talks
      for (Lead lead : [select Email from Lead where Email IN :leadMap.KeySet()]) {
Apex usage

• triggers
• classes (internal or web services)
• batch processing
• Visualforce controllers
• ...
June 30th, 2010             Yves Leblond   @small_talks
SOQL - SOSL
• SOQL (Salesforce Object Query Language)
 • “select” : more or less the SQL logic for querying
    objects stored in DB
  • “insert, update, delete” : used for loaded/instantiated
    objects (one or many per request), not like SQL
    processing logic (more like a “persistence layer”).
• SOSL (Salesforce Object Search Languages)
 • text based search (full text indexes)
    June 30th, 2010               Yves Leblond   @small_talks
Visual force
• Salesforce MVC development model




June 30th, 2010            Yves Leblond   @small_talks
Security and
 user management
• by roles (company organigram)
• by profile (manager, vendor, project mgr)
• can be refined using complexe rules (e.g.
  depending of attributes values)
• immediate and automatic propagation
  June 30th, 2010             Yves Leblond   @small_talks
Profiles, roles




June 30th, 2010       Yves Leblond   @small_talks
Packaging
•   a set of custom object definitions, classes,
    trigger definitions,VisualForce components

    •   “packaged” together

    •   to be moved from on org to another

•   Versioning and dependancies

•   Installation and uninstallation (removing associated data)

•   Unit tests mandatory !

    •   75% of code must be covered by unit tests before
        being packaged...

        June 30th, 2010                 Yves Leblond     @small_talks
Sandbox
• a complete copy of your company data (called your
  “organisation”), where you can :
  • deploy new packages version
  • deploy other company applications
• and test them for real
  Have you ever dream of such a test environment ???
        think to the efforts, human and financial ressources,
           to have a test environment always up to date...

   June 30th, 2010                    Yves Leblond      @small_talks
force.com governor
     Governor limit : execution time, external calls per
     transaction, SOQL statements per transaction, ...

                                      Limit                                      Trigger   Anonymous Block, ...

Total number of SOQL queries issued2                                               20              100
Total number of records retrieved by SOQL queries                                 1000            10000
Total number of SOSL queries issued                                                0               20
Total number of records retrieved by a single SOSL query                           0               200
Total number of DML statements issued (insert, update, upsert, merge, delete,
or database.emptyRecycleBin)                                                       20              100

Total number of records processed as a result of DML statements or
database.emptyRecycleBin                                                          100             10000


                                      ....
              June 30th, 2010                                               Yves Leblond         @small_talks
force.com governor


     The governor is there to guarantee
      performance and scalability fo all
                customers.




 June 30th, 2010             Yves Leblond   @small_talks
Best practices

Governor (performance constraints), mandatory unit
 tests, bulk management processing and most of the
                salesforce constraints
help also developer to apply best software practices

 even if it is sometimes frustrating ;-), if used to “Code and Go Live”.



      June 30th, 2010                        Yves Leblond       @small_talks
3. At the heart :

         the multitenant
           architecture
June 30th, 2010     Yves Leblond   @small_talks
“There is only one salesforce
database worldwide shared by all
  salesforces organisations and
           customers”

        And it is a giant Oracle Database, located in US,
           Singapore, and next in Europe data centers.
June 30th, 2010                 Yves Leblond   @small_talks
Multitenant architecture




June 30th, 2010        Yves Leblond   @small_talks
Physical architecture




June 30th, 2010   Yves Leblond   @small_talks
“There is only one object table”


                  A complete heterodox design ;-)
June 30th, 2010               Yves Leblond   @small_talks
Texte




June 30th, 2010           Yves Leblond   @small_talks
Query processing




June 30th, 2010               Yves Leblond   @small_talks
This is where important
                                        part of SF “know how” is
                                          (patented) : how to
                                           guarantee request
                                            response time....



            Salesforce rebuild a query engine for the databases
                            in order to manage
                    300.000.000 transactions every day,
                             very little servers
                  and an average response time of 270ms

                  see http://trust.salesforce.com for live stats


June 30th, 2010                           Yves Leblond        @small_talks
and Java ?
• Internally, there is a lot of java :
 • APEX is precompiled in java code
 • it seems that VisualForce generates Java
      Faces code
  • ...
• But you don’t see it ;-)
June 30th, 2010              Yves Leblond   @small_talks
3. force.com java API


June 30th, 2010   Yves Leblond   @small_talks
One of the integration options

•  Flex           • Amazon       • Python
• .net & VB       • AJAX         • Cocoa
• Ruby            • java
• Google          • PHP          •   Any WSDL consumer
                                     (APEX classes can be

• Perl            • Facebook         declared as web
                                     services)



June 30th, 2010                Yves Leblond      @small_talks
Data management
using “Enterprise WSDL”

   strongly typed, based on
      package definition
June 30th, 2010    Yves Leblond   @small_talks
try {
    binding = (SoapBindingStub) new SforceServiceLocator().getSoap();
} catch (ServiceException ex1) {
    System.out.println(ex1.getMessage());
    return;
}
try {
    lr = binding.login(userName, pwd);
} catch (UnexpectedErrorFault ex2) {
                                                                      connect
    System.out.println(ex2.getExceptionMessage() + "nn"
    return;
} catch (LoginFault ex2) {
    System.out.println(ex2.getExceptionMessage() + "nn");
    return;
} catch (RemoteException ex2) {
    System.out.println(ex2.getMessage() + "nn");
    return;
}
// create a variable to hold the query result
QueryResult qr = null;
// call the query saving the results in qr                   SOQL request
try {
      qr = binding
              .query("select Name, numberOfEmployees, Id, Industry from Account");
} catch (UnexpectedErrorFault uef) {
      System.out.println(uef.getExceptionMessage() + "nn");
      return;
} catch (Exception e) {
      e.printStackTrace();
      System.out.println("nn");

                                                            java
      return;
}
if (qr != null) {
      SObject[] records = qr.getRecords();
      _accounts = new Account[records.length];
      // we can loop through the returned records
      for (int i = 0; i < records.length; i++) {
          // Because we asked for accounts we will convert
          // the SObject for each record into an Account object
          Account account = (Account) records[i];
          _accounts[i] = account;
          // Now we can access any of the fields we had in the query
          // select clause directly from the account variable
          System.out.print(new Integer(i).toString() + ". ");
          System.out.print(account.getName() + " - ");
          System.out.println(account.getId());
      }

  June 30th, 2010                                       Yves Leblond                 @small_talks
Data management
 using “Partner WSDL”

     weakly typed, based on
     generic metadata infos
June 30th, 2010     Yves Leblond   @small_talks
private void querySample() {
       ...

       QueryResult qr = null;
       QueryOptions qo = new QueryOptions();
       qo.setBatchSize(new Integer(3));
       binding.setHeader(new SforceServiceLocator().getServiceName()
               .getNamespaceURI(), "QueryOptions", qo);
                                                                        SOQL request
       try {
           qr = binding.query("select FirstName, LastName from Contact");
           int loopCount = 0;
           boolean continueLoop = true;
           while (continueLoop) {
                                                                               java, but
               // process the query results
               for (int i = 0; i < qr.getRecords().length; i++) {
                   SObject con = qr.getRecords()[i];
                                                                              laborious.
                   String fName = "";
                   String lName = "";
                                                                       (like in old JDBC)
                   if (con.get_any()[0].getName().toLowerCase().equals(
                           "firstname")) {
                       fName = con.get_any()[0].getValue();
                       lName = con.get_any()[1].getValue();
                   } else
                       lName = con.get_any()[0].getValue();

                   if (fName == null) {
                       System.out.println("Contact " + (i + 1) + ": " + lName);
                   } else {
                       System.out.println("Contact " + (i + 1) + ": " + fName
                               + " " + lName);
                   }
               }
               // handle the loop + 1 problem by checking to see if the most
               // recent queryResult
               if (qr.isDone())
                    continueLoop = false;
               else
                    qr = binding.queryMore(qr.getQueryLocator());
           }
           System.out.println("nQuery succesfully executed.");
           getUserInput("nHit return to continue...");
       } catch (ApiFault af) {
           System.out
                   .println("nFailed to execute query succesfully, error message was: n"
                           + af.getExceptionMessage());
         June 30th, 2010
           getUserInput("nHit return to continue...");
       } catch (Exception ex) {
                                                               Yves Leblond              @small_talks
Even metadata
   management can be
     done in Java...

June 30th, 2010   Yves Leblond   @small_talks
ex : creation of a new kind of
              Custom Object type
private void createCustomObject()
{
"
"
     CustomObject co = new CustomObject();
     String name = "My Custom Object";
                                                                         NB :
"
"
     co.setFullName("MyCustomObject" + "__c");
     co.setDeploymentStatus(DeploymentStatus.Deployed);
                                                                 the Force.com IDE
"
"
     co.setDescription("Created by the Metadata API Sample");
     co.setEnableActivities(true);                                 (eclipse plugin)
"
"
     co.setLabel(name);
     co.setPluralLabel(co.getLabel() + "s");                          use this.
"    co.setSharingModel(SharingModel.ReadWrite);
"    CustomField nf = new CustomField();
"    nf.setType(FieldType.Text);
"    nf.setDescription("The custom object identifier on page layouts, " +
"related lists etc");
"    nf.setLabel("My Custom Object");
"    nf.setFullName("MyCustomObject" + " __c");
null)try { AsyncResult[] ars = metadatabinding.create(new CustomObject[] { co }); if (ars ==
"      {
"    "    System.out.println("The object was not created successfully"); return;
"    }
"    String createdObjectId = ars[0].getId();"
"    String[] ids = new String[] {createdObjectId};
"    boolean done = false;
"    long waitTimeMilliSecs = ONE_SECOND;
"    AsyncResult[] arsStatus = null;
"
"    ….

        June 30th, 2010                                Yves Leblond           @small_talks
4.VMforce ?


June 30th, 2010       Yves Leblond   @small_talks
VMforce ?
• VMforce : Spring applications on top of this
• Custom Objects : your data
• Native GUI and customization
• Workflow, Rules, Security profiles, ...
• Apex Classes and Triggers : processing
• VisualForce : native MVC framework
June 30th, 2010             Yves Leblond   @small_talks
June 30th, 2010   Yves Leblond   @small_talks
•   Spring :

    •   Spring Framework

    •   SpringSource TC server (Server® runtime, the Enterprise version of
        Apache Tomcat)

•   force.com

    •   force.com services

    •   force.com database

    •   everything we talked before : including automatic scalability, high
        availability, auto-tuning, back up and disaster recovery....

•   VMware

    •   vCloud technology: Automatic management of the Java stack that
        powers VMforce applications

    •   VMware vSphere: Industry leading virtualization platform will provide
        the resource isolation, management, and virtualization

        June 30th, 2010                            Yves Leblond         @small_talks
VMforce


June 30th, 2010         Yves Leblond   @small_talks
one many more
                      things...




June 30th, 2010       Yves Leblond   @small_talks
a smalltalk about       Salesforc    e with         architects




      June 30th, 2010        Yves Leblond Leblond
                                      Yves          @small_talks
                                                    @small_talks

Contenu connexe

Similaire à 2010-06 - a smalltalk about salesforce.com with java architects at YaJuG

OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware
 

Similaire à 2010-06 - a smalltalk about salesforce.com with java architects at YaJuG (20)

IUT presentation - English
IUT presentation - EnglishIUT presentation - English
IUT presentation - English
 
Sjug aug 2010_cloud
Sjug aug 2010_cloudSjug aug 2010_cloud
Sjug aug 2010_cloud
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
All up-dev ops
All up-dev opsAll up-dev ops
All up-dev ops
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Feature Bits at LSSC10
Feature  Bits at LSSC10Feature  Bits at LSSC10
Feature Bits at LSSC10
 
Alex Wade, Digital Library Interoperability
Alex Wade, Digital Library InteroperabilityAlex Wade, Digital Library Interoperability
Alex Wade, Digital Library Interoperability
 
soft-shake.ch - Optimizing iOS applications
soft-shake.ch - Optimizing iOS applicationssoft-shake.ch - Optimizing iOS applications
soft-shake.ch - Optimizing iOS applications
 
Course 3 : Types of data and opportunities by Nikolaos Deligiannis
Course 3 : Types of data and opportunities by Nikolaos DeligiannisCourse 3 : Types of data and opportunities by Nikolaos Deligiannis
Course 3 : Types of data and opportunities by Nikolaos Deligiannis
 
Azure and Umbraco CMS
Azure and Umbraco CMSAzure and Umbraco CMS
Azure and Umbraco CMS
 
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
Building a Lightweight Discovery Interface for China's Patents@NYC Solr/Lucen...
 
Jumpstart Azure
Jumpstart AzureJumpstart Azure
Jumpstart Azure
 
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
Azure Functions e Azure Logics Apps: i tuoi coltellini svizzeri per gestire i...
 
Introduction and Overview of OpenStack for IaaS
Introduction and Overview of OpenStack for IaaSIntroduction and Overview of OpenStack for IaaS
Introduction and Overview of OpenStack for IaaS
 
innovations born in the cloud - cloud data services from IBM to prototype you...
innovations born in the cloud - cloud data services from IBM to prototype you...innovations born in the cloud - cloud data services from IBM to prototype you...
innovations born in the cloud - cloud data services from IBM to prototype you...
 
(ATS3-APP02) What's new in Isentris 4.0
(ATS3-APP02) What's new in Isentris 4.0(ATS3-APP02) What's new in Isentris 4.0
(ATS3-APP02) What's new in Isentris 4.0
 
Analytics in the Cloud
Analytics in the CloudAnalytics in the Cloud
Analytics in the Cloud
 
Introduction to SQL Server Analysis services 2008
Introduction to SQL Server Analysis services 2008Introduction to SQL Server Analysis services 2008
Introduction to SQL Server Analysis services 2008
 
Azure.application development.nhut.nguyen
Azure.application development.nhut.nguyenAzure.application development.nhut.nguyen
Azure.application development.nhut.nguyen
 

Dernier

Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
vineshkumarsajnani12
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 

Dernier (20)

PHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation FinalPHX May 2024 Corporate Presentation Final
PHX May 2024 Corporate Presentation Final
 
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptxQSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
QSM Chap 10 Service Culture in Tourism and Hospitality Industry.pptx
 
WheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond InsightsWheelTug Short Pitch Deck 2024 | Byond Insights
WheelTug Short Pitch Deck 2024 | Byond Insights
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
Falcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business PotentialFalcon Invoice Discounting: Unlock Your Business Potential
Falcon Invoice Discounting: Unlock Your Business Potential
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
 
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...joint cost.pptx  COST ACCOUNTING  Sixteenth Edition                          ...
joint cost.pptx COST ACCOUNTING Sixteenth Edition ...
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck Template
 
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book nowPARK STREET 💋 Call Girl 9827461493 Call Girls in  Escort service book now
PARK STREET 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Putting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptxPutting the SPARK into Virtual Training.pptx
Putting the SPARK into Virtual Training.pptx
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 

2010-06 - a smalltalk about salesforce.com with java architects at YaJuG

  • 1. a smalltalk about Salesforc e with architects June 30th, 2010 Yves Leblond Leblond Yves @small_talks @small_talks
  • 2. 2010 Chatter - VMforce 2009 67 900 1 500 000 2008 51 800 1 100 000 force.com “sites” - GoogleApps link 2007 41 000 850 000 VisualForce - force.com 2006 29 800 646 000 App Exchange 2005 20 500 393 000 2004 13 900 227 000 2003 8 700 127 000 2002 5 700 76 000 2001 3 500 53 000 Fastest Growing Online CRM Company 2000 1 500 3 000 Salesforce CRM - the multi tenant architecture Founders launch salesforce.com in small San Francisco apartment 1999 “The End of Software” revolution begins June 30th, 2010 Yves Leblond @small_talks
  • 3. Cloud computing ? June 30th, 2010 Yves Leblond @small_talks
  • 4. Cloud computing ? • everything as a service (and more) PAAS ! SAAS ! IAAS ! Cloud ! Cloud SA SaaS AG • consider IT as a facility Cloud computing expert summit provided on demand June 30th, 2010 Yves Leblond @small_talks
  • 5. The great IAAS leap forward ;-) Before IAAS After IAAS add some RAM, CPU, servers and see what happens... I have the solution : provision but had to wait for budget, some virtual machines ;-) purchase and delivery... so think twice Does anyone knows what this What is this virtual machine server is there for ? don’t for ? anyway, it costs ‘only’ unplug it ! 100!/month. don’t touch !. (even in big banks...) June 30th, 2010 Yves Leblond @small_talks
  • 6. The owner point of view more flexible Cheaper June 30th, 2010 Yves Leblond @small_talks
  • 7. What may happen if wild usages (as usual?) the more systems we Virtualisation have, the more we are happy ! is our new game ! The worst the software is, the most Give us more System we have work fun ! administrators That will never change ! June 30th, 2010 Yves Leblond @small_talks
  • 8. “Good practices usage” is the key to cloud computing implementation projects • ITSM ‘in the IAAS cloud’ : new constraints, but stay rigorous (even more) • Software design ‘in the PAAS cloud’: think scalability and cloud deployment • Learn, then use best practices, cloud application frameworks, etc... • Or... June 30th, 2010 Yves Leblond @small_talks
  • 9. Lets take the developer (and user) point of view IAAS (may be) part of the solution. but not the solution SOFTWARE DESIGN USER SOLUTION DESIGN June 30th, 2010 Yves Leblond @small_talks
  • 10. June 30th, 2010 Yves Leblond @small_talks
  • 11. June 30th, 2010 Yves Leblond @small_talks
  • 12. Which IT components ? SalesCloud Applications SAAS ServiceCloud Custom apps Transaction/ Google Force.com PAAS AppEngine Structured data Force.com sites Servers IAAS Amazon EC2 (VMForce) Massive Amazon S3 Storage June 30th, 2010 Yves Leblond @small_talks
  • 13. so let’s go ! 1. force.com model 2. force.com multitenant architecture 3. force.com and java 4. VMforce (VMWare, force.com & java) June 30th, 2010 Yves Leblond @small_talks
  • 14. 1. force.com model June 30th, 2010 Yves Leblond @small_talks
  • 15. June 30th, 2010 Yves Leblond @small_talks
  • 16. force.com layers • Custom Objects : your data • Native GUI and customization • Workflow, Rules, Security profiles, Dashboards, Reporting ... • Apex Classes and Triggers : processing • VisualForce : native MVC framework June 30th, 2010 Yves Leblond @small_talks
  • 17. Basic Objects • User, Contact, Account, ... • Tasks, Notes, ... • Mail, templates, ... • ako of groupware layer June 30th, 2010 Yves Leblond @small_talks
  • 18. Custom objects June 30th, 2010 Yves Leblond @small_talks
  • 19. Native GUI and customisation June 30th, 2010 Yves Leblond @small_talks
  • 20. Workflows, ... June 30th, 2010 Yves Leblond @small_talks
  • 21. Apex language trigger blockDuplicates_tgr on Lead bulk(before insert, before update) { /* * begin by building a map which stores the (unique) list of leads * being inserted/updated, using email address as the key. */ Map<String, Lead> leadMap = new Map<String, Lead>(); for (Lead lead : System.Trigger.new) {" if (lead.Email != null) { // skip null emails " /* for inserts OR " * updates where the email address is changing " * check to see if the email is a duplicate of another in " * this batch, if unique, add this lead to the leadMap " */ " if ( System.Trigger.isInsert || " " (System.Trigger.isUpdate && "lead.Email != System.Trigger.oldMap.get(lead.Id).Email)) { "" " if (leadMap.containsKey(lead.Email)) { " lead.Email.addError('Another new lead has the same email address.'); " } else { " leadMap.put(lead.Email, lead); " } " } } } /* Using the lead map, make a single database query, * find all the leads in the database that have the same email address as * any of the leads being inserted/updated. */ June 30th, 2010 Yves Leblond @small_talks for (Lead lead : [select Email from Lead where Email IN :leadMap.KeySet()]) {
  • 22. Apex usage • triggers • classes (internal or web services) • batch processing • Visualforce controllers • ... June 30th, 2010 Yves Leblond @small_talks
  • 23. SOQL - SOSL • SOQL (Salesforce Object Query Language) • “select” : more or less the SQL logic for querying objects stored in DB • “insert, update, delete” : used for loaded/instantiated objects (one or many per request), not like SQL processing logic (more like a “persistence layer”). • SOSL (Salesforce Object Search Languages) • text based search (full text indexes) June 30th, 2010 Yves Leblond @small_talks
  • 24. Visual force • Salesforce MVC development model June 30th, 2010 Yves Leblond @small_talks
  • 25. Security and user management • by roles (company organigram) • by profile (manager, vendor, project mgr) • can be refined using complexe rules (e.g. depending of attributes values) • immediate and automatic propagation June 30th, 2010 Yves Leblond @small_talks
  • 26. Profiles, roles June 30th, 2010 Yves Leblond @small_talks
  • 27. Packaging • a set of custom object definitions, classes, trigger definitions,VisualForce components • “packaged” together • to be moved from on org to another • Versioning and dependancies • Installation and uninstallation (removing associated data) • Unit tests mandatory ! • 75% of code must be covered by unit tests before being packaged... June 30th, 2010 Yves Leblond @small_talks
  • 28. Sandbox • a complete copy of your company data (called your “organisation”), where you can : • deploy new packages version • deploy other company applications • and test them for real Have you ever dream of such a test environment ??? think to the efforts, human and financial ressources, to have a test environment always up to date... June 30th, 2010 Yves Leblond @small_talks
  • 29. force.com governor Governor limit : execution time, external calls per transaction, SOQL statements per transaction, ... Limit Trigger Anonymous Block, ... Total number of SOQL queries issued2 20 100 Total number of records retrieved by SOQL queries 1000 10000 Total number of SOSL queries issued 0 20 Total number of records retrieved by a single SOSL query 0 200 Total number of DML statements issued (insert, update, upsert, merge, delete, or database.emptyRecycleBin) 20 100 Total number of records processed as a result of DML statements or database.emptyRecycleBin 100 10000 .... June 30th, 2010 Yves Leblond @small_talks
  • 30. force.com governor The governor is there to guarantee performance and scalability fo all customers. June 30th, 2010 Yves Leblond @small_talks
  • 31. Best practices Governor (performance constraints), mandatory unit tests, bulk management processing and most of the salesforce constraints help also developer to apply best software practices even if it is sometimes frustrating ;-), if used to “Code and Go Live”. June 30th, 2010 Yves Leblond @small_talks
  • 32. 3. At the heart : the multitenant architecture June 30th, 2010 Yves Leblond @small_talks
  • 33. “There is only one salesforce database worldwide shared by all salesforces organisations and customers” And it is a giant Oracle Database, located in US, Singapore, and next in Europe data centers. June 30th, 2010 Yves Leblond @small_talks
  • 34. Multitenant architecture June 30th, 2010 Yves Leblond @small_talks
  • 35. Physical architecture June 30th, 2010 Yves Leblond @small_talks
  • 36. “There is only one object table” A complete heterodox design ;-) June 30th, 2010 Yves Leblond @small_talks
  • 37. Texte June 30th, 2010 Yves Leblond @small_talks
  • 38. Query processing June 30th, 2010 Yves Leblond @small_talks
  • 39. This is where important part of SF “know how” is (patented) : how to guarantee request response time.... Salesforce rebuild a query engine for the databases in order to manage 300.000.000 transactions every day, very little servers and an average response time of 270ms see http://trust.salesforce.com for live stats June 30th, 2010 Yves Leblond @small_talks
  • 40. and Java ? • Internally, there is a lot of java : • APEX is precompiled in java code • it seems that VisualForce generates Java Faces code • ... • But you don’t see it ;-) June 30th, 2010 Yves Leblond @small_talks
  • 41. 3. force.com java API June 30th, 2010 Yves Leblond @small_talks
  • 42. One of the integration options • Flex • Amazon • Python • .net & VB • AJAX • Cocoa • Ruby • java • Google • PHP • Any WSDL consumer (APEX classes can be • Perl • Facebook declared as web services) June 30th, 2010 Yves Leblond @small_talks
  • 43. Data management using “Enterprise WSDL” strongly typed, based on package definition June 30th, 2010 Yves Leblond @small_talks
  • 44. try { binding = (SoapBindingStub) new SforceServiceLocator().getSoap(); } catch (ServiceException ex1) { System.out.println(ex1.getMessage()); return; } try { lr = binding.login(userName, pwd); } catch (UnexpectedErrorFault ex2) { connect System.out.println(ex2.getExceptionMessage() + "nn" return; } catch (LoginFault ex2) { System.out.println(ex2.getExceptionMessage() + "nn"); return; } catch (RemoteException ex2) { System.out.println(ex2.getMessage() + "nn"); return; } // create a variable to hold the query result QueryResult qr = null; // call the query saving the results in qr SOQL request try { qr = binding .query("select Name, numberOfEmployees, Id, Industry from Account"); } catch (UnexpectedErrorFault uef) { System.out.println(uef.getExceptionMessage() + "nn"); return; } catch (Exception e) { e.printStackTrace(); System.out.println("nn"); java return; } if (qr != null) { SObject[] records = qr.getRecords(); _accounts = new Account[records.length]; // we can loop through the returned records for (int i = 0; i < records.length; i++) { // Because we asked for accounts we will convert // the SObject for each record into an Account object Account account = (Account) records[i]; _accounts[i] = account; // Now we can access any of the fields we had in the query // select clause directly from the account variable System.out.print(new Integer(i).toString() + ". "); System.out.print(account.getName() + " - "); System.out.println(account.getId()); } June 30th, 2010 Yves Leblond @small_talks
  • 45. Data management using “Partner WSDL” weakly typed, based on generic metadata infos June 30th, 2010 Yves Leblond @small_talks
  • 46. private void querySample() { ... QueryResult qr = null; QueryOptions qo = new QueryOptions(); qo.setBatchSize(new Integer(3)); binding.setHeader(new SforceServiceLocator().getServiceName() .getNamespaceURI(), "QueryOptions", qo); SOQL request try { qr = binding.query("select FirstName, LastName from Contact"); int loopCount = 0; boolean continueLoop = true; while (continueLoop) { java, but // process the query results for (int i = 0; i < qr.getRecords().length; i++) { SObject con = qr.getRecords()[i]; laborious. String fName = ""; String lName = ""; (like in old JDBC) if (con.get_any()[0].getName().toLowerCase().equals( "firstname")) { fName = con.get_any()[0].getValue(); lName = con.get_any()[1].getValue(); } else lName = con.get_any()[0].getValue(); if (fName == null) { System.out.println("Contact " + (i + 1) + ": " + lName); } else { System.out.println("Contact " + (i + 1) + ": " + fName + " " + lName); } } // handle the loop + 1 problem by checking to see if the most // recent queryResult if (qr.isDone()) continueLoop = false; else qr = binding.queryMore(qr.getQueryLocator()); } System.out.println("nQuery succesfully executed."); getUserInput("nHit return to continue..."); } catch (ApiFault af) { System.out .println("nFailed to execute query succesfully, error message was: n" + af.getExceptionMessage()); June 30th, 2010 getUserInput("nHit return to continue..."); } catch (Exception ex) { Yves Leblond @small_talks
  • 47. Even metadata management can be done in Java... June 30th, 2010 Yves Leblond @small_talks
  • 48. ex : creation of a new kind of Custom Object type private void createCustomObject() { " " CustomObject co = new CustomObject(); String name = "My Custom Object"; NB : " " co.setFullName("MyCustomObject" + "__c"); co.setDeploymentStatus(DeploymentStatus.Deployed); the Force.com IDE " " co.setDescription("Created by the Metadata API Sample"); co.setEnableActivities(true); (eclipse plugin) " " co.setLabel(name); co.setPluralLabel(co.getLabel() + "s"); use this. " co.setSharingModel(SharingModel.ReadWrite); " CustomField nf = new CustomField(); " nf.setType(FieldType.Text); " nf.setDescription("The custom object identifier on page layouts, " + "related lists etc"); " nf.setLabel("My Custom Object"); " nf.setFullName("MyCustomObject" + " __c"); null)try { AsyncResult[] ars = metadatabinding.create(new CustomObject[] { co }); if (ars == " { " " System.out.println("The object was not created successfully"); return; " } " String createdObjectId = ars[0].getId();" " String[] ids = new String[] {createdObjectId}; " boolean done = false; " long waitTimeMilliSecs = ONE_SECOND; " AsyncResult[] arsStatus = null; " " …. June 30th, 2010 Yves Leblond @small_talks
  • 49. 4.VMforce ? June 30th, 2010 Yves Leblond @small_talks
  • 50. VMforce ? • VMforce : Spring applications on top of this • Custom Objects : your data • Native GUI and customization • Workflow, Rules, Security profiles, ... • Apex Classes and Triggers : processing • VisualForce : native MVC framework June 30th, 2010 Yves Leblond @small_talks
  • 51. June 30th, 2010 Yves Leblond @small_talks
  • 52. Spring : • Spring Framework • SpringSource TC server (Server® runtime, the Enterprise version of Apache Tomcat) • force.com • force.com services • force.com database • everything we talked before : including automatic scalability, high availability, auto-tuning, back up and disaster recovery.... • VMware • vCloud technology: Automatic management of the Java stack that powers VMforce applications • VMware vSphere: Industry leading virtualization platform will provide the resource isolation, management, and virtualization June 30th, 2010 Yves Leblond @small_talks
  • 53. VMforce June 30th, 2010 Yves Leblond @small_talks
  • 54. one many more things... June 30th, 2010 Yves Leblond @small_talks
  • 55. a smalltalk about Salesforc e with architects June 30th, 2010 Yves Leblond Leblond Yves @small_talks @small_talks