wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

IT17 (Midterm) - Quiz 2

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

A development team is designing a new web application and wants to ensure protection against common vulnerabilities like Cross-Site Scripting (XSS) and SQL Injection (SQLi). Which advantage of using a web framework directly addresses this concern?

a)

Efficiency through pre-built libraries

b)

Standardization for consistent code structure

c)

Scalability for future growth

d)

Built-in security mechanisms

2.

An organization plans to build a web application that is expected to grow significantly in features and user base over several years. Choosing a web framework primarily supports this long-term vision due to its emphasis on:

a)

Minimal configuration for rapid deployment

b)

Enhanced performance with small footprint

c)

Scalability and easier maintenance over time

d)

Access to a large community of developers for support

3.

A new project requires a PHP framework that can be set up quickly without extensive initial configuration, allowing developers to focus on application logic. Which characteristic of CodeIgniter 4 makes it particularly well-suited for such a requirement?

a)

Its robust ORM capabilities

b)

Its high performance and minimal configuration

c)

The availability of the 'Spark' command-line tool

d)

Its strong focus on clean code principles

4.

A web application built with CodeIgniter 4 needs to achieve quick response times and efficient processing of user requests. What inherent design aspect of CodeIgniter 4 most directly contributes to meeting these performance objectives?

a)

Its extensive set of third-party plugins

b)

Its server-agnostic deployment options

c)

Its high performance and 'small footprint' architecture

d)

Its object-relational mapping (ORM) system

5.

Consider the CodeIgniter Request-Response cycle. What is the very first event that initiates this entire sequence, leading to the generation of a web page?

a)

The system mapping a URL to a Controller

b)

A user entering a URL into their browser

c)

The Controller processing logic and calling the Model/View

d)

The final HTML being sent back to the client

6.

Immediately following a user's URL input, the CodeIgniter system performs a crucial step to determine which part of the application should handle the request. What is this step called?

a)

Data validation

b)

Session management

c)

Routing

d)

Database querying

7.

In the CodeIgniter Request-Response cycle, which architectural component acts as the 'orchestrator,' taking the routed request, processing the necessary application logic, and deciding which data to fetch and which visual output to prepare?

a)

The Model

b)

The View

c)

The Router

d)

The Controller

8.

A developer is tasked with implementing the database interactions for an application, including creating, reading, updating, and deleting records, as well as applying specific business rules to the data. Which component of the MVC pattern should primarily encapsulate this functionality?

a)

The Controller

b)

The View

c)

The Model

d)

The Helper

9.

According to the principles of the MVC pattern in CodeIgniter, a 'View' component is designed to render the user interface. Which type of content or functionality should explicitly be excluded from the View to maintain proper separation of concerns?

a)

HTML and CSS styling

b)

Minimal PHP logic for display

c)

Direct database queries or complex business logic

d)

Data provided by the Model for display

10.

A user submits a login form on a CodeIgniter application, which sends a POST request. Which component is responsible for receiving and processing this incoming request, interacting with the data layer, and then directing the user to the appropriate next page or view?

a)

The Model

b)

The View

c)

The Helper

d)

The Controller

11.

The MVC architectural pattern divides an application into three distinct layers: Model, View, and Controller. How does this 'separation of concerns' fundamentally benefit the development of dynamic applications?

a)

It forces the use of a specific database technology, simplifying data management.

b)

It allows for faster initial development but complicates long-term scaling.

c)

It improves maintainability by compartmentalizing code and enhances security through clear boundaries.

d)

It eliminates the need for unit testing by ensuring each component works independently.

12.

In the restaurant analogy for MVC, the 'Waiter' receives an order from the customer and communicates it to the kitchen, then brings the prepared food back. Which MVC component does the 'Waiter' best represent?

a)

The User, who initiates the interaction.

b)

The Model, which prepares the data.

c)

The Controller, which processes requests and coordinates the flow.

d)

The View, which displays the final output.

13.

Using the MVC restaurant analogy, the 'Chef' is responsible for taking the order details, preparing the ingredients, and cooking the meal according to specific recipes. Which MVC component's responsibilities align with the 'Chef's' role?

a)

The Controller, managing the request and response.

b)

The View, presenting the final meal to the customer.

c)

The User, initiating the order.

d)

The Model, handling data logic and business rules.

14.

In a standard CodeIgniter 4 application, which folder is typically the web server's document root, making it the publicly accessible entry point for the application and containing assets like CSS, JavaScript, and images?

a)

The 'app' folder

b)

The 'system' folder

c)

The 'writable' folder

d)

The 'public' folder

15.

If a CodeIgniter application needs a location to store dynamically generated files, cache data, or application logs, which dedicated folder is typically designated for these types of temporary or persistent data that the web server needs write access to?

a)

The 'public' folder

b)

The 'app' folder

c)

The 'writable' folder

d)

The 'system' folder