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 trialKevin Korte
28,149 PointsLaravel vs RoR
I know, this question, again, right? Hopefully not. Actually what I'd like to know is if anybody has a good, unbiased, logical compare/contrast.
I'm not asking which is better, or which should I use, instead I'm asking for someone who knows more than me to have written cliff notes on each, so I can understand the differences in their ecosystems, and make my own informed opinion as to what system provides me and my app idea a better starting point.
I'm also not opposed to any Python framework, I'd just have to learn Python first, and I want to get a minimal viable product to a test market as fast a possible to see if this idea is worth continued development.
Thanks all
6 Answers
Tim Knight
28,888 PointsHi Kevin,
Yeah this is always a tough one. I absolutely love the Ruby language and in term really enjoy Rails. That being said PHP sites can be easier to deploy based on various deployment options since you rarely need the same AppServer type platform that you need with Ruby. So I'll say that I'm a Ruby developer that's been playing with PHP for about 9-12 months.
I like what's happening with Laravel, but I often feel like the PHP syntax is still so verbose to me.
So what do I mean by that? Well there are a few things (I'm speaking mostly to Laravel 4.x since so some of these points could be argued if they've been changed in 5.x).
- In Laravel you have to explicitly tell the controller which vie to render where Rails make some assumptions based on the controller and method name with the option of specifying the view file.
- Data validations are stored in the controller in Laravel which feels weird to me, Rails puts them in the model
- To me the PHP syntax as a lot of visual noise when it comes to a framework like this, see for example:
<?php
class TodoItem extends Eloquent {
public function todoList()
{
return $this->belongsTo('TodoList');
}
}
vs.
class TodoItem < ActiveRecord::Base
belongs_to :todo_list
end
Just that's just a few comparisons that seems to annoy me personally. Definitely check out the Laravel Basics. The ODOT Rails course can be a little overly complex because it forces the TDD methodology at you... you might consider the free version of https://www.railstutorial.org/ to give you a some comfort with Rails.
Kevin Korte
28,149 PointsHey Tim,
Thanks for the response. I'll start with I've did the railstutorail.org about 6 months ago, and loved it. Took about 5 days to get through it all, but was a fantastic crash course and had a ton of "ah-ha" moments.
I agree with your points, I actually have a proof of concept app I built in RoR, found here: https://frozen-woodland-5628.herokuapp.com/ (Ugly, I know. Proof of concept only)
On the admin side, I can assign multiple machines to a part, and a part to multiple machines, which is a great, easy way for me to update the data.
I'm half tempted to rebuild this is Laravel just to see what I think. I just want to make sure I'm picking the best tool for my needs. Laraval has peaked my interest when I otherwise dismissed PHP.
I guess what I'm looking for, and haven't found is a solid look at each's ecosystem. 18 months from now I don't want to be regretting my choice because one framework would have suited me better than the other. I'll probably stick with RoR, but i'm curious about Laravel. I've done both RoR and Laravel courses here, and still can't decide.
Tim Knight
28,888 PointsKevin it sounds to me like you're more comfortable in general with ROR right? I think your proof of concept looks like an awesome start. Rails has been a stable platform at this point for years, you have a proof of concept in it, and you're comfortable with it. Remember, if you're trying to build an MVP here... you should be building in what you can do that quickly in... and that sounds like it's Rails for you. If you're truly building your MVP using the Lean Startup method you have 18 months of the Build-Measure-Learn cycle before you should be worrying what ecosystem you're in. You're MVP could change dramatically in 18 months. Both platforms are stable, so it should be about which one you can build out quicker to keep moving. What's more fun for you? You know?
Kevin Korte
28,149 PointsYou're right, and I think I needed to hear that. I feel more comfortable in plain PHP over Ruby today, because I started over in Wordpress, but Ruby is so elegant and clean compared to PHP syntax I think it's the language I want to have long term, and Rails made it so easy for somebody with such little experience in both Rails and Ruby to build that proof-of-concept in about 20-30 hours.
I'm sure I'll learn more Ruby, get more comfortable and be happy with it. I just keep flip-flopping what to do.
I'm more of a design guy, but I know I need to focus on content, and functionality before I work out the design because of how rapidly it is going to change, no reason to put the cart before the horse.
I look at that and it pains me to see plain, vanilla bootstrap though. You can kinda see my plan for the site, basically to list all of the common maintenance items for off road machines on one site, one page. I use to be a parts guy at a motorcycle shop, and got asked "What air filter fits my machine" all the time, and there was never a good one stop resource to go to. I'd have to look in 2-3 or more books to find them all.
Beside the lack of information there, would you look at that and think that I should run with how it is as my MVP, and see if people start using it, or spend a little more time in development? I know what I want to do with it still, just not sure if I should launch it now or not. What does an outsider like yourself think?
Tim Knight
28,888 PointsKevin,
It can be scary when you're trying to launch something new right? You want to make sure you get everything right and that's where that flip-flopping comes in. The most important thing though is to do what you're already doing and that's to just start.
But you hit it right on, your little experience still allowed you to put together your proof-of-concept in 20-30 hours and with that I think you have your answer.
Here's what I would say, it's time to figure out if you're addressing a pain point that other people are having. Get some more data into the system and get it in front of people to really try it. The design is fine, just get it in front of them and see if it's addressing the problems they're having. What and listen to them use it. Forget that it looks like bootstrap, most of the people using the system don't know what bootstrap has, they're just hoping that you have the information that will help them. Then use their feedback to learn and iterate around your app. Adjust the design as you go while the functionality is better nailed down.
Sam Deacon
2,650 PointsAccording to this guy php frameworks are all 'pretenders' to the throne held by rails :).
It is good to see a whole language/community get behind one solid framework/ecosystem, rails + gems like devises just seem unparalleled. There are loads of php frameworks, which isn't always a good thing, but at least laravel has 'bubbled to the top'.
Kevin Korte
28,149 PointsI've since gone the rails ecosystem. So far so good, but I tend to personally discredit people who appear so blindly biased towards one thing vs another, that I don't give their opinion or advice much weight. I think it's always important to remain objective.
Maybe he is, I didn't want the whole 45 min video but just going off summary and what you said.
I think PHP has been going through a growth and transition in last few years, as it wasn't really designed to be a full fledged background language. That might be where he feels it still is.
Anyway though, all good here, really enjoying Ruby and Rails for the time.