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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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:30 pm, Tim Wattenberg <timwattenb...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Tue, Jan 18, 2011 at 8:30 AM, Tim Wattenberg < timwattenberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> 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. >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.> > Looking forward to your answers. > Thanks > Tim > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Am 18.01.11 16:19, schrieb David Kahn:> > > On Tue, Jan 18, 2011 at 8:30 AM, Tim Wattenberg > <timwattenberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org <mailto:timwattenberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>> > wrote: > > 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. > > > 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.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> > > > Looking forward to your answers. > Thanks > Tim > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to > rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > <mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > <mailto:rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 18 January 2011 15:39, Tim Wattenberg <timwattenberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks. In addition I found namespace-routing (http://guides.rubyonrails.org/routing.html under 2.6), which is what I was looking for. Am 18.01.11 16:53, schrieb Colin Law:> On 18 January 2011 15:39, Tim Wattenberg <timwattenberg-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> 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 >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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:30 pm, Tim Wattenberg <timwattenb...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> > wrote: >> 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-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.