Welcome to EverybodyWiki ! Nuvola apps kgpg.png Sign in or create an account to improve, watchlist or create an article like a company page or a bio (yours ?)...

Phoenix (web framework)

From EverybodyWiki Bios & Wiki
Jump to navigation Jump to search

Spudst3r (talk) 02:52, 5 March 2018 (UTC)

Original author(s)Chris McCord
Initial releaseAugust 28, 2015; 4 years ago (2015-08-28)[1]
Stable release
1.3.0 / August 28, 2017; 2 years ago (2017-08-28)
Written inElixir
    Lua error in Module:Wd at line 162: attempt to index field 'wikibase' (a nil value).
Operating systemCross-platform
Size1.8 MB[2]
TypeWeb application framework
LicenseMIT License

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.[3] The framework is also used by the high traffic website Pinterest. [4]

History[edit | edit source]

After getting frustrated at building real-time events into his Ruby on Rails application[5], Chris McCord discovered Elixir and started Phoenix to create a framework “focused on taking on the real-time web”.[6] The framework is frequently thought out of as Erlang/Elixir's Ruby on Rails.[7] [8]

In August 2015, Phoenix 1.0 was released.[9][10] 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.[11] Based partially on these results, Phoenix and Elixir began to gain attention in the developer community.[12]

In both 2016 and 2017, Phoenix was the subject of keynote talks at ElixirConf.[13][14] As of June 2018, the framework's official Git repository has nearly 12,000 stars on Github.

Version history
Version Date Notes
Old version, no longer supported: 1.0[15] August 28, 2015
Old version, no longer supported: 1.1[16] December 16, 2015 Explicit view rendering. Gettext added.
Old version, no longer supported: 1.2[17] June 23, 2016 Ecto 2.0. Phoenix Presence added. Phoenix PubSub extracted.
Current stable version: 1.3[2] July 28, 2017 Contexts added. Schemas instead of models.
Old version
Older version, still supported
Latest version
Latest preview version
Future release

Philosophy and design[edit | edit source]

Phoenix’s goal is to maintain high productivity (associated with slower, monolithic MVC frameworks) without compromising performance.[5]

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.[18]

To cope with real-time web development, Phoenix introduces channels to make bi-directional communication “as trivial as writing a REST endpoint”.[1] 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]

Channels represent a bi-directional communication session between the client and server over WebSocket or long polling. Clients join topics, which can be thought of as virtual rooms, and receive any messages sent to the subscribed topic. Such messages can originate from the server or other clients. As of 2018, there are JavaScript, iOS and Android clients available.

References[edit | edit source]

  1. 1.0 1.1 Chris McCord. "Phoenix 1.0 – the framework for the modern web just landed". Phoenix blog. Retrieved January 28, 2018.
  2. 2.0 2.1 "Release v1.3.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
  3. "Benefits of Elixir: How Elixir helped Bleacher Report handle 8x more traffic". Retrieved January 28, 2018.
  4. https://www.siliconrepublic.com/advice/elixir-programming-language-career
  5. 5.0 5.1 McCord, Chris; Tate, Bruce; Valim, José (2016). Carter, Jacquelyn, ed. Programming Phoenix. PragmaticBookshelf.
  6. Chris McCord (August 28, 2015). "Phoenix 1.0 – the framework for the modern web just landed". Retrieved January 28, 2018.
  7. https://infinum.co/the-capsized-eight/things-i-wish-active-record-had-after-using-ecto
  8. https://littlelines.com/blog/2014/07/08/elixir-vs-ruby-showdown-phoenix-vs-rails
  9. https://www.infoworld.com/article/2977641/application-development/phoenix-web-framework-rises-to-10-status.html
  10. Krill, Paul. "Phoenix Web Framework rises to 1.0 status". Java World. IDG. Retrieved 5 April 2018.
  11. Gary Rennie. "The Road to 2 Million Websocket Connections in Phoenix". Retrieved January 28, 2018.
  12. Nelson, Christian. "Elixir and Phoenix: The Future of Web APIs and Apps?". Carbon Five. Carbon Five. Retrieved 5 April 2018.
  13. Tan, Lauren. "ElixirConf 2016 Summary".
  14. Freeze, Jim. "ElixirConf™ US 2017".
  15. "Release v1.0.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
  16. "Release v1.1.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
  17. "Release v1.2.0 · phoenixframework/phoenix · GitHub". Retrieved 28 January 2018.
  18. 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.

Compte Twitter EverybodyWiki Follow us on https://twitter.com/EverybodyWiki !