๐ŸŒŸ Getting Started with Visualforce: What, Why, and How?

Alapan KarAlapan Kar
3 min read

Welcome to the first post of my Salesforce Visualforce Learning Series, where I document my daily journey of mastering Visualforce and Apex through hands-on projects, real debugging, and practical examples. Whether you're just getting started or refreshing your basics, this blog is written with simplicity and clarity in mind. Let's dive in!


๐Ÿ” What is Visualforce?

Visualforce is a component-based UI framework from Salesforce that allows developers to build custom user interfaces using HTML-style tags and optional Apex controllers. It was introduced in 2008 and has been widely used across classic Salesforce applications.

It uses:

  • Tag-based markup (<apex:page>, <apex:form>, <apex:outputText>, etc.)

  • Apex controller logic for dynamic behavior and database interaction

๐Ÿ“Š Comparison with LWC and Aura:

FeatureVisualforceAura ComponentsLightning Web Components (LWC)
Year Introduced200820142019
LanguageMarkup (HTML-like) + ApexJavaScript + HTMLModern JS + HTML
RenderingServer-sideClient-sideClient-side (modern)
Best UseLegacy, PDF, admin toolsTransition appsModern, performant UI

๐Ÿ“„ Why Learn Visualforce?

Even though Lightning Web Components (LWC) is the modern way to build UI in Salesforce, Visualforce is still essential for:

  • Maintaining and updating legacy apps

  • Creating admin-friendly internal tools quickly

  • PDF generation or complex tabular layouts

  • Deep integration with standard Salesforce UI and workflows


โš™๏ธ How Does Visualforce Work?

Here are 3 beginner-friendly Visualforce examples:

โœ… 1. Basic Hello World Page

<apex:page>
    <h1>Hello Visualforce!</h1>
</apex:page>

โœ… 2. Visualforce Page with Controller

<apex:page controller="MyController">
    <h2>Hello {!name}!</h2>
</apex:page>
public class MyController {
    public String name { get; set; }
    public MyController() {
        name = 'Visualforce Developer';
    }
}

โœ… 3. Using a Form to Save Data

<apex:page standardController="Contact">
    <apex:form>
        <apex:inputField value="{!Contact.FirstName}"/>
        <apex:inputField value="{!Contact.LastName}"/>
        <apex:commandButton action="{!save}" value="Save Contact"/>
    </apex:form>
</apex:page>

๐Ÿ’ก My Setup and Plan

I'm learning daily and creating blog posts that:

  • Are beginner-friendly

  • Have real examples and working screenshots

  • Show both the Visualforce Page and Apex Code

Hereโ€™s what Iโ€™ll cover next:

  1. Create Your First Visualforce Page

  2. Adding Static Resources (CSS & Images)

  3. Using Apex Custom Controllers

  4. Building a Visualforce Habit Tracker App


๐Ÿš€ Whatโ€™s Next?

Ready to build your first Visualforce page with a controller?

๐Ÿ‘‰ Read Part 2: Create Your First Visualforce Page with Apex Controller

In this post, Iโ€™ll walk you through:

  • Creating a Visualforce page from scratch

  • Writing your first Apex controller

  • Connecting form data to Salesforce objects

  • Real example: Create a "Contact Us" form

๐Ÿ”ง Beginner-friendly with code + screenshots. No prior Apex knowledge needed!


โœจ Final Thoughts

I believe in learning by doing. If you're trying to understand Visualforce, don't just read โ€“ build something! Follow along with my posts to:

  • Create real apps (like a habit tracker)

  • Understand how Apex connects to UI

  • Learn SLDS styling and best practices


Thanks for joining me in this journey. If you liked this post, leave a comment, share your thoughts, or suggest what you'd like to see next!

๐Ÿ“š Stay tuned for: Create Your First Visualforce Page


Written by [Your Name], a Visualforce learner documenting every step of the journey.

0
Subscribe to my newsletter

Read articles from Alapan Kar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Alapan Kar
Alapan Kar