Posts

Showing posts from December, 2014

Spring Integration - Introduction

Image
In this blog post and the subsequent post, I'm going to write about Spring Integration and also share my experience in using Spring Integration in a live project.

To begin with, I will provide a brief introduction to Spring Integration framework and in the next post I will show how to apply it.

Much of the content of this post is taken from the Spring Integration official website Spring Integration Reference

What is Spring Integration?Spring Integrationis a Spring driven framework which supports message driven architecture and provides routing, transformation of messages and implements the common Enterprise Integration patterns, more importantly the "Pipes and Filters" pattern.
What is Pipes and Filter Pattern?This is an Enterprise Integration pattern, which is applied, if multiple processing units are required to process a message and we need to increase reuse and also achieve decoupling.
The "filters" represent any component that is capable of producing and/or con…

HTML5 Canvas - Basics

Image
In this post we will take a look at the HTML5 Canvas element and how to use it.


What is canvas?HTML5 canvas element provides platform to draw stuff on it and also animate them.

How to create a Canvas?Canvas is a html5 element, which is created as below:
<canvas id="mycanvas" width="578" height="200"></canvas>
How to get a handle to the canvas?In order to draw shapes or write text into the canvas, we need to get a handle to the canvas object. This could be done in javascript as below:
<script>      var canvas = document.getElementById('myCanvas');      var context = canvas.getContext('2d');  //TODO</script>
Entire html code:<!DOCTYPE HTML><html>  <body>    <canvas id="myCanvas" width="578" height="250"></canvas>    <script>      var canvas = document.getElementById('myCanvas');      var context = canvas.getContext('2d');      //TODO    </…