Wednesday, October 17, 2007

Application Blocks

While developing an application, even a very simple logic can be accomplished in variety of approaches. Finally it is up to how effectively or efficiently the logic is implemented. Whether it is a direct approach, has leveraged and squeezed much of the facilities of that programming language and architecture, can withstand and easily provide rooms for changes and enhancements, whether it is easily extensible etc…
In Software development, specific customer segments have common needs at a higher level of abstraction. The platform does not always directly support these without a lot of manual work.

Application Blocks are such code libraries which is build up on optimized design patterns against common programming scenarios which need to be done in almost every application. Thus it provides the platform suitable for a wide variety of application types and architectures.

A good Application block should :

Enforces consistent development patterns

Provide a good level of abstraction between the business logic and the common scenario which is implemented in the current application block, so that we can easily plug this into any application
Should provide extensibility points that let developers tailor the application block to suit their needs. The most common use of extensibility points is to allow developers to use their own providers
It should provide good performance
Provide proper kind of guidance regarding the implementation
So before development choose your appkication block wisely :)

Wednesday, October 10, 2007

Service Oriented Architecture (SOA)

A service-oriented architecture (SOA) is a collection of services which thus lead to automation logic. These services may or may not communicate with each other to accomplish the application task...

When we say services, it refers to a discretely defined set of contiguous and autonomous business or technical functionality. A service is much like a function that is well-defined, self-contained, and does not depend on the context or state of other services. In fact, they just provide/offer a service by it’s own.

The term service oriented approach is not new; it is there from the long olden age of COM /DCOM and still survives and finds its existence in the software architecture space. Recently Microsoft has used this approach to design and implement WCF (Windows Communication foundation formerly known as Indigo) in Microsoft .Net framework 3.0

In an SOA environment independent services can be accessed without knowledge of their underlying platform implementation or other internal details which helps us greatly in interconnection like scenarios.Normally in this scenario, there will be a service consumer or service agent sending a service request message to a service provider. The service provider returns a response message to the service agent. The request and subsequent response connections are defined in some way that is understandable to both the service consumer and service provider
One of the other features of this approach is that the client is not tightly coupled to these services, both the client and services are independent of each other, thus the client is free to interact with whatever services are required

Tuesday, September 11, 2007

Architecting Software

Nowadays software architectures are getting a lot of attention. It surely is critical to today's business success, yet it requires technical, business and organizational talents. while things are getting more and more complex, a software built upon a wise strong architecture can survive any sort of change that come from time to time

Software architecture is commonly defined in terms of components. and almost all softwares contains database components as well as buisiness components. database being the databearer should have a good data model and design and will be well fine tuned by dba or other experts in database concepts

One of the Axioms from Scott's Axioms of Programmings says

Writing more code leads to more bugs, which leads to a longer development cycle, which leads to higher costs. Therefore, a minimalistic approach should be taken to writing code

Tuesday, June 26, 2007

A Singleton thought

Here I am depicting a small and very simple pattern, the most familiar singleton design pattern. when we say singleton it should not create more than one instance at any point of time and there by it should ensure a class has only one instance and provide a global point of access to it.
So, below is an example.

class Singleton
{
// Static members are lazily initialized.
// .NET guarantees thread safety for static initialization
private static readonly Singleton instance;
// Note: Constructor is 'protected'
protected Singleton()
{ }
public static Singleton Instance()
{
return instance;
}
}

We are giving a protected constructor because the derived classes also should be able to instantiate this, then only they can derive or else if we use a private constructor the derived class will not be able to instantiate their failing in execution. In other words it will indirectly provide or behave as a sealed class, a perfect singleton

Friday, June 22, 2007

An initial design thought

This is a small introduction to Design patterns. Design patterns are solutions to software design problems you find repeatedly in real-world application development or in other words, it is solutions to commonly encountered programming challenges. It describes about design and interaction of objects which are mainly comprised of reusable object-oriented elements. It is a description or template for how to solve a problem that can be used in many different situations Thus it can be considered as parts providing a strong foundation in building good software architecture which will make room even the future changes very easily

Most novice developers think design patterns as an insignificant clutter. But actually speaking it is a very powerful paradigm in the world of software architecture which will bring us proven defect free results. It can really speed up the development process by providing tested, proven development paradigms if you use it in a proper way, I mean in an exact context, domain.

Effective software design requires considering issues that may not become visible until later in the implementation. Reusing design patterns helps to prevent subtle issues that can cause major problems and improves code readability for coders and architects familiar with the patterns

Design patterns deal specifically with problems at the level of software design. But when I say Design patterns are very powerful paradigm in the world of software architecture, you must not confuse it with architectural patterns.
Architectural patterns are software patterns that offer well-established solutions to architectural problems in software engineering. A pattern describes an optimal solution to a common problem within a specific context of an application. To differentiate, we can take an example of Publisher-Subscriber pattern and MVC (Model-view-controller)

Here Publisher-Subscriber pattern is a design pattern where as MVC is an architectural pattern build based upon on the Publisher-Subscriber pattern. For an instance example of MVC we can say that applications like MS word, visual studio editor. SQL query analyzer will be using this architectural pattern as its base.

Design patterns can be classified mainly into any one of the following.

Fundamental patterns – basic building blocks like composite patterns
Creational patterns – which deal with the creation of objects like Builder, factory etc
Structural patterns – that ease the design by identifying a simple way to realize relationships between entities.
Behavioral patterns – that identify common communication patterns between objects and realize these patterns.