Step One: Create a SQL Server Azure Database (Post 1 of a 4 part series)

At this years annual Dreamforce conference, I had the honor of speaking about SQL Server Azure Database MeSpeaking2relationships using Lightning Connect. The talk was based on an article I wrote for DeveloperForce earlier this year titled, “Accessing a SQL Server Azure Database using Lightning Connect“. The original DeveloperForce article detailed the steps for creating a WCF Data service that exposed a single table SQL Server Azure database as OData.

This post will be the beginning of a 4 part series in which I will step you through what is necessary to expose and access a multi-table SQL Server Azure database with built-in relationships. These steps were covered at a high-level in my talk , but in this series, I will go through each step in greater detail. The steps will consist of the following:

1.) Create a SQL Server Azure Database (covered in this post)

2.) Create ASP.NET application to expose data as OData

3.) Publish Web Application to Windows Azure

4.) Create External Data Source and Define Relationships in Salesforce

TIP: Click here to access the code from this post, along with the Powerpoint slides from my talk at Dreamforce.

Step One: Create a SQL Server Azure Database

You will need a Microsoft Azure account to create a SQL Server Azure database, but you can sign-up for a free one-month trial through the following link. You will also need a way to build the database. If you do not have access to Microsoft SQL Server Management Studio, then you can use the built-in SQL Server tools that come with the free Community version of Visual Studio.

But the first step is just to create the database and the simplest way to do that is to go to the SQL Databases tab in Windows Azure Portal and click the big plus sign next the word New in the bottom right-hand corner of the Portal. Click Custom Create and enter a Database name along with a secure login name and password.

After the database server has been allocated, you can click here to download the latest version of Visual Studio, 2015. Keep in mind that it will take quite a long time to download and install. If you don’t want to wait, you can use an earlier version of Visual Studio, such as Visual Studio 2012 or 2013 (with latest update), but just NOT Visual Studio 2010.

Once installed, you can access it from the Windows Azure Portal by clicking the Open in Visual Studio link at the bottom of the database quick start page (see image below).

PetSuppliesPortal

When you click this link, you should be prompted to add your local IP address to the Windows Azure firewall rules. Go ahead and click “Yes”.

One thing to be aware of here is that unless you have a static IP address, you will need to do this every time the address changes (which for some DHCP environments could be daily). This is done by returning to the quick start page and clicking the Set up Windows Azure firewall rules for this IP address link under Design your SQL Database.

TIP: If you know the allowable range of IP addresses you might be assigned, you can configure a range of IP addresses in the Azure Management Portal by going to SQL Databases and selecting the link for the server that your database resides on. From there, select the Configure tab to enter a new rule with starting and ending IP address.

If you are using a browser such as Chrome, you may also be prompted with an external protocol request asking whether you want to launch the application. Go ahead and click Launch Application. Doing so will launch the Visual Studio application and open up SQL Server Object Explorer. The first time you connect, you should be prompted to enter the login name and password you specified when creating the database in Windows Azure Portal.

Once connected, you can use the SQL Server Object Explorer to add tables and data to your new SQL Azure database. If you prefer the point and click approach, you could create a new table for your database by expanding the Databases node, followed by your specific database and then right-clicking Tables and clicking Add New Table (see image below).

SQLObjectExplorerNewTable

If you are more comfortable working with SQL script, you could right-click on your database node and select New Query to bring up a window where you can type or paste in SQL script directly. Once entered, the script can be executed against your SQL Server Azure instance by clicking SQL | Execute.

Click here to see the second post in this four part series.

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…