Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

simon buysse
simon buysse
9,716 Points

JS + Ruby: Where to keep your business logic

Hi, I've started about 2 weeks ago with learning Ruby and Ruby on Rails. (Don't mind my Teamtreehouse score, I'm using some other sources) Now at first I just thought to learn this to be able to have some backend on which my HTML/CSS/JS projects can run and most of all to have something that can communicate with a database and save my application data.

I might be totally running ahead of myself but it seems to me that you could easily use Ruby on Rails for the business logic of your application as well. Now originally I tought JS would hold all the business logic.

So now I'm wondering; where are you supposed to keep the businnes logic of your webapp?

1 Answer

Brandon Mowat
Brandon Mowat
8,186 Points

I'd use ruby for business logic. That way the user can't see it. It's more secure.