miércoles, 21 de octubre de 2015

Comments on "Dependency Injection Pattern"

In the article Inversion of Control Containers and Dependency Injections pattern, the author presents to fundamental ways in which we can eliminate dependencies between a given a class and its implementation, this is called a Plug in and its a very useful too to add into our projects when trying to improve functionality. Some important plug ins mentioned in the article, are the Dependency Injection and the Service locator, but these are just some of the plug ins that are available and other ones can be useful as well but but other type of problems and solutions.

The configuration of the assembler can vary within criteria and tastes, from what we could read in the article, there are two main configurations available, the programmatic interface and the XML configuration type of solution.

In the XML configuration, it starts with a file, but it soon becomes problematic when trying to assemble, the best way to eliminate this issue is by using programming code to improve the performance of such configuration an avoid adding complexity to our development.

Implementing a flexible solution is of huge importance in the real world, it determines how easy it would be to change how the system works to another configuration without going through a lot of trouble. Developing Flexible projects with flexible configuration is key to a good quality software.

Systems always depend on other things, and its up to the developer to make such dependencies flexible and manageable.

Plugins are great solutions for theses kind of dependency problems, when usually the plug in has a prepackaged set of instructions that will deal worth a given issue or problem that was generated as a cause of a dependency.

As programmers, we must avoid developing software that depends a lot on complicated modules, instead, we should focus in developing flexible and easy configurable software.

miércoles, 14 de octubre de 2015

Comments on "Understanding the SOLID Principles"

The definition of the “Solid Principles” is a set of principles and practices that aim to improve and have better practices in the development and creation of classes and the creating of instance objects of a class. These practices are not always the same, and depend of the type of object we want to create, in some cases such practices may vary.

Solid doesn't refer to the conventional meaning of the word, it is actually a game of letter, which represent some principles know in the computer science community.

The first principle of the “Solid Principles”, is the SRP principle, which focuses on the development and verification of classes that must have certain responsibilities and will make a better understanding on which their responsibilities are. This principle prevents that any changes made to a certain class may affect other independent class in a given project.

The next principle of the “Solid Principles” is the OCP principle, which says that any class and/or function should be available for other classes to extend, in order to write unnecessary code and duplicated code. The class must be adaptable for modifications of any circumstance given.

The next principle of the “Solid principles” is the LCP, this principle establishes that classes must be able to be interchange, where two classes have a common parent or inheritance, this will permit flexibility in our projects.

The fourth principle, is the ISP principle, which says that is better to have a lot of interfaces doing certain processes that to have one interface doing a lot of tasks.
The last principle is the DIP, which says that a class must have to use abstraction in order to avoid having dependency between classes, which makes the relationship between classes much more free and natural.


These principles if applied in a correct manner, will make classes a lot more efficient and therefore better programming projects.

miércoles, 7 de octubre de 2015

Comments on "Inversion of control"

Inversion of Control is another way of thinking about the interaction of a certain flow of actions of a piece of software are not always controlled or not necessary in control of the programmer, in which case the program acts in some cases by itself doing things without human intervention.

These automatic behaviours are often defined by another piece of software, a clear example by this can be a framework, in which the instructions and set of pre charged modules of the framework will determine the actions and the moment in which certain instructions will be called and take the role of controlling the applications activity and behaviour in an automatic way.

This, in a simple sense is a king of artificial intelligence, some pieces of software work by themselves without the need of human or the programmer’s intervention.

There is another very important concept mentioned in the article, which is Ioc, this concept is fundamental to understand how it is possible that a framework can act by itself and make decisions on its own, in order to determine when to take action an execute certain sections of our program. It makes clear, which is the difference between a framework and a library, and explains that a framework is capable of calling code from a certain source, and a library is simply the definition of any needed functions in order to make a piece of software work by extending certain functions and classes.

The Ioc method becomes quite useful when we involve the template method pattern, in the situation where a super class defines the flow of events and controls how a program will behave in a given scenario.


Some things are meant to be done in an automatic way and this king of tools become very useful, when quick and automatic decision making is crucial.