Five Essentials for New Salesforce Platform Developers
One question I frequently see on the Developer Force community boards comes from developers new to Salesforce Platform and follows along the lines of, “what advice would you give to new developers starting out with Force.com?” For the new developer, it can be overwhelming. Here are my top 5 suggestions.
Last month, Reid Carlberg solicited advice for new Salesforce Platform developers from our team of developer evangelists. With over one million registered users, this hits on a question I get quite often. The question varies in phrasing, but generally boils down to, “what advice would you give to new developers starting out with Force.com?”
It’s easy to punt on a question like this. Developer Force is, in fact, pretty good at providing “getting started with Salesforce Platform,” a workbook tutorial that walks you through building your first app, and providing extensive learning paths that you can explore. But once you’ve built your first app, where do you go from there?
Part of the problem lies in the firehose effect. The Salesforce Platform tool chest is brimming with tools that enable you to build your database, add field validation, embed workflow rules and business logic, create custom UI’s, query database objects, run reports and retrieve analytics. Aside from the standard platform tools, Salesforce Platform provides mobile packs, open-source SDKs and tools, SOAP and REST APIs so you can integrate with other platforms Heroku, API’s to access Chatter feeds, tools for building web sites, and well, you get the idea.
For the new developer, it can be overwhelming. But just who is this new developer? In fact, Salesforce developers as a group come from diverse backgrounds. But whatever their roles I believe that many of these developers are looking for more than a quick start. I believe many are looking for a deeper understanding in the hopes of achieving some level of unconscious competence. I also believe these developers are looking at Salesforce Platform as a general-purpose tool for building data-driven applications in the cloud, not just a tool for building or extending CRM apps. It is with this group in mind that I share my top five things every new developer should master.
1. Develop a solid understanding of the platform. The basic learning path is to follow the tutorial in the Force.com Workbook, which walks you through the construction of the Warehouse app, an inventory management system. Not only does the tutorial guide you through and provide hands-on experience with every major component of the platform, the solution you create is a near-ubiquitous solution that can be adapted to numerous use cases. Also:
2. Learn and know your tools. It sounds simple but the best developers (on any platform) know their tools right down to that last 10% of the feature set. The fact is you will be living in your development environment. You’ll be more productive, and in the beginning you will find that you will fumble less for answers. Salesforce Platform offers numerous tools. Choose the tool that’s right for you and learn how to use it well. Here’s a list of the tools:
- The Developer Edition (DE) environment. More than just a tool, the DE environment is a browser-based development workspace that gives you access to Apex Code, Visualforce, Chatter, SOAP and REST integration APIs, and well, this just scratches the surface. Later when you deploy to a production environment, you’ll see that the Developer Edition environment allows you to continue development without affecting your production deployment. Since this is where you will be developing apps, installing packages, setting up administrative access, configuring and customizing your experience, you will want to take the time tour the environment and become comfortable with it’s most prominent features. The online help really shines here, but also be sure to
- The DE Environment is pretty cool but as a long time Java hack, I like to use Eclipse. It so happens that the Eclipse-based Force.com IDE is a powerful client application for creating, modifying, testing and deploying Force.com applications. As a plugin to Eclipse, it provides a comfortable environment for programmers familiar with integrated development environments, allowing you to code, compile, test, and deploy all from within the IDE itself.
- The Developer Console. The Developer Console is a versatile tool that lets you create, edit, debug and test your applications directly from your Salesforce org. Many developers work exclusively in the Developer Console, but where it shines is testing and debugging. You can step through the execution path of your app, set checkpoints, inspect variables and retrieve their values. The Developer Console also gives you access to debug logs so you can look at your Apex and Visualforce source, as well as callouts, validation rules and workflow rules. The Developer Console also allows you to execute SOQL queries directly in the tool, and there’s also a performance tree that allows you to look at memory usage and processing time. You can run Apex tests and view code coverage, set checkpoints and more.
3. Learn some code: SOQL, Visualforce, and Apex. As I mentioned, this technically isn’t a requirement for building basic apps. In fact, you can do a lot with formulas, approval processes and workflow rules. But if you plan to use Salesforce Platform as a general-purpose tool for building cloud applications, you will, in practice, want to write some code.
- Visualforce. If you know anything about XML, you know that it allows you to create other markup languages using DTD’s or XML Schema. Visualforce syntax is essentially another markup language. Markup elements are overloaded with components, and attributes are used to configure these components, making it a powerful language that’s super easy to use. Visualforce is used for creating forms, presenting lists and rollups from the database, and creating UI elements. You can embed XHTML in a Visualforce, making it versatile for creating web pages and mobile optimized pages with responsive design. The learning paths listed on the Visualforce page, will walk you through everything from learning the MVC model to building mobile apps using Visualforce pages. Once you’ve get some of the basics under your belt, I’d like to point you to Dynamic Visualforce Components.
- Apex Code. Apex is a strongly typed, object-oriented language that is syntactically similar to languages like Java and C#. However, the language is platform aware and contains constructs that make it easy to work with relational data. If you are familiar with other programming languages, you’ll still need to learn about execution contexts, bulk patterns, query optimization and limits. Beyond the basics you’ll find on the Apex Code page, I would point you to Dan Appleman’s Advanced Apex book.
- SOQL. If you’re familiar with SQL, you’ll feel right at home with SOQL. To get a quick comparison of the two, check out Dan Appleman’s From SQL to SOQL.
4. Choose Apps that are well suited to Salesforce Platform. As a general purpose development tool, Salesforce Platform is really good for building data-driven cloud apps that require security, identity management and OAuth authentication. So first, you’ll want to choose an problem that calls for these requirements. Spend time learning everything you can about both the Database and Security models.
5. Learn from the pro’s.
- Read a lot of code. You can learn a lot from others. And finally, test as you go. Salesforce already incorporates unit testing. But you’ll still need to write code to test your Apex. This is where the developer console really comes in handy.
- Follow the Community Boards. The best place to find Salesforce practitioners, MVPs and your peers is on the discussion boards. Along with some of the Developer Evangelists, you’ll find Salesforce MVP’s, other developers and enthusiast, and of course, me. It’s a great place to pose your questions and learn from others in a practical setting. And as Samantha Ready pointed out, “hang out on Stack Exchange, and remember to Google.”
- Employ the principles of good design. Learn about the Salesforce MVC model. Then employ the principles of abstraction, separation of concerns, and other practices of good object-oriented design.
Once you get to the point where you’re building your own apps I would add “Plan your design before you begin.” Salesforce Platform utilizes the classic model-view-controller model. You don’t need to follow formal design patterns, but you should map out your app and decide where you want to implement features. And “Factor in Refactoring.” In my own development I’ve discovered that once you’ve set up your objects, added field validation, workflow rules and business logic and get to user interface, there’s always more logic required. Sometimes this logic finds its way into a Visualforce button.
Feel free to share your own tips for getting started with Salesforce Platform. See you on the community boards.
— Michael Floyd
Editor in Chief