Tuesday, December 6, 2016

Heroku integeration with salesforce

 Heroku is a cloud platform based on a managed container system, with integrated data services and a powerful ecosystem, for deploying and running modern apps. The Heroku developer experience is an app-centric approach for software delivery, integrated with today’s most popular developer tools and workflows.




Lets understand step by step how heroku is helpful for salesforce :-



1. Developer writes code in  Node, PHP, go, java, python…

2. Uses the CLI, Github or continuous integration
 To push code to a build system, which    produces an app that`s ready for execution

3. Apps run in dynos
Smart containers with curated, automatically patched operating system images

4. heroku data services
heroku postgres and heroku redis are fully managed data services operated by heroku

5. Runtime  
The heroku runtime provides a set of services that orchestrate & manage the execution & scale of your application.

6. 150+ Add ons: 3rd party cloud services
Extend apps with a range of functionality such as data stores,logging,monitoring and more..

7. User access your app
From any device, over HTTP(including web socket) and API.

App made in salesforce can run on heroku,you don’t need to make many changes in application (your source code) in order to run it on heroku. One requirement is informing the platform as to which parts of your application are runnable.
While building applications When the Heroku platform receives the application source, it initiates a build of the source application. 
For example.. A Java application may fetch binary library dependencies using Maven, compile the source code together with those libraries, and produce a JAR file to execute.
**************************************************************************
The source code for your application, together with the fetched dependencies and output of the build phase such as generated assets or compiled code, as well as the language and framework, are assembled into a slug.( A slug is a bundle of your source, fetched dependencies, the language runtime, and compiled/generated output of the build system - ready for execution.)


Now further these applications run on dynos( Dynos are isolated, virtualized Unix containers, that provide the environment required to run an application.)

An application’s configuration is everything that is likely to vary between environments (staging, production, developer environments, etc.). This includes backing services such as databases, credentials, or environment variables that provide some specific information to your application.

The Heroku platform loaded the dyno with your most recent slug. This needs to be refined: in fact it loads it with the slug and any config variables you have assigned to the application. The combination of slug and configuration is called a release.
One more part comes in picture are dyno manager which keeps dynos running.,managing dynos running across all applications running on heroku

ADD-ONS
Applications typically make use of add-ons to provide backing services such as databases, queueing & caching systems, storage, email services and more. Add-ons are provided as services by Heroku and third parties - there’s a large marketplace of add-ons you can choose from.

HTTP ROUTING

Depending on your dyno formation, some of your dynos will be running the command associated with the web process type, and some will be running other commands associated with other process types.
The dynos that run process types named web are different in one way from all other dynos - they will receive HTTP traffic. Heroku’s HTTP routers distribute incoming requests for your application across your running web dynos.


NOW TH QUESTION THAT COMES TO OUR MND IS WHY THERE IS USE OF HEROKU IN SALESFORCE


Deploying your app using heroku..why?
Salesforce.com bought Heroku as a form of developer marketing and as an insurance policy. The developer marketing angle is aimed at getting the energy of the Ruby development community focused, to the extent it can be, on using the Salesforce.com 
platform and possibly on joining the ecosystem of developers of niche business applications.
One warning sign that Salesforce.com should take note of is Google's experience in promoting Python. Google App Engine could be considered similar to Heroku. It was originally powered by Python, which may not be as sexy as Ruby, but has an enthusiastic developer community.
Google doesn’t have many things that Salesforce.com has, such as a large community of business application users and a proven model for making easy-to-use configurable software, but it does have its own Database.com equivalent. But the wave of exciting Python-powered applications written on Google App Engine has yet to impress salesforce.com

Force.com uses an object-oriented programming language called Apex, which was invented by Salesforce but incompatible with Heroku. This lack of synchronization became a major point of criticism when Salesforce purchased Heroku in 2010.
Conversely, Heroku developers often build their apps with programming languages like Node.js, PHP, Ruby on Rails, Java, Go, and Python—but none of these languages are compatible within Salesforce’s native environment.
Heroku Connect finally addresses this disconnection by allowing Heroku apps to sync with the Force.com database.
Instead of a deep integration with Heroku, Salesforce customers can at least connect those apps to Salesforce without the need for extensive recoding, which is a potentially expensive and time-consuming affair. Salesforce knows it needs to show off tools like Heroku Connect to attract developers and convince them Force.com will work with popular Web toolkits like Node.js, Ruby on Rails and Java.
In time, Salesforce may yet achieve a deeper level of integration with Heroku—but after four years, at least developers can connect the two worlds in a more seamless way. Developers need to be able to build apps quickly and at Web scale, and Heroku is one of Salesforce’s best weapons to allow them to do it

Thanks…!!!!!!!

Friday, December 2, 2016

Future of CRM lightning components

Ok so now if you are ready for lightning but are still confused whether to allow users to switch to lightning or not ,let`s try a wayout..

Create a permission set for some users and name it lightning users..

Now that you have understood the lightning experience.

Lets move to lightning components….but before proceeding any further ,what is lightning components??

So let me tell you the difference..

See salesforce classic uses a page-centric model while lightning uses a app-centric model ,now lightning components was made by keeping in mind the lightning experience

A huge advantage of lightning components is that you don`t have to worry about compatibility across devices and browsers. The component framework handles this for you.

Lightning component is full-stack framework for building modern web applications, as lightning is already being used in salesforce 1 mobile app, it is also used in lightning app builder , lightning process builder, lightning desktop


In addition to building apps for desktop browsers salesforce 1 app ,components give you a level of customizations that was never offererd before via lightning extensions

Extension allow developer to actually plug-in standard salesforce 1 interface this means you can alter the look of fields in your applications ….


Here`s an example of custom application build using lightning components

Capture.JPG

This app uses custom objects to easily store expenses

In Red – we can see summary of expenses.

Below it is a detailed list of expenses which are created

So we can build this app using multiple components for example top and middle are part of one component and list at the bottom is a different component

Components communicate with each other using lightning events


IN THE NEXT SECTION WE WILL SEE HOW TO USE THESE COMPONENTS AND BUILD A LIGHTNING APP