Application Architecture

Like many of today’s developers. I started my IT career as a Flash Developer, and spend much of my time on learning new things from my senior friends, books and blogs about Flash Platform and get idea that there are lots of things to learn like Software Development Life Cycle (SDLC), Software Design Patterns, Coding Standards and many more. With expanding knowledge, I understand that architecture, frameworks and coding standards are important. Before starting discussion about application architecture, would like to share about preface for this post.

There are different technologies are available, we pick one technology, get knowledge for that, practice on that technology’. We live in technologies limitations or boundary and competing with other technologies. It is difficult enough to truly master a single platform. Of course many developers are experts in multiple languages, but mostly their knowledge and development practices of each language are different from each other.

For example, It you want to develop an application in two different languages (let say) Flex and Python. Your knowledge of Flex doesn’t give you any advantage for the Python application development. But I would like to say that knowledge of architecture or framework will help you here for the application development in both the languages. And that’s the reason behind the post on application architecture.

From a set of frameworks, I selected PureMVC as my framework of choice.

Before starting about PureMVC, let’s discuss about what is framework. As I understand Frameworkis a reusable set of libraries or classes for a software system, which follow some rules throughout the application. These rules are known as Design Patterns. So in other words we can say a framework is a collaborating set of design patterns. Frameworks are helpful as it give us the flexibility to implement the fastest solution to given problem.

Currently there are lots of discussions going on between Flash Platform & HTML5 features, development tools, and usage and development standards. But I think there is one topic ‘architecture‘ which is common and useful for all technologies or languages, application architecture/ framework is the heart of application standard, performance and scalability. Technology doesn’t matter for that. So  for the reference example, I have selected my favorite platform to explain application architecture. The Adobe Flash Platform is superb for developing rich experiences, including websites, games for web desktop and mobile users. From last few years lightweight, interactive run time has become the ideal choice for expressive media-centric web software. There is a major benefit of Flash Platform can experience as it has expanded to the desktop and well with Adobe AIR.

Goals of PureMVC

PureMVC is lightweight framework based upon well known Model-View-Controller design pattern. Main goals of PureMVC frameworks are:

  • To separate application’s coding into three different tiers: model (data), view  (UI) and controller (business logic)
  • For speedy implementation with scalability and maintainability
  • Reduce complexity from developer

Also one major benefit of using well known formal framework is common design patterns and way of adding development. From organizational point of view, usage of such great standard produce clean coding standard of applications and reduce dependency on developers, reduce knowledge transfer time for new developer. I think it’s a best and most attractive benefit of using standard and well known framework. Here are some reasons why I like PureMVC:

  • It is easy to learn, great documentation, samples and tutorials, easy to use and also easy to extend.
  • It facilitates loosely coupled application architecture (Publish and Subscribe- type), scalability, maintainability and portability for you application.

Developers agree that separating an application’s code into different part based on its functionality. These separations are three major areas: model, view and controller. Let’s have a quick overview of these terms: the model is for your data, the view is for user controls, user interaction, and the controller decides how model change when view is clicked and how view should updates when model updated. You can get basic idea about PureMVC framework from below conceptual diagram:

A forth singleton Façade, simplify development by providing single interface for communication throughout application. Below is the base overview of each singleton:

  • Model: manipulating the data model and retrieve data from remote services
  • View: mainly refer named mediators that adapt view component.
  • Controller: named mapping command classes, which are only created one needed.
  • Façade: initializes core singletons (model, view and controller) and provide a single interface for communications.

Will have to use Façade and other actor classes (like Mediator, Proxy/delegate and commands), to interact with singleton as shown below:

Note: In next Part, will update sample applications implemented with PureMVC framework using different programming language.

About these ads
  1. thegrincher
    April 6, 2012 at 7:49 PM

    Thanks for sharing Bharat. I’ve been a big proponent of frameworks out on linkedin, although I often get flamed for it. You’ve obviously reached a point where you understand the value of frameworks and not wasting time rolling your own solution when perfectly valid, documented solutions already exist. I look forward to reading more. Keep the posts coming!

  2. grimmwerks
    April 10, 2012 at 12:40 PM

    Big lover of PureMVC, and by extension, Fabrication for Flex (built on Multicore PureMVC).

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 101 other followers

%d bloggers like this: