Good strategy for "dashboard" ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Good strategy for "dashboard" ?

fugee ohu
I'm working on an auctions site My app doesn't yet have a user dashboard so I'm thinking app/views/user/dashboard or app/views/user/admin and same thing for controllers would be named dashboard_controller or admin_controller Is that good convention I was thinking there's probably gems too I know this isn't  a rails question but this is a big step in designing my site I'd like to get it right the first time Previously on other sites, I used the above described strategy

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/568a9ef8-b7ad-411c-a784-4a00879d3610%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Good strategy for "dashboard" ?

Marco Antonio Filho
Hi,

If your application is pure Rails, I would advise doing the approach you already mentioned, just a DashboardController with an index/show action would suffice. However, I think that the pure MVC architecture is usually not good enough when developing dashboards. The more components you have in the screen, the more resources you will have to handle in your controller which can compromise the controller's readability. 

So, I would either look into adding a design pattern such as presenters or view objects. Otherwise, you can use JavaScript in the frontend to access the various endpoints in the form of controller actions to render specific components of the dashboard. The last option is the best IMHO, because you are going to maintain your application as closer to the MVC as possible (no addition of design patterns), however, it is also important to have some JavaScript knowledge to keep your front end sound.

Hope it helps.

/ Marco

On Thu, May 3, 2018 at 4:06 PM fugee ohu <[hidden email]> wrote:
I'm working on an auctions site My app doesn't yet have a user dashboard so I'm thinking app/views/user/dashboard or app/views/user/admin and same thing for controllers would be named dashboard_controller or admin_controller Is that good convention I was thinking there's probably gems too I know this isn't  a rails question but this is a big step in designing my site I'd like to get it right the first time Previously on other sites, I used the above described strategy

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/568a9ef8-b7ad-411c-a784-4a00879d3610%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACMkcE4K8i8cAj6YBBDxE1uSmk6BUy_Tx2RA6j%2Bu%2BKZfqcqmDw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.