24
Introduction to Force.com Pages (Visualforce) Developers Reid Carlberg: salesforce.com @ReidCarlberg @ForceDotComLabs

Introduction to Force.com Pages (Visualforce)

Embed Size (px)

DESCRIPTION

Force.com can automatically generate user interfaces, but sometimes you want to go a bit further. This session explores Force.com pages (Visualforce), the component-based UI framework that lets you build attractive, dynamic, reusable user interfaces. We'll cover code walk-throughs, common use cases, a little about Force.com code (Apex), and sample UIs.

Citation preview

Page 1: Introduction to Force.com Pages (Visualforce)

Introduction to Force.com Pages (Visualforce)

Developers

Reid Carlberg: salesforce.com@ReidCarlberg@ForceDotComLabs

Page 2: Introduction to Force.com Pages (Visualforce)

Safe HarborSafe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year ended January 31, 2010. This documents and others are available on the SEC Filings section of the Investor Information section of our Web site.

Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Introduction to Force.com Pages (Visualforce)

Ask Your Questions in the Dreamforce Org!

Page 4: Introduction to Force.com Pages (Visualforce)

Who Has…

Just started with force.com?

Modified an existing HTML web page on any system?

Developed an HTML web page from scratch?

Developed a JSP/PHP/etc. type page?

Implemented a complete webapp from scratch?

Page 5: Introduction to Force.com Pages (Visualforce)

Visualforceprovides UI flexibility.

Salesforce MobileBest Mobile Experience

Why Visualforce?

Page 6: Introduction to Force.com Pages (Visualforce)

After this session

Describe Visualforce and why it matters

Explain 3 Common Usage Patterns

Identify 2 Ways of Authoring Pages

Decide your personal next step

Page 7: Introduction to Force.com Pages (Visualforce)

Model-View-Controller

ModelView Controller

Page 8: Introduction to Force.com Pages (Visualforce)

Today’s Demo App: Project Management

Project__c

Milestone__c

Action__c

User

Page 9: Introduction to Force.com Pages (Visualforce)

Developer Mode, Pages & Styles

Page 10: Introduction to Force.com Pages (Visualforce)

What We Did

Activate Developer Mode

Update the URL to “…/apex/MyNewPage”

standardController=Project__c

apex:Detail

showHeader=false

showSidebar=false

“…/apex/MyNewPage?id=[some project id]”

MAGIC!

Page 11: Introduction to Force.com Pages (Visualforce)

Learning the Syntax

http://developer.force.com

Page 12: Introduction to Force.com Pages (Visualforce)

Types of Controllers

standardController – All CRUD operations

– Expects “id” parameter

– You write no code

custom controllers– Replace standard controllers completely

– You write all code

controller extensions– Extend standard controllers

– You write some code

Page 13: Introduction to Force.com Pages (Visualforce)

Extensions & UI Enhancement

Page 14: Introduction to Force.com Pages (Visualforce)

What We Did

Wanted to see more detail about GrandChild objects

Created a Custom Page (no header, no sidebar)

Standard Controller = “Project__c”

Extensions=“ProjectMilestoneActionController”

Followed prompts to created class, methods

Built out a list of milestones and tasks

MAGIC!

Page 15: Introduction to Force.com Pages (Visualforce)

http://labs.force.com

Learning What’s Possible

http://developer.force.com

Page 16: Introduction to Force.com Pages (Visualforce)

Multiple Objects & Action Overrides

Page 17: Introduction to Force.com Pages (Visualforce)

Advanced Topics

Rerender

Wizards

List views

Reporting & Dashboards

Portals

Mobile Deployment

Email Templates

Page 18: Introduction to Force.com Pages (Visualforce)

Best Practices

Develop custom Apex code in sandbox or developer

edition

Use security scanner to ensure quality– http://security.force.com

Rely on server side where possible– faster!

Insert only a single <apex:form /> tag– faster!

Avoid re-writing every page

Page 19: Introduction to Force.com Pages (Visualforce)

Next Steps

Join Developer.Force.com– Get a Developer Edition

– Do the Force.com Workbook

Visit the Dev Zone!– Get the Cheatsheet (actually get ‘em all)

– Do the Workbook

Attend More Sessions– Intro to Force.com Sites

– Developing Applications with JQuery

Page 20: Introduction to Force.com Pages (Visualforce)

Resources, Q & A

Chatter Resources– This Deck in Dreamforce org

Twitter Resources– @ReidCarlberg

– @ForceDotComLabs

– @ForceDotCom

– @Salesforce

Page 21: Introduction to Force.com Pages (Visualforce)

Introduction to Force.com Pages (Visualforce)

Page 22: Introduction to Force.com Pages (Visualforce)

D I S C O V E R

Visit the Developer Training and Support Booth in Force.com Zone

Discover

Developer

Learning Paths

Developer training, certification and support resources

S U C C E S SFind us in the Partner Demo Area of

Force.com Zone 2nd Floor Moscone West

that help you achieve

Learn about Developer

Certifications

Page 23: Introduction to Force.com Pages (Visualforce)

Remember. . .

Check Chatter for additional session information

Get your developer Workbooks and Cheat Sheets in

the Force.com Zone

Visit for more information related

to this topicDon’t forget the survey!

Page 24: Introduction to Force.com Pages (Visualforce)

How Could Dreamforce Be Better? Tell Us!

Log in to the Dreamforce app to submit

surveys for the sessions you attendedUse the

Dreamforce Mobile app to submit

surveysEvery session survey you submit is

a chance to win an iPod nano!

OR