+91 7808402542

Jamshedpur , India

Two Design techniques that slow down the Web App

The back-end web application is the backbone of the web based software.Whether it is SAAS, Mobile Application or E commerce Application, all these applications are dependent on the back-end web application to send and process the data sent by the front end client application , receive the processed data into the client application.

In this article I am going to discuss about the two key design techniques or issues which slow down the web application.Although the speed of the web application is dependent on several factors, but here I will discuss about the two key design techniques ;

1.Heavily Layered Frameworks or Heavily Layered Software

2.EAV Data Modeling

Heavily Layered Framework or Heavily Layer Software :

Most of the scripting language used for writing web back-ends are either interpreted languages or they run on virtual machines. Python,Ruby,PHP,Perl are interpreted languages whereas the Java uses its own Java Virtual Machine.

Python,Ruby and PHP are the three most popular scripting language used for writing web applications.

As these are interpreted languages , so, whenever a server receives a request to run these scripts , the server passes the scripts to the interpretor of the language to run and process the script.

But , before the script is run and processed , the interpreter of the language goes through the following steps :

1.Scanning

2.Parsing

3.Interpretation

After the above steps have been successfully executed and no error has been reported , the interpreter then executes and processes the script.

Each time a server receives a request to run and process the script, the process of scanning,parsing and interpretation is executed each time.

So, an extra time is consumed to scan,parse and interpret the script.

Now, if heavily layered framework is introduced between the language interpreter and the main script , then what happens is that the interpreter has to do more work . And more work means more time to run and process the script.

And more time means , the client application has to wait more to receive response from the server.

Web frameworks are intermediate applications which support the web development. Although the frameworks enable rapid development and standard coding of web applications , but they slow down the speed and performance of the web application.

Some web apps use third party web frameworks and some have their own heavily layered software.

EAV Data Modeling :

EAV is an acronym for Entity,Attribute and Value. As you know , A web application requires a database server to store the data permanently. Some database servers are SQL database servers and some are NoSql database servers.

In SQL databases , the data is stored in tables . And each table represents a coherent data related to a specific entity. The entity may be employee,product ,sales order or anything else.

Generally the schema for each entity uses flat table structure , that means all the information related to that entity is stored in single table.

As long as the attributes of entity are fixed, flat table structure is good. But, when an entity has variable attributes then it unnecessarily creates the length of the table structure.

And this is where EAV data modeling comes to the rescue for data modeling of variable attribute entity data modeling.

Example : product table

Suppose there are three products . Shirt,book,mobile

The common attributes of “Shirt,Book and Mobile” are :

But, there are some attributes which are not common to “Shirt,Book and Mobile”

A Shirt has :

A Book has

A Mobile has

If a single table is used to store all types of products , then the table will like below :

When information about Shirt is stored in this table then the fields which are unused are ;

When information about Book is stored in this table then the fields which are unused are ;

When information about Mobile is stored in this table then the fields which are unused are ;

To avoid this , some developers use EAV data Model where two or more tables are used to store information related to the product.

Example

Product Table

Attribute Table

Value Table

This is how EAV data model is used to store different types of products with different attributes.

But as you can see that three tables are used , it requires a complex SQL query to retrieve presentable data.And this complex query takes considerable amount of time to process and return the results.

The time to process the query is not evident when products are less , but when product listing increases then the query takes the time to process and return the results.

Thus, you can see that how and why two key design techniques slow down the web app.

There are some e-commerce softwares which use this EAV data model.Whereas some don’t.

The purpose of this article is not to discourage you from using Web Frame Works and EAV data model.But to inform you that how these two things play an important role in deciding the speed of your web application, and help you make an informed decision.

Now, The question is , What is the substitute for these two design techniques ?

There are many alternatives and options, from selecting the software to selecting the language for development to selecting the database servers.

Photo of author

Santokh Saggu

Leave a Comment