SlideShare a Scribd company logo
VISUALFORCE
GOVT. ENGINEERINGCOLLEGE BIKANER
A SEMINAR REPORT
SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF
THE DEGREE OF
BACHELOR OF TECHNOLOGY
(Computer Science Engineering)
SUBMITTED TO
RAJASTHAN TECHNICAL UNIVERSITY, KOTA
SUBMITTED TO : SUBMITTED BY
Mrs Manisha ma’am
CSE Department
Rinku Saini
13EEBCS066
Visualforce report
ACKNOWLEDGEMENT
I would like to place on record my deep sense of gratitude to Prof. Manoj Kudi, HOD-Dept. of Computer
Science Engineering, Govt. Engineering College Bikaner, India for his generous guidance, help and useful
suggestions.
I express my sincere gratitude to Mrs Manisha Govt.
Engineering College Bikaner, Rajasthan,
encouragement and supervision throughout the course
ma’am., Dept. of Computer Science Engineering,
India, for his stimulating guidance, continuous of
present work.
I also wish to extend my thanks to Prof Vikram Singh Chouhan and other colleagues for attending my
seminars and for their insightful comments and constructive suggestions to improve the quality of this
Seminar work.
I am extremely thankful to Mr.J.P. Bhamu, Principal, Govt. Engineering College Bikaner, for providing me
infrastructural facilities to work in, without which this work would not have been possible.
Signature of Student
Rinku Saini (13EEBCS066)
ABSTRACT
Visualforce is the component-based user interface framework for the Force.com
platform. The framework includes a tag-based markup language, similar to HTML.
Each Visualforce tag corresponds to a coarse or fine-grained user interface
component, such as a section of a page, or a field. Visualforce boasts about 100
built-in components, and a mechanism whereby developers can create their own
components.
Visualforce uses the traditional model-view-controller (MVC) paradigm, with the
option to use auto-generated controllers for database objects, providing simple and
tight integration with the database. You can write your own controllers, or
extensions to controllers, using Apex Code. Visualforce also provides AJAX
components, and embeds the formula expression language for action, data and
component binding interaction. A developer creates Visualforce pages by composing
components, HTML, and optional styling elements on the Force.complatform. Just
like HTML, Visualforce can integrate with any standard web technology or
JavaScript framework to allow for a more animated and rich user interface. Each
page is then accessible by a unique URL. When someone accesses a page, the server
renders the page..
TABLE OF CONTENTS
Page No.
Acknowledgement .......................................................................................................................................................i
Abstract.............................................................................................................................................................................ii
Chapter 1: What is Visualforce?.........................................................................................................................1
Chapter 2: What is Visualforce Page?. ............................................................................................................2
Chapter 3: Where Can Visualforce Pages Be Used?...................................................................................3
Chapter 4: How to create visualforce page?...................................................................................................4
Chapter 5:Which Editions Support Visualforce?.........................................................................................5
Chapter 6: Which Permissions are Required for Visualforce Development?.....................................6
Chapter 7: How is Visualforce Architected?..................................................................................................6
Chapter 8: Tags of visualforce.............................................................................................................................8
Chapter 9: What are the Benefits of Visualforce? ........................................................................................9
Chapter 10: Controller in visualforce ...............................................................................................................11
Conclusion………………………………………………………………………...15
References...................................................................................................................................................................16
Visualforce report
Chapter-1
What is visualforce :-
Visualforce is a framework that allows developers to build sophisticated,
custom user interfaces that can be hosted natively on the
Force.complatform. The Visualforce framework includes a tag-based
markup language, similar to HTML, and a set of server-side “standard
controllers” that make basic database operations, such as queries and saves,
very simple to perform.
In the Visualforce markup language, each Visualforce tag correspondsto a
coarseor fine-grained user interface component, suchas a
section of a page, a related list, or a field. The behavior of Visualforce
components can either be controlled by the same logic that is used
in standard Salesforce pages, or developers can associate their own logic
with a controller class written in Apex.
Chapter-2
What is visualforce page
Developers can use Visualforce to create a Visualforce page definition. A
page definition consists of two primary elements:
• Visualforce markup
• A Visualforce controller
Visualforce Markup :-
Visualforce markup consists of Visualforce tags, HTML, JavaScript, or any
other Web-enabled codeembedded within a single
<apex:page> tag. The markup defines the user interface components that
should be included on the page, and the way they should
appear.
Visualforce Controllers :-
A Visualforce controller is a set of instructions that specify what happens
when a user interacts with the components specified in associated
Visualforce markup, such as when a user clicks a button or link. Controllers
also provide access to the data that should be displayed in a
page, and can modify component behavior.
Chapter-3
Where Can Visualforce Pages Be Used?
Developers can use Visualforce pages to
• Override standard buttons, such as the New button for accounts,
or the Edit button for contactsor
• Override tab overview pages, such as the Accounts tab home
page
• Define custom tabs
• Embed components in detail page layouts
• Create dashboard components or custom help pages
• Customize, extend, or integrate the sidebars in the Salesforce
console (custom console components)
• Add menu items, actions, and mobile cards in Salesforce1
Chapter-4
How to create visualforce page
With development mode enabled, you can create your first
Visualforce page by entering a URL for the page in your browser's
address bar as follows:
https://salesforce_instance/apex/pageName this give error message
Because the page does not yet exist, you are directed to an
intermediary page from which you can create your new page.
Click Create Page <myNewPageName> to create it
automatically.
Chapter-5
Which Editions Support Visualforce?
Visualforce is available in
Contact Manager
Group
Professional
Enterprise
Unlimited
Performance, and
Developer Editions.
Chapter-6
Which Permissions are Required for Visualforce
Development?
Visualforce development requires various permissions, depending on the
specific activity.
User Permissions Needed
To enable Visualforce development mode: “Customize
Application”
To create, edit, or delete Visualforce pages: “Customize
Application”
To create and edit custom Visualforce components: “Customize
Application”
To edit custom Visualforce controllers or Apex “Author
Apex”
To set Visualforce page security: “Manage Profiles
and Permission Sets”
To set version settings for Visualforce pages: “Customize
Application”
To create, edit, or delete static resources: “Customize
Application”
To create Visualforce Tabs: “Customize
Application
Chapter-7
How is Visualforce Architected?
All Visualforce pages run entirely on the Force.complatform, both when a
developer creates the page, and when an end user requests a page, as shown
in the following architecture diagrams.
When a developer finishes writing a Visualforce page and saves it to the
platform, the platform application server attempts to compile the markup
into an abstract set of instructions that can be understood by the Visualforce
renderer. If compilation generates errors, the save is aborted and the errors
are returned to the developer. Otherwise, the instructions are saved to the
metadata repository and sent to the Visualforce renderer. The renderer turns
the instructions into HTML and then refreshes the developer's view, thereby
providing instantaneous feedback to the developer for whatever changes
were made in the markup.
The architecture diagram below shows the process flow when a non-
developer user requests a Visualforce page. Because the page is already
compiled into instructions, the application server simply retrieves the page
from the metadata repository and sends it to the Visualforce renderer for
conversion into HTML.
Chapter-8
Tags of visualforce
1 <apex:page> calls an action when the page is loaded
2 <apex:actionFunction> defines a new JavaScript function that calls an
action
3<apex:stylesheet value="{!$Resource.<filename>}"/>
4<apex:outputText>
5<apex:commandButton> creates a button that calls an action
6<apex:commandLink> creates a link that calls an action
7 <apex:actionSupport> makes an event (such as
“onclick”“onmouseover”, and so on) on another, named component, call
an action
8<apex:pageBlock >
9<apex:pageBlockTable value="{!accounts}" var="a">
10 <apex:column value="{!a.name}"/>
11 <apex:form id="theForm">
12 <apex:pageBlockTabel> create a table
13 .<apex:inputField>
14.<apex:inputText>
15.<apex:inputTextArea>
Chapter-9
What are the Benefits of Visualforce?
As a markup language, Visualforce provides the following benefits:
1.User-friendly development :-
Developers can edit their Visualforce markup in the same window that
displays the resulting page. Consequently, developers can instantly verify
the result of an edit just by saving their code. The Visualforce editor pane
also includes auto-completion and syntax highlighting.
2.Integration with other Web-based user interface technologies :-
Because Visualforce markup is ultimately rendered into HTML, designers
can use Visualforce tags alongside standard HTML, JavaScript, Flash, or
any other codethat can execute within an HTML page on the platform,
including Force.complatform merge fields and expressions.
3.Model-View-Controller (MVC) style development :-
Visualforce conforms to the Model-View-Controller (MVC) development
pattern by providing a clear division between the view of an application (the
user interface, defined by Visualforce markup), and the controller that
determines how the application works (the business logic, defined by a
Visualforce controller written in Apex). With this architecture, designers
and developers can easily split up the work that goes with building a new
application—designers can focus on the look and feel of the user interface,
while developers can work on the business logic that drives the app.
4.Concise syntax :-
Visualforce pages can implement the same functionality as s-controls but
with approximately 90% fewer lines of code.
5.Data-driven defaults :-
Visualforce components are rendered intelligently by the platform. For
example, rather than forcing page designers to use different component tags
for different types of editable fields (such as email addresses or calendar
dates), designers can simply use a generic <apex:inputField> tag for all
fields. The Visualforce renderer displays the appropriate edit interface for
each field.
.
6.Automatically upgradeable :-
Visualforce pages do not need to be rewritten when other parts of the
Force.complatform are upgraded. Because the pages are stored as metadata,
they are automatically upgraded with the rest of the system.
Chapter-10
Controller in visualforce
A Visualforce controller is a set of instructions that specify what happens
when a user interacts with the components specified in associated
Visualforce markup, such as when a user clicks a button or link. Controllers
also provide access to the data that should be displayed in a page, and can
modify componentbehavior.
Types of Controllers :-
1. Standard Controller
2. Custom Controller
3. Extension
Standard Controler:-
The Force.complatform provides a number of standard controllers that
contain the same functionality and logic that are used for standard
Salesforce pages. For example, if you use the standard Accounts controller,
clicking a Save button in a Visualforce page results in the
same behavior as clicking Save on a standard Account edit page.
A standard controller exists for every Salesforce object that can be queried
using the Force.comAPI.
To associate a standard controller with a Visualforce page, use the
standardController attribute on the <apex:page> tag and assign it the name
of any Salesforce object that can be queried using the Force.comAPI.
For example, to associate a page with the standard controller for a custom
object named AccountObject, use the following markup
:<apex:page standardController="Account">
</apex:page>
Every standard controller includes a getter method that returns the record
specified by the id query string parameter in the page URL.
This method allows the associated page markup to reference fields on the
context record by using {!object} syntax, where object is the lowercase
name of the object associated with the controller. Forexample, a page that
uses the Account standard controller can use {!account.name} to return the
value of the name field on the accountthat is currently in context.
Custom controllers and controller Extension :-
Standard controllers can provide all the functionality you need for a
Visualforce page becausethey include the same logic that is used for a
standard page. Forexample, if you use the standard Accounts controller,
clicking a Save button in a Visualforce page results in the same behavior as
clicking Save on a standard Account edit page.
However, if you want to override existing functionality, customize the
navigation through an application, use callouts or Web services, or if you
need finer controlfor how information is accessed foryour page, you can
write a custom controller or a controller extension using Apex:
A custom controller is an Apex class that implements all of the
logic for a page without leveraging a standard controller. Use
custom controllers when you want your Visualforce page to run
entirely in system mode, which does not enforce the permissions
and field-level
security of the current user.
A controller extension is an Apex class that extends the
functionality of a standard or custom controller. Use controller
extensions when
• You want to leverage the built-in functionality of a standard
controller but override one or more actions, such as edit,view,
save, or delete.
• You want to add new actions.
Use Extension controller
<apex:page controller="customControllerClass"
extensions="extensionClass">
{!demo}<br/>
{!show}
</apex:page>
public class customControllerClass {
public String demo='hello visualforce';
public String getdemo(){
return demo;
}
}
public class extensionClass {
public extensionClass(customControllerClass controller) {
}
public String show ='This is the extension class';
public String getshow(){
return show;
}
}
Extension controller is used to extend the functionality of the
custom and standard controller
Visualforce markup can use the following types of controller
extension and custom controller methods:
• Action
• Getter
• Setter
Conclusion
So Finally in this visualforce we have learn how to create visualforce
pages,work off controller, mvc architecture etc.
We have learn how to make a dynamic web page using visualforce.
We can add all functionality of css,jquery and javascript.
References
http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_la
nguage_reference.pdf
http://www.salesforce.com/us/developer/docs/pages/salesforce_pages_devel
opers_guide.pdf
https://trailhead.salesforce.com/en

More Related Content

PPTX
Introduction to visualforce
PDF
Visualforce controllers
PDF
Customizing sales force-interface
PPTX
Mule with facebook
PPTX
New Features of ASP.NET 4.0
PPTX
Integration with Microsoft CRM using Mule ESB
PDF
Asp 1a-aspnetmvc
PPTX
Integration with Microsoft SharePoint using Mule ESB
Introduction to visualforce
Visualforce controllers
Customizing sales force-interface
Mule with facebook
New Features of ASP.NET 4.0
Integration with Microsoft CRM using Mule ESB
Asp 1a-aspnetmvc
Integration with Microsoft SharePoint using Mule ESB

What's hot (20)

PPTX
Introducing the new features in Expression Web 3
PPT
PPTX
Mvc summary
PPSX
Asp.net mvc
PPTX
Mule organization
PDF
PPTX
Integration of linked in using mule esb
PPTX
SharePoint Framework - Developer Preview
PPTX
Not Just Better, Faster - Expression and Sketchflow
PPT
ASP.NET MVC Presentation
PPTX
Web driver interface
PPTX
Mule integration with linkedin
PPTX
ASP.NEt MVC and Angular What a couple
PPTX
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
PPT
ASP.NET 4.0 Roadmap
PPTX
Automatic documentation with mule
 
PPTX
ASP .NET MVC Introduction & Guidelines
PPTX
SharePoint 2013 Hosted App Presentation by Roy Kim
PPT
Asp.net mvc
PPTX
Asp.net MVC training session
Introducing the new features in Expression Web 3
Mvc summary
Asp.net mvc
Mule organization
Integration of linked in using mule esb
SharePoint Framework - Developer Preview
Not Just Better, Faster - Expression and Sketchflow
ASP.NET MVC Presentation
Web driver interface
Mule integration with linkedin
ASP.NEt MVC and Angular What a couple
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
ASP.NET 4.0 Roadmap
Automatic documentation with mule
 
ASP .NET MVC Introduction & Guidelines
SharePoint 2013 Hosted App Presentation by Roy Kim
Asp.net mvc
Asp.net MVC training session
Ad

Viewers also liked (8)

PDF
Исковое заявление Waymo
PPTX
Music magazine timeline
PPTX
Balance hidroelectrolitico EN GERIATRIA
PDF
Acces a l emploi des jeunes diplomes
PPTX
PPT
CRAZY INVENTIONS
PPTX
Slide cf 2017 (1)
PDF
Whatever next? | The future of public engagement | Conference | 23 Feb 2017
Исковое заявление Waymo
Music magazine timeline
Balance hidroelectrolitico EN GERIATRIA
Acces a l emploi des jeunes diplomes
CRAZY INVENTIONS
Slide cf 2017 (1)
Whatever next? | The future of public engagement | Conference | 23 Feb 2017
Ad

Similar to Visualforce report (20)

PPTX
Introducing Visualforce
PPT
Vf ppt (1)
PPTX
Webinar: Salesforce Customization using Visualforce and Lightning Component F...
PDF
Customizing sales force-interface
PDF
Getting Started with Visualforce
PPTX
Visualforce
PPTX
Force.com Friday - Intro to Visualforce
PPTX
Force.com Friday: Intro to Visualforce (May 8, 2015)
PPTX
Force.com Friday : Intro to Visualforce
PDF
Using Visualforce in Salesforce1
PPTX
Entwicklung angepasster User Interfaces für Salesforce1
PDF
Workbook vf
PDF
Visualforce in Salesforce1: Optimizing your User Interface for Mobile
PDF
Visualforce Workbook
PPTX
3.dev meetup2 visualforce_sites_a_pruzan
PPTX
Coding Apps in the Cloud with Force.com - Part 2
PDF
Lightning Design System and Components for Visualforce Developers
PDF
Apexand visualforcearchitecture
PDF
Rg apexand visualforcearchitecture
PPTX
Coding the Salesforce1 Platform User Interface
Introducing Visualforce
Vf ppt (1)
Webinar: Salesforce Customization using Visualforce and Lightning Component F...
Customizing sales force-interface
Getting Started with Visualforce
Visualforce
Force.com Friday - Intro to Visualforce
Force.com Friday: Intro to Visualforce (May 8, 2015)
Force.com Friday : Intro to Visualforce
Using Visualforce in Salesforce1
Entwicklung angepasster User Interfaces für Salesforce1
Workbook vf
Visualforce in Salesforce1: Optimizing your User Interface for Mobile
Visualforce Workbook
3.dev meetup2 visualforce_sites_a_pruzan
Coding Apps in the Cloud with Force.com - Part 2
Lightning Design System and Components for Visualforce Developers
Apexand visualforcearchitecture
Rg apexand visualforcearchitecture
Coding the Salesforce1 Platform User Interface

Recently uploaded (20)

PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Business Ethics Teaching Materials for college
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Complications of Minimal Access Surgery at WLH
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
TR - Agricultural Crops Production NC III.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
human mycosis Human fungal infections are called human mycosis..pptx
Business Ethics Teaching Materials for college
Anesthesia in Laparoscopic Surgery in India
Complications of Minimal Access Surgery at WLH
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Pre independence Education in Inndia.pdf
Week 4 Term 3 Study Techniques revisited.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
VCE English Exam - Section C Student Revision Booklet
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

Visualforce report

  • 1. VISUALFORCE GOVT. ENGINEERINGCOLLEGE BIKANER A SEMINAR REPORT SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF TECHNOLOGY (Computer Science Engineering) SUBMITTED TO RAJASTHAN TECHNICAL UNIVERSITY, KOTA SUBMITTED TO : SUBMITTED BY Mrs Manisha ma’am CSE Department Rinku Saini 13EEBCS066
  • 3. ACKNOWLEDGEMENT I would like to place on record my deep sense of gratitude to Prof. Manoj Kudi, HOD-Dept. of Computer Science Engineering, Govt. Engineering College Bikaner, India for his generous guidance, help and useful suggestions. I express my sincere gratitude to Mrs Manisha Govt. Engineering College Bikaner, Rajasthan, encouragement and supervision throughout the course ma’am., Dept. of Computer Science Engineering, India, for his stimulating guidance, continuous of present work. I also wish to extend my thanks to Prof Vikram Singh Chouhan and other colleagues for attending my seminars and for their insightful comments and constructive suggestions to improve the quality of this Seminar work. I am extremely thankful to Mr.J.P. Bhamu, Principal, Govt. Engineering College Bikaner, for providing me infrastructural facilities to work in, without which this work would not have been possible. Signature of Student Rinku Saini (13EEBCS066)
  • 4. ABSTRACT Visualforce is the component-based user interface framework for the Force.com platform. The framework includes a tag-based markup language, similar to HTML. Each Visualforce tag corresponds to a coarse or fine-grained user interface component, such as a section of a page, or a field. Visualforce boasts about 100 built-in components, and a mechanism whereby developers can create their own components. Visualforce uses the traditional model-view-controller (MVC) paradigm, with the option to use auto-generated controllers for database objects, providing simple and tight integration with the database. You can write your own controllers, or extensions to controllers, using Apex Code. Visualforce also provides AJAX components, and embeds the formula expression language for action, data and component binding interaction. A developer creates Visualforce pages by composing components, HTML, and optional styling elements on the Force.complatform. Just like HTML, Visualforce can integrate with any standard web technology or JavaScript framework to allow for a more animated and rich user interface. Each page is then accessible by a unique URL. When someone accesses a page, the server renders the page..
  • 5. TABLE OF CONTENTS Page No. Acknowledgement .......................................................................................................................................................i Abstract.............................................................................................................................................................................ii Chapter 1: What is Visualforce?.........................................................................................................................1 Chapter 2: What is Visualforce Page?. ............................................................................................................2 Chapter 3: Where Can Visualforce Pages Be Used?...................................................................................3 Chapter 4: How to create visualforce page?...................................................................................................4 Chapter 5:Which Editions Support Visualforce?.........................................................................................5 Chapter 6: Which Permissions are Required for Visualforce Development?.....................................6 Chapter 7: How is Visualforce Architected?..................................................................................................6 Chapter 8: Tags of visualforce.............................................................................................................................8 Chapter 9: What are the Benefits of Visualforce? ........................................................................................9 Chapter 10: Controller in visualforce ...............................................................................................................11 Conclusion………………………………………………………………………...15 References...................................................................................................................................................................16
  • 7. Chapter-1 What is visualforce :- Visualforce is a framework that allows developers to build sophisticated, custom user interfaces that can be hosted natively on the Force.complatform. The Visualforce framework includes a tag-based markup language, similar to HTML, and a set of server-side “standard controllers” that make basic database operations, such as queries and saves, very simple to perform. In the Visualforce markup language, each Visualforce tag correspondsto a coarseor fine-grained user interface component, suchas a section of a page, a related list, or a field. The behavior of Visualforce components can either be controlled by the same logic that is used in standard Salesforce pages, or developers can associate their own logic with a controller class written in Apex.
  • 8. Chapter-2 What is visualforce page Developers can use Visualforce to create a Visualforce page definition. A page definition consists of two primary elements: • Visualforce markup • A Visualforce controller Visualforce Markup :- Visualforce markup consists of Visualforce tags, HTML, JavaScript, or any other Web-enabled codeembedded within a single <apex:page> tag. The markup defines the user interface components that should be included on the page, and the way they should appear. Visualforce Controllers :- A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link. Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.
  • 9. Chapter-3 Where Can Visualforce Pages Be Used? Developers can use Visualforce pages to • Override standard buttons, such as the New button for accounts, or the Edit button for contactsor • Override tab overview pages, such as the Accounts tab home page • Define custom tabs • Embed components in detail page layouts • Create dashboard components or custom help pages • Customize, extend, or integrate the sidebars in the Salesforce console (custom console components) • Add menu items, actions, and mobile cards in Salesforce1
  • 10. Chapter-4 How to create visualforce page With development mode enabled, you can create your first Visualforce page by entering a URL for the page in your browser's address bar as follows: https://salesforce_instance/apex/pageName this give error message Because the page does not yet exist, you are directed to an intermediary page from which you can create your new page. Click Create Page <myNewPageName> to create it automatically.
  • 11. Chapter-5 Which Editions Support Visualforce? Visualforce is available in Contact Manager Group Professional Enterprise Unlimited Performance, and Developer Editions. Chapter-6 Which Permissions are Required for Visualforce Development? Visualforce development requires various permissions, depending on the specific activity. User Permissions Needed To enable Visualforce development mode: “Customize Application” To create, edit, or delete Visualforce pages: “Customize Application” To create and edit custom Visualforce components: “Customize Application” To edit custom Visualforce controllers or Apex “Author Apex” To set Visualforce page security: “Manage Profiles and Permission Sets” To set version settings for Visualforce pages: “Customize Application” To create, edit, or delete static resources: “Customize Application” To create Visualforce Tabs: “Customize Application
  • 12. Chapter-7 How is Visualforce Architected? All Visualforce pages run entirely on the Force.complatform, both when a developer creates the page, and when an end user requests a page, as shown in the following architecture diagrams. When a developer finishes writing a Visualforce page and saves it to the platform, the platform application server attempts to compile the markup into an abstract set of instructions that can be understood by the Visualforce renderer. If compilation generates errors, the save is aborted and the errors are returned to the developer. Otherwise, the instructions are saved to the metadata repository and sent to the Visualforce renderer. The renderer turns the instructions into HTML and then refreshes the developer's view, thereby providing instantaneous feedback to the developer for whatever changes were made in the markup.
  • 13. The architecture diagram below shows the process flow when a non- developer user requests a Visualforce page. Because the page is already compiled into instructions, the application server simply retrieves the page from the metadata repository and sends it to the Visualforce renderer for conversion into HTML.
  • 14. Chapter-8 Tags of visualforce 1 <apex:page> calls an action when the page is loaded 2 <apex:actionFunction> defines a new JavaScript function that calls an action 3<apex:stylesheet value="{!$Resource.<filename>}"/> 4<apex:outputText> 5<apex:commandButton> creates a button that calls an action 6<apex:commandLink> creates a link that calls an action 7 <apex:actionSupport> makes an event (such as “onclick”“onmouseover”, and so on) on another, named component, call an action 8<apex:pageBlock > 9<apex:pageBlockTable value="{!accounts}" var="a"> 10 <apex:column value="{!a.name}"/> 11 <apex:form id="theForm"> 12 <apex:pageBlockTabel> create a table 13 .<apex:inputField> 14.<apex:inputText> 15.<apex:inputTextArea>
  • 15. Chapter-9 What are the Benefits of Visualforce? As a markup language, Visualforce provides the following benefits: 1.User-friendly development :- Developers can edit their Visualforce markup in the same window that displays the resulting page. Consequently, developers can instantly verify the result of an edit just by saving their code. The Visualforce editor pane also includes auto-completion and syntax highlighting. 2.Integration with other Web-based user interface technologies :- Because Visualforce markup is ultimately rendered into HTML, designers can use Visualforce tags alongside standard HTML, JavaScript, Flash, or any other codethat can execute within an HTML page on the platform, including Force.complatform merge fields and expressions. 3.Model-View-Controller (MVC) style development :- Visualforce conforms to the Model-View-Controller (MVC) development pattern by providing a clear division between the view of an application (the user interface, defined by Visualforce markup), and the controller that determines how the application works (the business logic, defined by a Visualforce controller written in Apex). With this architecture, designers and developers can easily split up the work that goes with building a new application—designers can focus on the look and feel of the user interface, while developers can work on the business logic that drives the app.
  • 16. 4.Concise syntax :- Visualforce pages can implement the same functionality as s-controls but with approximately 90% fewer lines of code. 5.Data-driven defaults :- Visualforce components are rendered intelligently by the platform. For example, rather than forcing page designers to use different component tags for different types of editable fields (such as email addresses or calendar dates), designers can simply use a generic <apex:inputField> tag for all fields. The Visualforce renderer displays the appropriate edit interface for each field. . 6.Automatically upgradeable :- Visualforce pages do not need to be rewritten when other parts of the Force.complatform are upgraded. Because the pages are stored as metadata, they are automatically upgraded with the rest of the system.
  • 17. Chapter-10 Controller in visualforce A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link. Controllers also provide access to the data that should be displayed in a page, and can modify componentbehavior. Types of Controllers :- 1. Standard Controller 2. Custom Controller 3. Extension Standard Controler:- The Force.complatform provides a number of standard controllers that contain the same functionality and logic that are used for standard Salesforce pages. For example, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page. A standard controller exists for every Salesforce object that can be queried using the Force.comAPI. To associate a standard controller with a Visualforce page, use the standardController attribute on the <apex:page> tag and assign it the name of any Salesforce object that can be queried using the Force.comAPI. For example, to associate a page with the standard controller for a custom object named AccountObject, use the following markup :<apex:page standardController="Account"> </apex:page>
  • 18. Every standard controller includes a getter method that returns the record specified by the id query string parameter in the page URL. This method allows the associated page markup to reference fields on the context record by using {!object} syntax, where object is the lowercase name of the object associated with the controller. Forexample, a page that uses the Account standard controller can use {!account.name} to return the value of the name field on the accountthat is currently in context. Custom controllers and controller Extension :- Standard controllers can provide all the functionality you need for a Visualforce page becausethey include the same logic that is used for a standard page. Forexample, if you use the standard Accounts controller, clicking a Save button in a Visualforce page results in the same behavior as clicking Save on a standard Account edit page. However, if you want to override existing functionality, customize the navigation through an application, use callouts or Web services, or if you need finer controlfor how information is accessed foryour page, you can write a custom controller or a controller extension using Apex:
  • 19. A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user. A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when • You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit,view, save, or delete. • You want to add new actions. Use Extension controller <apex:page controller="customControllerClass" extensions="extensionClass"> {!demo}<br/> {!show} </apex:page> public class customControllerClass { public String demo='hello visualforce'; public String getdemo(){ return demo; } } public class extensionClass { public extensionClass(customControllerClass controller) {
  • 20. } public String show ='This is the extension class'; public String getshow(){ return show; } } Extension controller is used to extend the functionality of the custom and standard controller Visualforce markup can use the following types of controller extension and custom controller methods: • Action • Getter • Setter
  • 21. Conclusion So Finally in this visualforce we have learn how to create visualforce pages,work off controller, mvc architecture etc. We have learn how to make a dynamic web page using visualforce. We can add all functionality of css,jquery and javascript.