Microservices : Reading List

Modern day businesses requires agility to survive and to be a leader. If you translate this business requirement into technology requirement, this means X Deploys a day (Time to market).

The big bloated, complex applications that we have built over a period of time is not allowing us to meet this X Deploys a day without compromising quality. If there is a way to decompose the big bloated monolith application blocks into smaller chunks it will help the business to extend, manage and deploy and eventually the X Deploys a day could become a reality.

How do we get there? Is there a way to achieve this? Microservices (lots of small applications) is one of the ways that could help in achieving this.

Microservices means developing a single, small, meaningful functional feature as single service, each service has its own process and communicate with lightweight mechanism, deployed in single or multiple servers.

Additional Reading List
The Twelve-Factor App

Microservices Reading List

Understanding Microservices

Microservices Architecture and Scalability

Microservices Patterns

Simon Brown’s Video : Software Architecture & Balance with Agility

Building Microservices
Software Architecture for Developers



ASP.NET Web API Vs WCF? What should i use for my project?

Microsoft defines ASP.NET Web APIs as

a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices.

ASP.NET Web API is an ideal platform for building Restful applications on the .NET Framework.

But wait… We do have WCF as part of .NET. So what is this Web API all about? When should I use this?

I was looking for some guidance to use during the solution process, but couldn’t find much help. After a bit of struggle, landed up in this web page which talks about features and when to use in detail.

From Microsoft Site

Enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them. HTTP only. First-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc. enabling wide reach.
Enables building services that support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them. Enables building Web APIs that support wide variety of media types including XML, JSON etc.
Supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security. Uses basic protocol and formats such as HTTP, WebSockets, SSL, JQuery, JSON, and XML. There is no support for higher level protocols such as Reliable Messaging or Transactions.
Supports Request-Reply, One Way, and Duplex message exchange patterns. HTTP is request/response but additional patterns can be supported through SignalR and WebSockets integration.
WCF SOAP services can be described in WSDL allowing automated tools to generate client proxies even for services with complex schemas. There is a variety of ways to describe a Web API ranging from auto-generated HTML help page describing snippets to structured metadata for OData integrated APIs.
Ships with the .NET framework. Ships with .NET framework but is open-source and is also available out-of-band as independent download.

In Summary

  • Use WCF to create reliable, secure web services that accessible over a variety of transports.  If you have an existing WCF service and you want to expose additional REST endpoints, use WCF and the WebHttpBinding.
  • Use ASP.NET Web API to create HTTP-based services that are accessible from a wide variety of clients. Use ASP.NET Web API if you are creating and designing new REST-style services.  Although WCF provides some support for writing REST-style services, the support for REST in ASP.NET Web API is more complete and all future REST feature improvements will be made in ASP.NET Web API.

Couple of Must Read blog entries on this topic


Happy Learning!!!

Single Page Application – What is it all about?

I heard the term Single Page Application for the first time sometime in March, 2012 from Vaidy. Though, I read a little bit about it at that time, I never thought it as something mainstream till the time I saw the new Hotmail application a couple of months back. my first impression was WoW. I am really impressed with the way Hotmail works now and IMHO it is much better than any of the email applications in the market.

So what is this Single Page Application (SPA) all about?
A single-page application is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience akin to a desktop application. The main aim of the SPA is to make the web application work seamlessly. All the necessary code is retrieved with a single page load and changing only elements on the page, depending on the actions taken by the user. The page does not automatically reload during user interaction with the application, nor does control transfer to another page.

How does this really help?
SPA is all about providing better user experience. It ensures a fine-grained control over the user experience as it eliminates network latencies and disruptions caused by page redraws, which result in a more native-app styled experience to the user.

Characteristics of a Single Page Application
• Almost no page reloads, UI built by JavaScript
• Most of the logic is executed on the client-side
• Richer Interaction between UI Components, which makes the web application work seamlessly
• No URL Change other than #
• Back Button works as expected
• Bookmark-able Links
• Ability to go Offline

Single Page Application

How does it really work?
The first time you access the SPA the application does the following
1. Downloads all the HTML, CSS and JavaScript.
2. Process the JavaScript.
3. Download the data from server.
4. Download templates needed to render the data.
5. Generate HTML from the template.
6. Inject HTML into the DOM.

I will try to post the following in the future posts

  1. How do i decide whether i need a SPA?
  2. What are the differences between SPA and Rich Internet Plug-In Apps?
  3. What is the technology stack should I choose for building my SPA?

Modern Web applications require different skill set. HTML5 and JavaScript will become the order of the day. IMHO, If you are already into this you will at least have a better mileage for the next couple of years.

Some Useful Pointers

Single Page Interface Manifesto
Building Single Page Apps with ASP.NET MVC4
Building Single Page Applications with RoR
Single Page Application Architecture
Single Page Application with Backbone.js and ASP.NET Web API
Sharepoint as SPA
Trello Architecture
Architecting Single Page Front end Applications
JS Web App Essentials
Single Page Web Apps with Backbone.Js

Happy Learning!!!

Responsive Web Design

Recently i was looking into Responsive Web Design (RWD), as i see there is a lot of momentum.

Responsive Web Design (RWD) essentially indicates that a web site is crafted to use Cascading Style Sheets 3 media queries, an extension of the @media rule, with fluid proportion-based grids (which use percentages and EMs instead of pixels), to adapt the layout to the viewing environment, and probably also use flexible images. As a result, users across a broad range of devices and browsers will have access to a single source of content, laid out so as to be easy to read and navigate with a minimum of resizing, panning, and scrolling.

Via : http://en.wikipedia.org/wiki/Responsive_Web_Design

I did not understand the full meaning of it until i started reading this book “Architecting Mobile Solutions for the Enterprise” by Dino Espito.

The essence of RWD is that when you are building websites for mobile, the size vary from device to device. Now how do we build a site which works with the different sizes?

A Responsive Web design is a client side solution which uses CSS for the Visual Characterstics and JavaScript for Behavior characterstics to build sites.

This means that you arrange webpages around a fluid HTML layout, which is then reconfigured and styled dynamically on the client using JavaScript functions in your pages. Your Javascript code, decides the browser’s capabilities and rearranges the page, apply styles etc.

Key technical features of responsive Web design:

  • Media queries and media query listeners
  • A flexible grid-based layout that uses relative sizing
  • Flexible images and media, through dynamic resizing or CSS

Via : http://msdn.microsoft.com/en-us/magazine/hh653584.aspx

Sounds very good. If you happened to have good javascript programmers, then its definitely worth looking into this.

Couple of good pointers

Happy Learning!!!!