Will Lam7,027 Points
Who has built a Rails based project from scratch?
Hey all! I'm almost done the Build a Simple Ruby on Rails Application module, but a thought crossed my mind - although I have a good conceptual basis of how Rails works, I'm not sure if I can duplicate these efforts if I didn't have something like Treehouse to copy from and practice on.
Truth be told, I'm feeling a bit nervous. Although I've learned a hell of a lot so far, I'm just curious who has gone on and built something of their own so far? Would love to see a list of examples :)
Liam Nichols10,936 Points
I think on the first run-through, you probably won't get enough to just sit down and put together an app. However, you get the basics of how to work through something. I've actually found it helpful to develop something in parallel with any tutorial that you're doing. Think of something that you want to make. It can be anything - even if it's just for personal use. Spend a decent amount of time planning. It's done for you in the videos (e.g., Ok, we're going to make a social application, it's going to have this functionality and that functionality), but I think you can extrapolate what information needs to be decided on before hand. What needs to go in the database? How are those things related to each other? What do you want the app to do/look like/feel like? The more you plan beforehand, the easier things will be along the way. Your outlook changes completely when you have something that you WANT to do, but aren't sure how to do it. The tutorials suddenly seem to make much more sense and feel more concrete.
The project that I'm currently working on isn't complete... far from it. But it's a point system that I've had for a long time. It's currently living in an excel spreadsheet that I've hacked together to calculate points, make predictions about future point values based on past performance, and track activities. I use it to motivate me to do awesome things everyday (like working on treehouse, working out, or using my treadmill desk instead of sitting on my ass). The excel spreadsheet is a pain in the ass to maintain and so I'm building a web app to do it all for me. I'm actually going back through and re-watching the videos for the basic section and then taking a break from the videos and going and working on related things in my app. I'm using git for version control, but not github for this project.
I tried working without a scaffold, but I got confused and went back to using it. I'm going to keep using it for now, but I'm already seeing why people don't use them as much in real life. It generates all sorts of stuff for you and you might or might not need it all or you might want something completely different and then you'll have to do twice as much work to change everything that you absolutely hate instead of just starting from scratch.
If you want to go scaffold-less, but have no idea where to start, Mike Hartl's rails tutorial is very good. He has you build a simple application in chapter 2, but starting in chapter 3, he has you build a new application from the ground up with no scaffolding, no devise. He uses rspec and capybara for testing, which was... confusing after doing the treehouse tutorial with regular testing. I'm still fuzzy on test driven development...
I'm building something, but it's not finished yet. However, here's some advice:
I found it extremely helpful to build a simple Rails app without using the scaffold generator. I allowed myself to generate models and controllers using the buil-in generators (if I were better I had written everything by hand using TDD). I can understand why Jason used scaffolding to start out, as it's nice to have a functioning resource right from the start. But scaffolding will flood your app with code of which you likely have no real understanding.