Hi folks,
I am playing around with Ruby on Rails and, probably like most of the
beginners, I started by writing a blog-application.
My questions is, if there is a special way to build something like a
frontend/backend structure.
As you might (or probably) know, the frontend should just give out a
database record and you can update or delete it within the backend.
I could do this with two seperated models/controllers, but I wondered if
there is a better way.
Looking forward to your answers.
Thanks
Tim
On Tue, Jan 18, 2011 at 8:30 AM, Tim W. <
[email protected]> wrote:
Yes! That is what MVC does… your views are your ‘front end’ and your
models are your ‘back end’. So if you have a model for Posts and a View
for
Posts you already have such a structure.
Am 18.01.11 16:19, schrieb David K.:
My questions is, if there is a special way to build something like a
a View for Posts you already have such a structure.
With my question I did’t aim to get an answer describing the technical
meaning of Frontend and Backend.
I am familiar with the MVC pattern.
I was thinking from the perspective of the user.
I may expressed myself wrong/misleading and should replace the words
“Frontend” and “Backend” with “User-Interface” and “Admin-Interface”.
For example in wordpress, you have got a “frontend” where the user reads
the posts, comments on them, etc and a “backend” where you can login and
administrate the site, write new posts, etc
On 18 January 2011 15:39, Tim W. [email protected]
wrote:
[…]
I was thinking from the perspective of the user.
I may expressed myself wrong/misleading and should replace the words
“Frontend” and “Backend” with “User-Interface” and “Admin-Interface”.
If you think of these as different interfaces then different
controllers may be what you want (not different models of course,
multiple controllers can access the same models). If there are
different levels of users then this may be best served by something
like cancan.
Colin
Thanks.
In addition I found namespace-routing
(Rails Routing from the Outside In — Ruby on Rails Guides under 2.6), which is what I
was looking for.
Am 18.01.11 16:53, schrieb Colin L.:
Interesting.
I’ll have a look on it and maybe give it a try.
Thanks.
Tim
Am 18.01.11 16:04, schrieb Robbie:
Hi Tim,
Have you tried using TYPUS - https://github.com/fesplugas/typus
It is quite easy to use and once you do a rails g typus you can get
rid of your forward facing admin files.
Hope this helps
Robbie
On Jan 18, 2:30pm, Tim W. [email protected]