As I write this, it’s my favorite time of the release. I’ve written all of my documentation and release notes for Summer ’13, and I’m waiting to see what our customers will do with all of the new features. And there are a lot of new features–the release notes top 275 pages, a new high!

One of the things I spent a lot of time on doesn’t rate even a sentence in the release notes. How can that be? The topics were for existing functionality. On the Doc Team we call this “legacy doc work.” It’s immensely satisfying to do, even if, since only the doc is new, there’s no trace of it in the release notes.

The improvements I worked on are substantial expansions and clarifications to the Visualforce Developer’s Guide material covering global variables, in particular the following:

  • $Setup — Somehow this global, which gives you access to custom settings, had escaped being documented entirely! I can’t take credit for fixing that; Eric Wilson, the Product Owner for Visualforce, wrote the new documentation for it, which I edited and expanded a bit.
  • $Action — Existing information about available $Action values was pulled into the Visualforce Developer’s Guide, to make the entry for $Action more complete. $ObjectType globalThere’s also new sample code that shows how to conditionally enable or hide links to those actions–for example, not showing a New button if the user can’t create new records–to create slick, intuitive pages for your users.
  • $Component — The behavior, use, and best practices for using $Component were researched, and the new documentation for it should be more complete and clear. In particular, the requirements for using $Component to reference nested Visualforce components from your non-Visualforce code (usually JavaScript) should be much easier to understand and use.
  • $ObjectType — This is the big one. The documentation for $ObjectType has been a source of frustration for me when writing sample code, and I simply couldn’t find enough information about how to use this powerful tool for introspecting sObjects in an organization. The additions in the Summer ’13 version of the Visualforce Developer’s Guide expand the material 500% or more. If trying to use $ObjectType has frustrated you in the past, I hope you’ll give the Visualforce Developer’s Guide another chance to help you out.

The documentation for the rest of the global variables was also reviewed and edited. And in addition to content changes, I reworked the structure, so that it should be easier to find the specific documentation you’re looking for, in the table of contents, index, via “see also” links, and so on.

We don’t often have the luxury of going back and expanding existing doc, because the engineers keep us so busy writing about all of their new features. Our global variables became a pet project, or maybe an obsession, and getting it into this release makes me really happy. I hope it’ll make it easier for you to use these very useful tools in your Visualforce applications.

tagged Bookmark the permalink. Trackbacks are closed, but you can post a comment.
  • Anonymous

    Not sure why Batch Process Job static variables are not persisted but instance variable, this behavior is confusing when we compare with normal apex class. I understand batch process is run in async in future time, but not sure why its not possible to persist static variables. Its an expected behavior from developers.

    • http://twitter.com/Alderete_SFDC Michael A. Alderete

      @ram_sj: I’m not sure I understand your question, but it doesn’t sound like it has to do with global variables in Visualforce, but with class variables in regular Apex? If you’re seeing behavior that’s not as documented, please do open a case! If you have a feature request, the Idea Exchange is the way to go. Cheers!