Goodbye IDE Beta…Hello Visual Studio Code

Back in 2016, I wrote a post here about how the IDE was making an epic comeback, with support for Lightning.  At the time I was very excited to see that Salesforce was refocusing it’s efforts towards improving that tool in the form of a Beta. Even though the IDE was the original tool that Salesforce offered and it had a long history with the development community, it had failed to keep up with the bevy of tools now being offered by third-parties.

Fast forward to today and the recent announcement by Salesforce that the IDE Beta has been officially discontinued.

So where does that leave Salesforce developers?

Well, not as bad as you might think. Salesforce is not giving up on supporting a local IDE. Nor are they giving up on the original version of the IDE (at least not just yet). So far, only the new Beta will be discontinued.

It is just that they are focusing their efforts towards improvement of the Salesforce Extensions for Visual Studio (VS) Code. It just made no sense to support two tools and after analyzing feedback from the Beta of the IDE, the team had to make a clear choice and Salesforce Extensions for VS Code came up the winner.

I personally prefer Visual Studio Code and there is no question that it is easier to install than Eclipse (which was always a bit of a nightmare imho with all the required Java installs it required). I also like how intuitive it is and that I can use it to do all sorts of other modern development. If there is a popular modern language out there, you can safely bet that VS Code supports it.

If you have not had a chance to check it out yet, I highly suggest you do so and just remember to keep an open mind.

Also, be aware that Salesforce Extensions for VS Code does not yet support everything that the IDE does. Like I said earlier, the original IDE is not going away, just the newer Beta version which included support for Salesforce DX and Lightning. It is going to take some time for the development team to get all the features that the IDE offers into Salesforce Extensions for VS Code.

But keep in mind, that VS Code is where they are headed, so if you have not yet checked out Visual Studio Code, now is the perfect time to do so. I think you will be pleasantly surprised and impressed with it.

And let me know what you think…

New Dream Job at Salesforce

THLogoI have very exciting news to share. The first day of Dreamforce will also be my first day as a member of the Trailhead team. I have accepted a job as a Technical Curriculum Engineer.

Doesn’t that just sound cool?

And the best part is that I will be working for the legendary, Jeff Douglas!!! Yep, that guy. The one and only. I bet you are way jealous now.

The thing that I love so much about Trailhead is the quality of the content they produce. I truly believe they are leading the way in terms of how to produce effective technical instructional material and I am just thrilled to be a part of it.

The thing I am most passionate about in life is the process of taking something that is very complex and difficult and presenting it in a way that is easily understandable to almost anyone. It is kind of like the ultimate crossword puzzle (and yes, I happen to love crossword puzzles).

As far as this blog and my courses at Pluralsight, we will have to see how that goes. I still have my latest course about Lightning Best Practices coming out soon (since I am almost finished with it). But after that is published, I may take a break for a while so I can really focus on my new and exciting job.

Cheers everyone,



Why Lightning Base Components are so Awesome

When Lightning development was first introduced, the Salesforce developers thought UI components (which you have probably seen used in a lot of sample code) would meet all the needs of component developers. They were wrong. Although the UI components, which include things like ui:inputText/ui:outputText, ui:button, ui:menu, ui:message are very useful, they have some serious drawbacks.

The biggest drawback is that they do not handle validation for you automatically. The component developer is responsible for adding JavaScript code needed to validate data entered into these components. Another big drawback with UI components is that they do not handle Salesforce Lightning Design System (SLDS) styling for you. You have to know which SLDS tags to use around your UI components.

To understand exactly what this means, consider a “very simple” component used only for creating new cases. This is what the component looks like when rendered:

Screen Shot 2017-03-03 at 2.51.39 PM.png

Using UI components, this is how much code is needed to validate this very simple component:

validateForm: function(component) {
  var validCase = true;
  var subjectField = component.find("Subject");
  if($A.util.isEmpty(subjectField.get("v.value"))) {
     validCase = false;
     subjectField.set("v.errors", [{message:"Subject can't be blank"}]);
   else {
     subjectField.set("v.errors", null);
   var reqNumberField = component.find("EngineeringReqNumber");
   if($A.util.isEmpty(reqNumberField.get("v.value"))) {
     validCase = false;
     reqNumberField.set("v.errors", [{message:"EngineeringReqNumber can't be blank"}]);
   else {
     reqNumberField.set("v.errors", null);
  // Verify we have a contact to attach it to
   var contact = component.get("");
   if($A.util.isEmpty(contact)) {
     validCase = false;
     console.log("Quick action context doesn't have a valid contact.");

In addition to having to add your own validation code to the JavaScript controller, you will have to know which SLDS (or Salesforce Lightning Design System) tags to use and this is not always so obvious.

Most developers I know do not want to have to spend the time learning which CSS tags to apply to get the styling they need. They just want things to work. Out of the box. Simple like.

I hear ya and so did the developers at Salesforce.

In Winter 17, Salesforce released a whole new set of components known as Base Lightning Components. Similar to the UI components, these components do something fundamentally different. The validation code and SLDS styling is built right in. All you have to do is add the markup to your page and waaaalaaa!

The page will render the same with styling and will have built-in validation, but the code will be so much simpler.

If you have not checked out the Base Lightning Components, you might also want to check out my new course on Pluralsight, which has an entire module about Base Lightning Components.

Top 5 Lightning Tips for Visualforce Devs

#1- Transition does not have to be all or nothing

For Visualforce Developers, when it comes to transitioning to Lightning development, it does not have to be an all or nothing deal. Very few development shops/companies will go from doing all Visualforce development to doing all Lightning development overnight. That is just not realistic, nor a good idea, in my opinion.

The introduction of Lightning Out offered a lot of options for Visualforce developers wanting to slowly transition to Lightning. If you want to learn what options are available in terms of a transition plan, I suggest checking out this post and blog series by Salesforce Architect, Mike Topalovich. Mike does an excellent job, not only of giving a lot of background, but of detailing 5 specific migration paths that you will want to consider.

#2 – Watch your Casing

JavaScript is Case sensitive!!!

This is so important, I am going to write it again, “JAVASCRIPT IS CASE SENSITIVE”.

If only I had a nickle for every time I ended up discovering that the odd error I was getting in Lightning was actually caused by a casing error of mine. Seriously, I cannot tell you how many times this has tripped me up. More times than I would probably like to admit.

So anytime you are working with Lightning and you get an error that makes no sense, the first thing you should do is return to your JavaScript code and make sure you did not make a casing error. It really is VERY easy to do. Embarrassingly so.

#3- Security Works Differently

As Visualforce developers, you have been spoiled as far as security is concerned. Visualforce apps operate out of the domain, which is not shared with Salesforce code. But, Lightning apps and components run in a special domain that is shared with Salesforce-authored Lightning code.

This means that the security for Lightning components are subject to a Content Security Policy (CSP). The rules surrounding what is and what is not allowed with these components will just tighten as time goes on. Go here to learn more about all the concerns regarding Lightning Security.

One important thing that you need to know is that any of your AuraEnabled Apex classes must do an explicit check for CRUD and FLS permissions. This was handled automatically for you in Visualforce pages, but in Lightning, unless you are using the new Lightning Data Service, you will need to do this check manually. You can do so using the isAccessible(), isCreateable(), isDeleteable(), and isUpdateable() methods. You can learn more about how this is done here.

#4 – Install and Use the Lightning Inspector

For Chrome users, there is an excellent plug-in called Lightning Inspector that every Lightning developer should check out. One of the most useful features it offers is a component tree tab, which shows you how the Lightning Framework sees your component. You can use this as a tool not only for debugging components, but learning more about what some of the built-in ones are capable of.

#5 – Check out newest components/features added

The Lightning Framework has been out for a while now (over 2 years actually) and in that time there have been many new releases and lots of new features added. Building Lightning components today is not the same as it was when you may have run through a tutorial or article a year or two ago. If it has been a while since you took a look at what features and components are available, it is time to take another look.

In the last release (Winter 17) many new features were added such as the Lightning Data Service, which you can kind of think of as the equivalent of a Standard Controller for a Visualforce page. Currently this feature is still in developer preview, but using it allows you to eliminate the need for Apex code and also those manual security checks that I mentioned earlier.

I strongly believe that component-based development, such as what you do with the Lightning Framework is the future of web and device-based development. If you have not already dipped your toes in Lightning Development, it is not too late. Things are just getting really good for this modern development platform.

AI for Everyone? Kind of

Recently, Salesforce started a campaign concerning their latest product offering, Einstein. This einsteinplane1campaign promises, “AI for Everyone”.

That is quite a claim and Salesforce is certainly not the first to make it. As a self-proclaimed AI Enthusiast/junkie, I can say that I have seen this type of claim before. However, this is the first time that I think it might actually be somewhat possible. At least as far as a specific area of AI known as deep learning is concerned. And, also if were talking about relating this just to Salesforce in particular.

So, does this mean that soon everyone will have personal robot butlers?

Absolutely not. We are not even beginning to talk about robotics here. Nor some other areas that fall under the rather large AI umbrella.

So what can Salesforce customers do with Einstein?

Well that will certainly change as the product evolves, but right now the most relevant thing you can do with it is to utilize the Predictive Vision Service (PVS). This can be used to classify images into categories using supervised learning and very specifically optimized machine learning algorithms. These algorithms were developed by a company called MetaMind, which was last year aquired by Salesforce and since then they have been working feverishly to offer their services on the platform.

If you are interested in learning more about how this works, check out the docs here or this recently released webinar, which does a very good job of laying out what is currently possible with the PVS.

Note that currently Salesforce is not offering a service that does Natural Language Processing (NLP).  But, I am sure that will be the next big thing Salesforce customers will be demanding. NLP is a huge field and one that has been around for many years, but with varying levels of success.  The most difficult challenge I suspect will come from the fact that the product will need to support several languages beyond English to be considered useful. It will also need to be able to handle untrained users with a high degree of accuracy, which is a very tall order to fill.

It appears to me that the majority of Einstein’s capabilities will be “Baked in” to many of Salesforce’s products and their use should be seamless to users. They will also be very specific to Salesforce CRM.

The most important thing to understand is that Einstein is NOT a general purpose AI engine. As enthusiastic as the Salesforce Marketing team obviously is, Salesforce has not reinvented the wheel and certainly not developed some new and unheard form of AI that will corner the market.

BUT, they have started to offer some very useful API’s that can be used to implement specific areas of AI that were once only accessible to the elite of AI researchers.

And the most promising news was just announced this month when a group from Salesforce Research created a neural network named the Dynamic Coattention Network and that model was the first to break the 80% mark when tested against the Stanford Question Answering Dataset. And for those of you that just said to yourselves, “and why should I care about that?”.

Well, ever since Stanford released their dataset, which now consists of questions posed by crowdworkers on a set of Wikipedia articles, lots of top AI researchers (including Microsoft, Google and IBM) have been racing to create models that will reach this golden threshold, but Salesforce was the first to reach it. It’s kind of a big deal.

I look forward to the next few years and seeing all the new services that will be added to the platform, bringing about the Enhanced Computing world I always envisioned.

Winter 17: Replacing JavaScript Buttons With Lightning Actions

Winter 17 hasJS introduced a whole bunch of new enhancements for Lightning and I will be blogging about a lot of them in the next few weeks, but one of my favorites is the new Lightning Actions that provide the ability to replace all those JavaScript buttons you may have littered about your org.

Ok, now anyone that has an org with more than one JavaScript button, just read that last statementdreamstime_xl_25648715 and probably thought, “Say what? I have to replace JavaScript buttons with something new? What about just migrating the existing buttons to Lightning?”

Can’t do it.

Why? Well, in three words, “Big Security Concerns

Yep. the kind that can bring an org to it’s knees and one that also can’t be resolved by providing some simple migration tool that converts existing buttons into Lightning actions automagically.

The bad news here is that you are going to have to do some real work to get all those buttons converted into Lightning actions. But, the good news is that once you do it, you will probably be very happy that you did and your org will certainly be more secure as a result.

And to help you get to that point, the Salesforce development group has started a new blog series titled, “JavaScript Buttons, Lightning and You“. This three part series will step you through what you need to know to move towards Lightning Actions. I also plan to cover this very topic as part of the new Lightning course I am working on (more on that later).

So, take some time to check out the new blog series and learn why you might be better off starting your transition to Lightning by first converting all those buttons to actions.

And stay tuned for more info about my upcoming Pluralsight course.


The Next Generation of Programmers, Listen Up!

Want to know what you need to know to be ahead of the curve in the world of Software Development?

Look no further than the following YouTube video, which was recorded during last years Dreamforce. It was a talk about “Modern Architectures: Above the Platform, Beyond the App” and it details all the things YOU (the next generation of programmer) needs to know to be successful in the new generation of app development.

Unfortunately, as of today, it has only been viewed 145 times and yet should have been PeterCoffeeSalesforceDotCom_sq300-269x200viewed 145 million times. In this video, Peter Coffee, the VP of Strategic Research at Salesforce is going to give you a message that you really need to hear.

I hope you take the time out of your day to hear his message. It is a VERY important one. Make sure you make it to the 26 minute mark when he says that, “We need to go further and provide an experience y recomposing what we used to call apps. We need to write code that intuits desire from behaviour, learns history and applies it predictively…”




Apply .NET Skills to Salesforce

NETTrailReleased yesterday is a new trail titled, “Apply .NET Skills to Salesforce” and it is all about wooing more .NET developers to the Salesforce platform, which I am of course, all for.

This FREE and most excellent resource is written by a .NET developer for .NET developers. It does not sugar coat anything about the platform, but instead tells .NET developers honestly and directly what the platform offers and how their existing .NET skills can allow them to transition easily to It also points out a lot of the common pitfalls they will want to avoid to be successful on the platform.

It consists of two modules. The first is all about SOQL and database basics and it has the following 4 units:

  • Moving from SQL to SOQL
  • Writing SOSL queries
  • Writing Efficient Queries
  • Manipulating Records with DML

The second module (which is my absolute favorite), it all about Apex and the platform and it has the following units:

  • Mapping .NET concepts to
  • Understanding Execution Context
  • Using Asynchronous Apex
  • Debugging and Running Diagnostics

I hope you check them out, as well as the Salesforce platform, which is growing more impressive by the day. And please let me know what you think.

What Ever Happened to Enhanced Computing?

FirstBookIt is hard to believe, but it has been 11 years since my first book,Building Intelligent .NET Applications: Agents, Data Mining, Rule-Based Systems, and Speech Processing was released.

In that book I introduced the term “Enhanced Computing”, to identify software programs that utilize AI-based technologies to improve and extend traditional line of business applications. This was actually the whole premise of my book. Unfortunately, the term Enhanced Computing never really caught on, but a lot of the technologies I wrote about in that book have continued to advance and show great potential to dominate the technological landscape of tomorrow.

One thing I found interesting is that in my book I also wrote about something called the “AI Effect“, in which people observed that once a technology becomes widely accepted it is no longer associated with AI. Most recently there has been an explosion in the media concerning IOT (Internet of Things) and machine learning. Both of these concepts are firmly grounded in AI, yet you rarely see AI mentioned when referencing them. AI Effect? Must be, I think.

I was very excited to see this article about What’s Next in Computing?, in which the author goes into great detail about how we are poised for another technological revolution in which he predicts that we may have finally entered the golden age of AI.At the forefront of that is machine learning (or Data Mining as I refered to it 11 years ago).

Machine Learning and the use of Neural Networks has long been of great interest to me so I was particularly pleased to see this recent article, The cloud is finally making machine learning practical. Even though the article focused on machine learning using Amazon Web Services algorithm’s and Microsoft’s Azure machine-learning service, I see no reason why the same things could not happen on the Salesforce platform.

After all, with the recent release from Yahoo of their News Feed dataset, which is a sample of anonymized user interactions in the news feeds and is over 1.5 TB (that’s right, Terabytes) in size, all sorts of things may be possible for researchers independently exploring deep learning techniques. Especially those fueled by the cloud (hint, hint, wink, wink).

There have also been many advances in image recognition, due to other advances in deep learning, which have suddenly thrust AI more into the mainstream. In this recent article on Why 2015 was a Breakthrough Year in Artificial Intelligence, a Google researcher states, “Computers used to not be able to see very well, and now they’re starting to open their eyes.”

In fact, just this week Mastercard announced it is offering a new security app that allows people to take a selfie in order to confirm their identity. It is called, “Selfie Pay”. Way Cool!!! I am pretty sure that one is going to take off soon.

EDIT on 2/29/16: And then, there was this announcement several days after I wrote this post that Salesforce acquires Machine-learning Startup PredictionIO. I am sure they just read my post and the hint, hint, wink, wink part and that is why they purchased them (LOL) Just Kidding, but talk about timing, eh?

So, here’s to the future of <whatever it might be called next>!!!


Who-hoo – The new Apex Interactive Debugger is finally here!!!

UPDATE on 3/1/2017: If you are interested in learning more about the Debugger, check out this Developers Relations Post. I would also suggest you check out this very interesting StackExchange Post, in which someone who has actually used the Debugger chimed in. FYI: It costs about $18,000/year.

Any Salesforce developer that has migrated from another language (especially .NET) knows that the debugging capabilities in are…ummm, how shall I put it?

They suck! Yeah, that’s it.

Well, guess what? As of Winter 16, Salesforce is offering a new Apex Interactive Debugger that will finally make developers of other platforms feel right at home.

I am talking about an interactive debugger that allows you to set, remove and suspend breakpoints. It also allows you to step in, step out, step over and through your code, as well as view variables at any point in the stack and also output System.debug statements to the console window.

This new interactive debugger is being offered as an eclipse plug-in (see image below).


Now, I must offer full disclosure right up front and tell you that there is one really big gotcha with this announcement and that is this:

It’s going to cost you. As in money. I would imagine a good amount of it too (although you will have to contact your Account Executive to find out exactly how much). Supposedly you can purchase debugger sessions that can be shared by your whole development team.

But why? Salesforce has always offered development tools for free.

The big reason for this cost is not because Salesforce is trying to make a lot of money off customers. It is to effectively limit the use of the tool. Because Salesforce is a multi-tenanted environment and resources are shared, if every customer all of a sudden was granted access to the new Apex Interactive Debugger, guess what would happen?

Crash!!!! as in all the servers lock up and no one is happy.

The Interactive debugger uses a debugger session manager and every debugging session is a transaction that can last up to 30 minutes. Each transaction needs a thread and a database connection. These are very expensive resources and in a shared environment, if every customer was able to do this, performance problems would quickly result.

Another thing to note is that the debugger uses the debugging API and at this time, that API is not publically available. This means that you will not find this kind of functionality offered in any third-party tools, such as MavensMate. Once Salesforce works out the kinks, they will likely release it publically, but in the meantime, the eclipse plug-in is the only way to go.

Also, for obvious reasons, this will only work on Sandbox orgs.

If you are a partner or a big development shop (now I am starting to wish I was one of those), then these limitations and the cost will likely not offset the benefit to having this super new tool. If you are interested in learning more, check out this Dreamforce video in which Josh Kaplan walks you through using the new debugger.

Happy debugging!!!!

UPDATE on 3/1/2017: If you are interested in learning more about the Debugger, check out this Developers Relations Post. I would also suggest you check out this very interesting StackExchange Post, in which someone who has actually used the Debugger chimed in. FYI: It costs about $18,000/year.