SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
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.

Mais conteúdo relacionado

Mais procurados

A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application development
IAEME Publication
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft access
babyparul
 
Repository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity FrameworkRepository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity Framework
Akhil Mittal
 

Mais procurados (20)

Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Synopsis
SynopsisSynopsis
Synopsis
 
Beginners introduction to asp.net
Beginners introduction to asp.netBeginners introduction to asp.net
Beginners introduction to asp.net
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architecture
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Ruby on rails RAD
Ruby on rails RADRuby on rails RAD
Ruby on rails RAD
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
A study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application developmentA study of mvc – a software design pattern for web application development
A study of mvc – a software design pattern for web application development
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft access
 
Integration of Struts & Spring & Hibernate for Enterprise Applications
Integration of Struts & Spring & Hibernate for Enterprise ApplicationsIntegration of Struts & Spring & Hibernate for Enterprise Applications
Integration of Struts & Spring & Hibernate for Enterprise Applications
 
TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5TY.BSc.IT Java QB U5
TY.BSc.IT Java QB U5
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
MVC 4
MVC 4MVC 4
MVC 4
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate ppt
 
Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)
 
Repository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity FrameworkRepository Pattern in MVC3 Application with Entity Framework
Repository Pattern in MVC3 Application with Entity Framework
 
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report 6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
6 Week / Month Industrial Training in Hoshiarpur Punjab- PHP Project Report
 
TY.BSc.IT Java QB U6
TY.BSc.IT Java QB U6TY.BSc.IT Java QB U6
TY.BSc.IT Java QB U6
 

Semelhante a IRJET- Lightweight MVC Framework in PHP

report_vendor_connect
report_vendor_connectreport_vendor_connect
report_vendor_connect
Yash Mittal
 

Semelhante a IRJET- Lightweight MVC Framework in PHP (20)

IRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management SystemIRJET- Training and Placement Database Management System
IRJET- Training and Placement Database Management System
 
cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)cakephp UDUYKTHA (1)
cakephp UDUYKTHA (1)
 
Web application framework
Web application frameworkWeb application framework
Web application framework
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
report_vendor_connect
report_vendor_connectreport_vendor_connect
report_vendor_connect
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring Framework
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts notes
Struts notesStruts notes
Struts notes
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Php Framework
Php FrameworkPhp Framework
Php Framework
 
Php framework
Php frameworkPhp framework
Php framework
 
College information management system.doc
College information management system.docCollege information management system.doc
College information management system.doc
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
 
Asp.net With mvc handson
Asp.net With mvc handsonAsp.net With mvc handson
Asp.net With mvc handson
 
PHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniterPHP Frameworks and CodeIgniter
PHP Frameworks and CodeIgniter
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 

Mais de IRJET Journal

Mais de IRJET Journal (20)

TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURESTUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
STUDY THE EFFECT OF RESPONSE REDUCTION FACTOR ON RC FRAMED STRUCTURE
 
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
A COMPARATIVE ANALYSIS OF RCC ELEMENT OF SLAB WITH STARK STEEL (HYSD STEEL) A...
 
Effect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil CharacteristicsEffect of Camber and Angles of Attack on Airfoil Characteristics
Effect of Camber and Angles of Attack on Airfoil Characteristics
 
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
A Review on the Progress and Challenges of Aluminum-Based Metal Matrix Compos...
 
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
Dynamic Urban Transit Optimization: A Graph Neural Network Approach for Real-...
 
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
Structural Analysis and Design of Multi-Storey Symmetric and Asymmetric Shape...
 
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
A Review of “Seismic Response of RC Structures Having Plan and Vertical Irreg...
 
A REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADASA REVIEW ON MACHINE LEARNING IN ADAS
A REVIEW ON MACHINE LEARNING IN ADAS
 
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
Long Term Trend Analysis of Precipitation and Temperature for Asosa district,...
 
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD ProP.E.B. Framed Structure Design and Analysis Using STAAD Pro
P.E.B. Framed Structure Design and Analysis Using STAAD Pro
 
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
A Review on Innovative Fiber Integration for Enhanced Reinforcement of Concre...
 
Survey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare SystemSurvey Paper on Cloud-Based Secured Healthcare System
Survey Paper on Cloud-Based Secured Healthcare System
 
Review on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridgesReview on studies and research on widening of existing concrete bridges
Review on studies and research on widening of existing concrete bridges
 
React based fullstack edtech web application
React based fullstack edtech web applicationReact based fullstack edtech web application
React based fullstack edtech web application
 
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
A Comprehensive Review of Integrating IoT and Blockchain Technologies in the ...
 
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
A REVIEW ON THE PERFORMANCE OF COCONUT FIBRE REINFORCED CONCRETE.
 
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
Optimizing Business Management Process Workflows: The Dynamic Influence of Mi...
 
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic DesignMultistoried and Multi Bay Steel Building Frame by using Seismic Design
Multistoried and Multi Bay Steel Building Frame by using Seismic Design
 
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
Cost Optimization of Construction Using Plastic Waste as a Sustainable Constr...
 

Último

notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Último (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 

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.