20131218


Some thoughts, links and tutorials I used in my quest to build an MVC WEB WEB API With EF Framework
 Date:   Wednesday, January 30, 2013 10:44 AM


Tutorials:
Here is a nice, clean tutorial on MVC and EF (NOT with WEB API!!!):

http://www.itorian.com/2012/08/code-first-approach-in-entity-framework.html#.UCZ4Op0gd94

MSDN Tutorial on code first (Familiarizes you with Migrations, Data Motion, and custom SQL):

http://msdn.microsoft.com/en-us/data/jj591621.aspx

 And here is a database first tutorial (Again, NOT with WEB API!!!):

http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/database-first-approach-in-entity-framework/

**** Actual EF Code First WEB API Tutorial by Jason Zanders (Microsoft all star):

http://blogs.msdn.com/b/jasonz/archive/2012/07/23/my-favorite-features-entity-framework-code-first-and-asp-net-ewb-api.aspx

View and Layout Information/Tutorials:

http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-view

 Configuring ASP.NET WEB API - routing, global, service, per-controller configuration(Media Types, parameter binding, etc…) Tutorial and info:

http://www.asp.net/web-api/overview/extensibility/configuring-aspnet-web-api

 
WEB API Dependency Resolver (Dependency Injection) (Volatile Interfaces)

http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver


REST API vs RPC API - overview, best practices, and design articles:
***Josh Reuben - ASPNET WEBAPI REST *** EXCELLENT ARTICLE on best practices considerations:

http://geekswithblogs.net/JoshReuben/archive/2012/10/28/aspnet-webapi-rest-guidance.aspx

http://encosia.com/rest-vs-rpc-in-asp-net-web-api-who-cares-it-does-both/


Web API Testing Links:
http://blog.jonathanchannon.com/2012/11/29/asp-net-web-api-testing/


Routing and Route Constraints for ASPNET and WEBAPI:
http://www.asp.net/mvc/tutorials/controllers-and-routing/creating-a-route-constraint-cs

IoC: 
I abandoned NINJECT IoC Containers for dependency injection after experiencing numerous problems.  I decided to go with Microsoft Unity as outlined here:

http://www.asp.net/web-api/overview/extensibility/using-the-web-api-dependency-resolver

Instead of using the ASP.NET Unity Web API package, I used the new Unity MVC4 package via NuGet.  This worked extremely well and was much less cumbersome to implement.

ID Server:
Thinktecture ID Server: I'm still playing with this, but hav not yet put anything up into a production setting.  A good video outlining the basic steps in setting everything up:

http://vimeo.com/51088126

Other Notes:
StackOverflow comment regarding MVC-WEB API and EF

http://stackoverflow.com/questions/13408659/build-asp-net-application-with-web-api-and-database-first-strategy


Get the EF Power Tools from Microsoft (Very Useful!)

http://blogs.msdn.com/b/adonet/archive/2012/04/09/ef-power-tools-beta-2-available.aspx

If you run into connection and/or connectstring issues:

http://stackoverflow.com/questions/3218208/entity-framework-v4-code-only-connection-string

http://stackoverflow.com/questions/689355/metadataexception-unable-to-load-the-specified-metadata-resource

20131125

IoT, APIs, Apps and the morass of our present

So I've been spending an inordinate amount of time contemplating the current morass of software, apps, APIs, mashups, data protocols, and such out there in the Ether that are applicable to my industry (insurance).  For the past year I've been focused on learning as much as I can regarding BYOD, app stores, mobile, SaaS, PaaS, Cloud, APIs, Mashups, etc... and I've come to the view that this whole thing is quickly becoming an imbroglio for us all. 

Consumers have a plethora of options available to them and that is great.  Despite the fact many of us struggle with the volume and variety, I still largely consider this volume of choice to be good, not bad.  Everyday introduces new and interesting solutions to help us manage the ever growing number of apps and solutions we desire. 

And yet, for every new Cover App, a dizzying array of new Apps are brought to market each day. Each with their own idiosyncrasies, inconsistencies, and contrivances. For anyone who's been paying attention to the unfolding events in the technology universe comes the realization that we are fast approaching the cusp of a catastrophe.  The unwieldy volume of information and interfaces available through the ever-increasing multitude of vertical solutions, components, etc..., is out-pacing any one individual or organizational ability to keep up.  Further, the divergence of standards across App and API offerings makes interconnection optimization nearly impossible.

This past week while reflecting on the chaotic state of affairs we are facing, a colleague shared an article via LinkedIn by  regarding her musings on IoT and the complexities of vendor lock in when concerning the Smart Home.  I chuckled as I nodded in agreement while comparing her thoughts to my own regarding the insurance industry and the complexities faced in developing innovative new technology services for our customers.

 As Stacey astutely surmises: "The key question so far is: Is the connected home going to be a vertically integrated Apple-like ecosystem or an open system where data flows freely between devices in the cloud?" - Stacey Higginbotham 

This question takes on increased urgency and meaning when you look at the situation from the enterprise IT perspective.  The multitude of disparate vendor solutions available quickly overwhelms even the most tenacious of us.  Considerations of discoverability, interoperability, openness, algorithmic consistency, manageability, and  incalculable technical considerations/risks paint B2B technology purchasing and implementation decisions in an entirely new and worrisome light.



Sites such as Programmable Web, the Google Play Store, and Code Academy are making good faith efforts in making information available in an organized and meaningful way, yet the volume of innovative information and application offerings is outpacing their ability to keep up.  And let's face it, even if they could keep up with all of the publicly available APIs and/or Apps offered, their libraries are not going to help me with APIs available for my industry that are not publicly shared, nor are they necessarily going to provide me information on the latest Apps available to replace members of my current App stable. 

What's more, I doubt any solution currently available can tell me how the earned premium KPI calculation varies between MyFavAPI and MyOtherAPI, something I need to consider if I'm building solution bridges across verticals, and feeding a SaaS analytics solution expecting a specific approach.  Solutions such as Google Play Private Channel are a good start, but far, far from complete.  Industry needs much more.  Heck, I don't even know if the date format being provided from MyFavAPI is going to work seamlessly across all the devices I intend to support with Apps from our internal App store. 


And there again... just what devices am I supporting?  How many different code bases do I need to support to bring my RESTful API-enabled mobile App to my customers?  Am I really going to support 5-10 codebases to satisfy the 95th percentile of users and their devices in an austere era and deflationary budgets?  What if my best customer's device choice falls outside that percentile?  I read and his thoughts on the matter.  He has some interesting insights there from a technological perspective.  I'm not going to guess as to whether HTML5 becomes THE solution to our App management problems, it is too soon for such prognostications.  But I will state that the current hap hazardous approach is not sustainable.

So why are you reading this blog?  What do I suggest as a solution?  Well, I'll start by admitting that I'm not sure.  I've flirted with the idea of taking a step back in time when we talked about "industry standards" and attempt to apply such concepts to the problems of the day.  I've considered suggesting the creation of a "single source of truth" for our particular industry.  A clearing house if you will.  Perhaps an independent organization whose primary function would emulate that of the Programmable Web, yet specific to the industry.  Folks like Novarica try to fill this need through consultation services, and they are an extremely talented group.  There are inherent difficulties in outsourcing strategy development, which is what we are talking about here.  And while Novarica and the like offer some great services to the industry, I've yet to see anything like the "Programmable Web and App Store for the Insurance Industry" come from them, at least not yet.

So I close with the typical set of questions:  What do you think?  How does business navigate constant change and keep themselves ready to seize opportunity with so much tumult?  Would an independent organization whose focus would be providing a library of information and insight to industry specific technology considerations be redundant or just what is needed?  Is the "Programmable Web and App Store for the Insurance Industry" necessary or superfluous?  Could Novarica or other such service providers fill this need?

Just My Thoughts... I welcome yours...