Earlier quoted context omitted.
Haml is great for many cases, but it's terrible when the ratio of text to embedded code gets large. Chris Eppstein, one of the developers of Haml, made a blog post to this effect last year: http://chriseppstein.github.com/blog/2010/02/08/haml-sucks-f... As a result, though I love Haml, I think ERb is a more sensible default.
Full Disclosure: I am not a haml developer. I'm a haml user -- I only develop on sass.
What’s Up With All These Changes in Rails?
81–90 of 115 posts
Re: What’s Up With All These Changes in Rails?
#82Earlier quoted context omitted.
Best of all worlds would have been to drop AR altogether and promote a migration to Sequel for the official Rails O/RM. ;-) Indeed. Or decouple the ORM entirely, though that likely removes a key aspect of what Rails is about. It is, however, what makes Ramaze so appealing. No coupling to any ORM, but there is a community inclination to use Sequel (so you can learn from example and there are people to answer questions…
ORM is decoupled in rails to my knowledge... there is a default to AR which is easy to overwrite with your ORM of choice (which often provides an ActiveModel interface and further rails integration by installing one extra gem). tl;dr: providing sane defaults != strong coupling
The few times I've wanted to just start a Rails app with simple Erb, with models representing data concepts (but not necessarily SQL anything), and evolve out to using a database (if and when needed), have been frustrating.
It's something that has been easy to do in some other frameworks so I tend to see Rails as almost DB-required, if not in fact coupled.
Re: What’s Up With All These Changes in Rails?
#83Earlier quoted context omitted.
Of course the ORM is slow! Is there anyone in 2011 who doesn't know this? Why not bite the bullet and learn SQL? Your DBA will thank you.
A 10% performance penalty to get down and dirty with your Domain Model and go all HSQL isn't exactly a big price to pay. Take a peek at Paul's benchmark. Iterate and instantiated 100K empty objects in 10s. That's crazy. You're talking about something that would probably take 1ms in c#. You're talking about a performance deficit four orders of magnitude large. Regardless, I think you've entirely missed the point. The…
using System;
using System.Diagnostics;
namespace testspeed
{
public static class Extensions {
public delegate void Action();
public static void Times (this int numTimes, Action action)
{
for (var i = 0; i x += 1);
Console.WriteLine ("{0} in {1} ms", x, sw.ElapsedMilliseconds);
Console.ReadKey ();
}
}
}
and it outputs 4 ms. Mono in debug mode on a 3.2 GHz Intel Core i3. For comparison, the parent's ruby code runs in 80ms with Ruby 1.9.2. Big difference, but not quite as bad. I don't know why though?Re: What’s Up With All These Changes in Rails?
#84There's a deeper problem that Yehuda isn't hitting and that is that there is an inverse correlation between being cool and cutting edge and being consumer friendly. Rails is, and really has always been, a framework which changes very quickly. Although virtually all of these changes are for the better either in some abstract feels-better sense or in a tangible practical sense, each of these changes imposes a cost on o…
> (1) If you are a Rails developer you need to be a full-time Rails developer and not do too much else. You can't do Rails and a bunch of other things because Rails will take up a lot of your time. I'm glad to see someone else say this. I don't use rails often, nor am I a "front end" developer by trade. I have put together some simple web apps using rails, but it seems that each time I go back to rails and try to use…
It just sort of comes with the territory that being a good Rails developer means being a polymath.
Re: What’s Up With All These Changes in Rails?
#85Earlier quoted context omitted.
You can have your sexy app up in a couple of weeks. But maintaining it still takes time, no matter what language/framework you're using. Upgrading to a new version is in the end maintenance (security fixes, underlying framework improvements, and the refactorings that go hand in hand with upgrading). If you go with rails you still can get to a point very quick, with the downside that you have to spend time for upgradi…
The rails 2 -> rails 3 upgrade path is one of the most complex upgrade paths I have seen for a web framework
Re: What’s Up With All These Changes in Rails?
#86Earlier quoted context omitted.
I often wish that DM would have replaced AR in Rails 3. Why Sequel?
Because it's simple, it gives you the flexibility of going lower-level easily, supports CPK+FK and I haven't run into any bugs. It's been very exciting for me. I picked it up in about a day, asked some questions, and am now easily doing things I couldn't before, and it just works . Did you know Sequel's open bug-list is often at zero open issues? Tried AR but it blew my mind that after all this time the support for C…
Of course it is by no means a scientific or fair comparison, but still makes me wonder.
Re: What’s Up With All These Changes in Rails?
#87Earlier quoted context omitted.
Either you can go the Microsoft route and be backwards compatible til the end of time You probably never went with Microsoft to say that. Yes, they are shipping the DLLs till the end of time, but you can also find the source code to Rails 2.3 till the end of time (it's right there, in your face), just as you can find the source code of Linux 0.01 (the initial release). On the other hand, what's the latest recommended…
Microsoft definitely has a lot of the "hey try this new thing" going on, but the key difference is I don't have to painfully upgrade all of my ASP.NET 2.0 applications when ASP.NET 3.0 or 3.5 comes out. Sure those support new features, but they are usually 99% compatible with the old versions (I believe they deprecate over two versions for the things that do change). Also if I look for code on the web, it's usually v…
And ASP.NET MVC is different and whatever compatibility it has with ASP.NET is actually hurting, IMHO. I mean, here's a framework with potential, but it has to carry the old bagage of ASP.NET from the start.
I get it that a framework like Rails moves TOO FAST for its own good, but nothing compels you to upgrade right now. Lots of people are still on Rails 2.3, it's a stable and reliable version and if you'll look around many projects have 2 branches, one for 2.3 and one for 3.0. And some of the projects, especially Rack middleware, don't need 2 branches.
It kind of sucks from one perspective - the 2.3 branches are going to receive less patches/upgrades, but you have the source code. If something really important is missing, or there's some unfixed bug, you can go ahead and fix it yourself.
You can't say the same thing about a binary DLL. I remember when I first tried out ASP.NET 2.0 - it contained an annoying bug related to their CSRF protection (if you clicked any control before the page loaded, it triggered an error since the CSRF token was getting loaded right before the tag, at the end of the page), and it took a service pack and 2 months to get it fixed.
Re: What’s Up With All These Changes in Rails?
#88Earlier quoted context omitted.
Of course the ORM is slow! Is there anyone in 2011 who doesn't know this? Why not bite the bullet and learn SQL? Your DBA will thank you.
A 10% performance penalty to get down and dirty with your Domain Model and go all HSQL isn't exactly a big price to pay. Take a peek at Paul's benchmark. Iterate and instantiated 100K empty objects in 10s. That's crazy. You're talking about something that would probably take 1ms in c#. You're talking about a performance deficit four orders of magnitude large. Regardless, I think you've entirely missed the point. The…
Still, it should take the blink of an eye, not a chin-scratch.
Re: What’s Up With All These Changes in Rails?
#89Earlier quoted context omitted.
Best of all worlds would have been to drop AR altogether and promote a migration to Sequel for the official Rails O/RM. ;-) Indeed. Or decouple the ORM entirely, though that likely removes a key aspect of what Rails is about. It is, however, what makes Ramaze so appealing. No coupling to any ORM, but there is a community inclination to use Sequel (so you can learn from example and there are people to answer questions…
You seem to know very little about Rails 3. But if you think ramaze has a "community", I guess I can understand why.
Re: What’s Up With All These Changes in Rails?
#90Earlier quoted context omitted.
DHH:Rails::Linus:Linux.
Can Linus single-handedly block changes from getting into Linux? That just seems crazy to me if he can. I get that DHH and Linus have pulpits, but that's all they should have. It's just extremely disappointing to hear someone say something can't get in, not because of quality, but because there's one person who doesn't like it. With that said, people do fork Linux, see Android. Do people fork RoR and actually produce…
Second. You just glanced over the possibility that DHH doesn't like HAML for a rational reason, like for instance maybe he doesn't think HAML is that big an improvement over HTML and therefore not worth being a default setting. It's not an irrational dislike that has nothing to do with the qualities of the library itself.
I think you underestimate DHH as well as the rest of the Rails core group.
And yes, Linus can single handedly stop anything from getting into Linux. This is how most open source projects are run, there is a leader at the top and as long as he/she is doing a good job, people follow.