Sunday, 30 December 2018

what is Force.com ?


Basically there are three models of cloud service.

1. Infrastructure as a service
ex : Amazon AWS
     Rackspace
     Heroku

2.Software as a Service

ex : Google Apps
     Zoho
     Quickbooks or Quicken Online
     Salesforce.com CRM offerings(includes Force.com)

3.Platform as a service
  ex : Google App Engine
       Microsoft Azure
       Heroku
       Force.com

Note :

1.Salesforce.com CRM cloud offerings better fit under software as a service.

saas is sotfware and all it's various features,paid for in an on-demand model,accessed over the internet,typically run in a browser;which means there's nothing to install on your computer,
nothing to upgrade or backup or patch.

-> Software features available on-demand
-> Accessed over the internet
-> No programs to install
-> Upgrades in the background
-> No infrastructure to support.

2. Force.com fits under Platform as a service.

PaaS is platform features supporting application development,paid for in an on-demand model.

-> Platform features and services available on-demand
-> Supports building applications
-> A subset of SaaS

Force.com is an on-demand application development platform.And it provides infrastructure and support,security services, database services,Web services APIs, Application logic,User Interface,etc.

-> Force.com is PaaS.

Services Across the Stack:
====================
1.Metadata driven functionality
2.Declarative Customization (Clicks and code)
3.Programmatic Customization (APEX and Visualforce)
4.User Authentication and Authorization
5.Multi-Featured (Sales and Service Cloud CRM)
6.Social Networking (Chatter)
7.Declarative Data Modeling (Objects,Fields,Relationships)
8.Programmatic Record Level Data Security (APEX Sharing)
9.Declarative Business Logic (Validations,Workflow,Approvals)
10.Infrastructure Security (IP Login Range,Login Hours)
11.International Localization (Translation Workbench)
12.Messaging and Notifications (Email Services,Outbound Messages)
13.Monitoring and Logging
14.Polymorphic Behavior
15.Memory Management
16.Metadata Synchronization
17.Transactional Data Persistence

APIs :
======
Apex web services :
-> SOAp
-> Rest

Data APIs
-> SOAP
-> REST
-> BULK
Streaming API
Chatter API
Metadata API

what makes Force.com SOA(service-oriented architecture)?

A service-oriented architecture is essentially a collection of services that communicate with each other, typically over the internet.

They can be simple or complex in nature. This can involve multiple services, coordinating some kind of process or activity,or simply be passing around a collection of data,potentially across disparate systems.

Force.com Service Layers :
====================
In force.com,Multiple native SOAP and REST APIs exist,allowing access to virtually all data and processing capability of any Salesforce or Force.com applications.


Note :
1.Native SOAP and REST APIs already exist.
2.Expose built-in and custom data and capabilities.
3.Allows tight integration with external systems.
4.Apex custom logic can callout(SOAP or REST).
5.Apex custom logic can be called-build your own API(SOAP or REST)
6.Apex can send and receive email.
7.Leverage UI mash-ups in Visualforce,Force.com sites and Portals.

Force.com Security :
====================
1.The Force.com security layer is multidimensional,highly configurable and very robust.

2.it has a sophisticated authentication mechanism that also supports multiple flavors of single sign-on and identity management,including many different OAUTH security flows. And,you're Salesforce instance can be either an identity provider or just a service provider or both.And you can leverage third-party identity providers,such as Facebook or Google.

3.User Profile Based Authorization

-> System Access(Protected IP Ranges and Login Hours)
-> System Features,Capabilities,UI,Navigation.
-> Object,Field and Record Level security
-> Reporting,Analytics and Document Security
-> APEX Classes and Visualforce

4.Remote/Mobile Application

Features As Services :
======================
1.Notifications
-> Highly customizable and data centric
-> Apex Email Services- Outbound/Inbound
-> Outlook and Gmail Integration
2.Workflow
-> Send Email
-> Assign Tasks
-> Updates Fields
-> Send SOAP outbound Messages
3.Multi-Step Approval Process
4.Social Collaboration - CHATTER

SOAP API :
=============
1.mature and robust
2.Manages standard and custom objects
3.Query,Search,Retrieve,Create,Update, Upsert,Delete,Undelete
4.Limited administrative capabilities.

 it allows some minimal utility and admin capabilities,such as resetting a user's password information,sending e-mails,and launching approval processes.

5.Obtain metadata information
6.Enterprise and partner WSDLs

The enterprise WSDL,for a hard-type representation of all standard and custom data objects and fields. The partner WSDL,that allows more generic access to any salesforce.com instance.

7.Include authentication service calls
8.It is designed to process data in batches of up to 200 records at a time.

9.Supports complex relational data synchronization.

it support for complex,relational data integration and synchronization, leveraging the Force.com external ID mechanism.

10.Not efficient for high volume processing > 1m rows

REST API :
=============
1.Similar functionality to the SOAP API.
2.Light weight
3.No WSDL required
4.Light data volume
5.Designed for mobile and web
6.Supports JSON and XML
7.Utilize hypermedia design
8.Discoverable and explorable.

it's discoverable and explorable capability allows developers to essentially surf the API,using tools
like the Developer's Workbench.

BULK(REST) API :
================
1.RESTful API processes large data sets(<50m rows)
2.Query,insert,update,upsert,delete or hardDelete.
3.Optimized for high volume jobs with
10K record batches.
4.Data is streamed to the Force.com servers.
5.Asynchronous background processing.
6.Batch and Job results can be queried.
7.Relies heavily on XML and CSV(not JSON).

Metadata(SOAP) API :
=====================
1.Developer Centric API
2.For CRUD operations on meta data
3.Includes object and field schema, page layouts,profiles etc.
4.used to migrate meta data - Not business data.
5.Used in developer tools.

ex : The Force.com IDE Eclipse add-in and the Force.com migration toolkit that works with ANT are both built on top of the API,to allow developers to manage customizations.

Streaming(REST) API :
======================
1.Real Time push technology
2.Notifies of changes to standard or custom object data.
3.Publish and Subscribe model
4.use the openBayeux Protocol and Ajax CometD libraries.
5.Social networking applications.

it's commonly used with social networking applications that process and stream feeds.

6.Reduce network traffic
7.Replaces Ajax Polling patterns.

Apex SOAP and REST APIs :
===========================
The Force.com Apex SOAP and REST APIs allow developers to create custom web services in the form of Apex class methods,to perform complex operations and business processes.

For SOAP web services,developers can declare a class method as static web service.

For REST Resources,developers can declare a class with @RestResource.

Custom Apex class methods are mapped to the standard HTTP verbs by decorating them with a declaration indicating which HTTP verb they should correspond to.

DELETE,GET,PATCH,POST,PUT.

Both SOAP and Rest web methods can leverage Apex helper classes for JSON and XML serialization,encoding,and encryption support.

Chatter REST API :
===================
1.Optimized for social and processing
2.Users,groups,followers,feeds,files,pictures.
3.Localized to the user's locale
4.Chatter data is available through other APIs
5.Reduces development effort to manage:
-> Hierarchical data graphs,relationships and keys
-> Social network processes
6.Similar to Twitter and facebook.

AJAX Toolkit :
===============
The Ajax toolkit is not a web service, but rather a javascript API that acts as a wapper,allowing calls to the SOAP API from Ajax,embedded in webpages, including Visualforce.


Thursday, 27 December 2018

what is metadata ?

Metadata :
===========

what is it ?

Metadata is persisted information that describes your application's functionality and representation.And metadata is at the core of the force.com platform.

In a more traditional development environment,developers use code either interpreted or compiled.And when executed, it determines the behaviour of an application.

Force.com uses a dynamic engine -- we'll call it the Kernel-- that reads any org's metadata that identifies how the application behavior and appearance is configured.

1. metadata distinguishes any force.com application from any other.
2.Developer have control major portions of metadata and are,therefore, able to customize their applications.
3.A sales force instance,or org,is nothing more than a container for metadata,as well as business data.

what does it do ?

1.metadata describes your org and describes your applications.
2.metadata describes your data and logic.

Everything in your org is described in metadata,from objects in fields, to declared business rules,workflow, reports and security permissions, even your Apex code and Visual force
pages,pretty much everything.

3.metadata drives the engine and as the kernel generates application components from metadata at run time, it forms the foundation of any instance in the platform's multi-tenant
infrastructure.

so metadata controls all aspects of what the platform offers. without metadata,there could be no
multi-tenant paradigm.

4.Every tenant on the platform can maintain their own set of partition metadata,the multi-tenant Kernel can serve multiple applications of varying data structure,with varying look and feel,and varying business logic in a completely decoupled and scalable manner.

5.Only the generic database,resources,and core logic of the kernel are shared.Everything about tenant applications is dynamic,driven by the metadata.

what does it look like ?

we don't really know.Like most elements of the force.com, the abstraction layers hide and protect much of what's in the cloud.That's their job.

The physical database tables that store the actual metadata in rows and columns are not accessible to developers.

However,much of the metadata is visible through developer tools and via the APIs.

When you connect your force.com org to the force.com IDE,you can download metadata and store it in files on your hard disk.The IDE allows you to modify the files and push them back up to
your org.

Most metadata objects represent in  XML structures.Apex and Visualforce also appear as traditional programming language code.Although,you'll find they're also tied to XML content as well.

How do I manage it?

Most non-programmers depend on the setup menu to declaratively configure the metadata in point and click wizards. it the fastest and most efficient way to perform much of the configuration.

ways to get metadata :
======================
1.The metadata API,one of the many platform web services, allows developers to perform crud operations on metadata, effectively allowing you to program your applications by managing data
operations.

2.The force.com IDE and force.com migration kit, which are both built on top of the API,are just two tools that let developers manage metadata.

Note :
Now keep in mind,that while a lot of metadata is accessible to you,other metadata is not necessarily even visible.There also exists metadata that is managed behind the scenes that you can't change even though you might be able to see it.