I Will Possess Your Heart (or, learning Apex and Visualforce)

So, like many nights after Hockey Night in Canada is done, I found myself alone in the house (with the wife sleeping, as well as the kiddies) and Saturday Night Live not doing it for me anymore. So, what do I do? Jump in front of the computer to do some work. Last night, it was trying to figure out the apex code to count the number of child opportunities (for all, won and and closed) and their values, as you cannot do rollup summary fields on standard to standard objects through administrative clicks. After an hour of searching for something I could learn from, or bastardize, my head hurt, I was tired and I gave up.

Now, like many people who have worked with salesforce.com for some time, we have had great plans to learn Apex, so that ‘simple’ triggers such as the one described above could be written with ease. S-Controls used to be available, and using an easy language such as javascript allowed us to create them with ease (if any HTML/WebDev had been done). Visualforce isn’t too bad for a quick list – it’s HTML like structure makes it simple for non-programmers. But once the Apex is required, well, one can get lost quite quickly…

Now, a year and a half I go I wrote a post (…Different Names For The Same Thing…), where I dreamt of a day where non-programmers had a one-stop shot to learn the basics of Apex programming. As a point, I went to Chapters.ca and looked at the Head Start or the Teach Yourself series. There exist for Ruby on Rails, PHP, Java, HTML5, C++, VB … the list goes on and on and on. Even the Dummies series has one of the better selling learn Java books (Beginning Java Programming for Dummies), and they all make the following assumptions:

  • You want to learn how to program in the language which the book is based around.
  • You are a novice in the field.

And with the assumptions accepted, these books do their job (as with any book, always read the user reviews…some do it better than others) in giving you a self-learning resource which is aimed at non-programmers getting the basics down, and entering the next level of neophyte junior programmer. Right now, these one-stop book does not exist for Apex development, and if it exists in multiple documents within developerforce (A great developer site!), it is not easily found, in any way.

This is a large hole for salesforce, and apex development in my eyes – in my last post, I said I dreamt of a day when this existed. But now, I do believe it is coming to a head, and is a necessity. There needs to be a ‘teach the basic constructs if object-oriented programming using Apex” book, or online class that allows the admin with dreams to evolve into the programming admin. Why?

1. Time – as much as we would love to learn java, become partially proficient and then learn apex, time is a large factor here. It is a daunting feeling knowing that there are multiple books and playtime at the computer before I could write a simple roll up summary trigger like the one on my mind now.

2. Optics – with database.com, and salesforce’s push into leading cloud development, I do believe a lack of a self-learning book is missing a marketing opportunity to non-Salesforce developers, as well as IT people who hit up bookstores with friends and family, or just to have a Starbucks break. We see the Microsoft series of learning books, as well as the teach yourself for many programming languages. A self-education book available at the local (or online) bookstore could increase the reach of our favorite application through non-standard resources learning the language.

3. Community – while we have a great community with Salesforce, where developers, admins, partners and users play very well together (I really couldn’t list out all the great people at all facets – I am blessed with friends and acquaintances from all areas that grows weekly), having a book to help people learn on apex would help tie the community together even more, just as developers have the ability to do so with multiple resources for Salesforce use and administration right now.

So, here’s to once again dreaming the dream…one day I’ll see a book – a one stop, learn the basics and have a running start in apex programming for those if us who have absolutely Bo programming experience. Until then, as the death cab song says, I’ve got to spend some time…

Oh, and my apex need at the beginning of this post? For any and all who may have a solution, feel free to share…I am sure a pint or two wi be shared in discussing your assistance next
Dreamforce!

Until next time, folks – keep safe, and enjoy the winter!

Nik

5 Comments

Jerome Gagnon-Voyer 20 February 2011 Reply

I had to do something similar last week, yes you do need some triggers. Here’s a decent example here:
http://colinloretz.com/2008/10/salesforce-rollup-summary-fields-using-apex-code/
Hope it helps a bit!

Benjamin Lemke 16 March 2011 Reply

Great article, Nik. I agree that the current learning methods leave something to be desired in terms of offering an easier approach to new developers.

As it stands, the syntax and methodology are so similar to Java that developers coming from another language are often confused by the different approaches.

gurman 2 September 2011 Reply

can u plz refer me any book to learn apex programing in easy way as soon as possible…..bcoz i m new in this technology…..

Nik 2 September 2011 Reply

Gurman,

One place I would recommend starting is developer.force.com – there is a plethora of information available for you here. There were many printed books available at dreamforce this year, and you can find the electric versions at http://wiki.developerforce.com/index.php/Forcedotcomworkbook

Leave a Reply

Are You Smarter Than A Spambot? *