Understanding the basic need of MVC architecture

1,125 views

Published on

Understanding the basic need of MVC architecture by anil labs

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,125
On SlideShare
0
From Embeds
0
Number of Embeds
80
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Understanding the basic need of MVC architecture

  1. 1. anil2u.info http://www.anil2u.info/2011/11/understanding-the-basic-need-of-mvc-architecture/Understanding the basic need of MVC architectureHome » Articles, General Category »November 18, 2011In this post i would like to explain about basic need of MVC architecture while develop the complexapplications. What is MVC is explained in my earlier post. I will explain this approach with smallexample.Target : Identify the Red ball in the box from the three balls (red, green and white )Case 1:In this case all balls are in the one box. Identify the all red balls is very difficult. Here we can find it inthe first pick or we have to check the all balls in the box. It is very time consuming. And not easy toidentify.Case 2:In this case we havetwo boxes. First boxcontains red andwhite balls. Secondbox contains greenbals.Compare to firstcase it is easy toidentify. But there isconfuse in identify thetarget in first box.Here also we tospend less time Understanding the basic need of MVC architecture | Anil Labscompare to first casebut spend time toidentify. We can find itfirst pick or check all balls in the box. Here identify the red balls from two balls so it very toidentifying.Case 3:
  2. 2. Case 3:In this case we havethree boxes. First boxcontanins red balls,second one is whiteballs and third one isgreen balls. It is veryeasy to identify thered balls in this case.With very less timecompare to abovetwo case we can Understanding the basic need of MVC architecture | Anil Labsidentify. There is noconfuse whilechoosing or identify the red balls. Understanding the basic need of MVC architecture | Anil LabsNow i am applying these cases to PHP development phases.Case 1 : Here we develop the application with combaining the HTML , PHP code alongwith the Database in a single page.If we face the bug and we know there is bug in Database, then also we need to check all code toidentify that bug in this case. We can identify the bug in starting of code then we feel happy. If wedidn’t find that one in the starting of the code then we need to check entaire code. Generally if wecombine all code that means we need to check in plenty lines of code.Example :Core PHP applications ( Combination of PHP, Database and HTML )Case 2 : Here we develop the applicaion with differenciate the HTML from combination ofPHP and Database.If we face the issue with database then directly go and check in coding part and find the relevent lineof code and rectify it. In this we need to check the all coding part. To check the bug took less timecompare with the case1. But it also took time.Example :Smarty ( Template engine ) – Combination of Coding and Datbase in one part and HTML is in
  3. 3. Smarty ( Template engine ) – Combination of Coding and Datbase in one part and HTML is inanother part.Case 3 : Here we develop the application with differnciate the HTML , PHP and Database.If we know the bug in database then directly go to the database files and rectify it. It is very easy toidentify and rectify it. Easy to understand.Example :CakePHP , CodeIgniterRelated Posts

×