just for you gifts haworth frankie phoenix coupons walden's ridge whitewater coupon code a perfect birthday gift for a best friend belk online coupons free shipping

What does mean MVC in PHP Language

- Advertisement -
- Advertisement -

If you just finished beginner level PHP and OOP then you need to focus on MVC workflow. Because 99% framework like Laravel, CodeIgniter, Zend, Yii, CakePHP, etc are created with MVC technology. Besides PHP language, MVC is supported by other languages like Java, C# (C-Sharp), etc. So it has an extreme-level facility to make a big project 🙂

What is MVC

We can see the MVC definition from Wikipedia. MVC full form is Model, View, Controller. When you will learn OOP (Object Oriented Programming) in PHP, you will learn about many design patterns like- Abstract, Singleton, Factory, Observer, Decorator, Facade, etc.

So MVC is a software design pattern commonly used for developing user interfaces that divide the related program logic into three (Mode-View-Controller) interconnected elements.

How does work MVC

Generally a Controller process request from GET, POST method. A Model communicates with the Controller via SELECT, INSERT, UPDATE, DELETE and View display processed data with HTML. Details are bellow-

The Model

  • ✓ Data related logic
  • ✓ Interacts with the database (SELECT, INSERT, UPDATE, DELETE)
  • ✓ Communicates With Controller
  • ✓ Can sometimes update the view

The View

  • ✓ What the user sees in the browser (UI)
  • ✓ Usually consists of HTML/CSS
  • ✓ Communicates with the controller
  • ✓ Can be passed dynamic values from the controller

The Controller

  • ✓ Receives input from the URL, form, view, etc
  • ✓ Processes requests (GET, POST, etc)
  • ✓ Gets data from the model
  • ✓ Passes data to the view

Actually, I have inspired to read the post from Brad Traversy Media. They have many free and premium tutorials on PHP. Note that: they aren’t paying me to write the post, I love their tutorials, so I have shared 😛

BTW, now I think you know how does work the MVC technology. Now if you complete a free course on MVC from YouTube, the concept will more clear. Later you will learn CodeIgniter. Because it’s an easy framework created with MVC style.

Don’t forget to share the article with your friends.

- Advertisement -
Mofizulhttp://mofizul.com
Web Developer & Front-end Expert

Related Articles

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35,800FansLike
75,435FollowersFollow
6,048,675SubscribersSubscribe
- Advertisement -

Latest Articles