Come see me talk about SQL Server and Lightning Connect at Dreamforce 2015

LightningI am happy to say that I will be presenting again at this years annual Dreamforce, Wednesday September 16, 2015 at 9:15am. The session is titled, “Exploring SQL Server Azure Database Relationships Using Lightning Connect, and I should be in the Mobile Theatre in Moscone West.

Lightning Connect is what I consider to be a game changer in the world of Integration. It allows you to easily (and the key word here is easily) setup a real-time connection between your external data and Salesforce.

After setting it up, you can query external data from within Salesforce just like you would any other sObject. No exhausting setup of some overly complicated publishing/subscriber model (which is something I myself have unfortunately been involved with). No, you just publish your data as oData, setup an external data source in Salesforce, define some external relationships, and off you go.

Now, as with any new technology like this, there are a few gotchas to be considered. I will be covering some of these, as they pertain to setting up a connection to communicate with a SQL Server Relational database hosted on Windows Azure. The key takeaways I hope to communicate during this session will be:

  • What you need to know to work with Visual Studio and SQL Server Azure
  • How quick and easy it is to setup a connection and query data one-way in real time
  • What you need to know to define relationships in Salesforce

Hope to see you there!

Why Every Salesforce Developer should be using Trailhead

I have recently been using Trailhead to help me study for an upcoming exam and I have been incredibly impressed with how good it is. I have already posted about the Trailhead modules that cover new material, such as Lightning, but what I was surprised about was how useful it was for reviewing material that I thought I already knew pretty well.

Trailhead is definitely not exhaustive in it’s coverage, but what I like most about the modules is that they go over just the stuff you really need to know. And most importantly, they go over best practices. There are so many examples of inefficient and just plain bad code out there (even on some of the Salesforce sites I hate to say). The text and challenges in the Trailhead modules were well thought out and it is obvious they put a lot of time into developing them. It still Trailheadsurprises me that something this good is free, but fortunately for us, it is.

If you are preparing for one of the Certified Developer tracks, you really need to check out the Developer Trail. It covers a lot of what goes into the exams and the progressively harder challenges really solidify what you just learned. Unlike tutorials that you can just follow in your sleep, the challenges tell you to do something, but not how to do it. And, if you do not do it exactly right, you do not get the points. You actually have to THINK about what you are doing and this is absolutely the best way to learn.

And if you are a certified developer who has been doing this for several years, there is still stuff for you to learn, even when it comes to best practices. As we all know, this platform is changing constantly and that means that so are best practices.

And honestly, it is just fun seeing yourself rack up the points. I really like the WooHoo I get at the end of the challenge. I am proud to say I have 5 badges and over 12,000 points so far (with more to come). How many will you get?

Gotchas encountered when working with Lightning Connect and SQL Server Azure Databases

ILightning recently published my first article for DeveloperForce about Accessing a SQL Server Azure Database with Lightning Connect. I had a lot of fun creating the database and application, but I did encounter several gotchas as I was working with this fairly new technology. This posting lists some of the issues I uncovered while working with SQL Server Azure and what you can do to avoid the problems I encountered.

  • Adding firewall rules
    • DSL will likely change your IP address, so you will have to set this everyday most likely (unless you are fortunate enough to have a static IP address). You do this through the Set up Windows Azure firewall rules for this IP address link on the Quick Start page.
    • Connection may get lost occasionally, even though your IP address has not changed. If you start getting weird problems trying to publish, you can go back to Azure portal and click the Setup Windows Azure Firewall link again. Even though it is already added, doing this somehow refreshes the connection and will resolve your problems.
  • Connection String user needs to use an unrestricted DB user that has access to the Master DB. Refer to this article for more information http://www.odata.org/blog/got-sql-azure-then-youve-got-odata/. Real-world applications exposing their sensitive data via oData will need to take this into consideration and try to use a more restricted user.
  • If you try to use the latest version of the Entity Framework with web services, you will have to install some additional NuGet packages as outlined in the article. See article for more about specifics on that.
  • Depending on your internet connection, the initial publish may take a long time to complete and if you try to access the hosted website before then, you will get errors (probably that the resource cannot be found). Make sure the output in Visual Studio shows that the publish was complete and with no errors (such as a timeout error, which happened to me several times) before attempting to see the results online. If successful, a browser window should be spawned and you will be directed to the home page of your new hosted website.
  • Unfortunatley, Lightning Connect does not yet (and notice the hopeful word yet) automatically create relationships when you create your external data source. You will have to manually create these yourselves. It gets even more complicated in that you MUST edit the existing synced fields to create these relationships and DO NOT create new fields instead. If you do create new fields then you will encounter errors such as the ones I got and reported about here.  The error had to do with how I defined the external lookup relationship. I went to the external object definition page and clicked New to create a new field and then define the relationship. In order to avoid the error, you will need to instead edit one of the existing SYNCED fields and specifically Change the Field Type so that it is of the External Lookup Relationship type and that it points to the correct external table object. Then, you can perform your SOQL query and get no errors.

Let me know about your experiences with Lightning Connect. Despite all the above issues, I think it is a FANTASTIC new development for integration and I am excited to see it develop even further.

Check Out the New Lightning Trailhead Challenge

Last Dreamforce (Oct. 2014), Salesforce announced a new interactive way of learning all about the 2015-trailhead_icons-new-lightning_components_b1ikjyForce.com platform through a new resource called Trailhead. I have reviewed a lot of online training platforms and I have to admit that Trailhead is the best free online resource I have ever seen. And just last week, they released a new training module on how to build modern apps using reusable Lightning components.

What makes Trailhead, and especially this Lightning module so special is that it challenges you to complete exercises within your own development org. And most of all, the challenges are just that. Challenges. They actually take effort and thought. They are NOT just a step-by-step tutorial re-hash like so many online tools are (not that there is anything at all wrong with that style of learning).

They provide a list of specific end goals, but they do not tell you exactly what to do to accomplish them. You have to figure that out for yourself. Typically, you will have to re-read through the module material you just read, but it is possible you may also have to do a little side research to come up with a solution.

Each challenge takes about 30 minutes, but it may take a little longer if you are brand new to the material. And, each challenge gets progressively harder to complete, so they kind of ease you into it.

If you looked into Lightning and can see what a game changer it will be to mobile development, you really owe it to yourself to go through this training module and earn your Lightning badge. I am half way there myself. Let me know if you get yours and what you thought of Trailhead. Personally, I think it is amazing that Developerforce offers this kind of high-end stuff for free!

 

Great FREE online class about Lightning

SalesforceU, the people who bring you all the premier online and class-driven courses about Salesforce technologies, have just released a new online course that walks you through what you need to get started developing with Lightning. This is a beginner course, but since Lightning is so brand new this is a GREAT way to get up to speed quickly. Lightning

And in case you do not know, Lightning was announced at last years Dreamforce 14. It is a component-based development technology that allows Salesforce developers to build responsive Salesforce1 mobile applications quickly and easily – for any kind of device.

The only downside about the course is that it is only available through a paid Salesforce edition, so you will not be able to access it through a trial org or Development org. But, if your company has a paid subscription, then you can login and access it through the Help & Training Standard Catalog, or though this link.

Another important thing to note is that if you go to the link I just gave you, you get a listing of 6 modules that this course consists of. If you click any of the links, it spawns a new browser tab and starts that module. Unfortunately, the player does not let you go directly to the next module, so when you get to the end of a module, do not think that is the end of the course. It is just the end of that module. You will have to close that tab and go back to original tab that displayed all the modules to click the link of the next module.

The course is taught by Salesforce MVP, Instructor and Advanced Developer Don Robins, and he does a great job of stepping you through all the material in a way that does not put you to sleep. He starts slow and makes sure you understand exactly what Lightning is and what the implications of it are. He then takes you through all the specific parts that make up a Lightning application and explains in practical detail what you need to know. By the end of the course (which is a little over one hour), you will understand how to asynchronously bind to your Salesforce data in the back end, how to nest components to build complex mobile pages, and how to handle events so you can build interactive mobile pages that respond quickly to user input. He walks you through creating a mobile app that displays expenses and lets users approve them right from the Salesforce1 app.

If you are the type of person that learns best through videos and not reading through boring documentation, then this is for you. It is a great first step for learning about Lightning. I found it a lot more helpful than working through the Lightning tutorials at Dreamforce. Those were helpful at getting my hands dirty, but they didn’t really teach me much about the underlying technology, as this online course does. This course does a great job of explaining in detail how things work and puts all the pieces together.

So check it out and let me know what you thought about it…