Saturday, December 19, 2015

Object oriented programming needs Aspect oriented programming

Object oriented programming is a creating new era. It has been in Software industry for many years and given rise to great software products. It is loved by all the programmers who are using it. It is loved by programmers because its adaptive and it is continuously adapting good features from many other programming language. Like lambdas from functional programming is a big step and its very useful for every programmer using OOP. As C# has for long time but Java has adapt lately in java 8.

I have been always looking for new things in programming and I was googling around and found AOP. Accornding to wiki In computing, aspect-oriented programming (AOP) is a patented programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a "pointcut" specification, such as "log all function calls when the function's name begins with 'set'". This allows behaviors that are not central to the business logic (such as logging) to be added to a program without cluttering the code core to the functionality. AOP forms a basis for aspect-oriented software development. It is new ideas which is not replacement of OOP but it is the another way to write the code which removes all the boiler plate codes in OOP. It is very useful for Transaction, Logging, Undo/Redo etc. But this can be done without changing much of code. It is very easy to use. If you search for AOP and read in details you will find interesting and think its hard to implement. But no worry there are many frameworks which has implemented this concepts and make the life of programmer easy. Spring for java is life saving tool for the java developers and given developer opportunity to do modification of code without many changes. Also for .Net developers PostSharp has expand the area to use AOP easily.

Although there are these frameworks which is helping programmers to remove boilerplate code and expand the possibilities with OOP, but I think OOP should be inside OOP. Instead of using other framework it should be part of language java and C#.


References:
https://en.wikipedia.org/wiki/Aspect-oriented_programming

 

No comments:

Post a Comment