Introduction To Application Frameworks

What is an Application framework?

Simple answer is Frame-to-work.
Framework defines the structure of the application and it gives us guidelines.


Is it a must to use an application framework?

Not actually. But, For example, If we code in Vanilla javascript which the same thing that we code in React js, it will be time-consuming and more stressful work.

We all know developing software application is hard. Furthermore developing industrial software application is harder. The software application has to interact with inputs, outputs, operating system, hardware and many more. When coming to the modern software applications, they are mostly GUI based software. GUI application development is more complex work.

Then Frameworks come to the stage. It makes the development easier. And we use these frameworks most of the time into Web Application development. So it is better to say Application Frameworks rather than saying Software Frameworks.

We can mainly identify two types of these frameworks

v Server-side web application framework

  • Ø  Laravel for PHP
  • Ø  Django for Python
  • Ø  Express for Node.js/JavaScript
  • Ø  Ruby on Rails for Ruby
  • Ø  ASP.NET for C#  etc.

(Note: Node.js is not a framework. It is javascript runtime environment )


v Client-side web application framework

  • Ø  Bootstrap
  • Ø  Skeleton
  • Ø  React.js
  • Ø  Angular.js
  • Ø  Vue.js
  • Ø  Semantic-UI etc.

When seeing the above list you can see ‘JavaScript is Everywhere’.

Model View Controller architecture


Most of the web app frameworks rely on the Model-View-Controller architecture(or design pattern). It separates the app logic into three layers.

Model
The Model holds all about the content of an app. When getting user inputs from the controller. It only deals with controllers.

View
Another word to view is 'frontend'. View holds the layout and how the user can interact with its parts. When the view gets user input, it communicates with the controller.

Controller
The Controller is an intermediary layer between the Model and the View. It accepts user inputs from the View, processes those inputs and informs the Model what variations should be made.


When designing software S.O.L.I.D are 5 object-oriented principles that should be followed.
S.O.L.I.D. STANDS FOR:
S — Single responsibility principle
O — Open closed principle
L — Liskov substitution principle
I — Interface segregation principle
D — Dependency Inversion principle

  1.Single responsibility      A class should only have one reason to change or a class should only be responsible for one particular task.
  2.Open Closed                  Ability to add new components, features, functions without having an  impact on the existing code.
  3.Liskov substitution        A derived class should be an actual copy of its parent class with overridden methods that does not change the underlying meaning or the functionality.
  4.Interface segregation    A class/client should not be forced to have unused methods
  5.Dependency Inversion  High level components should have an abstraction relationship with lower level components.

Someone who follows these principles while developing applications will definitely end up with better code. As well as this will also reduce the number of bugs reported in the code.

How to implement a solution?

Here is a list of best practices that we can follow while developing a solution.

1. Re-use code since it reduces the time spent on development and it also reduces the duplication of code.

2. A lot of software developing companies follow the agile methodology. Hence, it is not necessary for a developer to pre-plan and write any code assuming that it will be used in future.

3. Do not waste time on implementing an already existing solution done by someone else.

4. Practice applying descriptive words when declaring variables, functions and etc.

5. Each function should be solving one specific task. Do not make the code so complex since it would be hard to maintain.

6. Practice applying comments to improve code readability. This does not mean that you have to comment on each and everything but for complex situations where it is hard to understand.

7. Unit testing ensures that your code meets the expected requirements. Maybe it will not be very effective in coding at university but, trust me, it does when it comes to the industry. It is the duty of the developer to ensure that the code works properly.

8. It is also recommended for developers to get code review done by another senior developer to improve code quality.

9. Multiple developers will be working on the same code. Therefore, the code should be easily manageable and editable. So there would be version controlling mechanisms.

10. Developers should track the automated build processes that happen during the day (continuous integration).


Comments