Hi folks,
I have a problem with the understanding MVC architecture. It's not that I don't know anything about MVC. Everything makes sense to me in a MVC architecture but if I want to start to develop my app in an MVC architecture I'm stuck.
Basically there are a lot ways to do what you want in the programming world but I want to do it like it was supposed to be. So maybe there is someone who can help me out.
But here my recent problem with MVC:
I want to write my own blog in Ruby on Rails. This not a big deal I think. I would have my models like articles, comments, user and much more. For each of them I would create a controller to manage them and all. The problem is when it comes to the Admin-Panel. I want that an article can only created in the Admin-Panel.
So what should I do? Should I create a Admin-Panel controller to manage all those tasks which can only accomplished in the Admin-Panel at all? Otherwise I think it is too much for a single controller.
I want that my urls looks something like this:
For Admin-Panel tasks: example.com/admin/article/create For Viewers: example.com/article/show
(I think restful Rails routes are looking different but I think you get what I want)
How would you accomplish this task in an MVC architecture and how should it be done? Can you help to understand those MVC tasks much better?
Thank you in advance.