Client Server Architecture to understand API's
Credit Source: Google

Client Server Architecture to understand API's

In order to have in-depth understanding of API’s, we first need to understand the client server architecture. So, let’s first understand what is client-server architecture and its types so that while working in real time projects, it will be easier for us to incorporate these concepts in our project.

What is Client –server architecture?

Client – is a computer/machine/device which sends request to a server. Now, the question will be coming to your mind what is a request? What type of request it is? What is a server?

Request – is in the form of HTTP request. HTTP is a type of protocol which is used to communicate between a client and a server. HTTP stands for Hypertext transfer protocol.

Server – is a computer/device/machine which accepts the HTTP request sent by client and send response back to client in the form of HTTP.

Client server architecture:  It has 3 types.

  • 1 tier architecture –>where Data and Application resides in one machine. Presentation, Business, Data Access layers within a single software package. The data is usually stored in the local system or a shared drive. Application such as MS Office come under one-tier application.
  • 2 tier architecture –>where Client resides at one system and database server is at another system. We can have multiple clients. For instance, online ticket reservations software use the two-tier architecture.
  • 3 tier architecture--> In 3 tier architecture, we need Internet. This is applicable mainly for web applications. We have client (Browser), DB server (where we store our data). In between client and server, there is business logic layer (which is called as middle layer).

So, we have 3 layers here:

1.      Client layer/Client Server/Presentation Layer/UI

2.      Business Logic Layer/Application layer/Application server/Web server

3.      Database Layer/Database server

Internal working structure:

First, Client send a request through browser, business logic happens at second layer, it executes the request. Based on your request, corresponding business logic is triggered. And, then it will pass the request to database server which processes the data. And again it will sent back to Business layer and passed on to Client layer. And henceforth, you see response on your browser. Simple, isn't it ? Keep reading to clear your doubts. Please don't forget to refer the above diagram .

Technologies:

We have different technologies to design all the different layers in 3 tier architecture.

For Presentation Layer – we use scripting languages example: HTML5, JavaScript and CSS

For Business Layer – As we will apply logic implementation here so we will use programming languages to code. Example: Java, C#, .NET, Python. Business/application layer is the CORE component in 3 tier architecture.

For Data Layer – Oracle, SQL Server, My SQL, MongoDB and many more

Testing done on presentation layer is called GUI testing. Manual testing or automation testing comes under this layer. Example: We use Selenium ( or such tools) to test this layer.

Testing done on Business logic layer is called API testing. When we directly provide some inputs and verify the output, is called API testing. API testing happens at Business layer or the Application layer. In API testing, we provide some request and get response. Agree?

Testing done on database layer is called Database testing.

So, now you know which layer you test in your project/company. Comment below and lets discuss what you think about it. Do you have anything to add?

I hope, this article will provide you in depth knowledge on API's. Thank you for reading! 

Amrish Gurunathan

QA Engineer | Manual Testing | Automation Testing | Selenium Webdriver | TestNG | Java | GIT | JIRA | API Testing | Postman | Accessibility Testing

1 年

Insightful Article!

回复

Thank you for this breakdown! Wow…your visuals and explanations helped connect the dots!

Mukta Sharma

Software Testing || ISTQB Certified || Certified Scrum Master-CSM || AWS cloud certified || Agile Safe6 certified|| In Top 10 London Influencer || Tech Leadership ||

3 年

Riddhi Shah please see if this helps you. #api

Brijesh DEB

Infosys | The Test Chat | Empowering teams to master their testing capabilities while propelling individuals toward stellar career growth.

3 年

I saw a comment from my friend Piyush Kulkarni somewhere and I thought he brought out some very important and interesting points about the post . This IMHO is a very basic post on APIs. It only talks about the limited purview of 3 tier architecture of a monolithic application. This is very basic. Like Piyush mentioned, a detailed post would cover the history, evolution, tools, tests, protocols, architecture especially differentiating monolithic vs microservices etc and much more. Looking forward to see those covered in the next posts on APIs.

Rohit Sharma

Cloud Architect @ The Henson Group | Scalable Cloud Solutions, Infrastructure Automation, CI/CD Optimization

3 年

Very useful article Mukta Sharma

要查看或添加评论,请登录

Mukta Sharma的更多文章

社区洞察

其他会员也浏览了