Introduction to Application Framework

D.A.C.N.Jayashantha
4 min readFeb 24, 2022

--

What is Application Framework?

An application framework is a software library that provides a fundamental structure to support the development of applications for a specific environment.

S.O.L.I.D.: The First 5 Principles of Object Oriented Design

S.O.L.I.D. is define for the first five object-oriented design (OOD) principles by Robert C. Martin (also known as Uncle Bob).
  • S — Single- responsibility Principle(SRP)

SRP defines a class should have one and only one reason to change, meaning that a class should have only one job”. Function, module, API also considered under this. As a example refer the below code segment: This shows to get html and JSON outputs of area calculation, we need to implement 2 separate classes.

Consider the above class square. In order to find area of different shapes, we need to create separate classes.
Class implemented in order to get JSON formatted output. In save way we need to implement class AreaCalculator class to get respective HTML output.
calling 2 separate classes in respective objects.
  • O — Open-closed Principle

Under this, Objects or entities should be open for extension, but closed for modification, means class should be extendable without modifying the class itself.

  • L — Liskov Substitution Principle

This means that every subclass or derived class should be substitutable for their base or parent class and helps us model good inheritance hierarchies. This principle can be simply illustrated by below figure,

In this examples all the shape objects contain a Draw() and GetArea() behavior. Square, triangle, circle are sub classes of class shape , means shape is the parent class for below classes. The sub type of a square shape can be substituted for the sub type of a triangle in a function referencing a shape object.
  • I — Interface Segregation Principle

The Interface Segregation Principle (ISP) states that a client should not be exposed to methods it doesn’t need.

  • D — Dependency Inversion Principle

The Dependency Inversion Principle (DIP) says that high level modules should not depend on low level modules; both should depend on abstractions. However, Abstractions should not depend on details. Details should depend upon abstractions.

Approaching the solution

In software Engineering, in order to find solutions for technical problem, software engineers can follow following steps.

●Think throughout the problem- before approaching the solution, make sure to understand and clear doubts to resolve completely.

●Divide and conquer- Divide: This involves dividing the problem into smaller sub-problems. · Conquer: Solve sub-problems by calling recursively until solved.

●KISS

●Learn, especially from mistakes

●Always remember why software exists

●Remember that you are not the user

Implementing the solution

Below guidelines need to be followed when implementing and designing a solution.

●YAGNI- You ain’t gonna need it means write the code you need for the moment only that

●DRY- Don’t repeat yourself means reuse the code always

●Embrace abstraction- Make sure your system functions properly without knowing the implementation details of every component part.

●DRITW- Don’t reinvent the wheel

●Write code that does one thing well

●Debugging is harder than writing code- Make it readable as possible

●Kaizen- Leave it better than when you found it

Practices

●Unit testing- type of software testing where individual units or components of a software are tested. Class, function, module, API considered as units.

●Code Quality- reliability, maintainability, testability, portability, reusability of the code are some measures to find code quality.

●Code review- (sometimes referred to as peer review) is a software quality assurance activity in which one or several people check a program mainly by viewing and reading parts of its source code.

●Version controlling- The Version Control System makes it possible for collaborate between its developers and help in having back-ups on the remote repository.

●Continuous integration- help to detect issues early and fix them without delay.

--

--