< Return to Video

RailsConf 2014 - Looking Backward: Ten Years on Rails by Luke Francl

  • 0:23 - 0:26
    LUKE FRANCL: Good afternoon. I'd like to get
    started if, I
  • 0:26 - 0:30
    think, everybody's ready. Cool. Cool.
  • 0:30 - 0:34
    Thank, thank you for joining me this afternoon.
    I'm
  • 0:34 - 0:37
    excited to be here. And thanks for, thanks
    for
  • 0:37 - 0:39
    choosing this talk.
  • 0:39 - 0:41
    So it's been ten years since the first public
  • 0:41 - 0:44
    release on Rails, so I think that's a good
  • 0:44 - 0:48
    time to think back and reflect on where Rails
  • 0:48 - 0:51
    has come from, where it might be going, and
  • 0:51 - 0:54
    what the future has in store.
  • 0:54 - 0:58
    So, I've been thinking a lot about the early
  • 0:58 - 1:01
    days of Rails, lately, because the company
    I work
  • 1:01 - 1:05
    for, Swiftype, makes site search software.
    So I use
  • 1:05 - 1:09
    my own website for testing. So I index my
  • 1:09 - 1:11
    site and then have to do searches on it,
  • 1:11 - 1:14
    and I'll search for Rails. Just cause I'm
    not
  • 1:14 - 1:16
    super creative and I need to search for something,
  • 1:16 - 1:17
    right.
  • 1:17 - 1:19
    And, in doing so, I found some old blog
  • 1:19 - 1:21
    posts that I wrote in early 2005, when I
  • 1:21 - 1:24
    first discovered Rails. And it was really
    interesting for
  • 1:24 - 1:28
    me to read, because back then, I was, I
  • 1:28 - 1:32
    was working as a Java developer and I was
  • 1:32 - 1:35
    really interested in Python. And Rails was
    neither of
  • 1:35 - 1:37
    those things. So I was pretty skeptical of
    Rails.
  • 1:37 - 1:39
    Like, I was impressed with it, but I wasn't
  • 1:39 - 1:43
    sure it was worth learning Ruby over.
  • 1:43 - 1:45
    So I thought, I'll just sit back and let
  • 1:45 - 1:49
    the Python people catch up. And I waited and
  • 1:49 - 1:52
    I waited and I waited, and that never really
  • 1:52 - 1:55
    seemed to happen. And so after a few months,
  • 1:55 - 1:58
    I jumped into Rails and started learning it
    and
  • 1:58 - 2:00
    I started learning Ruby so that I could use
  • 2:00 - 2:05
    Rails. And then that fall, I got wind of
  • 2:05 - 2:07
    a new group starting in my home town. The
  • 2:07 - 2:10
    Ruby Users of Minnesota. And so I was, I
  • 2:10 - 2:11
    was there at the first meeting when there
    was
  • 2:11 - 2:13
    twelve people talk, who were just really excited
    about
  • 2:13 - 2:16
    Ruby and really excited about Rails.
  • 2:16 - 2:19
    And at that point I joined the, the Ruby
  • 2:19 - 2:22
    community and became a part of that and really
  • 2:22 - 2:25
    have not, have not looked back since then.
    And
  • 2:25 - 2:27
    I've been working with Rails professionally
    now for about
  • 2:27 - 2:29
    eight years.
  • 2:29 - 2:31
    So this made me think about a book I
  • 2:31 - 2:35
    read once called Looking Backward by Edward
    Bellamy. So
  • 2:35 - 2:37
    in this book, which was written in the late
  • 2:37 - 2:42
    1800s and takes place at that time, a rich,
  • 2:42 - 2:45
    upperclass man is hypnotized. And he falls
    asleep for
  • 2:45 - 2:49
    over a hundred years. And when he wakes up,
  • 2:49 - 2:50
    everything has changed.
  • 2:50 - 2:54
    America is now a socialist utopia. And so,
    you
  • 2:54 - 2:57
    know, he had it pretty good before, right.
    He,
  • 2:57 - 3:01
    he was wealthy. He had servants. And now everyone
  • 3:01 - 3:03
    is equal. And so he's pretty skeptical of
    this
  • 3:03 - 3:05
    new order.
  • 3:05 - 3:09
    So it takes him awhile, but as he's shown
  • 3:09 - 3:12
    the new way of doing things, he becomes convinced
  • 3:12 - 3:17
    that this is actually a better way. And that
  • 3:17 - 3:21
    made me think of, think of my situation, where
  • 3:21 - 3:24
    I was, I was skeptical of Rails, and, but
  • 3:24 - 3:29
    eventually won over.
  • 3:29 - 3:33
    So today, what I'd like to talk about is
  • 3:33 - 3:36
    the idea of what would a programmer from 2004
  • 3:36 - 3:39
    think if they could time travel forward to
    today
  • 3:39 - 3:43
    and experience our web development utopia.
    What would that
  • 3:43 - 3:45
    be like, for them, to see how we work
  • 3:45 - 3:46
    today?
  • 3:46 - 3:50
    So, what I'd like to do today is first
  • 3:50 - 3:53
    talk about what web development was like in
    2004.
  • 3:53 - 3:56
    Then, I'd like to jump forward to the present
  • 3:56 - 3:59
    and think about what a programmer from 2004
    would
  • 3:59 - 4:03
    think about our web development utopia of
    today. And
  • 4:03 - 4:05
    finally I'd like to take a look at what
  • 4:05 - 4:08
    the future might have in store for Rails,
    and
  • 4:08 - 4:13
    what the, what the legacy of Rails might be.
  • 4:13 - 4:16
    So first, let's talk a little bit about what
  • 4:16 - 4:20
    development was like in 2004.
  • 4:20 - 4:22
    So if I can set the stage for a
  • 4:22 - 4:25
    minute, I see a lot of Mac Books here
  • 4:25 - 4:29
    today. There were no Mac Books in 2004. The
  • 4:29 - 4:31
    top of the line Apple laptop was a Power
  • 4:31 - 4:35
    Mac G4. And, you know, Apple had not completely
  • 4:35 - 4:39
    penetrated the web development community like
    it has now.
  • 4:39 - 4:42
    There were only, I, I used Linux at work
  • 4:42 - 4:49
    myself. And, a Windows at home, actually.
    And the
  • 4:49 - 4:52
    most popular phone, like, maybe not the most
    popular,
  • 4:52 - 4:55
    but the hottest phone in 2004 was a Motorrola
  • 4:55 - 4:58
    Razr. So, right?
  • 4:58 - 5:02
    So things were pretty different there. Things
    were pretty
  • 5:02 - 5:05
    different then. And I was working as a Java
  • 5:05 - 5:07
    developer at the time. And I was pretty excited
  • 5:07 - 5:11
    about that, because I graduated in 2001, right
    after
  • 5:11 - 5:14
    the dot com bust. And things were pretty sketchy
  • 5:14 - 5:16
    there for awhile. It was hard for me to
  • 5:16 - 5:19
    find a job. And so I was excited that
  • 5:19 - 5:21
    I was able to work as a Java developer,
  • 5:21 - 5:23
    in the hot language at the time. And I
  • 5:23 - 5:24
    was, I was glad that I was able to
  • 5:24 - 5:27
    work at a software development company, where
    I could
  • 5:27 - 5:32
    work on software for sale instead of working
    in
  • 5:32 - 5:34
    the cost center at a, at a big bank
  • 5:34 - 5:37
    or something like that, right.
  • 5:37 - 5:40
    So I was working as a Java developer, and
  • 5:40 - 5:42
    if you've ever done any Java web development,
    you
  • 5:42 - 5:47
    know that it can be pretty painful, right.
    At
  • 5:47 - 5:48
    the time, the, the best way to do Java
  • 5:48 - 5:54
    web development was struts and hibernate.
    But we didn't
  • 5:54 - 5:57
    use either of those. We used raw Java servelettes
  • 5:57 - 6:03
    and hand coded J, JDBC queries to our database.
  • 6:03 - 6:07
    So the, the real problem with Java as a,
  • 6:07 - 6:10
    as a web development platform, at least in
    those
  • 6:10 - 6:13
    days, was it, it has a really long edit,
  • 6:13 - 6:17
    compile, debug loop. Or, in the case of, of
  • 6:17 - 6:21
    Java web development, it's the edit, compile,
    deploy, debug
  • 6:21 - 6:24
    loop. Because you have to restart your app
    server,
  • 6:24 - 6:26
    and we used Web Sphere, so that took a
  • 6:26 - 6:27
    long time.
  • 6:27 - 6:30
    So if I needed to write a new page
  • 6:30 - 6:33
    for, for our app, it, it was a pretty
  • 6:33 - 6:36
    involved process. So we used raw servelettes,
    so that's
  • 6:36 - 6:38
    sort of like using a raw CGI library, where
  • 6:38 - 6:42
    it's very low-level. And if, when you work
    in
  • 6:42 - 6:44
    Java, it's very verbose and you have to read
  • 6:44 - 6:47
    from input streams and write to output streams.
    And
  • 6:47 - 6:50
    it just doesn't have the conveniences of Ruby
    or
  • 6:50 - 6:51
    a scripting language.
  • 6:51 - 6:52
    So I'd have to write my servelette, then I'd
  • 6:52 - 6:55
    have to write a bunch of XML files, or
  • 6:55 - 6:57
    XML code in the web dot xml file to
  • 6:57 - 7:00
    map it up. And then you'd compile everything
    and
  • 7:00 - 7:03
    get it working and then restart your app server,
  • 7:03 - 7:07
    which would take several minutes. And then
    browse to
  • 7:07 - 7:10
    the new page to, to see what it, what's
  • 7:10 - 7:11
    going on there.
  • 7:11 - 7:14
    And that's where the fun would start, because
    that's
  • 7:14 - 7:17
    when the JSPs came into play. So JSP is
  • 7:17 - 7:21
    just like ERB, right. Instead of Ruby, it's
    Java.
  • 7:21 - 7:24
    But Java a much more heavy-weight language,
    and it
  • 7:24 - 7:27
    doesn't have, you know, friendly looping constructs
    or mapping
  • 7:27 - 7:30
    constructs like Ruby does. So writing view
    code in
  • 7:30 - 7:33
    Ruby, or in Java is not very much fun.
  • 7:33 - 7:35
    But worst of all, the way that JSPs work
  • 7:35 - 7:38
    is that it takes the Java, or the JSP
  • 7:38 - 7:40
    code that you write and it compiles it into
  • 7:40 - 7:42
    a Java class file. And then that Java class
  • 7:42 - 7:47
    file gets compiled into code. So when you
    get
  • 7:47 - 7:50
    an error, when you're debugging, you'd get
    this stack
  • 7:50 - 7:54
    trace, and it would be like, NullPointer exception
    on
  • 7:54 - 8:00
    line 12,075 of line 20,082, and you'd sit
    there
  • 8:00 - 8:07
    and you'd think, ah. What was I doing in
  • 8:07 - 8:10
    my JSP that could cause a NullPointer exception?
  • 8:10 - 8:12
    And you'd look at the JSP and you'd look
  • 8:12 - 8:14
    at the stack trace, and they had no correspondence
  • 8:14 - 8:20
    whatsoever, right. So it's really painful.
    And if you
  • 8:20 - 8:22
    were smart, you would, there was a setting,
    like
  • 8:22 - 8:23
    a secret setting you could use for Web Sphere
  • 8:23 - 8:28
    to keep around the compiled Java files. So
    then
  • 8:28 - 8:29
    you could open that up in your web browser
  • 8:29 - 8:34
    and look at line 12,075 and be like, oh.
  • 8:34 - 8:37
    That's what I was doing in the JSP.
  • 8:37 - 8:41
    So, web development in Java, especially in
    2004, not
  • 8:41 - 8:45
    very much fun. But there was, there was also
  • 8:45 - 8:48
    at that time a glimmer that something better
    was
  • 8:48 - 8:54
    on the way, that the web could do more.
  • 8:54 - 8:56
    There was a new sense that the web was
  • 8:56 - 9:00
    a powerful platform for delivering software.
    And I think
  • 9:00 - 9:04
    that the earliest glimmerings of this come
    from Microsoft's
  • 9:04 - 9:09
    Outlook web app. This was the first application
    to
  • 9:09 - 9:12
    use what we would call today Ajax, without
    requiring
  • 9:12 - 9:14
    any kind of browser plugins.
  • 9:14 - 9:19
    So that, that came out in 2001. And people,
  • 9:19 - 9:21
    people didn't pay much attention to it because
    it
  • 9:21 - 9:25
    was IE only and it, it wasn't clear how
  • 9:25 - 9:28
    it was working, right. And then Google launched
    Google
  • 9:28 - 9:31
    Suggest. And people dissected that, and they
    saw how
  • 9:31 - 9:36
    it was working. And they also launched Gmail,
    which
  • 9:36 - 9:38
    gave people a new sense of what was possible
  • 9:38 - 9:40
    in a web app. That, that web apps could
  • 9:40 - 9:44
    automatically refresh as things were changing
    on the server.
  • 9:44 - 9:46
    So there was a new sense of what was
  • 9:46 - 9:49
    possible. That, that, that maybe there was
    a better
  • 9:49 - 9:52
    way of writing web apps. And in 2004 I
  • 9:52 - 9:56
    was also looking for something better. Because,
    and I
  • 9:56 - 9:58
    attribute that to a book I read early in
  • 9:58 - 10:02
    my career. The Pragmatic Programmer by Dave
    Thomas and
  • 10:02 - 10:04
    Andy Hunt. And in that book, which is, it's
  • 10:04 - 10:07
    a terrific book about becoming a better software
    developer,
  • 10:07 - 10:10
    a better software crafts man. In that book,
    they
  • 10:10 - 10:14
    talk about the importance of learning a scripting
    language.
  • 10:14 - 10:16
    And that's because, if you were working in
    a
  • 10:16 - 10:19
    language like Java, there's often things that
    are too,
  • 10:19 - 10:21
    too small of a task to make it worth
  • 10:21 - 10:24
    writing a Java program to do. And, but a
  • 10:24 - 10:26
    scripting language you can, you know, knock
    that off
  • 10:26 - 10:27
    really easily.
  • 10:27 - 10:29
    So things that you might do manually, you
    can
  • 10:29 - 10:33
    instead write a script to do for you. And
  • 10:33 - 10:35
    so I took that to heart, and I went
  • 10:35 - 10:38
    to the book store. Remember, this was the
    early
  • 10:38 - 10:43
    2000s. There were still bookstores. And I
    looked at
  • 10:43 - 10:45
    all the books that they had about scripting
    languages.
  • 10:45 - 10:46
    So there was a bunch of books about Perl.
  • 10:46 - 10:50
    There was a bunch of books about Python. And
  • 10:50 - 10:52
    there was this one book about Ruby by those
  • 10:52 - 10:55
    same guys, Dave Thomas and Andy Hunt.
  • 10:55 - 10:58
    So I immediately just started the books about
    Perl,
  • 10:58 - 11:01
    because I'd worked with Perl before and I
    thought
  • 11:01 - 11:05
    it was terrible. And I looked at the books
  • 11:05 - 11:08
    about Python, and I'm like, this looks OK.
    I
  • 11:08 - 11:10
    can see myself using this. And then I looked
  • 11:10 - 11:13
    at the book about Ruby. And, unfortunately,
    what I
  • 11:13 - 11:15
    saw in the book about Ruby was a lot
  • 11:15 - 11:19
    of dollar signs and dollar sign underscores
    and at
  • 11:19 - 11:23
    signs and at at signs. And I thought, this
  • 11:23 - 11:26
    looks just like Perl. I don't, I don't want
  • 11:26 - 11:29
    to learn this. This, this is, this is, this
  • 11:29 - 11:31
    is crappy.
  • 11:31 - 11:34
    So I decided then to become a Python programmer.
  • 11:34 - 11:36
    And I was actually able to use Python for
  • 11:36 - 11:38
    a number of things in my job and my
  • 11:38 - 11:41
    personal programming. I wrote a script to
    migrate from
  • 11:41 - 11:44
    one bug database to the other. I wrote a
  • 11:44 - 11:46
    script that tied our subversion check ins
    to our
  • 11:46 - 11:49
    bug database so you could reference bug numbers
    and
  • 11:49 - 11:52
    link up the commits and stuff.
  • 11:52 - 11:55
    And I, I wrote some personal scripts. But
    what
  • 11:55 - 11:58
    I really wanted to do was write web apps.
  • 11:58 - 12:01
    Because that's, throughout my career, that's
    always what I've
  • 12:01 - 12:04
    been most excited about. Because I've always
    loved the
  • 12:04 - 12:07
    potential of the web as a platform for enabling
  • 12:07 - 12:11
    communication. It's, it's the most powerful
    and widely distributed
  • 12:11 - 12:15
    way that you can connect people.
  • 12:15 - 12:16
    And so every time I would have an idea
  • 12:16 - 12:20
    for a web app in Python, I would start
  • 12:20 - 12:22
    thinking about how it, or, I would start thinking
  • 12:22 - 12:24
    about how it should work and what it should
  • 12:24 - 12:26
    do. And I'd get excited about it, and want
  • 12:26 - 12:28
    to build it. And then I'd start reading about
  • 12:28 - 12:30
    how to build web apps in Python. And get
  • 12:30 - 12:32
    really frustrated.
  • 12:32 - 12:34
    Because, then there was no clear way. There
    was
  • 12:34 - 12:38
    no Jengo. There was CGI in the core library,
  • 12:38 - 12:40
    but, you know, who wants to write at that
  • 12:40 - 12:47
    low-level? There was, then, a myriad of templating
    options
  • 12:47 - 12:50
    and different object relational mappers and
    different ways of
  • 12:50 - 12:53
    publishing your objects to the web and different
    database
  • 12:53 - 12:57
    drivers. And, there was no clear way of deploying
  • 12:57 - 12:58
    the software, either.
  • 12:58 - 13:02
    So I would have this idea for what I
  • 13:02 - 13:05
    thought would be the next great app, and then
  • 13:05 - 13:08
    I would start reading about Python, how to
    implement
  • 13:08 - 13:11
    it in Python and get frustrated and give up.
  • 13:11 - 13:14
    But I didn't know it at the time, but
  • 13:14 - 13:16
    there was something better on the way.
  • 13:16 - 13:23
    So let's turn now to 2014, and think about
  • 13:23 - 13:27
    what would a programmer from 2004 think about
    how
  • 13:27 - 13:30
    we work today.
  • 13:30 - 13:31
    And I think if you could take someone from
  • 13:31 - 13:33
    then and bring them forward to now, I think
  • 13:33 - 13:36
    they would be amazed. Because it's truly a
    great
  • 13:36 - 13:41
    time to be a programmer. We're all walking
    around
  • 13:41 - 13:43
    with a computer in our pockets that's more
    powerful
  • 13:43 - 13:47
    than the desktop I had in 2004. And it
  • 13:47 - 13:50
    has a, a better web browser, too.
  • 13:50 - 13:54
    So think about what's different between now
    and then.
  • 13:54 - 13:58
    In 2004, Ajax was in its infancy. The term
  • 13:58 - 14:04
    hadn't even been coined yet. Today, rich Ajax
    frameworks
  • 14:04 - 14:09
    come with every web application framework.
    So you can,
  • 14:09 - 14:13
    you can build rich, interactive applications
    much easier.
  • 14:13 - 14:16
    And, you can even write your entire frontend
    in
  • 14:16 - 14:20
    JavaScript if you want to. Web browsers are
    immeasurably
  • 14:20 - 14:25
    more powerful now than they, than they were
    then.
  • 14:25 - 14:29
    Deployment is much easier, too. In 2004, it
    was
  • 14:29 - 14:30
    really hard to figure out how you should get
  • 14:30 - 14:34
    your app up on the web. You could colo,
  • 14:34 - 14:37
    but that was expensive. You could use shared
    hosting,
  • 14:37 - 14:41
    like, DreamHost or something like that. But
    those servers
  • 14:41 - 14:44
    were underpowered and kind of weak.
  • 14:44 - 14:47
    Today, you can spin up a server with the
  • 14:47 - 14:50
    click of a button. You can manage everything
    yourself
  • 14:50 - 14:53
    if you want to use EC2, or you can
  • 14:53 - 14:57
    rely on platform services like Heroku or Google
    App
  • 14:57 - 15:01
    Engine. And this is really great for programmers,
    because
  • 15:01 - 15:03
    you don't have to be a great programmer and
  • 15:03 - 15:07
    a great sys admin now to launch a web
  • 15:07 - 15:11
    application. You can let other people handle
    that part.
  • 15:11 - 15:12
    And that's terrific.
  • 15:12 - 15:15
    Another thing that I think is really powerful
    about
  • 15:15 - 15:21
    how we work today is that in, today we
  • 15:21 - 15:24
    have access to all of these web service APIs,
  • 15:24 - 15:27
    with a simple HTTP request. You can extend
    the
  • 15:27 - 15:30
    functionality of your app really easily by
    leveraging these
  • 15:30 - 15:31
    services.
  • 15:31 - 15:34
    There's everything from search, like my, my
    company provides,
  • 15:34 - 15:37
    to payments from companies like Stripe, and
    even telephony
  • 15:37 - 15:40
    from companies like Twillio.
  • 15:40 - 15:43
    So with just an HTTP request, you can add
  • 15:43 - 15:46
    that kind of functionality into your application
    super easily.
  • 15:46 - 15:49
    And best of all, you're us- they use JSON
  • 15:49 - 15:51
    instead of XML. So there's no XML setups like
  • 15:51 - 15:56
    there was back in the early 2000s.
  • 15:56 - 15:58
    But what about Rails? Like, what would a programmer
  • 15:58 - 16:02
    from 2004 think about Ruby on Rails? Well,
    I
  • 16:02 - 16:05
    think if you could bring someone, or talk
    to
  • 16:05 - 16:08
    somebody in 2004 and say, in ten years the
  • 16:08 - 16:09
    best way to make a web app is gonna
  • 16:09 - 16:12
    be this thing called Ruby on Rails. I think
  • 16:12 - 16:15
    what they would say is, what on Rails?
  • 16:15 - 16:19
    It's difficult to overstate how marginal the
    Ruby community
  • 16:19 - 16:26
    was in 2004. When David publicly demo'd Rails
    at
  • 16:28 - 16:32
    RubyConf 2004, there were probably less people
    in the
  • 16:32 - 16:36
    room than there are right now. That, there
    were
  • 16:36 - 16:39
    about sixty people at that conference.
  • 16:39 - 16:43
    Today, there's dozens of conferences around
    the world, and
  • 16:43 - 16:47
    thousands of people make their livings using
    Ruby and
  • 16:47 - 16:53
    Rails. The community has grown tremendously
    since those days.
  • 16:53 - 16:58
    But what about the features? The features
    were really
  • 16:58 - 17:03
    what made Rails succeed. And if I think back
  • 17:03 - 17:05
    on what I first thought about Rails when I
  • 17:05 - 17:09
    saw it, like, what impressed me. Things that,
    that
  • 17:09 - 17:13
    really stand out in my mind are things like
  • 17:13 - 17:15
    live reloading.
  • 17:15 - 17:17
    Compared to how I was working in Java, where
  • 17:17 - 17:18
    it was like, a really long cycle to get
  • 17:18 - 17:21
    anything up on the screen, in Rails, you could
  • 17:21 - 17:24
    edit any file. You could edit your model,
    you're,
  • 17:24 - 17:27
    you're views. Even your database schema. And
    reload your
  • 17:27 - 17:30
    browser and it was right there. And that was
  • 17:30 - 17:31
    tremendously exciting.
  • 17:31 - 17:34
    And, if you had an exception in your, in
  • 17:34 - 17:36
    your view, you would see exactly which line
    of
  • 17:36 - 17:39
    code caused it, and not have to wade through
  • 17:39 - 17:42
    these huge stack traces that had nothing to
    do
  • 17:42 - 17:46
    with what you were working on. And that was
  • 17:46 - 17:48
    tremendous for developer productivity.
  • 17:48 - 17:50
    Another thing that was a real big win for
  • 17:50 - 17:55
    developer productivity, for me anyway, was
    the development console.
  • 17:55 - 17:58
    Rails let you just type a single command and
  • 17:58 - 17:59
    get full access to all of the code that
  • 17:59 - 18:02
    you'd been writing. So, for me, I keep that
  • 18:02 - 18:04
    open all the time. And I am always constantly
  • 18:04 - 18:07
    trying out things and experimenting and trying
    to figure
  • 18:07 - 18:10
    out how different APIs work by using the developer
  • 18:10 - 18:11
    console.
  • 18:11 - 18:13
    This is something that I'd been able to get
  • 18:13 - 18:16
    working in the Java world using a tool called
  • 18:16 - 18:18
    BeanShell, which is like a Java scripting
    framework. But
  • 18:18 - 18:21
    it was nowhere near as good as the Rails
  • 18:21 - 18:24
    console, and, you know, it just was a lot
  • 18:24 - 18:28
    harder to, to get working.
  • 18:28 - 18:30
    Related to that is just the idea of having
  • 18:30 - 18:33
    separate development environments. Rails came
    right out of the
  • 18:33 - 18:37
    box with development, production, and test,
    and has separate
  • 18:37 - 18:38
    databases for all of those things. So you
    didn't
  • 18:38 - 18:41
    have to worry about mixing your code together.
  • 18:41 - 18:44
    You could have separate configurations for
    testing and production
  • 18:44 - 18:47
    and development. And that really helped with
    the software
  • 18:47 - 18:49
    engineering side of Rails.
  • 18:49 - 18:53
    Finally, the, the, the last big feature that
    I
  • 18:53 - 18:56
    think really stood out to me was ActiveRecord
    and
  • 18:56 - 19:00
    migrations. ActiveRecord was super exciting,
    because here, this, this,
  • 19:00 - 19:03
    this, this code is sort of magically intuiting
    the,
  • 19:03 - 19:05
    the fields from the structure of your database.
    You
  • 19:05 - 19:07
    didn't have to write any code at all. And
  • 19:07 - 19:10
    for someone who was writing SQL statements
    by hand,
  • 19:10 - 19:13
    that was really exciting.
  • 19:13 - 19:15
    And migrations were awesome, too, because
    you always need
  • 19:15 - 19:18
    to transition the state of your database in
    your,
  • 19:18 - 19:19
    in your application.
  • 19:19 - 19:22
    And, again, this is something that we had
    built
  • 19:22 - 19:25
    at my job. But ours was not as good.
  • 19:25 - 19:29
    It, it used raw SQL, so you would write
  • 19:29 - 19:32
    SQL statements to, to transition the database.
    And it
  • 19:32 - 19:34
    was tied directly to the app version that,
    that
  • 19:34 - 19:37
    we had. So, when you would release a new
  • 19:37 - 19:39
    version of the app, you would have to sync
  • 19:39 - 19:42
    that with the database. The database version
    would have
  • 19:42 - 19:43
    to be synced with that.
  • 19:43 - 19:45
    So there was, there was no way to independently
  • 19:45 - 19:47
    migrate the database.
  • 19:47 - 19:48
    And there was no way to go down. So
  • 19:48 - 19:51
    you had to get it right. Rails was better
  • 19:51 - 19:53
    than that.
  • 19:53 - 19:56
    But why did Rails win? Why, why was Rails
  • 19:56 - 19:59
    exciting to people? Because all these features
    were available
  • 19:59 - 20:03
    elsewhere. I think there's three reasons.
  • 20:03 - 20:05
    First of all, while each of these features
    was
  • 20:05 - 20:08
    something that you could get in other web
    programming
  • 20:08 - 20:12
    frameworks, Rails brought them all together.
    Rails was the
  • 20:12 - 20:19
    whole package. So Rails took things that were
    possible
  • 20:19 - 20:22
    and made them easy. It, even that, it made
  • 20:22 - 20:23
    them the default.
  • 20:23 - 20:25
    So Rails took a lot of best practices and
  • 20:25 - 20:28
    put them together in one thing that you could
  • 20:28 - 20:31
    use super simply. And that was really exciting
    to
  • 20:31 - 20:35
    people. Even, even for me, because I was able
  • 20:35 - 20:36
    to, to do some of the things that Rails
  • 20:36 - 20:39
    had. Having it together in one package was
    super
  • 20:39 - 20:41
    exciting.
  • 20:41 - 20:43
    The second reason I think Rails succeeded
    is the
  • 20:43 - 20:46
    triumph of hype. If you go back and read
  • 20:46 - 20:49
    the early blog posts about Rails, it's really
    interesting
  • 20:49 - 20:53
    because it really caused a furor in the Java
  • 20:53 - 20:55
    and the Python world. Because people were
    like, well,
  • 20:55 - 20:58
    why can't we do this? And in the middle
  • 20:58 - 21:02
    of all that, you saw DHH. He was constantly
  • 21:02 - 21:06
    promoting Rails and getting into discussions
    and arguments with
  • 21:06 - 21:11
    other people and blogging about it. And he,
    he
  • 21:11 - 21:14
    was relentless in promoting Rails, and the
    early Rails
  • 21:14 - 21:17
    community was relentless in sharing their
    enthusiasm for this
  • 21:17 - 21:18
    new thing.
  • 21:18 - 21:20
    And I think that that matters a lot, because
  • 21:20 - 21:24
    it's not enough to have great code and just
  • 21:24 - 21:27
    put it up on the internet. That, that never
  • 21:27 - 21:29
    works. You need to tell people about what
    you're
  • 21:29 - 21:33
    doing in order for them to know about it.
  • 21:33 - 21:36
    And you need to explain clearly and concisely
    why
  • 21:36 - 21:40
    it's better than what they're doing now. And
    Rails,
  • 21:40 - 21:44
    David and the Rails community really succeeded
    at that.
  • 21:44 - 21:49
    Third. Another reason that Rails succeeded
    is the triumph
  • 21:49 - 21:53
    of community. From really early days, Rails
    had the
  • 21:53 - 21:56
    ability to be extended with plugins. And so
    people
  • 21:56 - 22:00
    wrote plugins that would take care of default
    areas,
  • 22:00 - 22:02
    or not, not default areas, but common areas
    of
  • 22:02 - 22:06
    your application, like logging in or uploading
    files.
  • 22:06 - 22:07
    These are the things that you needed in your
  • 22:07 - 22:11
    app, but they weren't core to your app. And
  • 22:11 - 22:14
    so knowing that you could take advantage of
    these,
  • 22:14 - 22:18
    these plugins and later gems really made picking
    Rails
  • 22:18 - 22:25
    an easier choice.
  • 22:25 - 22:28
    So ultimately, Rails was successful. But what
    about the
  • 22:28 - 22:31
    future? What does the future have in store
    for
  • 22:31 - 22:36
    Rails? I think that Rails does face challenges
    in
  • 22:36 - 22:41
    the future, because, because the web is changing.
    What
  • 22:41 - 22:43
    people want to do on the web is, is
  • 22:43 - 22:46
    becoming different. And indeed the, the future
    of the
  • 22:46 - 22:49
    web I think is even in question.
  • 22:49 - 22:52
    So let's look at two challenges to Rails.
    First
  • 22:52 - 22:56
    of all, now that browsers are more powerful,
    people
  • 22:56 - 22:58
    are able to write more of their app on
  • 22:58 - 23:02
    the frontend. And so, when you do this, you
  • 23:02 - 23:06
    don't need the kind of classic web app that
  • 23:06 - 23:08
    Rails is. Rails is really good at generating
    a
  • 23:08 - 23:11
    lot of HTML and shipping it down to the
  • 23:11 - 23:15
    client. Kind of the classic web app like base
  • 23:15 - 23:17
    camp.
  • 23:17 - 23:19
    But when you're writing your entire app in
    JavaScript
  • 23:19 - 23:22
    in the client, what you need is the ability
  • 23:22 - 23:25
    to talk to the server with an API. And
  • 23:25 - 23:28
    when that's all you're doing, people can question,
    why
  • 23:28 - 23:30
    do I need Rails? Why do I need all
  • 23:30 - 23:33
    of this extra stuff that Rails does? I'm,
    maybe
  • 23:33 - 23:35
    I should just use node.js, and then I can
  • 23:35 - 23:38
    write, you know, the same language on the
    client
  • 23:38 - 23:40
    and the server.
  • 23:40 - 23:46
    Similarly, mobile apps are becoming increasingly
    popular, because you
  • 23:46 - 23:48
    can do so much more with a mobile app
  • 23:48 - 23:50
    than you can with a web app. The user
  • 23:50 - 23:54
    interaction is much richer and, and faster
    and, and
  • 23:54 - 23:59
    just cleaner. And, again, these kind of apps
    talk
  • 23:59 - 24:03
    to the server with an API. And so people
  • 24:03 - 24:06
    think, well, I don't need Rails, then.
  • 24:06 - 24:07
    And I think that this, this is a threat
  • 24:07 - 24:11
    to Rails. But there's two key things to remember
  • 24:11 - 24:14
    about this. One, Rails is great at this kind
  • 24:14 - 24:18
    of thing. In our application, we serve hundreds
    of
  • 24:18 - 24:24
    millions of API requests a day, a month, using
  • 24:24 - 24:26
    Rails. And the way that we do that is
  • 24:26 - 24:28
    not using action Controller.
  • 24:28 - 24:30
    But Rails makes it easy to pick out only
  • 24:30 - 24:34
    the parts of Rails that you need to use.
  • 24:34 - 24:36
    And so you can, you can take Rails much
  • 24:36 - 24:40
    further than many people think, I believe.
  • 24:40 - 24:44
    Second, even if you are building an API heavy
  • 24:44 - 24:46
    app, not all of your app is going to
  • 24:46 - 24:49
    be API based. You are going to need a
  • 24:49 - 24:54
    management console to handle the backend of
    your application.
  • 24:54 - 24:56
    Pretty much every app has this. You need a
  • 24:56 - 24:59
    way to look up your users and, you know,
  • 24:59 - 25:02
    change their account status and things like
    that.
  • 25:02 - 25:05
    And, are you gonna build an iPad app for
  • 25:05 - 25:07
    that? I don't think so. Because it would be
  • 25:07 - 25:10
    too expensive and slow. The web is still the
  • 25:10 - 25:13
    best way and the easiest way to distribute
    an
  • 25:13 - 25:15
    application.
  • 25:15 - 25:17
    So Rails has a real, I think, has a
  • 25:17 - 25:21
    place for that. Or, there's a place for Rails,
  • 25:21 - 25:25
    even in an API-driven application.
  • 25:25 - 25:28
    But even if the web, as a platform, and
  • 25:28 - 25:30
    Rails as a, as a framework, can't adapt and
  • 25:30 - 25:33
    fall by the wayside, I think the legacy of
  • 25:33 - 25:36
    Rails will really live on for a long time.
  • 25:36 - 25:41
    Because this idea of taking things that were
    possible
  • 25:41 - 25:44
    and making them simple, making them easy to
    do,
  • 25:44 - 25:48
    is really powerful. And it inspired programmers
    in many
  • 25:48 - 25:53
    different programming languages to, to copy
    Rails and to
  • 25:53 - 25:58
    try to get those benefits for themselves.
  • 25:58 - 26:00
    So I think no matter what the next platform
  • 26:00 - 26:04
    is, people will be inspired by that aspect
    of
  • 26:04 - 26:06
    Rails, and they will want to write the Rails
  • 26:06 - 26:09
    of whatever.
  • 26:09 - 26:11
    I'd also like to look at the reaction against
  • 26:11 - 26:15
    Rails. Because that's part of Rails's legacy,
    too. There's
  • 26:15 - 26:18
    two examples that I'd like to talk about here.
  • 26:18 - 26:21
    First of all, there's Jengo. So Jengo can't
    be
  • 26:21 - 26:26
    considered to be inspired by Rails, because
    it was
  • 26:26 - 26:28
    developed at the same time or even earlier
    than
  • 26:28 - 26:29
    Rails.
  • 26:29 - 26:34
    But since, the, the two frameworks have been
    really
  • 26:34 - 26:36
    similar and, and, and have learned a lot from
  • 26:36 - 26:40
    each other I think. But the way that Jengo
  • 26:40 - 26:43
    works, it is really driven by the Python philosophy
  • 26:43 - 26:47
    of explicit is better than implicit. So in,
    in
  • 26:47 - 26:51
    Jengo, when you, when you like what to map
  • 26:51 - 26:53
    up a url on your server, you think really
  • 26:53 - 26:56
    hard about what that url is going to be.
  • 26:56 - 27:01
    It doesn't happen automatically. And your
    database models tell
  • 27:01 - 27:05
    the database what its fields should be, instead
    of
  • 27:05 - 27:08
    the other way around. In Rails, of course,
    we
  • 27:08 - 27:12
    follow convention over configuration, right.
    But if you've ever
  • 27:12 - 27:14
    tried to teach someone Rails, you know that
    this
  • 27:14 - 27:18
    can be a double-edged sword.
  • 27:18 - 27:20
    Convention over configuration lets you write
    less code, but
  • 27:20 - 27:23
    it also makes it less clear what's happening.
    When
  • 27:23 - 27:26
    you're teaching somebody Rails, it can be
    really confusing
  • 27:26 - 27:29
    that you edit a route in this file over
  • 27:29 - 27:32
    here and therefore your controller over here
    needs to
  • 27:32 - 27:36
    be named this and it has these methods available
  • 27:36 - 27:41
    to it that respond to these HTTP requests.
    Or
  • 27:41 - 27:42
    HTTP methods.
  • 27:42 - 27:44
    That is not at all obvious. And so it
  • 27:44 - 27:50
    takes time to learn all those conventions.
    And, I
  • 27:50 - 27:51
    mean, I don't think one is better than the
  • 27:51 - 27:54
    other. They're just, you know, different sides
    of the
  • 27:54 - 27:57
    same coin. Different ways of looking at how
    programming
  • 27:57 - 27:59
    should work.
  • 27:59 - 28:02
    Kind of related to that is the second example,
  • 28:02 - 28:07
    which is microframeworks. Like Sinatra. These
    have been incredibly
  • 28:07 - 28:09
    influential. And I love using Sinatra. It's
    just, it's
  • 28:09 - 28:11
    like such a thing of beauty, when you can
  • 28:11 - 28:14
    have your whole web app in one file. And
  • 28:14 - 28:17
    the, the urls that are, that are in your
  • 28:17 - 28:20
    web app are just tightly connected to the
    code
  • 28:20 - 28:22
    that's going to run when someone goes to that
  • 28:22 - 28:23
    url.
  • 28:23 - 28:27
    It, that is like a really wonderful feeling,
    I
  • 28:27 - 28:31
    think. And Sinatra has been probably even
    more influential
  • 28:31 - 28:35
    than Rails. There are copies of Sinatra, or
    Sinatra-inspired
  • 28:35 - 28:39
    microframeworks anyway, in just about every
    programming language you
  • 28:39 - 28:43
    can think of. Anything from Java to PHP to
  • 28:43 - 28:48
    Clojure, Go, JavaScript. Even Haskall.
  • 28:48 - 28:53
    All of these have a version of Sinatra.
  • 28:53 - 28:58
    And in some languages, these microframeworks,
    the microframework inspired
  • 28:58 - 29:01
    by Sinatra is the default way people write
    web
  • 29:01 - 29:05
    apps. It's the best way that they have. And
  • 29:05 - 29:08
    I think that that is kind of a problem,
  • 29:08 - 29:12
    because while I love using Sinatra, when an
    app
  • 29:12 - 29:14
    gets above a certain size, I find myself pulling
  • 29:14 - 29:16
    in more and more of Rails.
  • 29:16 - 29:20
    And at some point I feel, well, I might
  • 29:20 - 29:22
    as well just switch to Rails. And so, in
  • 29:22 - 29:24
    these, I feel bad for these programmers in
    these
  • 29:24 - 29:26
    other languages, because they don't have the
    choice to
  • 29:26 - 29:30
    switch, necessarily, to something as good
    as Rails.
  • 29:30 - 29:32
    So I think, I think Rails actually has a
  • 29:32 - 29:34
    bright future ahead of it, because it, it's
    shown
  • 29:34 - 29:38
    the ability to adapt and respond to change.
    Think
  • 29:38 - 29:41
    about Rails 1 point 2 and the addition of
  • 29:41 - 29:44
    REST and making that the default way that
    we
  • 29:44 - 29:49
    think about controllers and resources on the
    web.
  • 29:49 - 29:52
    So I think that if people want to use
  • 29:52 - 29:55
    Rails to back JavaScript-based applications,
    Rails will get better
  • 29:55 - 29:58
    at that. And if people want to use it
  • 29:58 - 30:00
    to back mobile applications, it will get better
    than,
  • 30:00 - 30:03
    at that. But you'll still have the ability
    to
  • 30:03 - 30:05
    use Rails for what it's good at when you
  • 30:05 - 30:06
    need to.
  • 30:06 - 30:12
    All right. So we've talked about what programming
    was
  • 30:12 - 30:17
    like in 2004. We've talked a little bit about
  • 30:17 - 30:19
    the features of Rails that made people want
    to
  • 30:19 - 30:23
    use it and made it win. And we've talked
  • 30:23 - 30:26
    about what could happen in the future. What
    is
  • 30:26 - 30:29
    the, what's the legacy of Rails and will it
  • 30:29 - 30:33
    be able to adapt?
  • 30:33 - 30:36
    So a hundred years ago, or, actually, more
    than
  • 30:36 - 30:39
    a hundred years ago, when Edward Bellamy was
    frustrated
  • 30:39 - 30:42
    with the way things were going, with how society
  • 30:42 - 30:45
    was working, he took up his pen and he
  • 30:45 - 30:49
    used his imagination to create a new world.
    This,
  • 30:49 - 30:52
    this utopian novel, where he could explain
    how he
  • 30:52 - 30:54
    thought things ought to work.
  • 30:54 - 30:57
    Now, that may seem kind of pointless. Because
    it's
  • 30:57 - 31:02
    the twenty-first century. America is not a
    socialist utopia.
  • 31:02 - 31:05
    But that book was incredibly influential.
    In the years
  • 31:05 - 31:09
    after its publication, hundreds of Bellamy
    clubs were started
  • 31:09 - 31:13
    across the country, and millions of people
    were inspired
  • 31:13 - 31:15
    by the ideas written in the book.
  • 31:15 - 31:20
    And those people, and those clubs formed the
    nucleus
  • 31:20 - 31:24
    of the progressive movement in the early twentieth
    century,
  • 31:24 - 31:27
    that broke the trusts and monopolies, and
    ultimately paved
  • 31:27 - 31:31
    the way for social security and the American
    welfare
  • 31:31 - 31:31
    state.
  • 31:31 - 31:34
    So the book did have a huge influence on,
  • 31:34 - 31:35
    on the world.
  • 31:35 - 31:38
    Programming, on the other hand, is a little
    more
  • 31:38 - 31:44
    concrete. So when DHH was frustrated by how
    programming,
  • 31:44 - 31:48
    web programming worked in 2003 or whatever,
    he was
  • 31:48 - 31:52
    able to do something about it. He cracked
    open
  • 31:52 - 31:54
    his text editor and got to work and built
  • 31:54 - 31:57
    something that people found inspiring.
  • 31:57 - 31:59
    And when they saw it, they wanted to meet
  • 31:59 - 32:02
    other people who were interested in that.
    And that
  • 32:02 - 32:04
    was the genesis of the Rails community. And
    so
  • 32:04 - 32:09
    today, you know, we're all here today because
    of
  • 32:09 - 32:13
    the Rails community and because of what, what
    developed
  • 32:13 - 32:17
    over those, those last ten years. So I'm really,
  • 32:17 - 32:20
    really pleased to be a part of that community,
  • 32:20 - 32:23
    and really honored to be speaking to you today
  • 32:23 - 32:25
    about that.
  • 32:25 - 32:27
    And it, it's made a huge impact in the
  • 32:27 - 32:30
    direction of my career. And I just find it
  • 32:30 - 32:34
    inspiring. I find it inspiring that as programmers,
    we
  • 32:34 - 32:37
    can see something that's broken and we can
    fix
  • 32:37 - 32:40
    it. We can create a new reality for ourselves
  • 32:40 - 32:43
    with code. And I think that that's a really
  • 32:43 - 32:46
    powerful, really powerful notion.
  • 32:46 - 32:48
    And we also shouldn't forget the lessons of
    Rails
  • 32:48 - 32:50
    as we did that. Because Rails didn't just
    win
  • 32:50 - 32:53
    because it was, because it was better, though
    I,
  • 32:53 - 32:56
    I do think it was. It won because of
  • 32:56 - 32:59
    the community around it and because of the,
    their
  • 32:59 - 33:02
    passion for telling people about what was
    so good
  • 33:02 - 33:03
    about Rails.
  • 33:03 - 33:06
    So most of us probably are not going to
  • 33:06 - 33:11
    write the next great framework. I, I, I don't
  • 33:11 - 33:14
    imagine that I will. But I think that this,
  • 33:14 - 33:16
    we can take to heart the lessons of Rails
  • 33:16 - 33:19
    in our own work and in the libraries that
  • 33:19 - 33:20
    we're writing.
  • 33:20 - 33:23
    Don't forget to, to, to try to make things
  • 33:23 - 33:25
    easy. To try to make it easy for your
  • 33:25 - 33:29
    fellow programmers. And don't forget to tell
    people about
  • 33:29 - 33:32
    it and explain why they should use what you've
  • 33:32 - 33:35
    written. And I think if you do that, you
  • 33:35 - 33:37
    can help make the world a better place.
  • 33:37 - 33:38
    Thanks.
Title:
RailsConf 2014 - Looking Backward: Ten Years on Rails by Luke Francl
Description:

more » « less
Duration:
34:04

English subtitles

Revisions