Assignment
Course: Web Technologies & Programming
Submitted To Prepared By
Mohammad Anwar Hossain Name:Ahammad Ullah
Al-Amin
Department of CSE Id No:3869
Batch:65/A
1
Answer no 1
[Link] Security Fundamentals:
[Link] (Hypertext Transfer Protocol Secure):
HTTPS is a secure version of HTTP. It uses SSL/TLS (Secure Sockets
Layer/Transport Layer Security) to encrypt communication between a
user's browser and a website's server. This prevents eavesdropping,
tampering, and man-in-the-middle attacks, ensuring data privacy and
integrity.
[Link] Security Policy (CSP):
CSP is a security measure that helps prevent various types of attacks,
including Cross-Site Scripting (XSS). It allows developers to specify
which sources of content (scripts, stylesheets, images) are trusted and
allowed to be executed or loaded on a web page. By defining a strict
CSP, developers can mitigate the risk of malicious code injection
[Link] Vulnerabilities:
-XSS (Cross-Site Scripting): Injecting malicious scripts into webpages
viewed by others.
-SQL Injection: Injecting malicious SQL queries into input fields to
manipulate databases.
2
[Link] Security Measures in a Web Project:
Security Feature Purpose How to Implement
HTTPS Encrypt data SSL/TLS certificate
CSP Block malicious scripts Use CSP header
Input Validation Block malicious data Server-side checks
Output Encoding Prevent XSS Escape HTML output
SQL Prepared Prevent SQLi Use placeholders
Statements
CSRF Protection Prevent form hijacking Use tokens
Secure Cookies Protect sessions HttpOnly, Secure,
SameSite
Password Hashing Secure storage password_hash()
File Upload Controls Avoid remote code Validate type and size
execution
Answer no 2
[Link] Architecture:
Serverless architecture is a cloud-native development model that allows
developers to build and run applications without managing servers. The
cloud provider ( AWS Lambda, Google Cloud Functions, Azure
Functions) handles all the server management tasks, including
provisioning, scaling, and maintenance. Developers only need to focus
on writing code, which is executed in response to events
3
[Link]:
[Link] Operational Costs: Developers don't need to purchase or
maintain physical servers. You only pay for the compute time consumed
by your code, which can be significantly cheaper than paying for a
server that might be idle for extended periods.
[Link] Scaling: Serverless platforms automatically scale
applications up or down based on demand. This means your application
can handle sudden spikes in traffic without manual intervention and
without requiring you to over-provision resources.
[Link] Time to Market: By eliminating the need for server
management, developers can focus on writing business logic. This
accelerates the development lifecycle and allows products to be
launched more quickly.
[Link] Developer Productivity: Developers are freed from tedious
infrastructure management tasks, allowing them to concentrate on core
application features and innovation.
[Link] Fault Tolerance: Serverless platforms are designed for high
availability and redundancy. If a function or a server fails, the platform
automatically reroutes traffic to a healthy instance, ensuring minimal
downtime.
[Link] and Event-Driven: Serverless functions are triggered by
events, such as a user uploading a file, a database entry being updated,
or an API call. This makes it an excellent fit for building microservices
and responsive, event-driven applications.
4
Answer no 3
[Link] Data Types and Structures:
[Link]:These are simple, immutable data types.
-Number: Represents both integers and floating-point numbers.
Example: 10, 3.14.
-String: Represents textual data. Example: 'hello', "world".
-Boolean: Represents a logical entity with values true or false.
-Undefined: A variable that has been declared but not assigned a value.
-Null: Represents the intentional absence of any object value.
-Symbol: A unique and immutable value.
-BigInt: Represents integers of arbitrary size.
[Link]: A collection of key-value pairs. Objects are the building
blocks for more complex data structures. Example: { name: 'John', age:
30 }
[Link]:An ordered list of values. Arrays are a special type of object
where keys are indices. Example: ['apple', 'banana', 'cherry'].
[Link]: A block of code designed to perform a particular task.
Functions are first-class citizens in JavaScript, meaning they can be
treated as objects. Example: function add(a, b) { return a + b; }.
[Link] data types in Client-Side Scripting:
[Link] User Input: Variables are used to store data entered by a user
into forms. For example, a String might store a user's name, while a
Number stores their age.
5
[Link] the DOM (Document Object Model): JavaScript objects
and arrays are used to represent and interact with the elements on a web
page. You can select an element, get its properties (e.g., id, class), and
modify its content or styling.
[Link] Events: Functions are at the core of event handling. An
event (like a button click) triggers a function that performs a specific
action, such as displaying a message, validating form data, or sending a
request to a server.
[Link] API Calls: When fetching data from a server, the response is
often in JSON format, which is easily parsed into JavaScript objects.
These objects can then be used to dynamically update the web page.
[Link] Logic and Loops: Boolean values and logical operators are
used to control the flow of the application. For example, an if statement
might check if a form field is empty before submitting, or a for loop
might iterate through an array of data to display a list of items.
Answer no 4
[Link] Technologies for Interactive Applications:
i. HTML (HyperText Markup Language):
-Structure and content of the webpage.
-Tags define elements like headings, images, links, and forms.
6
ii. CSS (Cascading Style Sheets):-Controls the appearance and
[Link] responsive and aesthetic designs.
iii. JavaScript:
-Adds interactivity and logic.
-Used for dynamic content, DOM manipulation, animations, etc.
iv. Web APIs:
-Browser-provided interfaces to interact with the environment.
-Examples: Fetch API (HTTP requests), Geolocation API, LocalStorage.
[Link] Technologies Work Together:
[Link]: HTML provides [Link] the headings, paragraphs,
buttons, and input fields that a user sees.
[Link]: CSS then takes the structure and applies styling. It makes the
buttons look clickable, the text readable, and the layout organized.
[Link] & APIs: JavaScript provides the interactivity. When a user
clicks a button (defined in HTML and styled with CSS), a JavaScript
function is triggered. This function might use a Web API (like fetch) to
get data from a server and then use the DOM API to update the HTML
structure with the new data.
7
[Link] and Challenges:
Technology Benefits Challenges
HTML Easy to learn and use.<br> Provides a clear, Limited functionality on its
semantic structure.<br> Universally own.<br> Can become messy and
supported by all browsers. hard to manage for large projects.
CSS Separates content from presentation, Can be difficult to manage for large
improving maintainability.<br> Powerful projects without proper
and flexible for creating complex methodology ( BEM,
layouts.<br>- Responsive design can be CSS-in-JS).<br> Browser
achieved to adapt to different devices. inconsistencies can lead to
unexpected rendering.
JavaScript Enables rich, dynamic user interfaces.<br> Performance issues if not
Vast ecosystem of libraries and frameworks optimized.<br> Browser
(React, Angular).<br>- Can be used for both compatibility can be a
client-side and server-side development concern.<br> Security risks if not
([Link]). implemented carefully (e.g., XSS).
Web APIs Provide access to powerful browser API functionality varies between
features.<br> Standardized and browsers.<br> Security concerns
well-documented.<br> Simplify complex when dealing with sensitive APIs
tasks like network requests. (Geolocation).<br> Developers
need to stay updated with new and
changing APIs.