Welcome Guest, Not a member yet? Register   Sign In
One model for user and admin
#1

[eluser]masterix[/eluser]
Hi,

Is it a good idea to have only one model for user and admin? Let's say it is news model nad the are methods like news acceptation, getting last x news, deleting news and so on.

I'm waiting for your answers and advice Wink
#2

[eluser]Lockzi[/eluser]
I'm far from an experienced developer but I was going to say split it up... But then I figured it basically depends on how your administration part is going to look like and be used... You might be using the same/similar codes for listing news and such which would kind of be against the DRY (Don't Repeat Yourself) and the MVC logic.

I would say do as you wish, since, from my limited experience, I can't see any problem with either.

Regards,
Lockzi
#3

[eluser]Référencement Google[/eluser]
For my experience, I am used to keep all relative datas in one model.
#4

[eluser]Rick Jolly[/eluser]
Another vote for 1 model. The controllers should be able to handle the access permissions.
#5

[eluser]Eric Barnes[/eluser]
I will vote for one model as well. However it should be kept simple and not a 10gb file. Wink
#6

[eluser]masterix[/eluser]
Thanks for your replies Smile

It wouldn't be a 10gb file - there are only 10-15 methods to keep so I think one model is comfortable and acceptable solution.




Theme © iAndrew 2016 - Forum software by © MyBB