Introduction to E-Commerce and Web Development
E-commerce
Definition: E-commerce, or Electronic Commerce, involves buying and selling products/services via the internet.
Types of E-commerce:
Business to Business (B2B)
Consumer to Consumer (C2C)
Business to Consumer (B2C)
Consumer to Business (C2B)
Business to Government (B2G)
Consumer to Government (C2G)
Web Server
A web server is required to host an e-commerce site.
It serves content via HTTP (HyperText Transfer Protocol).
HTTP status codes include:
200: OK (request successfully processed)
201: Created (new resource successfully created)
403: Forbidden (access to the resource is prohibited)
404: Not Found (the requested resource does not exist)
500: Internal Server Error (generic server error)
502: Bad Gateway (server received an invalid response from another server)
503: Service Unavailable (server is currently unable to handle the request)
Using Scripting to Generate Web Pages
PHP (Hypertext Preprocessor) is a scripting language that embeds into HTML, allowing dynamic page generation.
A PHP program is executed by a scripting engine (like Apache), which evaluates requests, accesses stored data, and delivers responses to the browser.
The website should facilitate user interaction (e.g., creating accounts, placing orders, leaving reviews).
A dynamic website relies on a database:
Queries data via SQL (Structured Query Language).
Interaction with the database is hidden from users, allowing seamless operation.
DNS (Domain Name Service/System)
DNS translates human-readable domain names into numeric IP addresses (e.g., stevens.edu becomes 155.146.0.18).
Upon server setup, an IP address is assigned to the domain.
The process of purchasing a domain and linking it to an IP address is essential for website functionality.
Dynamic interactions occur on both the client (browser) and server (web server and database) sides, involving HTTP requests and responses.