function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
satheesh psatheesh p 

Difference Between Visualforce and Lightning Compnent

Both Visualforce and lighning Components used to desighn ui.But i dont know what is the differense between this two.
SandhyaSandhya (Salesforce Developers) 
Hi Satheesh,


Visualforce and Lightning both offer ways to design and create custom interfaces for Salesforce. 
Visualforce was designed to follow a Page-Centric model. This means that the intent of Visualforce was to create something that was your full page interface with Salesforce. When the user needed to perform some kind of operation, like Save a record, it would send that request to the Salesforce servers and then reload the entire page with the new state of the UI. All backend processing is done with Apex Code on the Server-Side. You have the option to inject JavaScript into the mix to handle some of the Client-Side processing, but it isn't the default interaction methodology. Visualforce was also primarily built for Desktop. When Visualforce was first launched back in 2008 the iPhone had been out for about a year. The concept of designing things "mobile first" hadn't yet been realized, this would come a few years later.
Visualforce also uses an HTML-like markup language for designing the pages and Apex code to handle the database operations. Here is a breakdown of what you have with Visualforce pages:
Visualforce Page - HTML-like markup language used to design the layout of the page.
Standard Or Custom Controller - Apex Code to handle Server-Side operations executed from the Visualforce page (EX: CRUD operations).
Optional: CSS Styling - Style your Visualforce page to look a specific way within the header or by file reference.
Optional: JavaScript - Used to handle Client-Side processing or to be coupled with CSS for a cosmetic revamp of the UI.
Optional: Apex Extensions - These are used to perform logical operations that are not housed within the standard or custom controller.


Lightning was designed to follow an App-Centric model. This essentially means that it has been designed to create self-contained components that build on top of each other. To put this in perspective, with Visualforce you would send an interaction to the Salesforce server and then update the entire page. However, with Lightning, you can send an interaction to the Salesforce servers and then update a specific component. This has huge implications for performance and for the fluid motion of a UI. This allows us to design UIs that are inherently responsive to the user interactions, meaning we update the things the user is interacting with and everything else remains untouched.
The components themselves can either have the logic process on the Client-Side (using JavaScript code) or on the Server-Side (using Apex Code) depending on what the component is designed to do. There is a great Blog Tutorial for how to use both types of processing within the Lightning framework. The Lightning Components and Applications come in "Bundles" that store all of the necessary files to run. Let's take a look at what a Lightning Component Bundle includes:
Component - Markup language used to structure the layout of the component.
CSS Styling - Used to change the cosmetic look or style of the component.
Controller - Use a JavaScript Controller to handle Client-Side logic processing or use an Apex Controller to handle Server-Side logic processing.
Design File - Used to describe the design-time behavior of the component when used in Lightning Pages, Lightning App Builder, or in Community Builder.
Documentation File - Provides sample code or reference documents for others to use when they get your component.
Renderer - Used to override the default Client-Side render settings of a component.
Helper - Used to store reusable JavaScript functions that are handled by the Renderer or Controller as well as executing Server-Side actions.
Optional: SVG File - Allows you to include custom icons for reference within your component.

Please refer below link for more clarification.

https://balkishankachawa.wordpress.com/2015/11/23/visualforce-vs-lightning/
 
Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
 
Thanks and Regards
Sandhya

 
Deepika Khanna 6Deepika Khanna 6
I will recommend to check out this visualforce video course. It covers all the important tags and great insight into standard controllers, custom controllers, extensions and lot more. 
Here is the link for the course:https://courses.mytutorialrack.com/p/visualforce-tutorial-for-beginners   (https://courses.mytutorialrack.com/p/visualforce-tutorial-for-beginners)
Sunil Shah 12Sunil Shah 12
Thanks Sandhya :)
ranbir das 1ranbir das 1
WHAT IS VISUALFORCE 
Visualforce follows a Page-Centric model. PageCentric means that the goal of Visualforce is to create something that is your full page interface. When the user has to perform some operation, eg Create a record or save a record, it sends that request to the Salesforce servers and then reloads the entire page with the new state of the UI. All backend processing is done with Apex Code on the Server-Side. You have the option to inject JavaScript into the mix to handle some of the Client-Side processing, but it isn’t the default interaction methodology. Visualforce also primarily built for Desktop. Visualforce generates a new page every time you interact with the application.
UI Generation
Server-Side
Workflow
  1. User requests a page
  2. The server executes the page’s underlying code and sends the resulting HTML to the browser
  3. The browser displays the HTML
  4. When the user interacts with the page, return to step one.
Why Visualforce
If you are building a page-centric experience with limited Client-Side logic use Visualforce.
If you are committed to Javascript Framework such as AngularJS or React continue using Visualforce.
If you are building an interactive experience with Javascript and you need third party Framework you should use Visualforce as a container for third-party Framework.
If you are exposing a Public-Facing Unauthenticated Website continue using Visualforce. Lightning components don’t support an anonymous (unauthenticated) user context yet.
If you are rendering pages as PDF in your application use Visualforce. Lightning components don’t support rendering as PDF output yet.
WHAT IS LIGHTING COMPONENT
It is an App-centric approach. Lightning components are part of the Salesforce user interface framework for developing dynamic web applications for desktop and mobile devices. They use JavaScript at the client-side and Apex at the server-side to provide the data and business logic.
To put this in perspective, with Visualforce you would send an interaction to the Salesforce server and then update the entire page. However, with Lightning, you can send an interaction to the Salesforce servers and then update a specific component. This has huge implications for performance and for the fluid motion of a UI.
 UI Generation
 Client-Side
 Workflow
  1. The user requests an application or a component
  2. The application or component bundle is returned to the client
  3. The browser loads the bundle
  4. The JavaScript application generates the UI
  5. When the user interacts with the page, the JavaScript application modifies the user interface as needed.
SHARATH KUMAR 93SHARATH KUMAR 93
Thank you so much Sandhya for such a contrasting infromation!
Sam VerdiSam Verdi
Fantastic answer Sandhya, thank you very much. Very clear and precise. Outstanding