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

PDF
Spring Framework -I
PPTX
Introduction To Building Enterprise Web Application With Spring Mvc
DOCX
Learning MVC Part 3 Creating MVC Application with EntityFramework
PPTX
Spring Basics
PDF
Web application development with laravel php framework version 4
PPTX
Jsp with mvc
PPTX
Spring MVC 5 & Hibernate 5 Integration
PPT
7) packaging and deployment
Spring Framework -I
Introduction To Building Enterprise Web Application With Spring Mvc
Learning MVC Part 3 Creating MVC Application with EntityFramework
Spring Basics
Web application development with laravel php framework version 4
Jsp with mvc
Spring MVC 5 & Hibernate 5 Integration
7) packaging and deployment

What's hot (20)

PPTX
Spring framework-tutorial
PDF
DOCX
Beginners introduction to asp.net
PPTX
Web apps architecture
PPTX
Spring framework
DOCX
Server side programming bt0083
PDF
Ruby on rails RAD
PPTX
CODE IGNITER
PDF
A study of mvc – a software design pattern for web application development
PPTX
Introduction to ejb and struts framework
DOCX
Microsoft access
PDF
Integration of Struts & Spring & Hibernate for Enterprise Applications
DOCX
TY.BSc.IT Java QB U5
PPTX
ASP.NET MVC Performance
PPTX
PPTX
Struts & hibernate ppt
DOCX
Report on mini project(Student database handling using RMI)
DOCX
Repository Pattern in MVC3 Application with Entity Framework
DOCX
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
DOCX
TY.BSc.IT Java QB U6
Spring framework-tutorial
Beginners introduction to asp.net
Web apps architecture
Spring framework
Server side programming bt0083
Ruby on rails RAD
CODE IGNITER
A study of mvc – a software design pattern for web application development
Introduction to ejb and struts framework
Microsoft access
Integration of Struts & Spring & Hibernate for Enterprise Applications
TY.BSc.IT Java QB U5
ASP.NET MVC Performance
Struts & hibernate ppt
Report on mini project(Student database handling using RMI)
Repository Pattern in MVC3 Application with Entity Framework
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
TY.BSc.IT Java QB U6
Ad

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

PDF
IRJET- Training and Placement Database Management System
PPTX
cakephp UDUYKTHA (1)
PPTX
Web application framework
PPTX
Spring Framework
DOCX
report_vendor_connect
PDF
Principles of MVC for Rails Developers
PDF
Getting Started with Spring Framework
PDF
MVC Interview Questions PDF By ScholarHat
PPTX
Spring tutorials
PPT
MVC Pattern. Flex implementation of MVC
PDF
Struts notes
PDF
Struts natraj - satya
PDF
Struts natraj - satya
PDF
Spring Framework-II
PPTX
Php Framework
PDF
Php framework
DOC
College information management system.doc
PPT
MVC Demystified: Essence of Ruby on Rails
PPTX
Asp.net With mvc handson
PPT
PHP Frameworks and CodeIgniter
IRJET- Training and Placement Database Management System
cakephp UDUYKTHA (1)
Web application framework
Spring Framework
report_vendor_connect
Principles of MVC for Rails Developers
Getting Started with Spring Framework
MVC Interview Questions PDF By ScholarHat
Spring tutorials
MVC Pattern. Flex implementation of MVC
Struts notes
Struts natraj - satya
Struts natraj - satya
Spring Framework-II
Php Framework
Php framework
College information management system.doc
MVC Demystified: Essence of Ruby on Rails
Asp.net With mvc handson
PHP Frameworks and CodeIgniter
Ad

More from IRJET Journal (20)

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

Recently uploaded (20)

PPTX
TE-AI-Unit VI notes using planning model
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PDF
ETO & MEO Certificate of Competency Questions and Answers
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Practice Questions on recent development part 1.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
anatomy of limbus and anterior chamber .pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
web development for engineering and engineering
PDF
Introduction to Data Science: data science process
PPTX
Glazing at Facade, functions, types of glazing
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PPTX
Road Safety tips for School Kids by a k maurya.pptx
PPTX
AgentX UiPath Community Webinar series - Delhi
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
TE-AI-Unit VI notes using planning model
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
July 2025: Top 10 Read Articles Advanced Information Technology
Lesson 3_Tessellation.pptx finite Mathematics
ETO & MEO Certificate of Competency Questions and Answers
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Practice Questions on recent development part 1.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
anatomy of limbus and anterior chamber .pptx
OOP with Java - Java Introduction (Basics)
web development for engineering and engineering
Introduction to Data Science: data science process
Glazing at Facade, functions, types of glazing
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Road Safety tips for School Kids by a k maurya.pptx
AgentX UiPath Community Webinar series - Delhi
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...

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.