SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1995
Lightweight MVC Framework in PHP
Ms. Namrata Jadhav1, Prof. Vaishali Londhe2
1 M.E. Student, Department of Computer Engineering, Yadavrao Tasgaonkar Institute of Engineering & Technology,
Karjat, Maharashtra, India
2 Professor, Department of Computer Engineering, Yadavrao Tasgaonkar Institute of Engineering & Technology,
Karjat, Maharashtra, India
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - PHP (Hypertext Preprocessor) is widely used
open source general purpose scripting language that is
especially suited for web development and can be embedded
into HTML. In object oriented programming development,
model-view-controller (MVC) is the name of methodology or
design pattern for successfully and efficiently relating the
user interface to underlying data models. This paper
introduced a Lightweight Model-View-Controller of PHP
programming format. The lightweight MVC format of php is
adjustment based on traditional PHP programming format
which was added in the MVC architecture.
Key Words: PHP, Lightweight MVC, OOPS, HTML,
Framework in PHP
1. INTRODUCTION
Object Oriented Programming, or OOP, refers to the
method of programming that invokes the use of classes to
organize the data and structure of an application. Object-
Oriented Programming (OOP) is a programming model
that is based on the concept of classes and objects. As
opposed to procedural programming where the focus is on
writing procedures or functions that perform operations
on the data, in object-oriented programming the focus is
on the creations of objects which contain both data and
functions together. It is used to manage dynamic content,
databases, session tracking, even build entire e-commerce
sites. PHP supports a large number of major protocols such
as POP3, IMAP, and LDAP. PHP4 added support for Java
and distributed object architectures (COM and CORBA),
making n-tier development a possibility for the first time.
The MVC pattern has been heralded by many developers
as a useful pattern for the reuse of object code and a
pattern that allows them to significantly reduce the time it
takes to develop applications with user interfaces. The
MVC pattern has been heralded by many developers as a
useful pattern for the reuse of code and a pattern that
allows them to significantly reduce the time it takes to
develop applications with user interfaces.
Lightweight MVC development framework, which can not
only effectively improve the efficiency of system
development and reduce the complexity of the
development, but also have good improvements in the
security, stability and robustness of the system.
2. PHP AND MVC FORMAT:
The PHP and MVC format has own properties and function
which are described below:
2.1. Typically PHP Programming
PHP is probably the most popular scripting language on
the web. It is used to enhance web pages. With PHP, you
can do things like create username and password login
pages, check details from a form, create forums, picture
galleries, surveys, and a whole lot more. If you've come
across a web page that ends in PHP, then the author has
written some programming code to liven up the plain, old
HTML.
The PHP software works with the web server, which is the
software that delivers web pages to the world. When you
type a URL into your web browser’s address bar, you’re
sending a message to the web server at that URL, asking it
to send you an HTML file. The web server responds by
sending the requested file. Your browser reads the HTML
file and displays the web page.
You also request a file from the web server when you click
a link in a web page. In addition, the web server processes
a file when you click a web page button that submits a
form. This process is essentially the same when PHP is
installed. You request a file, the web server happens to be
running PHP, and it sends HTML back to the browser,
According to Fig-1, client web browser is send request to
web server. Web server is accept this request and send
information to PHP Preprocessor as PHP form. After
processing, it shows the output as HTML form on Web
Server and Client Web browser accept HTML form from
Web Server and it display the HTML page as output.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1996
Fig -1 : Work of PHP with HTML
However, PHP's true strength lies in its ability to access
databases. PHP can access more than 20 different
databases (including MySQL), and can manipulate the
information within those databases based on input from
an online user. PHP can also be used to output images, PDF
files and even Flash movies from your website.
2.2 MVC Format
MVC, or Model-View-Controller is a software architecture,
or design pattern, that is used in software engineering,
whose fundamental principle is based on the idea that the
logic of an application should be separated from its
presentation. In this format, MVC has part and each part
has it’s own function.
Model : This part is manage the business logic and the
application data. It can be used to perform data
validations, process data and store it. The data can come
from flat file, database, XML document and Other valid
data sources.
View: This part is suitable for interaction, typically a user
interface element. This part deals with presenting the data
to the user. Multiple views can exist for a single model for
different purposes.
Controller: This part is represents the classes connecting
the model and the view, and is used to communicate
between classes in the model and view. Controller is
receive input from user and instruct model and view
perform action and this action is depend on input.
Fig-2: MVC Pattern
In Fig-2, MVC pattern is represents to the user, in a web
application as a output. In this pattern, the controller holds
a reference to both the model and a data store and is
responsible for keeping the model persisted. The
controller responds to lifecycle events like Load, Save,
Delete, and issues commands to the data store to fetch or
update the model. A slightly different take from having a
model handle the persistence is to introduce a separate
concept of Store and Adapter API. Store, Model and
Adapter (in some frameworks it is called Proxy) work
hand by hand. Store is the repository that holds the loaded
models, and it also provides functions such as creating,
querying and filtering the model instances contained
within it.
3. Lightweight MVC:
This section is presenting Lightweight MVC which is take
those things, readability, maintainability, efficiency,
reconfigurable. Lightweight MVC is also called as MVC-Like
or L-MVC. By using this framework, the project will be
more maintainable, reliable and coding is very clear and
easy for understand.
Fig-3: Lightweight MVC Framework
Fig-3 is indicate Lightweight MVC architecture which is
consist multiple sections like index page, security,
libraries, business controller, MVC base class, database and
template. It also can give full advantages of the MVC
pattern.
Index.php :
Index file is always initializing resource which is L-MVC
framework needed including the configuring file.
According to parameter in the URL, the corresponding
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1997
controller BusinessController is found. HTTP request and
submitted data will be sort before controller loaded.
<?php
require_once(dirname(_FILE_).“config/config.php”);
require_once(CONFIG_PATH.”autoload/autoload.php”);
$App = new App();
$App -> run();
?>
Model Layer :
The model is representing business logic and data of an
application. It is responsible for storing, deleting and
updating the application data. This operations are included
database operations. The logic of operation and business
operation will be implemented together.
DataAccess class is included to encapsulated database
operation method, in which the database can be
automatically linked and released in the lightweight MVC
framework.
DataAcess is implement with programming as follows:
Class DataAccess {
protected $host_name ;
protected $user_name ;
protected $password;
protected $database_name;
protected $database;
protected $query;
protected $result;
protected $result_array = array();
Function _construct($host_name, $user_name,
$password, $database_name)
{
$this -> host_name = $host_name;
$this -> user_name = $user_name;
$this -> password = $password;
$this -> database_name = $database_name;
mysql ($this -> host_name, $this -> user_name, $this ->
password, $this -> database_name);
if(!$this -> db)
{
throw new Exception(“Can’t connect database”);
}
$this -> db ->query(“set name”);
}
The data deal with Model and send back to the Controller
then via View to the controller.
Controller Layer :
Controller is handling data that the user inputs or submit
and update the Model. The controller accepts the input and
view to perform action according on input. The controller
is core class of lightweight MVC framework. The controller
is simply collector of information, which is passes to Model
to arranging the storage without containing logic. The
controller takes request and execute it and invoke model.
The model is send request to presentation layer.
View Layer :
The View is working as presentation layer. This layer is
use for formatting data which is received from model. The
Controller, Model and View Connected to each other but
developed and maintained separately. The View is uses
template mechanism and this template mechanism can
reuse specific part of page.
3.1. Pros of Lightweight MVC Framework :
 Get exact functionality you want.
 Control over small details important to your project.
 Familiarity with code.
 Fast development.
 Fast modification.
 Low maintenance.
 High speed of execution.
 Security.
 Extreme simplicity.
 Reliability in regard to future development.
3.2 Cons of Lightweight MVC Framework :
 You should have real understanding of programming.
 It is tedious task for large and very custom websites.
 Less inbuilt support.
4. CONCLUSION
Lightweight MVC Framework is very useful and most used
in IT industry. This paper introduced that the Lightweight
MVC Framework is working with PHP and oops concept
and Lightweight MVC hast its own functions and
properties. This technology can save you a lot of time and
effort and provide peace of mind as you develop your PHP
application. By studying lightweight MVC framework is an
excellent way to learn and improve your craft in software
development and help you stay on top of the evolving
world of PHP and framework development.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072
© 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1998
REFERENCES
[1] Xiohong Li, Na Liu, “Research on Lightweight MVC”,
Information Science and Engineering School of Dalian
Polytechnic university, Dalian, China.
[2] Dandan Zhang, Zhiqiang Wei, Yougquan Yang, “Research
on Lightweight MVC Framework Based on Spring MVC
and Mybatis”, Department of Computer Science, Ocean
University of China.
[3] Guanhua Wang, “Application of lightweight MVC-like
structure in PHP”, School of Computer Science &
Engineering, Southeast University Nanjing, China.
[4] Manisha Jailia, Ashok Kumar, Manisha Agarwal, Isha
Sinha, “Behavior of MVC (Model View Controller) based
Web Application Developed in PHP and .NET
framework”, Banasthali Vidyapith , Rajasthan, India.

More Related Content

What's hot (20)

PPTX
Spring framework-tutorial
vinayiqbusiness
 
PDF
Synopsis
Gaurav Gopal Gupta
 
DOCX
Beginners introduction to asp.net
Naveen Kumar Veligeti
 
PPTX
Web apps architecture
Tanmoy Barman
 
PPTX
Spring framework
Sonal Poddar
 
DOCX
Server side programming bt0083
Divyam Pateriya
 
PDF
Ruby on rails RAD
Alina Danila
 
PPTX
CODE IGNITER
Yesha kapadia
 
PDF
A study of mvc – a software design pattern for web application development
IAEME Publication
 
PPTX
Introduction to ejb and struts framework
s4al_com
 
DOCX
Microsoft access
babyparul
 
PDF
Integration of Struts & Spring & Hibernate for Enterprise Applications
IJMER
 
DOCX
TY.BSc.IT Java QB U5
Lokesh Singrol
 
PPTX
ASP.NET MVC Performance
rudib
 
PPTX
MVC 4
Vasilios Kuznos
 
PPTX
Struts & hibernate ppt
Pankaj Patel
 
DOCX
Report on mini project(Student database handling using RMI)
shraddha mane
 
DOCX
Repository Pattern in MVC3 Application with Entity Framework
Akhil Mittal
 
DOCX
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
c-tac
 
DOCX
TY.BSc.IT Java QB U6
Lokesh Singrol
 
Spring framework-tutorial
vinayiqbusiness
 
Beginners introduction to asp.net
Naveen Kumar Veligeti
 
Web apps architecture
Tanmoy Barman
 
Spring framework
Sonal Poddar
 
Server side programming bt0083
Divyam Pateriya
 
Ruby on rails RAD
Alina Danila
 
CODE IGNITER
Yesha kapadia
 
A study of mvc – a software design pattern for web application development
IAEME Publication
 
Introduction to ejb and struts framework
s4al_com
 
Microsoft access
babyparul
 
Integration of Struts & Spring & Hibernate for Enterprise Applications
IJMER
 
TY.BSc.IT Java QB U5
Lokesh Singrol
 
ASP.NET MVC Performance
rudib
 
Struts & hibernate ppt
Pankaj Patel
 
Report on mini project(Student database handling using RMI)
shraddha mane
 
Repository Pattern in MVC3 Application with Entity Framework
Akhil Mittal
 
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
c-tac
 
TY.BSc.IT Java QB U6
Lokesh Singrol
 

Similar to IRJET- Lightweight MVC Framework in PHP (20)

PPTX
Ps02 cint24 mvc in php
Conestoga Collage
 
PDF
DPC2007 Zend Framework (Gaylord Aulke)
dpc
 
PDF
Analyzing Optimal Practises for Web Frameworks
IRJET Journal
 
PDF
Php framework
cncwebworld
 
PPTX
Php Framework
cncwebworld
 
PDF
Web frameworks
Valerio Maggio
 
PPTX
Codeigniter
shah baadshah
 
PDF
Presentation 1 Web--dev
altsav
 
PDF
MVC in PHP
Vineet Kumar Saini
 
PDF
PHP Web Development.pdf
Fariha Tasnim
 
PDF
Object Oriented Programming with Laravel - Session 1
Shahrzad Peyman
 
PDF
Php and-mvc
Manoj Sahoo
 
PPTX
MVC & CodeIgniter
Harshit Gupta
 
PPTX
Building Large Scale PHP Web Applications with Laravel 4
Darwin Biler
 
PPT
Zend
marcosTedsys
 
DOCX
Development of Multiplatform CMS System with Zend Framework
Sinisa Vukovic
 
PPTX
Codeignitor
Gandhi Ravi
 
PPT
Beautiful Models in PHP
brandonsavage
 
PPT
PHP Frameworks and CodeIgniter
KHALID C
 
Ps02 cint24 mvc in php
Conestoga Collage
 
DPC2007 Zend Framework (Gaylord Aulke)
dpc
 
Analyzing Optimal Practises for Web Frameworks
IRJET Journal
 
Php framework
cncwebworld
 
Php Framework
cncwebworld
 
Web frameworks
Valerio Maggio
 
Codeigniter
shah baadshah
 
Presentation 1 Web--dev
altsav
 
MVC in PHP
Vineet Kumar Saini
 
PHP Web Development.pdf
Fariha Tasnim
 
Object Oriented Programming with Laravel - Session 1
Shahrzad Peyman
 
Php and-mvc
Manoj Sahoo
 
MVC & CodeIgniter
Harshit Gupta
 
Building Large Scale PHP Web Applications with Laravel 4
Darwin Biler
 
Development of Multiplatform CMS System with Zend Framework
Sinisa Vukovic
 
Codeignitor
Gandhi Ravi
 
Beautiful Models in PHP
brandonsavage
 
PHP Frameworks and CodeIgniter
KHALID C
 
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
PDF
Kiona – A Smart Society Automation Project
IRJET Journal
 
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
PDF
Breast Cancer Detection using Computer Vision
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
PDF
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
PDF
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
IRJET Journal
 
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
IRJET Journal
 
Kiona – A Smart Society Automation Project
IRJET Journal
 
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
IRJET Journal
 
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
IRJET Journal
 
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
IRJET Journal
 
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
IRJET Journal
 
BRAIN TUMOUR DETECTION AND CLASSIFICATION
IRJET Journal
 
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
IRJET Journal
 
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
IRJET Journal
 
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
IRJET Journal
 
Breast Cancer Detection using Computer Vision
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
IRJET Journal
 
Auto-Charging E-Vehicle with its battery Management.
IRJET Journal
 
Analysis of high energy charge particle in the Heliosphere
IRJET Journal
 
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
IRJET Journal
 
Ad

Recently uploaded (20)

PDF
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPTX
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PPTX
Distribution reservoir and service storage pptx
dhanashree78
 
PPTX
darshai cross section and river section analysis
muk7971
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
PDF
NTPC PATRATU Summer internship report.pdf
hemant03701
 
PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
PPTX
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
PPTX
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
PDF
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
PDF
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
Knowledge Representation : Semantic Networks
Amity University, Patna
 
Data structures notes for unit 2 in computer science.pdf
sshubhamsingh265
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
UNIT 1 - INTRODUCTION TO AI and AI tools and basic concept
gokuld13012005
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
Distribution reservoir and service storage pptx
dhanashree78
 
darshai cross section and river section analysis
muk7971
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
NTPC PATRATU Summer internship report.pdf
hemant03701
 
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
MODULE 04 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
MODULE-5 notes [BCG402-CG&V] PART-B.pdf
Alvas Institute of Engineering and technology, Moodabidri
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Knowledge Representation : Semantic Networks
Amity University, Patna
 

IRJET- Lightweight MVC Framework in PHP

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1995 Lightweight MVC Framework in PHP Ms. Namrata Jadhav1, Prof. Vaishali Londhe2 1 M.E. Student, Department of Computer Engineering, Yadavrao Tasgaonkar Institute of Engineering & Technology, Karjat, Maharashtra, India 2 Professor, Department of Computer Engineering, Yadavrao Tasgaonkar Institute of Engineering & Technology, Karjat, Maharashtra, India ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - PHP (Hypertext Preprocessor) is widely used open source general purpose scripting language that is especially suited for web development and can be embedded into HTML. In object oriented programming development, model-view-controller (MVC) is the name of methodology or design pattern for successfully and efficiently relating the user interface to underlying data models. This paper introduced a Lightweight Model-View-Controller of PHP programming format. The lightweight MVC format of php is adjustment based on traditional PHP programming format which was added in the MVC architecture. Key Words: PHP, Lightweight MVC, OOPS, HTML, Framework in PHP 1. INTRODUCTION Object Oriented Programming, or OOP, refers to the method of programming that invokes the use of classes to organize the data and structure of an application. Object- Oriented Programming (OOP) is a programming model that is based on the concept of classes and objects. As opposed to procedural programming where the focus is on writing procedures or functions that perform operations on the data, in object-oriented programming the focus is on the creations of objects which contain both data and functions together. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites. PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4 added support for Java and distributed object architectures (COM and CORBA), making n-tier development a possibility for the first time. The MVC pattern has been heralded by many developers as a useful pattern for the reuse of object code and a pattern that allows them to significantly reduce the time it takes to develop applications with user interfaces. The MVC pattern has been heralded by many developers as a useful pattern for the reuse of code and a pattern that allows them to significantly reduce the time it takes to develop applications with user interfaces. Lightweight MVC development framework, which can not only effectively improve the efficiency of system development and reduce the complexity of the development, but also have good improvements in the security, stability and robustness of the system. 2. PHP AND MVC FORMAT: The PHP and MVC format has own properties and function which are described below: 2.1. Typically PHP Programming PHP is probably the most popular scripting language on the web. It is used to enhance web pages. With PHP, you can do things like create username and password login pages, check details from a form, create forums, picture galleries, surveys, and a whole lot more. If you've come across a web page that ends in PHP, then the author has written some programming code to liven up the plain, old HTML. The PHP software works with the web server, which is the software that delivers web pages to the world. When you type a URL into your web browser’s address bar, you’re sending a message to the web server at that URL, asking it to send you an HTML file. The web server responds by sending the requested file. Your browser reads the HTML file and displays the web page. You also request a file from the web server when you click a link in a web page. In addition, the web server processes a file when you click a web page button that submits a form. This process is essentially the same when PHP is installed. You request a file, the web server happens to be running PHP, and it sends HTML back to the browser, According to Fig-1, client web browser is send request to web server. Web server is accept this request and send information to PHP Preprocessor as PHP form. After processing, it shows the output as HTML form on Web Server and Client Web browser accept HTML form from Web Server and it display the HTML page as output.
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1996 Fig -1 : Work of PHP with HTML However, PHP's true strength lies in its ability to access databases. PHP can access more than 20 different databases (including MySQL), and can manipulate the information within those databases based on input from an online user. PHP can also be used to output images, PDF files and even Flash movies from your website. 2.2 MVC Format MVC, or Model-View-Controller is a software architecture, or design pattern, that is used in software engineering, whose fundamental principle is based on the idea that the logic of an application should be separated from its presentation. In this format, MVC has part and each part has it’s own function. Model : This part is manage the business logic and the application data. It can be used to perform data validations, process data and store it. The data can come from flat file, database, XML document and Other valid data sources. View: This part is suitable for interaction, typically a user interface element. This part deals with presenting the data to the user. Multiple views can exist for a single model for different purposes. Controller: This part is represents the classes connecting the model and the view, and is used to communicate between classes in the model and view. Controller is receive input from user and instruct model and view perform action and this action is depend on input. Fig-2: MVC Pattern In Fig-2, MVC pattern is represents to the user, in a web application as a output. In this pattern, the controller holds a reference to both the model and a data store and is responsible for keeping the model persisted. The controller responds to lifecycle events like Load, Save, Delete, and issues commands to the data store to fetch or update the model. A slightly different take from having a model handle the persistence is to introduce a separate concept of Store and Adapter API. Store, Model and Adapter (in some frameworks it is called Proxy) work hand by hand. Store is the repository that holds the loaded models, and it also provides functions such as creating, querying and filtering the model instances contained within it. 3. Lightweight MVC: This section is presenting Lightweight MVC which is take those things, readability, maintainability, efficiency, reconfigurable. Lightweight MVC is also called as MVC-Like or L-MVC. By using this framework, the project will be more maintainable, reliable and coding is very clear and easy for understand. Fig-3: Lightweight MVC Framework Fig-3 is indicate Lightweight MVC architecture which is consist multiple sections like index page, security, libraries, business controller, MVC base class, database and template. It also can give full advantages of the MVC pattern. Index.php : Index file is always initializing resource which is L-MVC framework needed including the configuring file. According to parameter in the URL, the corresponding
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1997 controller BusinessController is found. HTTP request and submitted data will be sort before controller loaded. <?php require_once(dirname(_FILE_).“config/config.php”); require_once(CONFIG_PATH.”autoload/autoload.php”); $App = new App(); $App -> run(); ?> Model Layer : The model is representing business logic and data of an application. It is responsible for storing, deleting and updating the application data. This operations are included database operations. The logic of operation and business operation will be implemented together. DataAccess class is included to encapsulated database operation method, in which the database can be automatically linked and released in the lightweight MVC framework. DataAcess is implement with programming as follows: Class DataAccess { protected $host_name ; protected $user_name ; protected $password; protected $database_name; protected $database; protected $query; protected $result; protected $result_array = array(); Function _construct($host_name, $user_name, $password, $database_name) { $this -> host_name = $host_name; $this -> user_name = $user_name; $this -> password = $password; $this -> database_name = $database_name; mysql ($this -> host_name, $this -> user_name, $this -> password, $this -> database_name); if(!$this -> db) { throw new Exception(“Can’t connect database”); } $this -> db ->query(“set name”); } The data deal with Model and send back to the Controller then via View to the controller. Controller Layer : Controller is handling data that the user inputs or submit and update the Model. The controller accepts the input and view to perform action according on input. The controller is core class of lightweight MVC framework. The controller is simply collector of information, which is passes to Model to arranging the storage without containing logic. The controller takes request and execute it and invoke model. The model is send request to presentation layer. View Layer : The View is working as presentation layer. This layer is use for formatting data which is received from model. The Controller, Model and View Connected to each other but developed and maintained separately. The View is uses template mechanism and this template mechanism can reuse specific part of page. 3.1. Pros of Lightweight MVC Framework :  Get exact functionality you want.  Control over small details important to your project.  Familiarity with code.  Fast development.  Fast modification.  Low maintenance.  High speed of execution.  Security.  Extreme simplicity.  Reliability in regard to future development. 3.2 Cons of Lightweight MVC Framework :  You should have real understanding of programming.  It is tedious task for large and very custom websites.  Less inbuilt support. 4. CONCLUSION Lightweight MVC Framework is very useful and most used in IT industry. This paper introduced that the Lightweight MVC Framework is working with PHP and oops concept and Lightweight MVC hast its own functions and properties. This technology can save you a lot of time and effort and provide peace of mind as you develop your PHP application. By studying lightweight MVC framework is an excellent way to learn and improve your craft in software development and help you stay on top of the evolving world of PHP and framework development.
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 05 Issue: 03 | Mar-2018 www.irjet.net p-ISSN: 2395-0072 © 2018, IRJET | Impact Factor value: 6.171 | ISO 9001:2008 Certified Journal | Page 1998 REFERENCES [1] Xiohong Li, Na Liu, “Research on Lightweight MVC”, Information Science and Engineering School of Dalian Polytechnic university, Dalian, China. [2] Dandan Zhang, Zhiqiang Wei, Yougquan Yang, “Research on Lightweight MVC Framework Based on Spring MVC and Mybatis”, Department of Computer Science, Ocean University of China. [3] Guanhua Wang, “Application of lightweight MVC-like structure in PHP”, School of Computer Science & Engineering, Southeast University Nanjing, China. [4] Manisha Jailia, Ashok Kumar, Manisha Agarwal, Isha Sinha, “Behavior of MVC (Model View Controller) based Web Application Developed in PHP and .NET framework”, Banasthali Vidyapith , Rajasthan, India.