0:00:23.100,0:00:26.500 LUKE FRANCL: Good afternoon. I'd like to get[br]started if, I 0:00:26.500,0:00:30.140 think, everybody's ready. Cool. Cool. 0:00:30.140,0:00:33.550 Thank, thank you for joining me this afternoon.[br]I'm 0:00:33.550,0:00:36.750 excited to be here. And thanks for, thanks[br]for 0:00:36.750,0:00:38.550 choosing this talk. 0:00:38.550,0:00:41.070 So it's been ten years since the first public 0:00:41.070,0:00:43.960 release on Rails, so I think that's a good 0:00:43.960,0:00:48.280 time to think back and reflect on where Rails 0:00:48.280,0:00:51.180 has come from, where it might be going, and 0:00:51.180,0:00:53.870 what the future has in store. 0:00:53.870,0:00:58.480 So, I've been thinking a lot about the early 0:00:58.480,0:01:01.420 days of Rails, lately, because the company[br]I work 0:01:01.420,0:01:05.269 for, Swiftype, makes site search software.[br]So I use 0:01:05.269,0:01:09.369 my own website for testing. So I index my 0:01:09.369,0:01:11.439 site and then have to do searches on it, 0:01:11.439,0:01:13.729 and I'll search for Rails. Just cause I'm[br]not 0:01:13.729,0:01:15.880 super creative and I need to search for something, 0:01:15.880,0:01:16.570 right. 0:01:16.570,0:01:18.509 And, in doing so, I found some old blog 0:01:18.509,0:01:20.850 posts that I wrote in early 2005, when I 0:01:20.850,0:01:23.840 first discovered Rails. And it was really[br]interesting for 0:01:23.840,0:01:27.950 me to read, because back then, I was, I 0:01:27.950,0:01:32.079 was working as a Java developer and I was 0:01:32.079,0:01:35.060 really interested in Python. And Rails was[br]neither of 0:01:35.060,0:01:37.439 those things. So I was pretty skeptical of[br]Rails. 0:01:37.439,0:01:39.119 Like, I was impressed with it, but I wasn't 0:01:39.119,0:01:43.090 sure it was worth learning Ruby over. 0:01:43.090,0:01:45.039 So I thought, I'll just sit back and let 0:01:45.039,0:01:49.439 the Python people catch up. And I waited and 0:01:49.439,0:01:51.990 I waited and I waited, and that never really 0:01:51.990,0:01:55.130 seemed to happen. And so after a few months, 0:01:55.130,0:01:58.499 I jumped into Rails and started learning it[br]and 0:01:58.499,0:02:00.409 I started learning Ruby so that I could use 0:02:00.409,0:02:04.590 Rails. And then that fall, I got wind of 0:02:04.590,0:02:06.509 a new group starting in my home town. The 0:02:06.509,0:02:09.508 Ruby Users of Minnesota. And so I was, I 0:02:09.508,0:02:10.989 was there at the first meeting when there[br]was 0:02:10.989,0:02:13.480 twelve people talk, who were just really excited[br]about 0:02:13.480,0:02:15.849 Ruby and really excited about Rails. 0:02:15.849,0:02:18.770 And at that point I joined the, the Ruby 0:02:18.770,0:02:22.010 community and became a part of that and really 0:02:22.010,0:02:24.909 have not, have not looked back since then.[br]And 0:02:24.909,0:02:27.069 I've been working with Rails professionally[br]now for about 0:02:27.069,0:02:28.650 eight years. 0:02:28.650,0:02:31.400 So this made me think about a book I 0:02:31.400,0:02:35.409 read once called Looking Backward by Edward[br]Bellamy. So 0:02:35.409,0:02:37.459 in this book, which was written in the late 0:02:37.459,0:02:41.590 1800s and takes place at that time, a rich, 0:02:41.590,0:02:45.260 upperclass man is hypnotized. And he falls[br]asleep for 0:02:45.260,0:02:48.620 over a hundred years. And when he wakes up, 0:02:48.620,0:02:49.879 everything has changed. 0:02:49.879,0:02:54.069 America is now a socialist utopia. And so,[br]you 0:02:54.069,0:02:57.219 know, he had it pretty good before, right.[br]He, 0:02:57.219,0:03:00.939 he was wealthy. He had servants. And now everyone 0:03:00.939,0:03:03.340 is equal. And so he's pretty skeptical of[br]this 0:03:03.340,0:03:05.090 new order. 0:03:05.090,0:03:09.379 So it takes him awhile, but as he's shown 0:03:09.379,0:03:11.709 the new way of doing things, he becomes convinced 0:03:11.709,0:03:16.879 that this is actually a better way. And that 0:03:16.879,0:03:20.959 made me think of, think of my situation, where 0:03:20.959,0:03:24.200 I was, I was skeptical of Rails, and, but 0:03:24.200,0:03:29.019 eventually won over. 0:03:29.019,0:03:32.700 So today, what I'd like to talk about is 0:03:32.700,0:03:36.450 the idea of what would a programmer from 2004 0:03:36.450,0:03:39.310 think if they could time travel forward to[br]today 0:03:39.310,0:03:42.650 and experience our web development utopia.[br]What would that 0:03:42.650,0:03:45.260 be like, for them, to see how we work 0:03:45.260,0:03:46.299 today? 0:03:46.299,0:03:49.739 So, what I'd like to do today is first 0:03:49.739,0:03:53.389 talk about what web development was like in[br]2004. 0:03:53.389,0:03:55.930 Then, I'd like to jump forward to the present 0:03:55.930,0:03:59.209 and think about what a programmer from 2004[br]would 0:03:59.209,0:04:02.650 think about our web development utopia of[br]today. And 0:04:02.650,0:04:05.430 finally I'd like to take a look at what 0:04:05.430,0:04:07.870 the future might have in store for Rails,[br]and 0:04:07.870,0:04:13.400 what the, what the legacy of Rails might be. 0:04:13.400,0:04:16.060 So first, let's talk a little bit about what 0:04:16.060,0:04:19.680 development was like in 2004. 0:04:19.680,0:04:22.220 So if I can set the stage for a 0:04:22.220,0:04:24.690 minute, I see a lot of Mac Books here 0:04:24.690,0:04:28.660 today. There were no Mac Books in 2004. The 0:04:28.660,0:04:30.590 top of the line Apple laptop was a Power 0:04:30.590,0:04:35.150 Mac G4. And, you know, Apple had not completely 0:04:35.150,0:04:39.289 penetrated the web development community like[br]it has now. 0:04:39.289,0:04:42.380 There were only, I, I used Linux at work 0:04:42.380,0:04:49.050 myself. And, a Windows at home, actually.[br]And the 0:04:49.050,0:04:51.990 most popular phone, like, maybe not the most[br]popular, 0:04:51.990,0:04:54.810 but the hottest phone in 2004 was a Motorrola 0:04:54.810,0:04:58.460 Razr. So, right? 0:04:58.460,0:05:01.770 So things were pretty different there. Things[br]were pretty 0:05:01.770,0:05:04.560 different then. And I was working as a Java 0:05:04.560,0:05:07.180 developer at the time. And I was pretty excited 0:05:07.180,0:05:10.660 about that, because I graduated in 2001, right[br]after 0:05:10.660,0:05:14.340 the dot com bust. And things were pretty sketchy 0:05:14.340,0:05:15.990 there for awhile. It was hard for me to 0:05:15.990,0:05:19.229 find a job. And so I was excited that 0:05:19.229,0:05:20.960 I was able to work as a Java developer, 0:05:20.960,0:05:22.930 in the hot language at the time. And I 0:05:22.930,0:05:24.190 was, I was glad that I was able to 0:05:24.190,0:05:27.360 work at a software development company, where[br]I could 0:05:27.360,0:05:31.690 work on software for sale instead of working[br]in 0:05:31.690,0:05:33.629 the cost center at a, at a big bank 0:05:33.629,0:05:37.090 or something like that, right. 0:05:37.090,0:05:40.240 So I was working as a Java developer, and 0:05:40.240,0:05:42.270 if you've ever done any Java web development,[br]you 0:05:42.270,0:05:46.620 know that it can be pretty painful, right.[br]At 0:05:46.620,0:05:48.400 the time, the, the best way to do Java 0:05:48.400,0:05:53.500 web development was struts and hibernate.[br]But we didn't 0:05:53.500,0:05:56.960 use either of those. We used raw Java servelettes 0:05:56.960,0:06:03.370 and hand coded J, JDBC queries to our database. 0:06:03.370,0:06:07.000 So the, the real problem with Java as a, 0:06:07.000,0:06:09.919 as a web development platform, at least in[br]those 0:06:09.919,0:06:12.740 days, was it, it has a really long edit, 0:06:12.740,0:06:16.789 compile, debug loop. Or, in the case of, of 0:06:16.789,0:06:20.830 Java web development, it's the edit, compile,[br]deploy, debug 0:06:20.830,0:06:24.220 loop. Because you have to restart your app[br]server, 0:06:24.220,0:06:25.539 and we used Web Sphere, so that took a 0:06:25.539,0:06:26.990 long time. 0:06:26.990,0:06:29.930 So if I needed to write a new page 0:06:29.930,0:06:33.050 for, for our app, it, it was a pretty 0:06:33.050,0:06:35.810 involved process. So we used raw servelettes,[br]so that's 0:06:35.810,0:06:38.470 sort of like using a raw CGI library, where 0:06:38.470,0:06:41.979 it's very low-level. And if, when you work[br]in 0:06:41.979,0:06:44.310 Java, it's very verbose and you have to read 0:06:44.310,0:06:47.000 from input streams and write to output streams.[br]And 0:06:47.000,0:06:49.539 it just doesn't have the conveniences of Ruby[br]or 0:06:49.539,0:06:51.150 a scripting language. 0:06:51.150,0:06:52.449 So I'd have to write my servelette, then I'd 0:06:52.449,0:06:54.690 have to write a bunch of XML files, or 0:06:54.690,0:06:56.810 XML code in the web dot xml file to 0:06:56.810,0:07:00.440 map it up. And then you'd compile everything[br]and 0:07:00.440,0:07:02.940 get it working and then restart your app server, 0:07:02.940,0:07:06.810 which would take several minutes. And then[br]browse to 0:07:06.810,0:07:10.069 the new page to, to see what it, what's 0:07:10.069,0:07:11.229 going on there. 0:07:11.229,0:07:13.810 And that's where the fun would start, because[br]that's 0:07:13.810,0:07:17.280 when the JSPs came into play. So JSP is 0:07:17.280,0:07:21.310 just like ERB, right. Instead of Ruby, it's[br]Java. 0:07:21.310,0:07:24.389 But Java a much more heavy-weight language,[br]and it 0:07:24.389,0:07:27.360 doesn't have, you know, friendly looping constructs[br]or mapping 0:07:27.360,0:07:30.500 constructs like Ruby does. So writing view[br]code in 0:07:30.500,0:07:33.430 Ruby, or in Java is not very much fun. 0:07:33.430,0:07:35.430 But worst of all, the way that JSPs work 0:07:35.430,0:07:37.810 is that it takes the Java, or the JSP 0:07:37.810,0:07:39.830 code that you write and it compiles it into 0:07:39.830,0:07:42.050 a Java class file. And then that Java class 0:07:42.050,0:07:47.349 file gets compiled into code. So when you[br]get 0:07:47.349,0:07:50.250 an error, when you're debugging, you'd get[br]this stack 0:07:50.250,0:07:53.870 trace, and it would be like, NullPointer exception[br]on 0:07:53.870,0:08:00.080 line 12,075 of line 20,082, and you'd sit[br]there 0:08:00.080,0:08:06.800 and you'd think, ah. What was I doing in 0:08:06.800,0:08:09.840 my JSP that could cause a NullPointer exception? 0:08:09.840,0:08:11.960 And you'd look at the JSP and you'd look 0:08:11.960,0:08:14.479 at the stack trace, and they had no correspondence 0:08:14.479,0:08:19.699 whatsoever, right. So it's really painful.[br]And if you 0:08:19.699,0:08:21.770 were smart, you would, there was a setting,[br]like 0:08:21.770,0:08:23.449 a secret setting you could use for Web Sphere 0:08:23.449,0:08:27.569 to keep around the compiled Java files. So[br]then 0:08:27.569,0:08:29.419 you could open that up in your web browser 0:08:29.419,0:08:33.950 and look at line 12,075 and be like, oh. 0:08:33.950,0:08:36.570 That's what I was doing in the JSP. 0:08:36.570,0:08:41.240 So, web development in Java, especially in[br]2004, not 0:08:41.240,0:08:44.820 very much fun. But there was, there was also 0:08:44.820,0:08:48.110 at that time a glimmer that something better[br]was 0:08:48.110,0:08:53.570 on the way, that the web could do more. 0:08:53.570,0:08:55.900 There was a new sense that the web was 0:08:55.900,0:08:59.930 a powerful platform for delivering software.[br]And I think 0:08:59.930,0:09:04.400 that the earliest glimmerings of this come[br]from Microsoft's 0:09:04.400,0:09:08.570 Outlook web app. This was the first application[br]to 0:09:08.570,0:09:12.080 use what we would call today Ajax, without[br]requiring 0:09:12.080,0:09:14.250 any kind of browser plugins. 0:09:14.250,0:09:18.990 So that, that came out in 2001. And people, 0:09:18.990,0:09:20.840 people didn't pay much attention to it because[br]it 0:09:20.840,0:09:24.610 was IE only and it, it wasn't clear how 0:09:24.610,0:09:27.540 it was working, right. And then Google launched[br]Google 0:09:27.540,0:09:31.090 Suggest. And people dissected that, and they[br]saw how 0:09:31.090,0:09:35.740 it was working. And they also launched Gmail,[br]which 0:09:35.740,0:09:37.740 gave people a new sense of what was possible 0:09:37.740,0:09:39.840 in a web app. That, that web apps could 0:09:39.840,0:09:44.180 automatically refresh as things were changing[br]on the server. 0:09:44.180,0:09:46.050 So there was a new sense of what was 0:09:46.050,0:09:49.060 possible. That, that, that maybe there was[br]a better 0:09:49.060,0:09:52.380 way of writing web apps. And in 2004 I 0:09:52.380,0:09:56.360 was also looking for something better. Because,[br]and I 0:09:56.360,0:09:58.070 attribute that to a book I read early in 0:09:58.070,0:10:01.530 my career. The Pragmatic Programmer by Dave[br]Thomas and 0:10:01.530,0:10:04.260 Andy Hunt. And in that book, which is, it's 0:10:04.260,0:10:06.510 a terrific book about becoming a better software[br]developer, 0:10:06.510,0:10:10.270 a better software crafts man. In that book,[br]they 0:10:10.270,0:10:13.720 talk about the importance of learning a scripting[br]language. 0:10:13.720,0:10:16.240 And that's because, if you were working in[br]a 0:10:16.240,0:10:19.150 language like Java, there's often things that[br]are too, 0:10:19.150,0:10:21.110 too small of a task to make it worth 0:10:21.110,0:10:23.990 writing a Java program to do. And, but a 0:10:23.990,0:10:25.640 scripting language you can, you know, knock[br]that off 0:10:25.640,0:10:27.350 really easily. 0:10:27.350,0:10:28.940 So things that you might do manually, you[br]can 0:10:28.940,0:10:33.020 instead write a script to do for you. And 0:10:33.020,0:10:35.410 so I took that to heart, and I went 0:10:35.410,0:10:38.010 to the book store. Remember, this was the[br]early 0:10:38.010,0:10:42.580 2000s. There were still bookstores. And I[br]looked at 0:10:42.580,0:10:44.780 all the books that they had about scripting[br]languages. 0:10:44.780,0:10:46.350 So there was a bunch of books about Perl. 0:10:46.350,0:10:49.620 There was a bunch of books about Python. And 0:10:49.620,0:10:52.220 there was this one book about Ruby by those 0:10:52.220,0:10:55.460 same guys, Dave Thomas and Andy Hunt. 0:10:55.460,0:10:58.270 So I immediately just started the books about[br]Perl, 0:10:58.270,0:11:00.640 because I'd worked with Perl before and I[br]thought 0:11:00.640,0:11:05.370 it was terrible. And I looked at the books 0:11:05.370,0:11:07.620 about Python, and I'm like, this looks OK.[br]I 0:11:07.620,0:11:09.710 can see myself using this. And then I looked 0:11:09.710,0:11:13.170 at the book about Ruby. And, unfortunately,[br]what I 0:11:13.170,0:11:14.750 saw in the book about Ruby was a lot 0:11:14.750,0:11:18.730 of dollar signs and dollar sign underscores[br]and at 0:11:18.730,0:11:23.000 signs and at at signs. And I thought, this 0:11:23.000,0:11:26.450 looks just like Perl. I don't, I don't want 0:11:26.450,0:11:28.840 to learn this. This, this is, this is, this 0:11:28.840,0:11:30.550 is crappy. 0:11:30.550,0:11:33.610 So I decided then to become a Python programmer. 0:11:33.610,0:11:35.920 And I was actually able to use Python for 0:11:35.920,0:11:37.700 a number of things in my job and my 0:11:37.700,0:11:41.350 personal programming. I wrote a script to[br]migrate from 0:11:41.350,0:11:44.040 one bug database to the other. I wrote a 0:11:44.040,0:11:46.440 script that tied our subversion check ins[br]to our 0:11:46.440,0:11:48.640 bug database so you could reference bug numbers[br]and 0:11:48.640,0:11:51.670 link up the commits and stuff. 0:11:51.670,0:11:55.360 And I, I wrote some personal scripts. But[br]what 0:11:55.360,0:11:58.320 I really wanted to do was write web apps. 0:11:58.320,0:12:00.580 Because that's, throughout my career, that's[br]always what I've 0:12:00.580,0:12:03.570 been most excited about. Because I've always[br]loved the 0:12:03.570,0:12:06.680 potential of the web as a platform for enabling 0:12:06.680,0:12:10.770 communication. It's, it's the most powerful[br]and widely distributed 0:12:10.770,0:12:14.600 way that you can connect people. 0:12:14.600,0:12:16.100 And so every time I would have an idea 0:12:16.100,0:12:19.770 for a web app in Python, I would start 0:12:19.770,0:12:22.060 thinking about how it, or, I would start thinking 0:12:22.060,0:12:23.830 about how it should work and what it should 0:12:23.830,0:12:25.620 do. And I'd get excited about it, and want 0:12:25.620,0:12:28.200 to build it. And then I'd start reading about 0:12:28.200,0:12:30.040 how to build web apps in Python. And get 0:12:30.040,0:12:31.500 really frustrated. 0:12:31.500,0:12:33.770 Because, then there was no clear way. There[br]was 0:12:33.770,0:12:38.370 no Jengo. There was CGI in the core library, 0:12:38.370,0:12:40.500 but, you know, who wants to write at that 0:12:40.500,0:12:46.600 low-level? There was, then, a myriad of templating[br]options 0:12:46.600,0:12:50.190 and different object relational mappers and[br]different ways of 0:12:50.190,0:12:53.320 publishing your objects to the web and different[br]database 0:12:53.320,0:12:57.370 drivers. And, there was no clear way of deploying 0:12:57.370,0:12:58.500 the software, either. 0:12:58.500,0:13:02.170 So I would have this idea for what I 0:13:02.170,0:13:04.570 thought would be the next great app, and then 0:13:04.570,0:13:08.210 I would start reading about Python, how to[br]implement 0:13:08.210,0:13:11.450 it in Python and get frustrated and give up. 0:13:11.450,0:13:13.980 But I didn't know it at the time, but 0:13:13.980,0:13:16.320 there was something better on the way. 0:13:16.320,0:13:23.260 So let's turn now to 2014, and think about 0:13:23.260,0:13:27.380 what would a programmer from 2004 think about[br]how 0:13:27.380,0:13:30.050 we work today. 0:13:30.050,0:13:31.200 And I think if you could take someone from 0:13:31.200,0:13:33.240 then and bring them forward to now, I think 0:13:33.240,0:13:36.370 they would be amazed. Because it's truly a[br]great 0:13:36.370,0:13:40.680 time to be a programmer. We're all walking[br]around 0:13:40.680,0:13:43.040 with a computer in our pockets that's more[br]powerful 0:13:43.040,0:13:47.050 than the desktop I had in 2004. And it 0:13:47.050,0:13:50.310 has a, a better web browser, too. 0:13:50.310,0:13:53.950 So think about what's different between now[br]and then. 0:13:53.950,0:13:58.270 In 2004, Ajax was in its infancy. The term 0:13:58.270,0:14:04.320 hadn't even been coined yet. Today, rich Ajax[br]frameworks 0:14:04.320,0:14:08.940 come with every web application framework.[br]So you can, 0:14:08.940,0:14:12.670 you can build rich, interactive applications[br]much easier. 0:14:12.670,0:14:15.550 And, you can even write your entire frontend[br]in 0:14:15.550,0:14:19.760 JavaScript if you want to. Web browsers are[br]immeasurably 0:14:19.760,0:14:25.290 more powerful now than they, than they were[br]then. 0:14:25.290,0:14:28.900 Deployment is much easier, too. In 2004, it[br]was 0:14:28.900,0:14:30.420 really hard to figure out how you should get 0:14:30.420,0:14:33.830 your app up on the web. You could colo, 0:14:33.830,0:14:37.100 but that was expensive. You could use shared[br]hosting, 0:14:37.100,0:14:41.110 like, DreamHost or something like that. But[br]those servers 0:14:41.110,0:14:44.320 were underpowered and kind of weak. 0:14:44.320,0:14:46.870 Today, you can spin up a server with the 0:14:46.870,0:14:49.940 click of a button. You can manage everything[br]yourself 0:14:49.940,0:14:53.040 if you want to use EC2, or you can 0:14:53.040,0:14:56.770 rely on platform services like Heroku or Google[br]App 0:14:56.770,0:15:00.820 Engine. And this is really great for programmers,[br]because 0:15:00.820,0:15:03.490 you don't have to be a great programmer and 0:15:03.490,0:15:06.670 a great sys admin now to launch a web 0:15:06.670,0:15:10.700 application. You can let other people handle[br]that part. 0:15:10.700,0:15:11.910 And that's terrific. 0:15:11.910,0:15:14.920 Another thing that I think is really powerful[br]about 0:15:14.920,0:15:20.950 how we work today is that in, today we 0:15:20.950,0:15:24.160 have access to all of these web service APIs, 0:15:24.160,0:15:27.380 with a simple HTTP request. You can extend[br]the 0:15:27.380,0:15:30.290 functionality of your app really easily by[br]leveraging these 0:15:30.290,0:15:30.940 services. 0:15:30.940,0:15:34.270 There's everything from search, like my, my[br]company provides, 0:15:34.270,0:15:36.970 to payments from companies like Stripe, and[br]even telephony 0:15:36.970,0:15:39.560 from companies like Twillio. 0:15:39.560,0:15:42.640 So with just an HTTP request, you can add 0:15:42.640,0:15:46.500 that kind of functionality into your application[br]super easily. 0:15:46.500,0:15:49.320 And best of all, you're us- they use JSON 0:15:49.320,0:15:51.440 instead of XML. So there's no XML setups like 0:15:51.440,0:15:55.660 there was back in the early 2000s. 0:15:55.660,0:15:58.280 But what about Rails? Like, what would a programmer 0:15:58.280,0:16:02.060 from 2004 think about Ruby on Rails? Well,[br]I 0:16:02.060,0:16:04.930 think if you could bring someone, or talk[br]to 0:16:04.930,0:16:07.610 somebody in 2004 and say, in ten years the 0:16:07.610,0:16:09.380 best way to make a web app is gonna 0:16:09.380,0:16:11.920 be this thing called Ruby on Rails. I think 0:16:11.920,0:16:15.320 what they would say is, what on Rails? 0:16:15.320,0:16:19.300 It's difficult to overstate how marginal the[br]Ruby community 0:16:19.300,0:16:26.300 was in 2004. When David publicly demo'd Rails[br]at 0:16:27.830,0:16:31.830 RubyConf 2004, there were probably less people[br]in the 0:16:31.830,0:16:36.070 room than there are right now. That, there[br]were 0:16:36.070,0:16:39.170 about sixty people at that conference. 0:16:39.170,0:16:43.010 Today, there's dozens of conferences around[br]the world, and 0:16:43.010,0:16:46.790 thousands of people make their livings using[br]Ruby and 0:16:46.790,0:16:52.880 Rails. The community has grown tremendously[br]since those days. 0:16:52.880,0:16:58.240 But what about the features? The features[br]were really 0:16:58.240,0:17:02.850 what made Rails succeed. And if I think back 0:17:02.850,0:17:05.429 on what I first thought about Rails when I 0:17:05.429,0:17:09.199 saw it, like, what impressed me. Things that,[br]that 0:17:09.199,0:17:12.789 really stand out in my mind are things like 0:17:12.789,0:17:14.730 live reloading. 0:17:14.730,0:17:16.770 Compared to how I was working in Java, where 0:17:16.770,0:17:18.299 it was like, a really long cycle to get 0:17:18.299,0:17:20.829 anything up on the screen, in Rails, you could 0:17:20.829,0:17:24.148 edit any file. You could edit your model,[br]you're, 0:17:24.148,0:17:27.049 you're views. Even your database schema. And[br]reload your 0:17:27.049,0:17:30.129 browser and it was right there. And that was 0:17:30.129,0:17:31.200 tremendously exciting. 0:17:31.200,0:17:33.629 And, if you had an exception in your, in 0:17:33.629,0:17:36.220 your view, you would see exactly which line[br]of 0:17:36.220,0:17:39.200 code caused it, and not have to wade through 0:17:39.200,0:17:41.779 these huge stack traces that had nothing to[br]do 0:17:41.779,0:17:45.700 with what you were working on. And that was 0:17:45.700,0:17:47.809 tremendous for developer productivity. 0:17:47.809,0:17:50.350 Another thing that was a real big win for 0:17:50.350,0:17:55.250 developer productivity, for me anyway, was[br]the development console. 0:17:55.250,0:17:57.529 Rails let you just type a single command and 0:17:57.529,0:17:59.490 get full access to all of the code that 0:17:59.490,0:18:01.799 you'd been writing. So, for me, I keep that 0:18:01.799,0:18:03.799 open all the time. And I am always constantly 0:18:03.799,0:18:06.980 trying out things and experimenting and trying[br]to figure 0:18:06.980,0:18:09.909 out how different APIs work by using the developer 0:18:09.909,0:18:11.299 console. 0:18:11.299,0:18:12.909 This is something that I'd been able to get 0:18:12.909,0:18:15.779 working in the Java world using a tool called 0:18:15.779,0:18:18.240 BeanShell, which is like a Java scripting[br]framework. But 0:18:18.240,0:18:20.720 it was nowhere near as good as the Rails 0:18:20.720,0:18:24.009 console, and, you know, it just was a lot 0:18:24.009,0:18:27.700 harder to, to get working. 0:18:27.700,0:18:29.649 Related to that is just the idea of having 0:18:29.649,0:18:33.399 separate development environments. Rails came[br]right out of the 0:18:33.399,0:18:36.590 box with development, production, and test,[br]and has separate 0:18:36.590,0:18:38.480 databases for all of those things. So you[br]didn't 0:18:38.480,0:18:40.539 have to worry about mixing your code together. 0:18:40.539,0:18:43.669 You could have separate configurations for[br]testing and production 0:18:43.669,0:18:47.220 and development. And that really helped with[br]the software 0:18:47.220,0:18:49.409 engineering side of Rails. 0:18:49.409,0:18:52.519 Finally, the, the, the last big feature that[br]I 0:18:52.519,0:18:56.169 think really stood out to me was ActiveRecord[br]and 0:18:56.169,0:19:00.100 migrations. ActiveRecord was super exciting,[br]because here, this, this, 0:19:00.100,0:19:02.559 this, this code is sort of magically intuiting[br]the, 0:19:02.559,0:19:05.200 the fields from the structure of your database.[br]You 0:19:05.200,0:19:06.950 didn't have to write any code at all. And 0:19:06.950,0:19:10.480 for someone who was writing SQL statements[br]by hand, 0:19:10.480,0:19:12.600 that was really exciting. 0:19:12.600,0:19:14.799 And migrations were awesome, too, because[br]you always need 0:19:14.799,0:19:17.750 to transition the state of your database in[br]your, 0:19:17.750,0:19:18.690 in your application. 0:19:18.690,0:19:21.610 And, again, this is something that we had[br]built 0:19:21.610,0:19:24.940 at my job. But ours was not as good. 0:19:24.940,0:19:28.940 It, it used raw SQL, so you would write 0:19:28.940,0:19:32.039 SQL statements to, to transition the database.[br]And it 0:19:32.039,0:19:34.419 was tied directly to the app version that,[br]that 0:19:34.419,0:19:36.960 we had. So, when you would release a new 0:19:36.960,0:19:39.350 version of the app, you would have to sync 0:19:39.350,0:19:41.649 that with the database. The database version[br]would have 0:19:41.649,0:19:42.889 to be synced with that. 0:19:42.889,0:19:44.690 So there was, there was no way to independently 0:19:44.690,0:19:46.610 migrate the database. 0:19:46.610,0:19:47.970 And there was no way to go down. So 0:19:47.970,0:19:50.980 you had to get it right. Rails was better 0:19:50.980,0:19:53.190 than that. 0:19:53.190,0:19:56.149 But why did Rails win? Why, why was Rails 0:19:56.149,0:19:59.070 exciting to people? Because all these features[br]were available 0:19:59.070,0:20:03.169 elsewhere. I think there's three reasons. 0:20:03.169,0:20:04.960 First of all, while each of these features[br]was 0:20:04.960,0:20:07.700 something that you could get in other web[br]programming 0:20:07.700,0:20:11.759 frameworks, Rails brought them all together.[br]Rails was the 0:20:11.759,0:20:18.690 whole package. So Rails took things that were[br]possible 0:20:18.690,0:20:21.539 and made them easy. It, even that, it made 0:20:21.539,0:20:22.970 them the default. 0:20:22.970,0:20:25.330 So Rails took a lot of best practices and 0:20:25.330,0:20:27.570 put them together in one thing that you could 0:20:27.570,0:20:31.200 use super simply. And that was really exciting[br]to 0:20:31.200,0:20:34.549 people. Even, even for me, because I was able 0:20:34.549,0:20:36.309 to, to do some of the things that Rails 0:20:36.309,0:20:39.419 had. Having it together in one package was[br]super 0:20:39.419,0:20:41.259 exciting. 0:20:41.259,0:20:43.330 The second reason I think Rails succeeded[br]is the 0:20:43.330,0:20:46.279 triumph of hype. If you go back and read 0:20:46.279,0:20:49.490 the early blog posts about Rails, it's really[br]interesting 0:20:49.490,0:20:53.200 because it really caused a furor in the Java 0:20:53.200,0:20:55.470 and the Python world. Because people were[br]like, well, 0:20:55.470,0:20:57.950 why can't we do this? And in the middle 0:20:57.950,0:21:01.809 of all that, you saw DHH. He was constantly 0:21:01.809,0:21:06.230 promoting Rails and getting into discussions[br]and arguments with 0:21:06.230,0:21:10.570 other people and blogging about it. And he,[br]he 0:21:10.570,0:21:13.600 was relentless in promoting Rails, and the[br]early Rails 0:21:13.600,0:21:16.929 community was relentless in sharing their[br]enthusiasm for this 0:21:16.929,0:21:18.419 new thing. 0:21:18.419,0:21:20.450 And I think that that matters a lot, because 0:21:20.450,0:21:23.809 it's not enough to have great code and just 0:21:23.809,0:21:26.720 put it up on the internet. That, that never 0:21:26.720,0:21:29.169 works. You need to tell people about what[br]you're 0:21:29.169,0:21:32.970 doing in order for them to know about it. 0:21:32.970,0:21:36.490 And you need to explain clearly and concisely[br]why 0:21:36.490,0:21:40.480 it's better than what they're doing now. And[br]Rails, 0:21:40.480,0:21:44.149 David and the Rails community really succeeded[br]at that. 0:21:44.149,0:21:48.919 Third. Another reason that Rails succeeded[br]is the triumph 0:21:48.919,0:21:53.379 of community. From really early days, Rails[br]had the 0:21:53.379,0:21:56.320 ability to be extended with plugins. And so[br]people 0:21:56.320,0:21:59.509 wrote plugins that would take care of default[br]areas, 0:21:59.509,0:22:02.220 or not, not default areas, but common areas[br]of 0:22:02.220,0:22:06.039 your application, like logging in or uploading[br]files. 0:22:06.039,0:22:07.429 These are the things that you needed in your 0:22:07.429,0:22:10.639 app, but they weren't core to your app. And 0:22:10.639,0:22:13.980 so knowing that you could take advantage of[br]these, 0:22:13.980,0:22:18.440 these plugins and later gems really made picking[br]Rails 0:22:18.440,0:22:24.909 an easier choice. 0:22:24.909,0:22:27.820 So ultimately, Rails was successful. But what[br]about the 0:22:27.820,0:22:31.159 future? What does the future have in store[br]for 0:22:31.159,0:22:36.019 Rails? I think that Rails does face challenges[br]in 0:22:36.019,0:22:40.799 the future, because, because the web is changing.[br]What 0:22:40.799,0:22:42.850 people want to do on the web is, is 0:22:42.850,0:22:46.080 becoming different. And indeed the, the future[br]of the 0:22:46.080,0:22:48.870 web I think is even in question. 0:22:48.870,0:22:51.769 So let's look at two challenges to Rails.[br]First 0:22:51.769,0:22:55.999 of all, now that browsers are more powerful,[br]people 0:22:55.999,0:22:58.220 are able to write more of their app on 0:22:58.220,0:23:01.799 the frontend. And so, when you do this, you 0:23:01.799,0:23:05.529 don't need the kind of classic web app that 0:23:05.529,0:23:08.120 Rails is. Rails is really good at generating[br]a 0:23:08.120,0:23:10.620 lot of HTML and shipping it down to the 0:23:10.620,0:23:14.769 client. Kind of the classic web app like base 0:23:14.769,0:23:16.590 camp. 0:23:16.590,0:23:19.200 But when you're writing your entire app in[br]JavaScript 0:23:19.200,0:23:21.649 in the client, what you need is the ability 0:23:21.649,0:23:24.629 to talk to the server with an API. And 0:23:24.629,0:23:28.379 when that's all you're doing, people can question,[br]why 0:23:28.379,0:23:29.860 do I need Rails? Why do I need all 0:23:29.860,0:23:33.210 of this extra stuff that Rails does? I'm,[br]maybe 0:23:33.210,0:23:35.480 I should just use node.js, and then I can 0:23:35.480,0:23:38.100 write, you know, the same language on the[br]client 0:23:38.100,0:23:40.490 and the server. 0:23:40.490,0:23:45.980 Similarly, mobile apps are becoming increasingly[br]popular, because you 0:23:45.980,0:23:47.720 can do so much more with a mobile app 0:23:47.720,0:23:49.980 than you can with a web app. The user 0:23:49.980,0:23:54.169 interaction is much richer and, and faster[br]and, and 0:23:54.169,0:23:58.919 just cleaner. And, again, these kind of apps[br]talk 0:23:58.919,0:24:02.539 to the server with an API. And so people 0:24:02.539,0:24:05.830 think, well, I don't need Rails, then. 0:24:05.830,0:24:07.379 And I think that this, this is a threat 0:24:07.379,0:24:10.659 to Rails. But there's two key things to remember 0:24:10.659,0:24:14.480 about this. One, Rails is great at this kind 0:24:14.480,0:24:18.440 of thing. In our application, we serve hundreds[br]of 0:24:18.440,0:24:23.509 millions of API requests a day, a month, using 0:24:23.509,0:24:25.990 Rails. And the way that we do that is 0:24:25.990,0:24:28.269 not using action Controller. 0:24:28.269,0:24:30.249 But Rails makes it easy to pick out only 0:24:30.249,0:24:33.860 the parts of Rails that you need to use. 0:24:33.860,0:24:35.740 And so you can, you can take Rails much 0:24:35.740,0:24:40.190 further than many people think, I believe. 0:24:40.190,0:24:43.509 Second, even if you are building an API heavy 0:24:43.509,0:24:45.700 app, not all of your app is going to 0:24:45.700,0:24:49.299 be API based. You are going to need a 0:24:49.299,0:24:54.179 management console to handle the backend of[br]your application. 0:24:54.179,0:24:55.899 Pretty much every app has this. You need a 0:24:55.899,0:24:59.399 way to look up your users and, you know, 0:24:59.399,0:25:02.009 change their account status and things like[br]that. 0:25:02.009,0:25:04.639 And, are you gonna build an iPad app for 0:25:04.639,0:25:06.860 that? I don't think so. Because it would be 0:25:06.860,0:25:09.600 too expensive and slow. The web is still the 0:25:09.600,0:25:13.309 best way and the easiest way to distribute[br]an 0:25:13.309,0:25:15.059 application. 0:25:15.059,0:25:17.119 So Rails has a real, I think, has a 0:25:17.119,0:25:20.879 place for that. Or, there's a place for Rails, 0:25:20.879,0:25:24.970 even in an API-driven application. 0:25:24.970,0:25:27.529 But even if the web, as a platform, and 0:25:27.529,0:25:30.309 Rails as a, as a framework, can't adapt and 0:25:30.309,0:25:32.529 fall by the wayside, I think the legacy of 0:25:32.529,0:25:36.049 Rails will really live on for a long time. 0:25:36.049,0:25:40.690 Because this idea of taking things that were[br]possible 0:25:40.690,0:25:44.119 and making them simple, making them easy to[br]do, 0:25:44.119,0:25:47.909 is really powerful. And it inspired programmers[br]in many 0:25:47.909,0:25:52.679 different programming languages to, to copy[br]Rails and to 0:25:52.679,0:25:57.999 try to get those benefits for themselves. 0:25:57.999,0:26:00.149 So I think no matter what the next platform 0:26:00.149,0:26:03.799 is, people will be inspired by that aspect[br]of 0:26:03.799,0:26:06.039 Rails, and they will want to write the Rails 0:26:06.039,0:26:09.009 of whatever. 0:26:09.009,0:26:10.980 I'd also like to look at the reaction against 0:26:10.980,0:26:15.259 Rails. Because that's part of Rails's legacy,[br]too. There's 0:26:15.259,0:26:17.940 two examples that I'd like to talk about here. 0:26:17.940,0:26:21.049 First of all, there's Jengo. So Jengo can't[br]be 0:26:21.049,0:26:26.019 considered to be inspired by Rails, because[br]it was 0:26:26.019,0:26:28.460 developed at the same time or even earlier[br]than 0:26:28.460,0:26:29.309 Rails. 0:26:29.309,0:26:34.049 But since, the, the two frameworks have been[br]really 0:26:34.049,0:26:36.110 similar and, and, and have learned a lot from 0:26:36.110,0:26:39.860 each other I think. But the way that Jengo 0:26:39.860,0:26:42.980 works, it is really driven by the Python philosophy 0:26:42.980,0:26:47.190 of explicit is better than implicit. So in,[br]in 0:26:47.190,0:26:50.610 Jengo, when you, when you like what to map 0:26:50.610,0:26:53.460 up a url on your server, you think really 0:26:53.460,0:26:55.889 hard about what that url is going to be. 0:26:55.889,0:27:00.809 It doesn't happen automatically. And your[br]database models tell 0:27:00.809,0:27:04.759 the database what its fields should be, instead[br]of 0:27:04.759,0:27:08.330 the other way around. In Rails, of course,[br]we 0:27:08.330,0:27:11.809 follow convention over configuration, right.[br]But if you've ever 0:27:11.809,0:27:14.379 tried to teach someone Rails, you know that[br]this 0:27:14.379,0:27:17.889 can be a double-edged sword. 0:27:17.889,0:27:20.190 Convention over configuration lets you write[br]less code, but 0:27:20.190,0:27:23.440 it also makes it less clear what's happening.[br]When 0:27:23.440,0:27:26.499 you're teaching somebody Rails, it can be[br]really confusing 0:27:26.499,0:27:29.330 that you edit a route in this file over 0:27:29.330,0:27:32.200 here and therefore your controller over here[br]needs to 0:27:32.200,0:27:35.850 be named this and it has these methods available 0:27:35.850,0:27:40.639 to it that respond to these HTTP requests.[br]Or 0:27:40.639,0:27:42.320 HTTP methods. 0:27:42.320,0:27:44.059 That is not at all obvious. And so it 0:27:44.059,0:27:49.820 takes time to learn all those conventions.[br]And, I 0:27:49.820,0:27:51.289 mean, I don't think one is better than the 0:27:51.289,0:27:54.320 other. They're just, you know, different sides[br]of the 0:27:54.320,0:27:56.899 same coin. Different ways of looking at how[br]programming 0:27:56.899,0:27:59.480 should work. 0:27:59.480,0:28:01.669 Kind of related to that is the second example, 0:28:01.669,0:28:06.570 which is microframeworks. Like Sinatra. These[br]have been incredibly 0:28:06.570,0:28:09.470 influential. And I love using Sinatra. It's[br]just, it's 0:28:09.470,0:28:11.169 like such a thing of beauty, when you can 0:28:11.169,0:28:13.860 have your whole web app in one file. And 0:28:13.860,0:28:16.539 the, the urls that are, that are in your 0:28:16.539,0:28:19.820 web app are just tightly connected to the[br]code 0:28:19.820,0:28:22.139 that's going to run when someone goes to that 0:28:22.139,0:28:22.999 url. 0:28:22.999,0:28:27.139 It, that is like a really wonderful feeling,[br]I 0:28:27.139,0:28:31.330 think. And Sinatra has been probably even[br]more influential 0:28:31.330,0:28:35.179 than Rails. There are copies of Sinatra, or[br]Sinatra-inspired 0:28:35.179,0:28:39.350 microframeworks anyway, in just about every[br]programming language you 0:28:39.350,0:28:43.460 can think of. Anything from Java to PHP to 0:28:43.460,0:28:48.299 Clojure, Go, JavaScript. Even Haskall. 0:28:48.299,0:28:52.999 All of these have a version of Sinatra. 0:28:52.999,0:28:57.960 And in some languages, these microframeworks,[br]the microframework inspired 0:28:57.960,0:29:00.989 by Sinatra is the default way people write[br]web 0:29:00.989,0:29:05.389 apps. It's the best way that they have. And 0:29:05.389,0:29:07.610 I think that that is kind of a problem, 0:29:07.610,0:29:12.019 because while I love using Sinatra, when an[br]app 0:29:12.019,0:29:14.129 gets above a certain size, I find myself pulling 0:29:14.129,0:29:16.179 in more and more of Rails. 0:29:16.179,0:29:19.509 And at some point I feel, well, I might 0:29:19.509,0:29:22.009 as well just switch to Rails. And so, in 0:29:22.009,0:29:23.690 these, I feel bad for these programmers in[br]these 0:29:23.690,0:29:26.200 other languages, because they don't have the[br]choice to 0:29:26.200,0:29:30.179 switch, necessarily, to something as good[br]as Rails. 0:29:30.179,0:29:31.809 So I think, I think Rails actually has a 0:29:31.809,0:29:34.299 bright future ahead of it, because it, it's[br]shown 0:29:34.299,0:29:38.169 the ability to adapt and respond to change.[br]Think 0:29:38.169,0:29:41.330 about Rails 1 point 2 and the addition of 0:29:41.330,0:29:43.980 REST and making that the default way that[br]we 0:29:43.980,0:29:48.519 think about controllers and resources on the[br]web. 0:29:48.519,0:29:51.739 So I think that if people want to use 0:29:51.739,0:29:55.440 Rails to back JavaScript-based applications,[br]Rails will get better 0:29:55.440,0:29:57.639 at that. And if people want to use it 0:29:57.639,0:30:00.190 to back mobile applications, it will get better[br]than, 0:30:00.190,0:30:02.779 at that. But you'll still have the ability[br]to 0:30:02.779,0:30:05.009 use Rails for what it's good at when you 0:30:05.009,0:30:06.299 need to. 0:30:06.299,0:30:11.619 All right. So we've talked about what programming[br]was 0:30:11.619,0:30:16.610 like in 2004. We've talked a little bit about 0:30:16.610,0:30:19.279 the features of Rails that made people want[br]to 0:30:19.279,0:30:23.230 use it and made it win. And we've talked 0:30:23.230,0:30:26.200 about what could happen in the future. What[br]is 0:30:26.200,0:30:29.210 the, what's the legacy of Rails and will it 0:30:29.210,0:30:33.320 be able to adapt? 0:30:33.320,0:30:35.889 So a hundred years ago, or, actually, more[br]than 0:30:35.889,0:30:39.369 a hundred years ago, when Edward Bellamy was[br]frustrated 0:30:39.369,0:30:41.970 with the way things were going, with how society 0:30:41.970,0:30:45.110 was working, he took up his pen and he 0:30:45.110,0:30:48.789 used his imagination to create a new world.[br]This, 0:30:48.789,0:30:51.580 this utopian novel, where he could explain[br]how he 0:30:51.580,0:30:53.739 thought things ought to work. 0:30:53.739,0:30:56.889 Now, that may seem kind of pointless. Because[br]it's 0:30:56.889,0:31:01.580 the twenty-first century. America is not a[br]socialist utopia. 0:31:01.580,0:31:05.499 But that book was incredibly influential.[br]In the years 0:31:05.499,0:31:09.279 after its publication, hundreds of Bellamy[br]clubs were started 0:31:09.279,0:31:12.509 across the country, and millions of people[br]were inspired 0:31:12.509,0:31:15.499 by the ideas written in the book. 0:31:15.499,0:31:19.690 And those people, and those clubs formed the[br]nucleus 0:31:19.690,0:31:23.799 of the progressive movement in the early twentieth[br]century, 0:31:23.799,0:31:27.239 that broke the trusts and monopolies, and[br]ultimately paved 0:31:27.239,0:31:30.619 the way for social security and the American[br]welfare 0:31:30.619,0:31:31.220 state. 0:31:31.220,0:31:34.059 So the book did have a huge influence on, 0:31:34.059,0:31:35.460 on the world. 0:31:35.460,0:31:37.960 Programming, on the other hand, is a little[br]more 0:31:37.960,0:31:43.929 concrete. So when DHH was frustrated by how[br]programming, 0:31:43.929,0:31:48.489 web programming worked in 2003 or whatever,[br]he was 0:31:48.489,0:31:51.830 able to do something about it. He cracked[br]open 0:31:51.830,0:31:54.289 his text editor and got to work and built 0:31:54.289,0:31:57.139 something that people found inspiring. 0:31:57.139,0:31:59.340 And when they saw it, they wanted to meet 0:31:59.340,0:32:01.679 other people who were interested in that.[br]And that 0:32:01.679,0:32:04.429 was the genesis of the Rails community. And[br]so 0:32:04.429,0:32:09.179 today, you know, we're all here today because[br]of 0:32:09.179,0:32:13.070 the Rails community and because of what, what[br]developed 0:32:13.070,0:32:17.350 over those, those last ten years. So I'm really, 0:32:17.350,0:32:19.830 really pleased to be a part of that community, 0:32:19.830,0:32:23.320 and really honored to be speaking to you today 0:32:23.320,0:32:24.940 about that. 0:32:24.940,0:32:27.259 And it, it's made a huge impact in the 0:32:27.259,0:32:30.489 direction of my career. And I just find it 0:32:30.489,0:32:33.739 inspiring. I find it inspiring that as programmers,[br]we 0:32:33.739,0:32:36.590 can see something that's broken and we can[br]fix 0:32:36.590,0:32:39.730 it. We can create a new reality for ourselves 0:32:39.730,0:32:42.869 with code. And I think that that's a really 0:32:42.869,0:32:45.669 powerful, really powerful notion. 0:32:45.669,0:32:47.519 And we also shouldn't forget the lessons of[br]Rails 0:32:47.519,0:32:50.299 as we did that. Because Rails didn't just[br]win 0:32:50.299,0:32:53.450 because it was, because it was better, though[br]I, 0:32:53.450,0:32:55.629 I do think it was. It won because of 0:32:55.629,0:32:58.600 the community around it and because of the,[br]their 0:32:58.600,0:33:01.679 passion for telling people about what was[br]so good 0:33:01.679,0:33:03.129 about Rails. 0:33:03.129,0:33:06.220 So most of us probably are not going to 0:33:06.220,0:33:10.720 write the next great framework. I, I, I don't 0:33:10.720,0:33:13.879 imagine that I will. But I think that this, 0:33:13.879,0:33:15.919 we can take to heart the lessons of Rails 0:33:15.919,0:33:18.590 in our own work and in the libraries that 0:33:18.590,0:33:19.919 we're writing. 0:33:19.919,0:33:23.179 Don't forget to, to, to try to make things 0:33:23.179,0:33:25.409 easy. To try to make it easy for your 0:33:25.409,0:33:28.679 fellow programmers. And don't forget to tell[br]people about 0:33:28.679,0:33:32.419 it and explain why they should use what you've 0:33:32.419,0:33:34.720 written. And I think if you do that, you 0:33:34.720,0:33:36.640 can help make the world a better place. 0:33:36.640,0:33:37.940 Thanks.