Phoenix (web framework)
|Original author(s)||Chris McCord|
|Initial release||August 28, 2015|
1.3.0 / August 28, 2017
|Type||Web application framework|
Phoenix is a free and open-source web application framework written in Elixir. It implements the server-side MVC pattern for building traditional request-response services, and adds channels for real-time web development. Bleacher Report disclosed that migrating from Ruby on Rails reduced 150 servers to just five. The framework is also used by the high traffic website Pinterest. 
History[edit | edit source]
After getting frustrated at building real-time events into his Ruby on Rails application, Chris McCord discovered Elixir and started Phoenix to create a framework “focused on taking on the real-time web”. The framework is frequently thought out of as Erlang/Elixir's Ruby on Rails. 
In August 2015, Phoenix 1.0 was released. In the same year, it was benchmarked to hold 2 million WebSocket connections on a single server, taking just 1-2 seconds to broadcast to all subscribers. Based partially on these results, Phoenix and Elixir began to gain attention in the developer community.
|Old version, no longer supported: 1.0||August 28, 2015|
|Old version, no longer supported: 1.1||December 16, 2015||Explicit view rendering. Gettext added.|
|Old version, no longer supported: 1.2||June 23, 2016||Ecto 2.0. Phoenix Presence added. Phoenix PubSub extracted.|
|Current stable version: 1.3||July 28, 2017||Contexts added. Schemas instead of models.|
Philosophy and design[edit | edit source]
Phoenix’s goal is to maintain high productivity (associated with slower, monolithic MVC frameworks) without compromising performance.
Inspired by Ruby on Rails, it borrows conventions such as the MVC pattern, sensible defaults, generators and DSLs, but leverages Elixir’s metaprogramming to remove boilerplate as well as the Erlang virtual machine to provide low-latency performance and scalability.
To cope with real-time web development, Phoenix introduces channels to make bi-directional communication “as trivial as writing a REST endpoint”. The channels abstraction
Technical overview[edit | edit source]
Phoenix is a highly modular framework built on Cowboy, a production ready Erlang web server. It integrates with Ecto for database persistence and gettext for internationalization.
Views as functions[edit | edit source]
Embedded Elixir (EEx) is used to compose page templates, which are compiled into functions at build time. Since all views are simply functions, they are rendered from memory at run-time without requiring disk I/O, making them highly performant.
Channels[edit | edit source]
References[edit | edit source]
- Chris McCord. "Phoenix 1.0 – the framework for the modern web just landed". Phoenix blog. Retrieved January 28, 2018.
- "Release v1.3.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
- "Benefits of Elixir: How Elixir helped Bleacher Report handle 8x more traffic". Retrieved January 28, 2018.
- McCord, Chris; Tate, Bruce; Valim, José (2016). Carter, Jacquelyn, ed. Programming Phoenix. PragmaticBookshelf.
- Chris McCord (August 28, 2015). "Phoenix 1.0 – the framework for the modern web just landed". Retrieved January 28, 2018.
- Krill, Paul. "Phoenix Web Framework rises to 1.0 status". Java World. IDG. Retrieved 5 April 2018.
- Gary Rennie. "The Road to 2 Million Websocket Connections in Phoenix". Retrieved January 28, 2018.
- Nelson, Christian. "Elixir and Phoenix: The Future of Web APIs and Apps?". Carbon Five. Carbon Five. Retrieved 5 April 2018.
- Tan, Lauren. "ElixirConf 2016 Summary".
- Freeze, Jim. "ElixirConf™ US 2017".
- "Release v1.0.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
- "Release v1.1.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
- "Release v1.2.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
- McCord, Chris; Tate, Bruce; Valim, Jose (2016). Programming Phoenix (1st ed.). Dallas, Texas, USA: The Pragmatic Programmers. p. 1. ISBN 978-1-68050-145-2.
External Links[edit | edit source]
This article "Phoenix (web framework)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Phoenix (web framework). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.