Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

building an application using CodeIgniter part 2/3

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
11,474
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 17, 2008

Code Igniter Sample Application by Derek Allard

Category:

People & Blogs

Tags:

License:

Standard YouTube License

  • likes, 4 dislikes

Link to this comment:

Share to:
see all

All Comments (7)

Sign In or Sign Up now to post a comment!
  • ddragox , your doing it all wrong. Learn MVC approach before making Codeigniter tutorials. Like all other said, this is wrong. View != Model

  • put view in the model, this is very bad example

  • why is there display logic in your model?

  • why put control stuff in a model?

    I thought a model should just return data. 1 purpose for 1 function.

  • Don't think html should be put in your model. What if a new design calls for something other than a list? Or if you want to reuse that function to get the same data elsewhere in your application?

  • CodeIgniter is an MVC framework, so when building things with it, you should follow MVC architecture. Surely, it would be much better (and more complient with MVC) to get the search results with the model, pass them to ther controller. The controller checks to see if there are any results and then passes it on to the view. You should never use PHP to print out HTML tags, and in Views, you can use if's and loops, so use the view to output and format the data. That would be a more MVC approach.

  • isn`n better to output from model other type of data, like array and, in controller, forward that to view file where is HTML?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more