Posts

Showing posts with the label Web Development

The Architecture of Web Browsers

Image
 The Architecture of Web Browsers How Web Browsers Work - The Architecture and how the different components work together - How the Rendering Engine works How Web Browsers Work - The following diagram illustrates the parts of a web browser and how they interact with each other. User Interface This is the user interface for the browser. It includes the Address Bar, back button, Bookmarking options, Refresh button, etc. The browser’s user interface is not specified in any formal specification, but comes from practices shaped over decades of experience (and browsers copying each other). As a result, all browsers have UIs that are extremely similar to each other. The Browser Engine The browser engine marshals actions between the browser’s user interface and the browser’s rendering engine. When you type in a new website and press the enter key, the browser UI will tell the browser engine, which will then communicate with the rendering engine. The Rendering Engine The rendering engine is...

Introduction to HTTP

Image
 Introduction to HTTP - Hypertext Transfer Protocol (HTTP) is a protocol that provides a standardized way for computers to communicate with each other.  - It has been the foundation for data communication over the internet since 1990 and is integral to understanding how client-server communication functions. - HTTP is a protocol that allows the fetching of resources, such as HTML documents. - It is the foundation of any data exchange on the Web and it is a client-server protocol, which means requests are initiated by the recipient, usually the Web browser.  - A complete document is reconstructed from the different sub-documents fetched, for instance, text, layout description, images, videos, scripts, and more. Features: Connectionless: When a request is sent, the client opens the connection; once a response is received, the client closes the connection. - The client and server only maintain a connection during the response and request. - Future responses are made on a ne...

What are APIs?

Image
 What are APIs? - If you look up the term API, you'll probably find a number of definitions—some of which are rather difficult to understand. - But the key underlying idea is in the name—Application Programming Interface. - An API is an interface.  - It's something that has been created to help two different systems interact with one another. - A key idea to remember is that API functionality is defined independently of the actual implementation of the provider. - Essentially, you don't need to understand the entirety of the application implementation in order to interact with it through the API. Application programming interfaces APIs: 1- It doesn't expose the implementation to those who shouldn't have access to it. 2- The API provides a standard way of accessing the application. 3- It makes it much easier to understand how to access the application's data. How do APIs Work? Client-Server Communication: - When you got to a bank, the bank teller acts as an inter...

Model View Controller Pattern (MVC)

Image
 Model View Controller Pattern (MVC) What is MVC? - MVC stands for Model-View-Controller, a common pattern for architecting web applications. - As well as a term that we use very commonly in the industry, for indicating which parts of an application we are currently managing or touching.     - The Model-View-Controller pattern is a way of Thinking of our application in terms of three layers.  Describes the 3 layers of the application we are developing: 3-Layers: 1- Models : Manage data and business logic for us.  What happens inside models and databases, capturing logical relationships and properties across the web app objects. 2- Views : Handles display and representation logic.  What the user sees (HTML, CSS, JS from the user's perspective). 3- Controllers : Routes commands to the models and views, containing control logic. Control how commands are sent to models and views, and how models and views wound up interacting with each other. Explanation - The M...

Building out a CRUD application

Image
 Building out a CRUD application What CRUD means? So to create a CRUD application, let's first learn CRUD. CRUD stands for Create, Read, Update, Delete. C == Create R == Read U == Update D == Delete For every one of these verbs, There are equivalent SQL statements that match that verb for want to do to a database.  Create: Whenever we want to create an object in our web application, We want to commit an insert statement in our relational database. Read: When we want to read records from the user's perspective on a web application, We want to select certain records from our database so that we can feed them into the view that the client sees.  Update : When we want to update something from the user's perspective, The user clicks a button, checks the checkbox, or submits a form.            Changing something that already exists in that web application, we want to execute an update statement to our database.   Delete: Finally, when a user...

Connections and Sessions in TCP/IP

Image
 Connections and Sessions in TCP/IP TCP/IP is a connection-based protocol: - To start any communication a connection must be arranged. - Open a connection to start communications. - Close a connection to end communications.  - Meaning all communications between parties are arranged over a connection. - A connection is established before any data transmission begins. - Over TCP/IP , we'll always need to establish a connection between clients and servers in order to enable communications.  Moreover: Deliveries over the connection are error-checked, If packets arrive damaged or lost, then they are resent (known as retransmission). It's really important that we continually monitor what connections are opened and closed. between a recipient and sender because the more connection that we have open The more performance-based issues we may run into.  We will always need to establish a connection from a client application to a Postgres server Or MySQL server over TCP/IP in o...

TCP/IP (Transmission Control Protocol/Internet Protocol)

Image
 TCP/IP (Transmission Control Protocol/Internet Protocol) What is TCP/IP?  TCP/IP is a suite of communication protocols that are used to connect devices and transfer data over the Internet. TCP/IP can also be used as a communications protocol in a private computer network (an intranet or extranet). TCP/IP uses: TCP: - Defines how applications create communication channels. - Manages when a message is broken down to be transmitted. IP addresses:  - An IP address identifies the location of a computer on a network. - Defines how to address and route packets for delivery. Ports:  - A port is a location on the recipient computer, where data is received. - While an IP address tells you where to find a particular computer,  - It doesn't tell you specifically where on that computer a particular connection should be made—that's what port numbers are for. Some port numbers you should know: - Port 80: The port number most commonly used for HTTP requests.  - For exampl...

Client-Server Model

Image
  Client-Server Model   What is the Client-Server Model? ⦁ In order to build database-backed web applications, we first need to understand how servers, clients, and databases interact. ⦁ A major part of this is the client-server model, so let's look at that first. The basic idea is very simple, and looks something like this: ⦁  A server is a centralized program that communicates over a network (such as the Internet) to serve clients. ⦁  And a client is a program (like the web browser on your computer) that can request data from a server. ⦁  When you go to a web page in your browser, your browser (the client) makes a request to the server—which then returns the data for that page. Adding databases to the model : Relational Database Clients :   ⦁  A database client is any program that sends requests to a database. ⦁  In some cases, the database client is a webserver! When your browser makes a request, the web server acts as a server (fulfilling that...