From Zero to Ecto in 10 Minutes - Using Ecto outside of Phoenix
Setting up Ecto inside a Phoenix project is pretty trivial. But how easy is it to set up Ecto in a project that doesn’t use Phoenix? Easier than you might think. Here’s a step by step guide on setting it up from mix new to inserting a record.
http://geoffreylessel.com/2016/from-zero-to-ecto-in-10-minutes/
Foreign Processes and Phoenix
Ever need to run a non-Elixir executable alongside your Phoenix app? With a little OTP, it’s easy!
https://shift.infinite.red/foreign-processes-and-phoenix-555179c24151
Rails asset pipeline vs Phoenix and Brunch
Both Rails and Phoenix can manage and deploy assets for you. But the approaches and solutions differ greatly.
Read more at Phoenix on Rails blog.
IoT with Elixir and CoAP part 1: Example on how to easily prototype and build an IoT platform
IoT hardware is limited in terms of available resources and uses lightweight application layer protocols for communication. Some of the popular choices include MQTT or XMPP. Michał Podwórny takes a look at something quite different: Constrained Application Protocol (CoAP).
Family Ties Part 6 posted, comparing guards in Erlang and Elixir
Posted the sixth of a continuing series of articles on similarities and differences between Erlang and Elixir. This article covers guard expressions, discussing why guards look the way they do, and covering some extra guard-related features in Erlang and what they can tell us about both languages.
http://daniel-azuma.com/blog/2016/05/31/family-ties-6-being-on-guard
Index of previous articles in the series: http://daniel-azuma.com/articles/family-ties/
ReadRepos - Simple master-slave database access package for Ecto.
ReadRepos is a simple master-slave database access package for Ecto.
By using this package, you can access slave databases randomly like below:
MyApp.Entry |> MyApp.Repo.slave.all
MyApp.Entry |> MyApp.Repo.slave.get(1)
The best of Rails in Phoenix (part 2)
Once again, I’m presenting good parts of Rails waiting in Phoenix for those that transition between the two.
Read more at Phoenix on Rails blog.
ExEnum - Enumerated type management package inspired by ActiveHash::Enum.
ExEnum is an enumerated type management package supporting Gettext, inspired by ActiveHash::Enum.
https://github.com/kenta-aktsk/ex_enum
Usage
defmodule MyApp.Status do
use ExEnum
row id: 0, type: :invalid, text: "invalid"
row id: 1, type: :valid, text: "valid"
accessor :type
end
You can use helper functions like below:
# index.html.eex
<td><%= Status.get(user.status).text %></td>
# form.html.eex
<%= select f, :status, Status.select([:text, :id]), class: "form-control" %>
# show.html.eex
<%= Status.get(@user.status).text %>
Beyond Functional Programming with Elixir and Erlang
José Valim reveals his point of view about the role of functional programming in Erlang and Elixir and what are its real benefits: maintainable, distributed, fault-tolerant applications.
Beyond Functional Programming with Elixir and Erlang « Plataformatec Blog
Installing Font Awesome from NPM in Phoenix
It’s easy to add Font Awesome, a free icon webfont, to Phoenix project using nothing but Brunch to do so.
Read more at Phoenix on Rails blog.
MediaSample - sample phoenix project to develop curation media, news media, etc.
MediaSample is a sample Phoenix project for developers interested in developing curation media, news media, blog, etc. This project is featuring many basic and general topics.
- authentication/authorization
- social login
- internationalization
- master/slave access to database
- many to many relationship
- pagination
- image file upload to S3
- send email via SES
- sitemap and RSS
- Facebook OGP and Twitter Cards
- full text search(Elasticsearch)
Using Ecto For Formula 1 Standings
Learn about composing Ecto Queries by generating a Formula 1 Driver’s Championship standings table with a single trip to the database. The final query will include multiple joins and wheres, and will demonstrate select, group_by, and order_by as well.
Introducing Dayron - The Elixir REST client you ever wanted
Dayron is a flexible library to interact with RESTful APIs and map resources to Elixir data structures. It works similar of Ecto.Repo but, instead of retrieving data from a database, it has underlying http clients to retrieve data from external HTTP servers.
Satisfying TDD using Elixir and Dialyzer
Experiment in using Dialyzer to guide a TDD workflow for the Roman Numerals Kata.
https://medium.com/p/seeking-simple-satisfaction-2a098902ddff
Family Ties Part 5 discusses exception handling in Erlang and Elixir
Posted the fifth of a continuing series of articles on similarities and differences between Erlang and Elixir. This article covers exception handling in the two languages, demonstrating how closely they’re aligned.
http://daniel-azuma.com/blog/2016/05/25/family-ties-5-exceptionally-similar
Index of previous articles in the series: http://daniel-azuma.com/articles/family-ties/
Phoenix + React: love story. RePh 2.
Here is a next part of RePh tutorial I’ve recently wrote: https://medium.com/@chvanikoff/phoenix-react-love-story-reph-2-14a6dcadbbd0
The best of Rails in Phoenix (part 1)
There are many parts of Phoenix that will make you, the long-time Rails developer, smile and feel right at home.
Read more at Phoenix on Rails blog.
https://gist.github.com/goofansu/c71f173ee6c8da0b0407b90c5a41c6a9
Elixir mix tasks for zsh auto completion, contains the latest Phonenix 1.1.4 tasks.
