 Good afternoon, I'd like to get started if I think everybody's ready cool Cool, thank you. Thank you for joining me this afternoon. I'm excited to be here and thanks for Thanks for choosing this talk So it's been ten years since the first public release of rails. So I think that's a good time to think back and reflect on Where rails has come from where it might be going and what the future has in store so I've been thinking a lot about the early days of rails lately because the company I work for Swift type makes site search software. So I use my own website for testing so I Indexed my site and then have to do searches on it and I'll search for rails just because I'm not super creative and I need to search for something right and In doing so I found some old blog posts that I wrote in early 2005 when I first discovered rails and it was really interesting for me to read because back then I was I was working as a Java developer and I was really interested in Python and Rails was neither of those things. So I was pretty skeptical of rails like I was impressed with it But I wasn't sure it was worth learning Ruby over so I thought I'll just sit back and let the Python people catch up and I Waited and I waited and I waited and that never really seemed to happen And so after a few months I jumped into rails And started learning it and I started learning Ruby so that I could use rails and then that fall I got wind of a new group starting in my hometown the Ruby users of Minnesota And so I was I was there at the first meeting when there was 12 people talk who are just really excited about Ruby and really excited about rails and at that point I joined the the Ruby community and Became a part of that and really have not have not looked back since then and I've been working with rails professionally now for about eight years so This made me think about a book. I read once called Looking Backward by Edward Bellamy So in this book which was written in the late 1800s and takes place at that at that time A rich upper-class man is hypnotized and he falls asleep for over a hundred years and when he wakes up Everything has changed America is now a socialist utopia and so, you know, he had it pretty good before right? He he was wealthy He had servants and now everyone is equal and so he's pretty skeptical of this new order so It takes him a while, but as he's shown the new way of doing things. He becomes convinced that this is actually a better way and and That made me think of Think of my situation where I was I was skeptical of rails and but eventually won over So today What I'd like to talk about is the idea of what would a programmer from 2004 Think if they could time travel forward to today and experience our web development utopia What would that be like for them to see how we work today? So what I'd like to do today is first talk about what web development was like in 2004 Then I'd like to jump forward to the present and think about what a programmer from 2004 would think about our web development utopia of today and finally I'd like to take a look at what the future might have in store for rails and what the What the legacy of rails might be? So first let's talk a little bit about what development was like in 2004 So if I can set the stage for a minute, I see a lot of Mac books here today There were no Mac books in 2004 the top of the line Apple laptop was a power Mac g4 and You know Apple had not completely penetrated the web development community like it has now There were only I used Linux at work myself and Windows at home actually and The most popular phone like no, maybe not the most popular but the hottest phone in 2004 was a Motorola razor So right so things were pretty different there Things were pretty different then and I was working as a Java developer at the time and I was pretty excited about that because I graduated in 2001 right after the dot-com bust and Things were pretty sketchy there for a while. It was hard for me to find a job And so I was excited that I was able to work as a Java developer in the hot language of the time And I was I was glad that I was able to work at a software development company where I could work on software for sale instead of Working in the cost center at a big bank or something like that, right? So I was working as a Java developer and if you've ever done any Java web development, you know that it can be pretty painful, right? At the time the the best way to do Java web development was struts and Hibernate, but we didn't use either of those we used raw Java servlets and hand-coded JDBC queries to our database so The the real problem with Java as a as a web development platform at least in those days was it has a really long edit compile Debug loop or in the case of Java web development. It's the edit compile deploy debug loop Because you have to restart your app server and we used web sphere so that took a long time So if I needed to write a new page for for our app It was a pretty involved process. So we used raw servlets So that's sort of like using a raw CGI library where it's very low level And if when you work in Java, it's very verbose and you have to read from input streams and write to output streams And it just doesn't have the conveniences of Ruby or scripting language So I'd have to write my servlet then I'd have to write a bunch of XML file or XML code in the web.xml file to map it up and Then you compile everything and get it working and then restart your app server Which would take several minutes and then browse to the new page to to see what it What's going on there? And that's where the fun would start because that's when the JSP's came into play So JSP is just like ERB right you instead of Ruby It's Java but Java is a much more heavyweight language and it doesn't have you know Friendly looping constructs or mapping constructs like Ruby does so writing view code in Ruby or in Java is not very much fun But worst of all the way that JSP's work is that it takes the Java or the JSP code that you write and it Compiles it into a Java class file and then that Java class file gets compiled into code so When you get an error when you're debugging you'd get us this stack trace and it would be like null pointer exception online 12,075 of line 20,082 and you'd sit there and you'd think What was I doing in my JSP that could cause a null pointer exception? And you'd look at the JSP and you'd look at the stack trace and they had no correspondence whatsoever, right? So it's really painful and if you were smart you would there's a setting like a secret setting You could use for web sphere to keep around the compiled Java files So then you could open that up in your web browser and look at line 12,075 and be like oh That's what I was doing in the JSP So web development in Java especially in 2004 not very much fun But there was there was also at that time a glimmer that something better was on the way that The web could do more There was a new sense that the web was a powerful platform for delivering software and I think that the earliest glimmerings of this come from Microsoft's Outlook web app This was the first application to use what we would today call Ajax without requiring any kind of browser plugins so that that came out in 2001 and people Didn't pay much attention to it because it was I only and It wasn't clear how it was working right and then Google launched Google suggests and people dissected that and they saw how it was working and They also launched Gmail which Gave people a new sense of what was possible in a web app that that web apps could automatically Refresh as things were changing on the server. So there was a new sense of what was possible That that maybe there was a better way of writing web apps and in 2004 I was also looking for something better because and I attribute that to a book I read early in my career The pragmatic programmer by Dave Thomas and Andy Hunt and in that book, which is a terrific book about becoming a better software developer a better software craftsman in that book they talk about the importance of learning a scripting language and that's because If you're working in a language like Java, there's often things that are too Too small of a task to make it worth writing a Java program to do and but a scripting language You can you know knock that off really easily So things that you might do manually you can instead write You know a script to do for you and so I took that to heart and I went to the bookstore remember this was the early 2000s there were still bookstores and I Looked at all the books that they had about scripting languages So there was a bunch of books about Pearl there was a bunch of books about Python and There was this one book about Ruby by those same guys Dave Thomas and Andy Hunt So I immediately discarded the books about Pearl because I'd worked with Pearl before and I thought it was terrible and I looked at the books about Python and I'm like this looks okay I can see myself using this and then I looked at the book about Ruby and Unfortunately, what I saw in the book about Ruby was a lot of dollar signs and dollar sign underscores and at signs and at at signs and I thought This looks just like Pearl I Don't I don't want to learn this this this is this is this is crappy so I decided then to become a Python programmer and I was actually able to use Python for a number of things in my job and in my personal Programming I wrote a script to migrate from one bug database to the other I wrote a script that tied our subversion check-ins to our bug database so you could reference bug numbers and link up the commits and stuff and I Wrote some personal scripts But what I really wanted to do was write web apps because that's throughout my career That's always what I've been most excited about because I've always loved the potential of the web as a platform for enabling communication It's it's the most powerful and widely distributed way that you can connect people and So every time I would have an idea for a web app in Python I would Start thinking about how or I would start thinking about how it should work and what it should do And I'd get excited about it and want to build it and then I'd start reading about how to build web apps in Python And get really frustrated because then there was no clear way. There was no Django There was CGI in the core library, but you know who wants to write at that low level there was then a myriad of templating options and Different object relational mappers and different ways of publishing your objects to the web and different database drivers and There was no clear way of deploying the software either so I Would have this idea for what I thought would be the next great app and then I would start reading about Python How to implement it in Python and get frustrated and give up But I didn't know it at the time, but there was something better on the way. So let's turn now to 2014 and think about What would a programmer from 2004 think about how we work today? And I think if you could take someone from then and bring them forward to now I think they would be amazed because it's truly a great time to be a programmer We are all walking around with a computer in our pockets. That's more powerful than the desktop. I had in 2004 And it has a better web browser too So think about What's different between now and then in 2004 Ajax was in its infancy that the term hadn't even been coined yet Today rich Ajax framework come with every web Application framework so you can you can build rich interactive applications much easier And you can even write your entire front-end in JavaScript if you want to web browsers are Immeasurably more powerful now than they than they were then Deployment is much easier too in 2004. It was really hard to figure out how you should get your app up on the web You could colo, but that was expensive You could use shared hosting like dream host or something like that, but Those servers were underpowered and kind of weak Today you can spin up a server with the click of a button You can manage everything yourself if you want to use EC2 Or you can rely on platforms services like Heroku or Google App Engine and this is really great for programmers because You don't have to be a great programmer and a great Sysadmin now to launch a web application You can let other people handle that part and that's terrific another thing that I think is really powerful about how we work today is that in Today we have access to all of these web service apis with a simple HTTP request You can extend the functionality of your app really easily by leveraging these services There's everything from search like my my my company provides to payments from companies like Stripe and even telephony from companies like Twilio So with just an HTTP request you can add that kind of functionality into your application super easily and Best of all, you're used they use JSON instead of XML. So there's no XML sit-ups like there was back in the early 2000s But what about rails like what would a programmer from 2004 think about Ruby on rails? Well, I think if you could bring someone Talk to somebody in 2004 and say in 10 years the best way to make a web app is going to be this thing called Ruby on rails I think what they would say is what on rails? It's difficult to overstate how marginal the Ruby community was in 2004 when David publicly demoed Rails at RubyConf 2004 There were probably less people in the room than there are right now Then there were about 60 people at that conference Today, there's dozens of conferences around the world and thousands of people make their livings Using Ruby and rails the community has grown tremendously since those days But what about the features the features were really what made rails succeed? and if I think back on what I First thought about rails when I saw it like what impressed me things that that really stand out in my mind are things like library loading Compared to how I was working in Java where it was a really long cycle to get anything up on the screen in rails You could edit any file you could edit your model your your views even your database schema and reload your browser And it was right there and that was tremendously exciting And if you had an exception in your in your view you would see exactly which line of code Caused it and not have to wade through these huge stack traces that had nothing to do with what you were working on and That was tremendous for developer productivity Another thing that was a real big win for developer productivity for me. Anyway, it was the development console Rails let you just type a single command and get full access to all the code that you've been writing so for me I keep that open all the time and I I'm always constantly trying out things and Experimenting and trying to figure out how different apis work by using the developer console This is something that I'd been able to get working in the Java world using a tool called bean show Which is like a Java scripting framework, but it was nowhere near as good as the rails console and You know, it just was a lot harder to to get working Related to that is just the idea of having separate development environments Rails came right out of the box with development Production and test and has separate databases for all of those things So you didn't have to worry about mixing your code together you could have separate configurations for testing and production and development and That really helped with the software engineering side of rails Finally the last big feature that I think Really stood out to me was active record and migrations Active record was super exciting because here this this this this code is sort of magically Intuiting the fields from the structure of your database You didn't have to write any code at all and for someone who is writing SQL statements by hand that was really exciting and Migrations were awesome too because you always need to transition the state of your database in your in your application and Again, this is something that we had built at my job But ours was not as good It it used raw SQL So you would write SQL statements to to transition the database and it was tied directly to the app version that that we had So when you would release a new version of the app You would have to sync that with the database the database version would have to be synced with that So there was there was no way to independently migrate the database and there was no way to go down So you had to get it right Rails was better than that But why did rails win why why was rails exciting to people because all these features were available elsewhere I Think there's three reasons First of all while each of these features was something that you could get in other web programming frameworks rails Brought them all together rails was the whole package So rails took things that were Possible and made them easy it even that it made them the default so rails took a lot of best practices and put them together in one thing that you could use super simply and That was really exciting to people even even for me because I was able to do some of the things that rails had Having it together in one package was super exciting The second reason I think rails succeeded is the triumph of hype if you go back and read the early blog posts about rails, it's really interesting because It really caused a furor in the Java and the Python worlds because people were like well Why can't we do this and in the middle of all that you saw date DHH? He was constantly promoting rails and getting into discussions and arguments with other people and blogging about it and And He was relentless in promoting rails and the early rails community was real relentless and sharing their enthusiasm for this new thing and I think that that matters a lot because it's not enough to have great code and just put it up on the internet that That never works You need to tell people about what you're doing in order for them to know about it and you need to explain clearly and concisely why it's better than what they're doing now and rails David and the rails community really succeeded at that third Another reason that rails succeeded is the triumph of community From really early days Rails had the ability to be extended with plugins and so people wrote plugins that would take care of default areas Or not not default areas, but but common areas of your application like logging in or uploading files These are the things that you needed in your app but they weren't core to your app and so knowing that you could take advantage of these These plugins and later gyms really made picking rails An easier choice So ultimately rails was successful But what about the future? What does the future have in store for rails? I think that rails does face challenges in the future because Because the web is changing what people want to do on the web is becoming different and indeed the The future of the web I think is even in question So let's look at two challenges to rails first of all Now that browsers are more powerful people are able to write more of their app on the front end And so when you do this You don't need the Kind of classic web app that rails is rails is really good at generating a lot of HTML and shipping it down to the client Kind of the classic web app like like base camp But when you're writing your entire app in JavaScript in the client What you need is the ability to talk to the server with an API and when that's all you're doing People can question. Why do I need rails? Why do I need all of this extra stuff that rails does? I'm maybe I should just use node.js and then I can write You know the same language on the client and the server Similarly mobile apps are becoming increasingly popular because you can do so much more with the mobile app than you can with a web app you the user interaction is much richer and And faster and and just cleaner Again, these kind of apps talk to a server with an API and so people think well I don't need rails then and I think that this this is a threat to rails, but There's two key things to remember about this one Rails is great at this kind of thing In our application we serve hundreds of millions of API requests a month Using rails and the way that we do that is not using action controller But rails makes it easy to pick out only the parts of rails that you need to use And so you can you can take rails much further than many people think I I believe Second even if you are building an API heavy app not all of your app is going to be API-based you are going to need a management console to handle the back end of your application Pretty much every app has this you need a way to look up your users and You know change their account status and things like that and Are you going to build an iPad app for that? I don't think so because it would be too expensive and slow The web is still the best way and the easiest way to distribute an application So rails has a real I think has a place for that or There's a place for rails even in an API driven application But even if the web as a platform and rails as as a framework can't adapt and fall by the wayside I think the legacy of rails will really live on for a long time because this idea of Taking things that were possible and making them simple making them easy to do It was really powerful and it inspired programmers and many different programming languages to to copy rails and to To try to get those benefits for themselves So I think no matter what the next platform is People will be inspired by that aspect of rails and they will want to write the rails of whatever I'd also like to look at the reaction against rails because that's part of rails is legacy, too There's two examples that I'd like to talk about here. First of all, there's Django. So Django can't be considered to be Inspired by rails because it was developed at the same time or even earlier than rails, but Since the the two frameworks have been really similar and have have learned a lot from each other, I think But the way that Django works it is really driven by the Python philosophy of explicit is better than implicit so in in Django when you When you like want to map up a URL on your server you think really hard about what that URL is going to be it doesn't happen automatically and Your database models tell the database what its field should be instead of the other way around In rails, of course, we follow convention over configuration, right? But if you've ever tried to teach someone rails, you know that this can be a double-edged sword Convention over configuration lets you write less code, but it also makes it less clear what's happening when you're teaching somebody rails it can be really confusing that You edit a route in this file over here and therefore your controller over here needs to be named this and it has these Methods available to it that respond to these HTTP requests there are HTTP methods That is not at all obvious and so it takes time to learn all those conventions And I mean I don't think one is better than the other They're just you know different different sides of the same coin different ways of looking at how programming should work Kind of related to that is the second example, which is micro frameworks like Sinatra These have been incredibly influential, and I love using Sinatra It's just it's like such a thing of beauty when you can have your whole web app in one file and the URLs that are that are in your web app are just Tightly connected to the code that's going to run when someone goes to that URL that is like a really wonderful feeling I think and Sinatra has been probably even more influential than rails there are copies of Sinatra or Sinatra inspired Micro frameworks anyway in just about every programming language you can think of anything from Java to PHP to closure go Java script even Haskell all of these have a version of Sinatra and In some languages these micro framework they're the micro framework inspired by Sinatra is the default way people write web apps It's the best way that they have and I think that that is kind of a problem because While I love using Sinatra When an app gets above a certain size I find myself pulling in more and more of rails and At some point I feel well I might as well just switch to rails and so in these I feel bad for these programmers and these other languages because they Don't have the choice to switch necessarily to something as good as rails So I think I think rails actually has a bright future ahead of it because it's shown the ability to adapt and respond to change think about Rails 1.2 and the addition of rest and making that the default way that we think about Controllers and resources on the web So I think that if people want to use rails to back javascript based applications Rails will get better at that and if people want to use it to back mobile applications It will get better than at that But you'll still have the ability to use rails for what it's good at when you need to All right, so we've talked about what programming was like in 2004 we've talked a little bit about The features of rails that made people want to use it and made it win and We've talked about what could happen in the future. What is the What's the legacy of rails and will it be able to adapt? So a hundred years ago or actually more than a hundred years ago when Edward Bellamy was frustrated with The way things were going with how society was working. He took up his pin and He used his imagination to create a new world this this utopian novel where he could explain how he thought things ought to work Now that may seem kind of pointless because it's the 21st century America is not a socialist utopia but That book was incredibly influential in the years after its publication Hundreds of Bellamy clubs were started across the country and millions of people were inspired by the ideas written in the book and Those people and those clubs form the nucleus of the progressive movement in the early 20th century that broke the trust and monopolies and Ultimately paved the way for social security and the American welfare state So the book did have a huge influence on on the world Programming on the other hand is a little more concrete so when DHH was frustrated by how programming web programming worked in 2003 or whatever he Was able to do something about it he cracked open his text editor and got to work and built something that people found inspiring and When they saw it they wanted to meet other people who are interested in that and that was the genesis of the rails community And so today You know, we're all here today because of the rails community and because of what What developed over those those last ten years, so I'm really Really pleased to be a part of that community and really honored to be speaking to you today about that and It's made a huge impact in the direction of my career And I just find it inspiring I find it inspiring that as programmers We can see something that's broken and we can fix it We can create a new reality for ourselves with code And I think that that's a really powerful really powerful notion and we also shouldn't forget the lessons of rails as we do that because Rails didn't just win because it was because it was better though I I do think it was it won because of the community around it and because of the the their passion for for telling people about what was so good about rails, so Most of us probably are not going to write the next great framework I Don't imagine that I will but I Think that we can take to heart the lessons of rails in our in our own work and in the the libraries that we're writing Don't forget to to to try to make things easy to try to make it easy for your fellow programmers And don't forget to tell people about it and and explain why They should use what you've written and I think if you do that you can help make the world a better place Thanks