0% found this document useful (0 votes)
83 views

Implementation of MVC Pattern in Content Management System Using Codeigniter As Skeleton Framework.

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : [email protected] Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
83 views

Implementation of MVC Pattern in Content Management System Using Codeigniter As Skeleton Framework.

Contact us for project abstract, enquiry, explanation, code, execution, documentation. Phone/Whatsap : 9573388833 Email : [email protected] Website : https://dcs.datapro.in/contact-us-2 Tags: btech, mtech, final year project, datapro, machine learning, cyber security, cloud computing, blockchain,

Uploaded by

dataprodcs
Copyright
© © All Rights Reserved
You are on page 1/ 11

current practices to help developers’ better grasp how to use PHP frameworks in web development apps.

Our approach of generating CRUD (Create, Read, Update, and Delete) operations is used to validate this
proposal.

Keywords – CodeIgniter, Model-View-Controller, PHP, Content Management System, CRUD


OperationsOOP.

CHAPTER NAME Page Numbers

1 Introduction 6-7

2 Litrature Review 8

3 Methodlogy 9-13

4 Working with data base 14-18

5 ALGORITHM USED ARE AS 18-20


FOLLOWS

6 MODULE’S WISE WITH THEIR 20-23


EXPLAINATION AS USED IN THE
PROJECT

7 Conclusion 23-24

8 References 24-25

9 Appendices 25-32

10 Screenshots 33-34

5
CHAPTER ! INTRODUCTION

The rapid development of web based application has affected the coding methodology.
This takes our attention toward a higher need of feasibility and maintainability. Other
than that, It is a general-purpose and an open source tool kit that requires minimal
setup. To decrease and deal with the level of complexity in the nature of the project,
various techniques for programming in PHP has been proposed. One of those is the
Object Oriented Programming OOP and MVC design pattern with some short of factory
design pattern. The concept used in this paper of a PHP Framework is related to Object
Oriented Programming and Model View Controller. MVC is a design pattern that applies
to the concept of software development and originally designed to provide multiple
views of the same data for virtually modern interactive applications.

This component stores data and represent data structure relationship and
dependencies with database. Model will only deal with the data base so the user does
not have the authority to access the models. Model will only be available for the
controller and as per the user requirements we will modify and make model classes. In
order to accomplish difficult task carried out at the database end.

It is the component which represents the presentation of the data. Various devices can
be used for presentation of data in which the application has multiple views of the data.
Any user is allowed to view all the UI components like drop down boxes and text boxes
among many other features. It will facilitate users to input their data and our system at
the backend will manipulate data and again provide the data that will be required at the
users end.

It is the component primarily responsible for handling the user interaction. The controller
interprets the inputs from the user and informs model and view to change as required. It
is represented as an information collector and acts as the glue between model and
view.

Controller is the kind of main component that will follow complete business logic that we
want to implement in any kind of system like here we are implementing it in Content
management system.

The idea behind using MVC Pattern in PHP Framework is that the code presentation
and layout will be much simpler and well separated and divided that can make the
project easily manageable. It is helpful in providing an interface though which all the
classes corresponding to the logical object of the application can be manipulated.

6
Model – This component stores data and represent data structure relationship and
dependencies with database. Model will only deal with the data base so the user does
not have the authority to axccess the models. Model will only be available for the
controller and as per the user requirements we will modify and make model classes. In
order to Accomplish difficult task carried out at the database end.

View – It is the component which represents the presentation of the data. Various
devices can be used for presentation of data in which the application has multiple views
of the data. Any user is allowed to view all the UI components like drop down boxes and
text boxes among many other features. It will facilitate users to input their data and our
system at the backend will manipulate data and again provide the data that will be
required at the users end.

Controller – It is the component primarily responsible for handling the user interaction.
The controller interprets the inputs from the user and informs model and view to change
as required. It is represented as an information collector and acts as the glue between
model and view.

Controller is the kind of main component that will follow complete business logic that we
want to implement in any kind of system like here we are implementing it in Content
management system.

The idea behind using MVC Pattern in PHP Framework is that the code presentation
and layout will be much simpler and well separated and divided that can make the
project easily manageable. It is helpful in providing an interface though which all the
classes corresponding to the logical object of the application can be manipulated.

7
Chapter 2 Litrature Review

Umi Saadahetal all proposed thatthe development of projects from pure PHP takes a long time.
However, a framework is often using to ease the task. The most popular is the MVC model.
However, sometimes the complex design could not produce optimum performance and they
mentioned the drawback as “This framework provides a very less amount of resources when
compared to other frameworks.”

KhaoulaBenmoussa , Majida Laaziri ,Samira Khoulji, Mohamed Larbi Kerkeb, Abir El


Yamamiyet.all all proposed that there are a lot of frameworks available for the purpose of
designing. However, choosing the correct framework is not often an easy task. This literature
provides a complete model to evaluate and compare the main PHP frameworks and they also
mentioned the drawback as the comparison criteria are sometimes not accurate.

SUBARI, ARKHAN yet.all all proposed that Various computer applications are used to assess
the success of achieving organizational goals embodied in specific measures.The drawback was
mentioned as theAccuracy of the model is often questioned.

Das Somayet.all all proposed that this shows the flexibility in storing real time data. Along with
that the development of NTNU- QGIS web API will provide access to various devices to
simultaneous collect and store data in the database to visualize at the same time.

Moilanen, Markusyet.all proposed thathis introduces the PHP Framework Symfony. It uses
MariaDB database. The thesis covers the most essential aspects of developing said features,
focusing on the critical issues and solutions to them.

MuhammadIrfanKhanyet all proposed that the techniques presented in this article will help you
efficiently and effectively create large-scale applications that are otherwise difficult to manage.
This framework methodology was developed to implement application development using the
Codeigniter 2.1.0 framework.

Natalya Prokofyevayet all proposed that this document provides an overview of the popularity of
various PHP programming frameworks (CakePHP2, CodeIgniter, Symfony2, Yii, PhalconPHP)
and comparisons based on different criteria. The tests were run using the ab.exe (Apache
Benchmark) tool that came with the Apache web server.

8
CHAPTER 3 METHODLOLGY

One of those is the Object Oriented Programming OOP and MVC design pattern with
some short of factory design pattern. The methodology used in this paper of a PHP
Framework is related to Object Oriented Programming and Model View Controller. MVC
is a design pattern that applies to the concept of software development and originally
designed to provide multiple views of the same data for virtually modern interactive
applications.This component stores data and represent data structure relationship and
dependencies with database. Model will only deal with the data base so the user does
not have the authority to access the models. Model will only be available for the
controller and as per the user requirements we will modify and make model classes. In
order to accomplish difficult task carried out at the database end.It is the component
which represents the presentation of the data. Various devices can be used for
presentation of data in which the application has multiple views of the data. Any user is
allowed to view all the UI components like drop down boxes and text boxes among
many other features. It will facilitate users to input their data and our system at the
backend will manipulate data and again provide the data that will be required at the
users end.

It is the component primarily responsible for handling the user interaction. The controller
interprets the inputs from the user and informs model and view to change as required. It
is represented as an information collector and acts as the glue between model and
view.

Controller is the kind of main component that will follow complete business logic that we
want to implement in any kind of system like here we are implementing it in Content
management system.

The idea behind using MVC Pattern in PHP Framework is that the code presentation
and layout will be much simpler and well separated and divided that can make the
project easily manageable. It is helpful in providing an interface though which all the
classes corresponding to the logical object of the application can be manipulated.

The integration of frameworks has revolutionized the generation of web applications,


and CodeIgniter is one of these frameworks that facilitate the construction of PHP web
applications.

In this paper the architecture that has been used is standard MVC architecture. It is
beneficial for easy visualization, enhanced security, modularity, and overall project
performance. The DRY (Don’t Repeat Yourself) concept is used herein. It decreases the
number of lines in the code and hence provides better performance. DRY Concept is
extremely helpful in eliminating redundancies in the process as well as in logic. One of
the key goals of the DRY principle is to make code more maintainable and increase

9
reusability of the same code in different scenario at all stages of its development. When
the DRY principle is followed, we are able to update code in one place and have the
change implemented to all occurrences of the code in question automatically.

We shall attempt to provide optimized security in both front end and back end and in
backend we will be using pre defined security features or CodeIgniter and in the front
end we will define our security guidelines and security codes that will be responsible for
the perfect output for the clients or the users end. As a result of better optimization the
burden on the hardware of the user decreases significantly. Additionally, it also helps in
the project performance enhancement. Apart from these, better and strict
implementation of the MVC pattern provides increased project modularity and better
visualization of the system. It helps the project become more user-friendly.

Software requirements

1. Windows 7 and above. The latest operating systems make it easier and
feasible to achieve the objectives of out proposed system. For the optimal
performance it is suggested that the user makes the use of latest
operating systems at their disposal.

2. PHP 7.3 or above

3. XAMPP server for local testing and deployment

4. MySQL – It is an open source relational database management system.

Server requirements

1. PHP version 7.3 or newer is required, with the *intl* extension and *mbstring*
extension installed.

2. The following PHP extensions should be enabled on our server:

3. PHP-json,Php-xml.

4. In order to use the CURL Request, We will also need libcurl installed.

5. A database is required for most web application programming. Currently


supported databases are:

6. a) MySQL (5.1+) via the MySQLi or PDO driver.

10
The programming languages and other frameworks used in our proposed work are
listed below –

1. HTML – We have used HTML (Hypertext Markup Language) which will primarily
function in the front end. It is designed for the documents to be displayed in a
web browser. HTML will be used for the basic designing for the front end that will
be available for the client or to the servers end.

2. CSS - CSS is the extension to the HTML which modifies the design and display
of the web pages. In our proposed work we have used CSS to beautify the view.
Enhancing the view has a positive impact on the user making the project more
user-friendly user-interfaces.

3. JavaScript – JavaScript is used for the motion and also for the functionality at
the client side.

4. PHP - It is server side scripting language used to design and implement web
service as well as it is used inside the framework CodeIgniter skeleton
framework.

5. PHP CodeIgniter – CodeIgniter is a framework of PHP which is highly secured.


It is mostly famous for having a very small footprint. CodeIgniter is also helpful in
handling errors, customizability, security, better User Interface, and it is based on
MVC Pattern. It also provides active record classes for handling all the queries
very securely and to eliminate some short of errors that will occur at the clients
end.

6. SQL – It has been used for the querying of the data base which is present in the
data base.
Content Management System is a software platform whose main purpose is to
automate the tasks required to manage and publish content, such as uploading and
formatting website content. Basically, a CMS makes it easy for people of all tech levels
to manage their website. The CMS takes input through the user-friendly interface and
remodels it into a website that works for the visitors.

In our proposed system the users, who are the visitors on the website would just be
able to view the posts and like it as well. However, the subscribers who have made an
account on the website would be able to post their contents and comment on posts. For
an added layer of security, the content posted by the subscriber would not be directly
posted on the website. It will go for a review to the Admin or the Manager. Upon further

11
acceptance the post will be published on the website. This is because we know that
java script will be executed as the as it gets the DOM (Document . READY
FUNCTION).)

Implementation of MVC discussed in depth.

We have connected the CodeIgniter with our website database. Just after entering the
CodeIgniter interface we see the folder named ‘assets’. In the assets folder all the
folders including admin, manger, subscriber, and home are present.

- In the admin folder we can see all the files of admin dashboard and the css and
js files related to it.
- In the manager folder, all the css and js files of manager are present.
- Same is the case with subscriber folder which includes all the css and js files of
subscriber.

In the Home folder, the files are present of css and js including the assets folder of
Home and the contact form.

In the Config folder, we find the several files including Autoload and database.

- Autoload basically keeps the files preloaded for our visit in the same section
again.
- In the database file, we can find the three main stored information. The
username, password, and the database.

This Project is a CMS(Content Management System) based Software in which the we


have divided them to 4 parts.The first one is the Users.The users are the ones who just
visit the websites.The second one is the Subscribers.Subscribers are the ones who
have created the account in our website.The third one is the Manager who can manage
the subscribers as well as the manager can manage all the poems and can activate all
the poems and deactivate the poems.The Fourth one we have a Admin who can
manage all the managers as well as the subscribers.Admin can also view all the poems
and can activate and deactivate all the poems.

As the users visits the website they will find a home page which will consists of a header
in which it have the search module and the menu ( Home, Contact, Login) bellow which
we have a news corner and after the news corner we have got all poems where the

12
poems can been seen one by one in pagination. In the poems section the poems can
be liked as we and commented and can also be read-more. Below the poems it has got
a space in which the trending poem can be seen account to the likes and the comments
which is named as popular posts. After the popular post section the we have a section
named as latest post in which the users will be able to see the recently posted poems.In
the view page we also have an option to view the poems categories wise.We also have
the modeule names as search module in which we can search the poems according to
our needs and view them.The users can also subscribe to news letter if the want to get
the notification and stay updated with us.We have tried our level best to make it as user
friendly as well as seo friendly giving all the necessary links like Instagram page ns well
as the facebook links and few more mets tags for better seo.

Once the users creates the account he will have the status as deactivated Untill and
unless the user is activated by the admin or the manager.Once the admin or the
manager activates the user then the user can log-in.In this we have a common login
from which the user can log-in to their dashboard and add their own poems.The
importance of making the a common log-in is just to get the code minimized and we can
follow a good concept of DRY which is Don’t Repeat Your Self which states that once
the code is written we need to reuse the same type of codes.As the Subscriber gets its
dashboard after it has loged in successfully he has two options to upload his own
poems for which CK editor has being used for better and best performance and he can
view the home page from the session it self and can change the profile details if he want
to change and update it.He/She can also view his/her all poems and can also activate
and de activate the poem that he/she is not willing to show to the users. Now after
Subscribers we have manager who can manage the subscriber in the manager’s
dashboard the manager can add new categories can add new subscribers and also can
view all the poems and can also do its CRUD(Create Read Update Delete) Active and
Deactive operations. We have a Admin who can manage all the Managers ,
Subscribers, All Poems, System settings, Add Poems, Master Entries for the required
options or fields and contact us. He can perform all the crud operations (Create Read
Update Delete) at the same time activate and deactivate.The admin has also got the
rights and authority to add admin add managers, add subscribers as well as add
poems. He will also be able to see the people who contact them via contact us
page.Since it is totally dynamic we have implemented website setting in which the
admin can change anything on the view part like(Page Tittle) from his own dashboard.

When the subscriber is loged in then the session is set during the login so that we have
have a good track of the user.

Working of the Database

13
The working of the Database can be conveniently explained using the Data Flow
Diagrams or DFD.

Level 1 DFD:

The user can visit the Content Management System by either as a visitor or as a
subscriber by logging in.

14
Manage manager manage subscriber Create

Manage subscriber create update

Create Update Active

Update Delete inactive

Delete Active

Active Inactive

inactive

ALGORITHM USED ARE AS FOLLOWS

• CSRF TOKENS:- A CSRF Token is a secret, unique and unpredictable value a


server-side application generates in order to protect CSRF vulnerable resources.

• DON’T REPEAT YOURSELF (DRY) Concepts:- Dry concept is used so that the
codes ones written is a function is used again and again.

• SEARCHING ALGORITHMS:-Searching Algorithms are designed to check for an


element or retrieve an element from any data structure where it is stored. Based
on the type of search operation, these algorithms are generally classified into two
categories:

1. Sequential Search: In this, the list or array is traversed sequentially and


every element is checked. For example: Linear search.
2. Interval Search: These algorithms are specifically designed for searching in
sorted data-structures. These type of searching algorithms are much more
efficient than Linear Search as they repeatedly target the center of the
search structure and divide the search space in half. For Example: Binary
Search.

18

You might also like