Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Monday, July 5, 2010

DCI -A better OO paradigm?

DCI(Data Context and Interaction) has come up as a paradigm to guide you back to the essence of oo(Object Oriented) programming. Then the natural question is what is wrong in the way we perceive OO now?.Well there are a lot .The main problem is OO is designed to capture the end-users mental model in a computer.Are we really successful in using OO in that way. Definitely not.what we are trying to do is to build software on the four basic pillars(Abstraction,Encapsulation,Inheritance and polymorphism) that we believe as the base of OO design. In addition to that we have identified so may concepts like coupling,cohesion ,design patterns,AO(Aspect oriented)programming,DDD(Domain driven Design) etc. What are we really trying to solve here and why we have these many paradigms?. Please watch this video and you may not get all the points the speaker is trying to explain. Thinking in a different way is always difficult especially in the programming world where we are getting trained to follow the so called best practices and design principles. It is better refresh the mind sometimes ! .I am planning to have a separate post on DCI later, once I get a clear idea on practicing DCI.

Video
http://www.infoq.com/presentations/The-DCI-Architecture
Other References
http://www.artima.com/articles/dci_vision.html
http://blog.jaoo.dk/2009/03/04/handling-architecture-in-the-agile-world/
http://vimeo.com/8235574

Saturday, April 10, 2010

Four trends that developers have to concieve for the next decade

Past two decades were very exciting and important for software developers and we saw web(www) emerging as a dominant platform for computation and communication.We also witnessed different trends like distributed computing and service orientation gaining popularity.Looking at recent years I am pointing to four exciting developments that is going to challenge the developer of the next decade.

Cloud
Cloud is going to redefine the traditional software development platform.Here are some points.

1) Abstraction over Deployment platform
Developer is abstracted from the platform(hardware,OS,Server etc) where the application is going to be running. But he need to be aware of the Cloud provider's platform .Since everything is available as per "pay per use" policy applications needs to be optimized to use less resources as possible.
2) Abstraction over data storage and usage
Since data will be available as services ,he need not be bothered about the underlying implementation,but only needs to know the API's to retrieve the data from the service provider.Scalability will also be addressed by the provider
3) Changes in traditional software development life cycle
The development life-cycle for the cloud is going to be different from traditional one.The builds and releases should be aligned to the targeted cloud platform
4) Security and Dependency on specific cloud platforms
These are contentious issues that developer have to be aware of and the design should be optimized to minimize any impacts.Security in the cloud is different from the traditional environments and no standards have been evolved right now.The applications should be developed in such a way that it should be easy to switch to a different cloud provider if needed.

Emergence of multiple platforms

PC is no more the dominant platform for applications in the coming age.Alternate platforms like Mobile and other hand-held devices like Ipad,e-readers etc are also becoming much more popular.For eg. Iphone and Android have already become popular platform for developers.It is becoming more important that applications should be made available in multiple platforms to reach out to more users.So it is time for developers to gain understanding of multiple platforms.

No Sql Alternatives


The dominance of RDBMS is getting challenged and everyone in the industry is getting the understanding that RDBMS as a one size fit for all is not a good idea. RDBMS is designed with ACID compliance as a principle ,but not all the real systems need full ACID compliance and also have problems to address like performance ,scalability and availability.So alternate implementations gained attention in recent times and many companies are moving to a better no-sql alternative which suites their application domain.

Functional Programming

Fuctional programming(FP) is gaining more importance as better paradigm for concurrent applications. Due to the emergence of multicore processors it become the duty of applications to be more concurrent to make maximum use of multiple cores.FP also helps programmers to code in higher level of abstraction and helps to reduce duplication of algorithms and in program correctness. Mainstream languages are adopting functional programming features like closures,functions as first class objects and immutability . Languages like ruby,python,C# has already adopted many of these features and new languages like scala,F#,Clojure have come up with strong functional programming support.

Thursday, January 7, 2010

Why I started learning Scala ?

Recently I started learning Scala language.I have been working on java for the past 4 years and is quite satisfied with it.I am also sure java is going to stay there for a long term against all the criticisms and hatred of those dynamic language advocates. Java gives me lot of confidence to take a problem or project as I am sure there will be a solution in java for everything. As a new comer it may be confusing as java gives you a lot of options and it is difficult to choose the right approach or solution ,but as you mature you enjoy the freedom and power it gives .It is especially because java's open source nature and availability of lot of open source libraries and frameworks. Look for example how many web frameworks you have in java.

Recently we saw emergence a lot of jvm languages which according to me strengthens the java language platform. The important among them are Jruby,Jython,Scala,Clojure and Groovy Jruby and Jython are JVM versions of Ruby and Python respectively ,which are two powerful dynamic languages. They helps lovers of those dynamic languages to stick to that platform and at the same time leverage the power of JVM,the most tested, trustworthy VM platform. Groovy ,Scala and Clojure are developed independantly and among them scala attracted me very much and I decided to learn scala .This is mainly because I felt any need of learning any of the dynamic languages in JVM as java gives me what I want and I am confident with that. But when looking at Scala I saw some interesting stuff and felt it is worth to learn that. I am listing down some of those features.

1) Functional programming
Scala support for functional programming attracted me .As of now I didn't think much about the style of programming I followed and the debate over Imperative or functional programming in scala groups pushed me to take a deep look at functional programming aspects. Scala being a multi-paradigm language leverage the power of both functional and imperative approaches.
2) Type inference
Scala is strongly typed language and at the same time it has something called type inference by which it infers the type of a variable and relieves most of the burden from programmer.
3) Actors
Actor is a more advanced way for parallel programming instead of using threads and locks which is very low level and difficult to use for programmers.
4) DSL support
DSL (Domain specific languages) are gaining popularity and scala offers a power full support with its parser library.

I will try publish detailed notes on each of these as I progress ,but the interesting point is
that it forced me two look deep at some basic concepts of programming which I consider very valuable as a programmer.