New to RoR, a quick question

Hi!

I'm new to Ruby and Rails and I've got previous experience with PHP, some C/Objective C and Java. I've just finished the short "first app" tutorial on rubyonrails.org. RoR seems great and I really like it after this brief intro :slight_smile:

A question. What should an app contain? I mean, is it the whole site or should I split the site up in several apps? Most tutorials only have some basic intro that creates like a 'blog'. Yeah, that fits good inside a single app. But what about if you have one part of your site that's a blog, another part is a forum, another is a community thing, another is a task manager...and so on.

Do you see what I mean? Should I split all these into several 'apps'?

Perhaps it's a stupid question, but as I said, I AM new to this so... :slight_smile:

Cheers! Linus

Hi!

I'm new to Ruby and Rails and I've got previous experience with PHP, some C/Objective C and Java. I've just finished the short "first app" tutorial on rubyonrails.org. RoR seems great and I really like it after this brief intro :slight_smile:

A question. What should an app contain? I mean, is it the whole site or should I split the site up in several apps? Most tutorials only have some basic intro that creates like a 'blog'. Yeah, that fits good inside a single app. But what about if you have one part of your site that's a blog, another part is a forum, another is a community thing, another is a task manager...and so on.

Do you see what I mean? Should I split all these into several 'apps'?

Perhaps it's a stupid question, but as I said, I AM new to this so... :slight_smile:

Welcome to the party, I just got here myself... I would say to answer your question that it matters more what your various apps have in common or need to share. Let's say you have a blog comment model and a forum post model, and they both need a user to sign in in order to be able to say who created each -- that would argue for maybe putting each of these "apps" together in the same application where they could share the common sign-in and other resources.

On the other hand, if you don't need to share anything, there's a lot good to be said for having the bare-est minimum in your application. Less to break, for one thing. You could also expose your login as a service from one "user management" app, and consume it from two others. Luckily, these sorts of choices are something you can revise later on, as a Rails app can seem a bit like a box of Legos, where you can snap things together and good tests let you refactor at whim.

Walter

These parts of the site (forum, community thing, task manager) you’ll would basically do with Rails Scaffolds, creating each resource of your application and each important thing of the app (comments, posts, members) you’d define in models. You would design your views, use some gem for authentication… basically it.

I think that´s it, basically. I tip I can give you is start making something real, coding for sure :smiley: … in your free time, address some project you have in mind and with no pressure or compromise, start developing it!

Oh, and don’t forget http://railscasts.com I’ve already learned a lot of things with its screencasts!

Cheers!

Hi!

Thank you for your answers :slight_smile: I really appreciate it. I have checked out some Railscasts and they are great. They may be a little too specific for me at the moment though.

Are there any good Rails-tutorials out there for a complete website? A website that has more functions than just a 'blog' with comments. Or maybe just a complete site on github or something where I can browse some code to get the hang of the structure of a complete site? :slight_smile:

Best Regards Linus

Hi!

Thank you for your answers :slight_smile: I really appreciate it.

I have checked out some Railscasts and they are great. They may be a

little too specific for me at the moment though.

Start with the Rails guides. It isn’t a whole website, but it’s all of the initial steps required to build one:

http://guides.rubyonrails.org/

I also hear good things about Rails for Zombies, but haven’t had a chance to check it out:

http://railsforzombies.org/

Best Wishes,

Peter