In the video below I walk through all of these steps to migrate the local “todo” CRUD application created earlier to be fully hosted in Microsoft’s cloud. From there, we have a fully operational business application running on Office 365 with all custom code hosted in Azure.
Live walk through of hosting “Todo List” CRUD application on the Microsoft cloud. Continued from the first video where we coded a full local application, this video migrates the application front/back end to the cloud. HTTPS Breeze WebAPI endpoint hosted on Azure for the backend with HTTPS Office 365 SharePoint Content Editor Web Part for the frontend GUI end user experience.
Custom HTTP header was added for extra security as an application “client secret” which is required for the WebAPI middle tier to respond to HTTP traffic. Missing HTTP header will respond with “null” and not execute any Dot Net code.
Live coding walk through of a locally hosted “Todo List” CRUD application with Breeze WebAPI 2.2 middle tier and SQL Express relational database storage. This baseline allows developers to be more productive locally with fast feedback loops. Iterate code changes, reload test, and repeat. This technology stack can create sophist acted business application with input validation, advanced data schema, workflows, and more bringing in the latest web innovations from NPM and NodeJS.
Custom HTTP header was added for extra security as an application “client secret” which is required for the WebAPI middle tier to respond to HTTP traffic. Missing HTTP header will respond with “null” and not execute any Dot Net code.
In this video I used several components and want to share links for each:
With SharePoint 2013 and industry movement towards the cloud I’ve been exploring JavaScript as a primary way to develop rich applications.
One common challenge is data access.
With C# I have years of experience with [System.Data] and can perform CRUD against SQL relational databases in my sleep. Open connection, query, data adapter, fill DataTable, and voila! Muscle memory. Second nature. Tried and true methods. However, in the new client side JS world I had no clue where to begin.
People describe Breeze as “Entity Framework on the client in JavaScript” which sounds simple yet has profound implication for the developer. CRUD operations, LINQ style query, navigating primary/foreign keys, input validation, caching, batch updates, and more. That’s a lot to consider and new ideas take time to absorb. Breeze could potentially replace:
ASP.Net (ASPX) web forms
ASCX user controls
InfoPath forms
SharePoint web parts
WCF 5.6 data services
OData
Classic WebAPI
I set out to code an example with a few goals:
Create simple SQL schema (two tables – parent/child – one to many)
Execute CRUD operations in JS against SQL tables
Leverage JS plugins and NuGet “Install-Package” to load third party components
Install-Package breeze.webapi2.ef6
Install-Package breeze.angular
Install-Package angularjs.core
Little code as possible
The whole thing took less than 30 minutes and I edited video down to just 15. I was impressed by how straightforward and easy the process was. Breeze# in ASP.Net MVC for the back end WebAPI controller was nearly identical to the Breeze example code. Add one C# method per entity (SQL table) and Breeze does the rest. The JS front end took a little more time to understand but was also easy to apply. Connect Entity Manager to the Breeze URL and you’re ready for CRUD queries. Amazing! Given how easy Breeze is I would be hard pressed to use OData or manually created WebAPI controllers with C# code to query a database. If you can use Breeze, then use it! You’ll save lots of effort.
Please leave a comment if you found this helpful. Thank you!