• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using model functions in View

#11
[eluser]alboyd[/eluser]
Quote:
Code:
foreach($clients as $clients)

Does that work? I've never done it I would always do:
Code:
foreach($clients as $client)

#12
[eluser]daparky[/eluser]
[quote author="alboyd" date="1253515923"]
Quote:
Code:
foreach($clients as $clients)

Does that work? I've never done it I would always do:
Code:
foreach($clients as $client)
[/quote]

Yes, that works fine. I usually do what you do but this time i didn't Smile

#13
[eluser]BrianDHall[/eluser]
[quote author="wiredesignz" date="1253511688"]@BrianDHall and interested others,

Quote: The view obtains data from the model and presents it to the user. The view represents the output of the application.

The view generally have free access to the model, but should not change the state of the model. Views are read only representations of the state of the model. The view reads data from the model using query methods provided by the model.

http://www.phpwact.org/pattern/model_view_controller[/quote]

@wiredesignz Thanks for posting that, I've never seen that particular explanation of MVC. I'm not entirely sure I like it, but it does considerably differ from my previous understanding of the relationships between M, V, and C. I can't say its wrong or even that I particularly disagree with anything in it though, it does make sense - I just think I've been using views in a very different fashion.

Cheers!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.