Basics Of Elixir And Phoenix
Onorio Catenacci,
IT Trainer
United Shore, Troy, MI
2
Agenda
What Is Elixir?
Where Can I Get Elixir?
How Do I Get Started With Elixir?
What’s Mix?
How Do I Create An Elixir App?
What Is Phoenix?
Where Can I Get Phoenix?
How Do I Start To Create A Phoenix App?
Summary/Review
3
What Is Elixir?
Elixir is a highly-scalable, fault-tolerant,
actor-model based functional
programming language which is
somewhat descended from Erlang, Ruby
and Clojure.
4
What Is Elixir?
Highly-scalable: Literally thousands of
BEAM processes running concurrently.
Fault-tolerant: Each BEAM process is
separate. Failures in BEAM processes
are isolated.
5
What Is Elixir?
Actor-model: What OO should have
been.
Functional Programming: Everything is
immutable by default—much safer in
multi-process environment.
6
What Is Elixir?
Erlang: BEAM and OTP
Ruby: Syntax
Clojure: Macro system
7
What Is Elixir?
Operating System
BEAM
Elixir Erlang
Erlang Abstract Format
8
Where Can I Get Elixir?
Start with www.elixir-lang.org
Install link
Will need to install Erlang first
9
Where Can I Get Elixir?
Mac: HomeBrew, MacPorts, Build From
Source
Linux: Package Manager, Build From
Source
Windows: Installer, Chocolatey NuGet
10
Where Can I Get Elixir?
Nerves: Elixir On Embedded Hardware
11
How Do I Get Started With Elixir?
REPL: iex
Build Manager: mix
Compiler: elixirc
Editor Language Bindings:
Vim
Emacs
Atom
Sublime Text
etc. etc. etc.
12
What’s Mix?
Elixir’s build tool
Leiningen:Clojure::Mix:Elixir
13
How Do I Create A New Elixir App?
New app:
mix new <appname>
Run unit tests:
mix test
14
What Is Phoenix?
Web framework
Built with Elixir and Erlang
15
How Do I Get Phoenix?
1.) Install Hex
2.) Install postgresql*
3.) Install node.js
4.) Install phoenix via mix
mix
archive.install
https://github.com/phoenixframework/archives/raw/master/pho
enix_new.ez
*Postgresql is default—can use other DB’s.
16
How Do I Start A New Phoenix App?
mix phoenix.new <appname>
cd appname
mix ecto.create
mix phoenix.server
17
Summary/Review
Elixir is a language based on the BEAM with high-scalability,
fault-tolerance and other desirable properties for large scale
applications
We can get Elixir on a number of platforms
Iex allows us to try out code and mix is a tool to allow us to easily
build and test applications
Phoenix is a web framework for Elixir.
18
Summary/Review
Where To Get More Information:
1.) Detroit Elixir/Erlang Meetup.
https://www.meetup.com/Detroit-Erlang-and-Elixir-Meetup/
2.) elixir-lang.org
3.) Elixir Forum: https://elixirforum.com/
19
Feedback
Twitter: @OldDutchCap
E-mail: catenacci@ieee.org
Also please fill out survey:
https://tinyurl.com/dcode-ex
Survey is anonymous.

Basics Of Elixir and Phoenix

  • 1.
    Basics Of ElixirAnd Phoenix Onorio Catenacci, IT Trainer United Shore, Troy, MI
  • 2.
    2 Agenda What Is Elixir? WhereCan I Get Elixir? How Do I Get Started With Elixir? What’s Mix? How Do I Create An Elixir App? What Is Phoenix? Where Can I Get Phoenix? How Do I Start To Create A Phoenix App? Summary/Review
  • 3.
    3 What Is Elixir? Elixiris a highly-scalable, fault-tolerant, actor-model based functional programming language which is somewhat descended from Erlang, Ruby and Clojure.
  • 4.
    4 What Is Elixir? Highly-scalable:Literally thousands of BEAM processes running concurrently. Fault-tolerant: Each BEAM process is separate. Failures in BEAM processes are isolated.
  • 5.
    5 What Is Elixir? Actor-model:What OO should have been. Functional Programming: Everything is immutable by default—much safer in multi-process environment.
  • 6.
    6 What Is Elixir? Erlang:BEAM and OTP Ruby: Syntax Clojure: Macro system
  • 7.
    7 What Is Elixir? OperatingSystem BEAM Elixir Erlang Erlang Abstract Format
  • 8.
    8 Where Can IGet Elixir? Start with www.elixir-lang.org Install link Will need to install Erlang first
  • 9.
    9 Where Can IGet Elixir? Mac: HomeBrew, MacPorts, Build From Source Linux: Package Manager, Build From Source Windows: Installer, Chocolatey NuGet
  • 10.
    10 Where Can IGet Elixir? Nerves: Elixir On Embedded Hardware
  • 11.
    11 How Do IGet Started With Elixir? REPL: iex Build Manager: mix Compiler: elixirc Editor Language Bindings: Vim Emacs Atom Sublime Text etc. etc. etc.
  • 12.
    12 What’s Mix? Elixir’s buildtool Leiningen:Clojure::Mix:Elixir
  • 13.
    13 How Do ICreate A New Elixir App? New app: mix new <appname> Run unit tests: mix test
  • 14.
    14 What Is Phoenix? Webframework Built with Elixir and Erlang
  • 15.
    15 How Do IGet Phoenix? 1.) Install Hex 2.) Install postgresql* 3.) Install node.js 4.) Install phoenix via mix mix archive.install https://github.com/phoenixframework/archives/raw/master/pho enix_new.ez *Postgresql is default—can use other DB’s.
  • 16.
    16 How Do IStart A New Phoenix App? mix phoenix.new <appname> cd appname mix ecto.create mix phoenix.server
  • 17.
    17 Summary/Review Elixir is alanguage based on the BEAM with high-scalability, fault-tolerance and other desirable properties for large scale applications We can get Elixir on a number of platforms Iex allows us to try out code and mix is a tool to allow us to easily build and test applications Phoenix is a web framework for Elixir.
  • 18.
    18 Summary/Review Where To GetMore Information: 1.) Detroit Elixir/Erlang Meetup. https://www.meetup.com/Detroit-Erlang-and-Elixir-Meetup/ 2.) elixir-lang.org 3.) Elixir Forum: https://elixirforum.com/
  • 19.
    19 Feedback Twitter: @OldDutchCap E-mail: catenacci@ieee.org Alsoplease fill out survey: https://tinyurl.com/dcode-ex Survey is anonymous.

Editor's Notes

  • #3 Dispelling myths about FP What’s immutability and why does it matter? What’s a first class function? Built-in regular expressions Recursion vs. iteration Summary/review
  • #4 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #5 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #6 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #7 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #8 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #9 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #10 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #11 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #12 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #13 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #14 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #15 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #16 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #17 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #18 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes
  • #19 Someone seems to have gotten the mistaken notion that adopting FP means dropping OO; nothing could be further from the truth. Let’s look at a few of the assumptions underlying that: 1.) Learning a new approach means abandoning an old approach. 2.) FP doesn’t have classes