# Frontend and admin , best practice?

**URL:** <https://www.ruby-forum.com/t/frontend-and-admin-best-practice/179896>\
**Category:** Rails\
**Created:** [December 7, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/frontend-and-admin-best-practice/179896 "2009-12-07T17:15:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ialuronico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c4cdca/32.png) [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Post date:** [December 7, 2009, 5:15pm UTC](https://www.ruby-forum.com/t/frontend-and-admin-best-practice/179896/1 "2009-12-07T17:15:29Z")

</div>

Hi,

I’m writing a small website (with restful authentication users) with a  
frontend and an administration.

Wich is the best practice ?

1. running 2 separate application (frontend and admin) sharing the same  
DB

2. mixing admin and frontend but how can I use 2 istance of restful  
authentication for frontend users and administrative users

thanks

Simone.

---

<div class="post-metadata">

**Author:** ![ialuronico](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/c4cdca/32.png) [@ialuronico](https://www.ruby-forum.com/u/ialuronico)\
**Post date:** [December 8, 2009, 9:04am UTC](https://www.ruby-forum.com/t/frontend-and-admin-best-practice/179896/2 "2009-12-08T09:04:03Z")

</div>

Simone R. wrote:

> I’m writing a small website (with restful authentication users) with a  
> frontend and an administration.
> 
> Wich is the best practice ?
> 
> 1. running 2 separate application (frontend and admin) sharing the same  
> DB

Given you say this is a small application this seems like overkill.

> 1. mixing admin and frontend but how can I use 2 istance of restful  
> authentication for frontend users and administrative users

On one of my own smallish applications I’m using role\_requirement to  
dynamically expose administrative features using the same set of view  
templates as the regular non-administrative users. For small websites  
this technique has worked out amazingly well for me.

For more complex applications I might consider namespaced templates for  
administration, but so far I haven’t needed to do that.
