mvc with codeigniter presented by bhanu priya. mvc stands for "model view controller”. ...

24
MVC WITH CODEIGNITER Presented By Bhanu Priya

Upload: moris-godwin-grant

Post on 19-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

MVC WITH CODEIGNITER

Presented By Bhanu Priya

Page 2: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

MVC

MVC stands for "Model View Controller”.

Model-View-Controller is a software architecture, or design pattern, that is used in software engineering for developing web application.

MVC is a concept that enables us to separate our business logic from the presentation.

Page 3: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Model View Controller Architecture

Page 4: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Model View Controller contains three parts.

Model View Controller

PARTS OF MVC

Page 5: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

The model is a lowest level of the pattern.

Model manages all the behaviour of the data of the application.

It responds to the requests from view.

It also responds to instruction from the controller to update itself

MODEL

Page 6: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

View is used for displaying all or portion of data to the user.

View can present the data in a particular format which is triggered by controller’s decision.

Script based templating system like Jsp , Asp , PHP, Ajax(Easy to integrate).

VIEW

Page 7: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

The controller is responsible for responding to user input and perform interactions on the data model objects.

The controller receives the input and validates the input, then performs the business operation that modifies the state of the data model.

Controller acts as interaction between model and view.

CONTROLLER

Page 8: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Controller receives all the requests from the user for the application with an isolation.

It works with the model to prepare any data needed by the view.

It also represents to instruction from the controller to update itself.

PROCESS

Page 9: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

The user interacts with the View which presents a web form.

The user submits the form, and the Controller receives the POST request. It passes this data to the Model.

The Model updates and queries the database and sends the result back to the Controller.

The Controller passes the Model’s response to the View.

The View updates itself with the new data and is displayed to the user.

Page 10: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

ARCHITECTURE

Page 11: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Reduce the code complexity.

Reusability.

Extendability.

Time Consuming.

WHY USE MVC

Page 12: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

There’s increased complexity as an application may use other patterns at the same time as MVC.

The view and the controller are closely coupled which makes modification to one affect the other.

When the model is active frequent changes to model can result in excessive updates of the corresponding views.

PROBLEMS OF MVC

Page 13: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Reusability.

Clarity of design.

Efficient modularity.

Multiple views.

Ease of growth.

Distributable.

ADVANTAGES OF MVC

Page 14: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

It is too complex to implement.

It is not suitable for smaller application.

There is a chance to occur code duplication.

Increased complexity.

Close coupling between view and controller.

DISADVANTAGES OF MVC

Page 15: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Substitutable user interface.

User interface components.

Multiple simultaneous views of the same model.

Synchronized views.

Easier user interface changes.

Easier testing.

BENEFITS OF MVC

Page 16: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Codeigniter is an Application Development Framework - a toolkit - for people who build web sites using PHP.

Its goal is to enable you to develop projects much faster than you could if you were writing code from scratch.

Rich set of libraries for commonly needed tasks, as well as a simple interface and logical structure to access these libraries.

It is focused by minimum amount of code.

CODEIGNITER

Page 17: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

IT is primarily focus on,

Model-View-Controller basics. Routing basics. Form validation. Performing basic database queries using "Active Record“.

CODEIGNITER(CONTIN)

Page 18: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

<?php

Class ABC extends XY_Controller {          Public function index ()          {                  Echo ‘Hello World!’;          }          public functionwishes()          {       echo ‘Good Morning!’;          } } ?>

For example

Page 19: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Easy to learn, adopt and deploy.

Easy handling and customizing.

We can add new functionality without affecting the customization at all.

Offers flexibility and easy management With MVC based framework.

Active Record Implementation is simply superb and easy to remember.

ADVANTAGES OF CODEIGNITER

Page 20: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Provides easier configuration and customization of configuration files.

Good collection of possessed libraries.

Awesome documentation of the user guide, which makes it easy for any coder to use the whole framework.

Enables to incorporate its own existing scripts as well as develop core libraries for the system.

Page 21: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

Its PHP based only and not very object-oriented in some parts.

PHP legacy code.

Irregular releases.

DISADVANTAGES OF CODEIGNITER

Page 22: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

A small track and astounding presentation.

Configuration and normal coding rules are not required.

Depiction of straightforward solutions.

Free from complex structures and development.

BENEFITS OF CODEIGNITER

Page 23: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

http://www.tutorialspoint.com/struts_2/basic_mvc_architecture.htm

http://salopek.eu/content/28/create-a-simple-php-mvc-framework

http://ellislab.com/codeigniter http://ellislab.com/codeigniter/user-guide/ http://phpdog.blogspot.in/2012/02/codeigniter-tutorials-for-

beginners.html http://tutsforweb.blogspot.in/2012/05/user-registration-with-

codeigniter.html

REFERENCE

Page 24: MVC WITH CODEIGNITER Presented By Bhanu Priya.  MVC stands for "Model View Controller”.  Model-View-Controller is a software architecture, or design

THANK YOU