Chris McCord has released version 1.0 of the Phoenix web framework.
Written in Elixir, Phoenix implements the server-side MVC pattern and aims to combine high developer productivity with high application performance. Announcing the release in a blog post, McCord said that it had taken "a year and a half of work, 2500 commits, and 30 releases."
Among the updates and changes in Phoenix 1.0 are the introduction of "channels," that give developers "a multiplexed connection to the server for bidirectional communication."
McCord continues
Phoenix also abstracts the transport layer, so you no longer have to be concerned with how the user has connected. Whether WebSocket, Long-polling, or a custom transport, your channel code remains the same.
You write code against an abstracted "socket", and Phoenix takes care of the rest. Even on a cluster of machines, your messages are broadcasted across the nodes automatically. Phoenix's javascript client also provides an API that makes client/server communication beautifully simple.
There has been an enthusiastic response from the developer community to the latest Phoenix release. On Hacker News, in the discussion Phoenix 1.0, user oomkiller said:
"After spending nearly 7 years in the Ruby and Rails ecosystem, I changed jobs and have been working in with Elixir and Phoenix for nearly 3 months. I have been very satisfied with the process. The community is amazing, the tooling is unbeatable, and the quality and availability of open source libraries is great, especially for such a young project."
In response to user fierycatnet, who asked "Hypothetically speaking, why would you choose Phoenix over Rails for a new app?" ghayes responded:
Phoenix shares many features with Ruby on Rails, e.g. a strong MVC model, an integrated ORM, a routing system, etc. What Phoenix on Elixir excels at is concurrency and distributed computing. For applications, this means you can have many active web sockets, for instance, where Rails applications tend to break down when you have too many active connections. Phoenix uses erlang processes for these tasks, which are lightweight and can number millions on a single machine.
Other features in Phoenix's major release are a number dedicated to productivity. Without listing them all, they include:
- Project generation with
mix phoenix.new my_app
- Postgres, MySQL, MSSQL, and MongoDB resources through Ecto integration
- Resource generators, such as
mix phoenix.gen.html User users name:string age:integer
to bootstrap a project and learn the ins and outs of phoenix best practices - Erlang OTP tooling to get a live look into your running application and diagnose issues
The Phoenix community is on the freenode IRC in #elixir-lang channel, and more information can be found here.