Recently I had to start using a different language (Python) to maintain an existing project. It made me appreciate the role micro-frameworks have played in my adoption of new languages of late, by late I mean the last few years. This article explores what role they play and how that can help in the immediate adoption of a new [syntax] language.
What is a micro-framework
The frameworks are much of a much-ness very similiar in there construction and patterns. These frameworks tend to consist of / specialise in a single part of a normal application (routing), and often achieve that goal in simplistic and similiar ways. They generally encourage building small, tight and loosely coupled components that can then be assembled quickly by the developer and often driven from a single file.
Ease of understanding is by far the most common feature of most micro-frameworks, they contain significantly less code, fewer features and little complexity so they offer an unparalleled opportunity to understand how a minimalist implementation of a solution to a problem might be approached.
Getting a RESTful web application up-and-running is a fairly trivial task with most frameworks and these micro-services are an increasingly popular application architecture in enterprise infrastructure, as they allow for rapid development, smaller code-bases, enterprise integration, and descrete deployable packages
They tend to be delivered through Domain Specific language implementations, examples of which are Sinatra (Ruby), Silex (PHP),Flask (Python), SpringBot (Java), Nancy for .NET etc etc.. just google you will find lots.
According to the Thoughtworks technology radar (and those guys know a thing or two) they are something you should be adopting in your organisation.
How have they have often helped me learn a new language
The similiarities of structure help understand the architecture quickly. The formulaic nature of the process of routing and responding to http requests means regardless of language the concepts are similiar and more often than not the DSL implementations offer similiar syntax. Removing the barrier of how do this work allowing me to concentrate on how I do domain specific logic in this language.
The ease of deployment makes failing fast a feature. Most of the frameworks are equipped with in-built servers, or lean on middleware modules, so running them is a simple as executing a file and navigating to localhost.
You are encouraged to write simple code.The modular nature often means you are encouraged to stand on the shoulders of others and the code you write tends to be very simple.
They are fun. Fun and fast means a project can be achieved quickly and results are immediate.
So I thoroughly recommend next time you want to pick up a language or achieve something quick in your language of choice pick up a micro framework it will be fun and fruitful.