Lecturer Note-3
Lecturer Note-3
Development
3
LEARNING OUTCOMES
By the end of this topic, students will be able to:
Understand the concept of CRUD Application
Create a web application
Understand Encapsulation and Modifiers
Understand Abstraction and Polymorphism
Create a class that implement another class
Use final keyword
Understand why we study Object-Oriented Programming
Interpret PHP Class script
Create Object Class and Interface
Every day, we carry out CRUD tasks. frequently without acknowledging. CRUD
apps simplify and arrange work by digitizing administrative procedures.
However, many people are unaware of the functions of CRUD apps or how simple
it is to create one. Let's divide the fundamentals into the following subsections.
The user interface we employ to communicate with databases using APIs is called
CRUD apps. This particular programme supports the four fundamental
operations of create, read, update, and delete. The database, the user interface,
and the APIs are the main components of CRUD apps.
Database
Your database serves as the initial location where you keep your data. There will
be a database management system that you choose to store the data in,
depending on whether you are using SQL (relational) or NoSQL (documents).
User Interface
The front-end through which the end user interacts with the database is known
as the user interface (UI). Additionally, organizations are now placing a higher
priority on user interface design and user experience because to the growing
popularity of excellent applications.
APIs
The back-end also instructs your databases on what tasks to carry out. Although
these functions can be modelled in a variety of ways, they are created to carry out
four fundamental CRUD tasks.
Let's take a look at an app for managing employee information that is linked to
your employee database.
CREATE: It goes without saying that the app should be able to create new
employee records as you welcome new team members. The CRUD app can be
used to perform the CREATE operation by including a form with text, number,
and email input fields as well as a submit button to add the new record to the
database. When we click the submit button on our form, a POST HTTP request
will be sent to our API, adding this new record to the database.
READ: The end user should be able to view records using this READ feature.
They should be able to search for a particular employee and apply filters to
produce a list of employees who fit their search criteria. Although you can further
set the action to allow extra actions like updating details, this function does not
alter the information that is presented. The most sophisticated solutions
integrate with other tools and services, such email sending systems, to improve
their CRUD interfaces.
DELETE: Since some employees have left your company, you can delete their
data from the database since you no longer require it. You can delete certain
records that you no longer require with the use of the DELETE function. This may
appear as a delete button or a "X" next to the employee record on the user
interface; selecting either of these causes a DELETE HTTP request to be sent and
causes the record to be deleted from the database.
CRUD is a recurring concept, as can be shown. from the creation of record to its
deletion. Any given application may contain a variety of CRUD operation
combinations. For instance, a user CREATES an account, UPDATES their details
for a more personalised experience, ADDS something to their basket, then
DELETES something from the cart to subscribe to your newsletter.
2.0 CRUD APPLICATION EXAMPLE
Lincoln University maintains a human resources department that helps manage
student and keep track of both old and new student. The HR department
manages a relational database application with various tables that track different
types of student information:
A student record includes attributes such as first and last name, admission
number, contact number, home address, department, and any other relevant
personal details.
Student should be guided to create a CRUD application that resemble the
screenshot below:
1. Login Screen
2. Sign Up Screen
3. READ RECORD
4. Create New Record
5. Update Record
Assignment
Create a Todo List CRUD application that display and output that resemble the
below, with the ability to read, update, create and delete any task. Please read
about Font Awesome and Material Design Icons and applied them accordingly.
PROJECTS FOR PRESENTATION
Each student should be grouped into a group of two, each group should pick from
any of the following CRUD applications and develop using their knowledge of
pure css and pure php programming language. The submission and presentation
will be communicated in a later date.
Event management
Student Information Management
Membership Management
Content Marketing Calendar
To-do App
Applicant Tracking App
Remote Learning App
Inventory Management
KEYWORDS
OOP
Polymorphism
Encapsulation
Inheritance
Abstraction
Destructor
SUMMARY
This topic we were able to discuss
The component of Object-Oriented Programming
The characteristics of OOP
Interface and Trait
Encapsulation and Polymorphism