![]() Rails people have a name for this they call it "The Golden Path".īut when you need "real-time" features, like chat or activity feeds, you're off the Golden Path and out of the flow. When you build something the Rails team had in mind, the flow is powerful and enjoyable. That's because Rails is an amazingly productive framework for shipping code. I liked building with Rails, and I'd doubtless be working on new Rails features instead of inventing Phoenix. I think it's safe to say that there wouldn't be a Phoenix framework if I'd gotten the job I applied for at 37signals in 2013. And, finally, what we've been doing with these building blocks we've come up with.How distributed computing and the ideas from sync.rb culminated in a Phoenix feature called LiveView.How working in Elixir lit up "distributed computing", not as a radioactive core of a complicated database but as a basic building block for any web application.How trying to build sync.rb with Ruby led me to Elixir, and why I think Elixir is uniquely suited to solve these problems.How real-time app features got me thinking about syncing updates, rather than rendering static content, as the right primitive for connecting app servers to browsers. ![]() To back it up, I want to talk you through the history of Phoenix, what we were trying to do, and some of the problems we solved along the way. In the process of building Phoenix, I believe we've hit on some new ideas that will change the way we think about building applications in much the same way Rails did for CRUD apps. Unlike Rails, Phoenix is more than just an Elixir web framework. I spend my days building Phoenix, which is Elixir's goto web framework. Today, I work in a language called Elixir. It's hard to remember what CRUD app development was like before Rails, because the framework has been so influential. It hit on the idea of using an expressive language and a few well-chosen, unifying abstractions to drastically simplify development. And there's no JavaScript to write.ĭo you remember when Ruby on Rails was first released? I do. You just write HTML templates, and a stateful process synchronizes it with the browser, updating it only when needed. ![]() No GraphQL APIs, controllers, serializers, or resolvers. LiveView strips away layers of abstraction, because it solves both the client and server in a single abstraction. ![]() This is a post about how we created LiveView, our flagship feature. Phoenix provides features out-of-the-box that are difficult in other languages and frameworks. I work at Fly.io and created Phoenix, an Elixir web framework. Elixir, running on OTP, is a harder language to implement that kind of cross-platform compilation, but even a limited subset of Elixir would be nice for sharing some code between the front and back ends in big projects.I'm Chris McCord. That's something that Clojure has been doing for a while that can be a big deal – for some teams and some people. What could be much bigger than LiveView is the Elixir-in-JavaScript thing that was released/announced at ElixirConf last year. I also don't think Elixir will ever be as popular as Ruby – there's a lot more programming languages available now, and a lot more that are pretty great too. Some of the shit Rails does (or did) was, in contrast, sometimes maddeningly opaque and mostly invisble – I avoid that kind of thing as a general policy now. Plug in Elixir, and Ring in Clojure, are really pretty simple under the covers. They've been pretty friendly when getting started, but there's also little 'black magic' to their inner workings, and that makes a huge (positive) difference long-term. The Rails-equivalents for functional programming languages tho have been very different in my (fairly limited) experience. I often begin loathing or hating that same tech as soon as I want to veer off the 'happy path' of yet-another-todo-list tutorial app. Similarly, a lot of popular tech seems designed to seem great when your only exposure is tutorials and 'getting started' guides. 'Rails-like' is a thing and a bar that everything new has to clear, or get close to clearing, to even be possibly considered 'a contender'.īut I think a lot of what made Rails compelling isn't really that great, or is really actively harmful. But nothing is going to be that much better than what was previously available as Rails once was. I don't mean that nothing is as good as Rails – I think Phoenix, even without LiveView, is much nicer to work with, at least for me. I don't think there are any other possible Rails contenders – Rails already exists.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |