Author Topic: M in MVC  (Read 821 times)

0 Members and 1 Guest are viewing this topic.

Offline DemonicTopic starter

  • Devotee
  • Posts: 561
  • Gender: Male
    • View Profile
    • Free FPS Reviews and FPS Tips
M in MVC
« on: November 30, 2008, 11:16:57 PM »
I'm work on a small forum and trying something new with the MVC, I got the basics down for the Controller and Views, I'm just having a hard time thinking of a way to create the model class. http://code.google.com/p/cforums/ Been reading all day, once I get a basic idea of how I'll have the model class setup I can move on the error handling.

Thinking about taking a CodeIgniter Approach to Models http://codeigniter.com/user_guide/general/models.html
« Last Edit: November 30, 2008, 11:27:25 PM by Demonic »

Offline Liquid Fire

  • Devotee
  • Posts: 858
    • View Profile
Re: M in MVC
« Reply #1 on: December 03, 2008, 07:07:20 AM »
Well one thing is that there code is based on php 4 when it comes to the contructor as they use the objects name instead of __construct() php 4 is really really old and php is no longer updating it so i would not go that way.

Also, in codeigniter, at least as far as i can tell, there base model class provide basrely any functionality, like functionality to save, load data, queries for multiple records all of which can be abstract so that is is the same for all models.  If you don't want to(or can't) build something like that i would suggestion integrating a ORM system.