Wednesday, February 28, 2018

Patterns and Anti-Patterns in the Software Lifecycle

Patterns and Anti-Patterns in the Software Lifecycle

In the stages of software development, there are many methods used to rectify errors in the programming. Patterns and Anti-Patterns quite do the exact job. In the cycle of software development, there are series of common occurring errors and problems. To make a software reliable, robust, reusable and extensible, one uses patterns in order to solve common occurring problems.
Pattern in Software Development:
While designing your software, you will at some stage feel the problem of continuously occurring errors of the same type again and again. If you go on solving them personally, not only you will waste time but you will lose your concentration. In order to solve this, we use Pattern to remove common occurring errors in software design. Pattern can be reusable for a given problem as the problem can occur many times.
Design Patterns provide general solutions that may not fit with specific problems. Design Patterns offer tested and proven development paradigms that speed up the process of development of software.
Types of Patterns:
  • Algorithms Strategy Patterns: Solve high level algorithmic problems by exploiting characteristics on a computing platform.
  • Structural Design Pattern: This solves problems related to global structures of applications being developed.
  • Computational Design Patterns: Solve problems related to computation.
  • Implementation Strategy Pattern: Solve problems related to implementation source code that supports program organization.
Design Pattern has three classification known as Structural Patterns, Behavioral Patterns and Creational Patterns.
Anti-Pattern in Software Development:
Anti-Pattern is a counter word used to describe Patterns. In this, pattern that is frequently used but is ineffective to a problem and has gone wrong is called anti-pattern. Anti-Pattern is used mostly as viable solution to a problem but due to some reasons in gets wrong. If you apply anti pattern, not only the answer to your problem will be ineffective but it will leave you into a more complex and worse situation than you were before.
It is better to first recognize the pattern before you implement it for a solution while developing your software as it may lead you to nowhere.
Applications of Anti-Pattern:
Anti-Pattern is used in many circumstances and fields depending upon the need. It is used in social and business operations on different levels like Organizational, Project Management. In Software Engineering, it is used in Software Design, Object Oriented Programming, Programming, Configuration Management, and Methodological.
Anti-Patterns look to be genuine in the starting but may soon be ineffective and can lead you into complex situations and it typically has more of consequences than advanatges.
http://www.anarsolutions.com/patterns-anti-patterns-software-lifecycle/utm_source=blogger

Making CI Effective in Any Size Organization

Making CI Effective in Any Size Organization

CI or Continuous Integration is a term used in DevOps that allows real time integration of data into the central system of the organization. Earlier to t
his, integration of data took place once in a while by manual means and that made the organization less effective and deprived of real time developments.
Continuous Integration and its Purpose:
The sole purpose of Continuous Integration is to create real time environment for the team members so that they can execute their work in a more efficient way than before. In continuous integration, the team members update their data into the central computer so that the rest folks can also have access to it. The difference between CI and other integration method is that it is real time and automated while the others are manual and are dependent on the team member for updating.
Making Continuous Integration Effective in Any Size Organization:
CI can be effective if it properly fits into the size organization. There must be proper analysis, feasibility check, and excellent management and only then CI will fit well with size organization. For making a good team organization, you need to have hardworking, punctual and innovative people in your team. The utmost important thing is that your team knows how to collaborate with their teammates. The proper collaboration of team members along with distinctive, proportional and well mined work distribution is the key trait of any best team organization. If you have such a team then CI will be effective automatically.
Some Advantages of Continuous Integration:
  • Mitigating Risks: There’s a difference between your local working machine condition and the condition of that machine on which your product software will run. Sometimes it happens that the software which was working fine on your local machine works pathetically on your client’s computer. CI allows one to remove such problems by continuous testing and reexamining.
  • Builds Confidence while Negotiating with Client: If you have an effective test suite tjhat sort outs all problems and error then the level of confidence inside you excels. Continuous testing removes errors, bugs and other small mistakes and makes your software more robust and secured and that will help you in taking a lead.
  • Builds Better Communication making your work excellent: CI enhances communication level between your teammates and that helps in building the best software.
So if you want to build a software that has increased visibility, reduces overhead, mitigate risks, boosts confidence and makes your software effective and efficient then you should definitely try Continuous Integration.

Tuesday, February 27, 2018

Testing tools – JUnit and EasyMock

Testing tools – JUnit and EasyMock

In order to enhance the productivity of developer and the software, we use JUnit and EasyMock which are basically best choices for testing tools. JUnit is done by isolating a single component from the rest. The method goes in four sections and thus a cycle is completed. In case of EasyMock, it is the method by which one isolates the component from the rest of the system as all of them are dependent on each other.
JUnit:
JUnit is performed in four phases and is done in isolated components in a repeatable way. The four phases are as follows:
  1. Prepare: In this phases, the system sets up a baseline in order to test and it also defines the test result.
  2. Execution: The Test starts now.
  3. Validation: The system validates the result against the previous expectations or estimations.
  4. Reset: The whole unit is set back to the original way like it was before prepare phase.
JUnit is a popular framework that is used for testing purpose of isolated components as it has effective API.
Important Characteristics of JUnit:
  • JUnit is known to be an open source network for testing and writing codes.
  • JUnit provides test runners for running tests.
  • It gives you the facility of writing codes fast and helps you in running it.
  • Two bars are there in order to display progress and report. If the bar is green then the test is running smoothly else if red then test failed.Image result for testing tools
Overview of EasyMock:
Before we understand EasyMock, we need to understand Mock Objects. Mark Object facilitates the running and testing of codes by JUnit. To test a component, one needs to isolate it from the rest as they are interconnected and are independent to each other. The Job of Mock Object is to isolate the component and this is done by EasyMock.
EasyMock is a framework that creates Mock Object which in return isolates the component in order to run. After the creation of Mock Object, a proxy object is created which takes the place of real object.
Life Cycle of EasyMock:
  • Create Mock: In this phase, the mock object is created
  • Expect: In this, the expected behavior of the mock object is recorded and in the later phase, it is verified.
  • Replays: This phase replays the previously recorded behavior.
  • Verification: This is the last phase where the recorded mock object is executed and if passed then the phase is complete.
JUnit and EasyMock work in collaboration as both are interdependent to easy other. One needs to test components and the other creates viable situation to run testing.

Monday, February 26, 2018

Developing enterprise applications using Microservices Architecture

Developing enterprise applications using Microservices Architecture

Microservices Architecture is basically a distinctive method to d
evelop a software system. For many developers, this method has become a preferred tool for developing enterprise applications. Microservice architecture is given preference because it is scalable. It means that it supports variety of platforms and devices, especially internet, mobile, computer and wearable or if you are not sure what more you will require in such cloudy situation.
Characteristics of Microservice Architecture:
  • Componentization of system is a special feature in Microservices. It has the ability to replace each piece being independent from other. It is also the ability to replace part of a system.
  • Automation of infrastructure where continuous delivery being mandatory.
  • It provides the feature of decentralizing data management which means that there will be different database for each service instead of one database for the whole system.
  • It has smart end points and dumb pipes which eradicates the use of an Enterprise Service Bus.
  • Organization is based around business capabilities rather than technology.
  • The components here use simple methods of communication like Simple Restish protocol.
  • The facility of decentralize components where every independent component can use their standard method of development.Advantage of Microservice Architecture:
Microservices allow the developer to deploy and redeploy a particular component by redefining it. It also means that the components can be broken down into multiple pieces and can be used as independent component for different use without compromising with the integrity of the application.
Other Advantages:
  • In Microservices, codes for different services can be written in different language.
  • In case if one of the Microservice fails then the other will work and will have no impact. The process is called Better fault Isolation.
Apart from these, Microservice Architecture allows reusability and lots of scalability. This makes this method much more preferable than any other method. It also increases the autonomy of the developing team.
Disadvantage of Microservice Architecture:
The drawback lies in developing an independent system which may be very painful as one can have to write unnecessary programing codes in order to make it function. Transaction management and multiple database can be a painful process for the user. Thought the system under Microservices will be independent but there must some coordination between them and sometimes having independent components can make it difficult for the developer.
In the last, despite of drawbacks or other complexity, Microservices has been implemented by many organizations like Amazon, Twitter, PayPal, EBay and Netflix and many more. In the last few year, Microservices has seen huge rise in use which shows the level of success and its importance in today’s architecture industry.

Thursday, February 22, 2018

SAFe – Scaled Agile Framework

SAFe – Scaled Agile Framework

To carry out software development work, we use Scaled Agile Framework which is also known as SAFe. Most software development teams use scaled agile in order to boost the work quality, quantity, speed and productivity. Scaled agile and its whole framework is divided into three patterns; Team, Program and Portfolio.

Why one should use SAFe?

Scaled agile is an advanced method that is used in software development that overcomes many obstacles between the team. Here are few reasons why you must use scaled agile:
  • Scaled agile is simple, lighter and easy to use yet it gives immense efficiency and can expand as per use.
  • It enhances the level of productivity by 20-50% and that is why it is given prominence.
  • Scaled Agile also enhances the level of quality by up to 50% and more. Such benefits are rarely available in other agile frameworks.
  • It also enhances job productivity and job satisfaction. The major role of agile framework is to create a balance between the teams that are opting different fields but have the same goal.

When is the need to use SAFe?

We basically use scaled agile when the team is working independently. The other reason is quite similar like when the team is working on different aspects of agile implementation. However, they are facing constant and severe obstructions and obstacles then we use agile framework. While working on a large board we use scaled agile as it synchronizes the whole team into and brings them on one board. The other important reason is rise in productivity and quality of work.

Advantages of SAFe:

Scaled Agile offers many advantages for users and some of them are mentioned below.
  • Scaled agile is available for free and is very approachable and easy to implement.
  • The framework is in usable form and is easy to implement without much complexions.
  • Scaled agile is more practical and specific rather than being complex. User knows where to implement it and how to implement it.
  • It offers complete picture of software development which makes it easier for the developer.
  • Scaled Agile promotes transparency at all levels making it more suitable for teams.
  • Apart from this, scaled agile constantly evolves itself making it more robust day by day to ensure efficiency and quality.
Like every other software framework, scaled agile has various reasons to be criticized. The over simplified way of approach makes it mediocre for the developers. The one size fit all approach also portrays the feeling that everything is ok and nothing needs to be changed whereas change is the constant phenomenon. These reasons yet are nothing compared to its advantages. One can say that presently agile holds high ground and is suitable for use.

Exception Handling Best Practice

Exception Handling Best Practice

The process that responds to the occurrence of exceptions while computing is called Exception Handling Best Practice. This process often alters the working out or execution of any program and implements specific operating system, language of programming along with computer hardware. In other words, this process interrupts the continuity or lucidity of a normal and regular flow of operations and carries out instructions which had been registered previously. The handling of an exception for a certain program dependsentirely to its configuration of either a software exception or a hardware exception. Exception Handling Best Practice offers almost the same as error checking, however it does not allow the smooth and uninterrupted flow of a program. The very first exception handling was observed in a programming language, Lisp, as early as in the 1960s and 1970s. It has eventually emerged and evolved as a significant operation with new approach and demands.
Advantages of Exception Handling:
  • Unlike the traditional custom of handling errors and glitches, exception handling provides with the advantage of simplifying complexities of a program. It offers one to read a program without much effort like the tradition system as language is very distinct.
  • With the incorporation of a singular exception handler it is possible to handle several errors which are similar to each other. Considering one of the errors as a class parameter, other errors are dealt comparing with it.
  • Exception handling has a very crucial advantage over the traditional error handling. This is because it can propagate or channelize all the errors to a certain situation where they can be easily handled.
 Disadvantages of Exception Handling:
  • Since exception handling is too keen to deal with the ‘normal flow’ of a program, it mostly abhors the possibility of the generation of the code for error handling.
  • There are no garbage collectors which are built-in and thus, exception handling may often result in the leakage of confidential resources. This might eventually block the working procedure of a running program.
  • Exception handling has resulted in its exploitation as it offers to propagate errors in the desired direction to be handled. People tend not to follow the rigorous process of the traditional method and put exceptional handling in use as much as possible.

 Conclusion:
One has to be meticulous enough to implement exception handling; this is because there are certain cases where the traditional method may prove more fruitful. However, Exception Handling is one of the best error handling procedures to be used in codes. Its checks, navigates and resolves certain errors tactfully and helps a programmer to execute his work without being obstructed.

Wednesday, February 21, 2018

Duplication of code – importance of eliminating it!

Duplication of code – importance of eliminating it!

Software development is a collaborative process and developers often struggle with the duplication of code.
Duplication occurs when multiple developers are working on a software project simultaneously but on different tasks or modules, and hence they are not aware if similar code is already written by other developer and then they end up writing the same code again. Another big reason is copy paste of the code by the developers resulting in either basic or parametric literal duplication. Developers often reuse the already available content under pressure of time and want to avoid intellectual strain on them. They often clone the code and then adopt the same either unintentionally or they are not aware of how to avert or get rid of it. At times, renaming of variables, changing values, inserting or deleting code fragments are followed with intention and then detailed design is not modified resulting in duplication of code.
Taking everything into account, there are three simple kinds of duplication that we can remove from our code that productively shape up on each other.
  • Data Duplication
This one is the most basic type and is easily identifiable. This type of duplication can be eliminated by generating a way that parameterizes the alterations characterized by that data.
  • Algorithm Duplication
To not repeat this type of duplication, it is mandatory to have a thorough knowledge of delegates and functional programming, as using delegates builds a much simpler method and casts the problem in the same light as refactoring any other kind of data.
  • Type Duplication
A lot of times, the two methods that do pretty much the same thing, however, they just vary on the kind they operate on results in type duplication. Just like data, this duplication can be eliminated using generics to refactor out that type info.
For instance, imagine a functionality is tweaked a bit and that code is used 50 times in the project, now you will be required to go and make that small change 50 times to ensure the change is reflected at all places. Another classic example is bug fixing, developer may not be aware of duplicate code available in the project and might go and fix the bug at one instance as reported.
How to get rid of duplication?
Code duplication is important factor for high maintenance cost, and this problem is present in all medium to large software projects. Usage of Code duplication detection tools, Open source and Proprietary, can help to identify and fix the problem.
Conclusion:
Duplication has become a norm and you may get it in the code, and like we use various tools to test the performance of the project, it has become essential to get rid of duplication using the available tools. This will make your code shorter, easier to understand, and can be maintained without any hassle.