Side projects in Elixir
I wrote a blog post about doing side projects in Elixir over at the Dive Into Elixir blog. It discusses the proper mindset for approaching side projects, finding ideas, and planning.
Please check it out and lemme know what you think!
json_stream_encoder v0.1.2
json_stream_encoder has reached version 0.1.2.
This version fixes an indentation bug that most people won’t notice but drove me crazy.
TIL about ECTO_EDITOR env
TIL that you can set ECTO_EDITOR environment variable to automatically open the migration file upon creation.
ETS with Access, Enumerable and Inspect
An example of how Access behavior, Inspect and Enumerable protocols can be used to work with ETS as a typical Keyword list.
Hands on Training: Learn to create Phoenix from scratch
Tomorrow, I am conducting a workshop @ Opencamps conference NYC to deep dive into Phoenix internals and create a mini Phoenix framework from scratch.
The workshop is free for all to attend.
Looking forward to meet all Elixir and Phoenix enthusiasts attending Opencamps conference.
PS: I am offering 40% discount on my book series until Nov 21. Use coupon opencamps2017 when you buy at https://shankardevy.com/phoenix-book
Talk on The Story of Conn at Opencamps NYC
Tomorrow, I will be presenting a talk on “The Story of Conn in the World on Phoenix” at Opencamps NYC .
In this talk, I will walk through the entire lifecycle of request/response in Phoenix right from CowboyHandler where conn gets initialized to the point where Phoenix sends out a response back to the browser.
The conference session is free for all to attend.
Looking forward to meet all Elixir and Phoenix enthusiasts attending Opencamps conference.
PS: I am offering 40% discount on my book series until Nov 21. Use coupon opencamps2017 when you buy at https://shankardevy.com/phoenix-book
How To Build Docker Containers For Elixir Apps
A complete guide for building Docker Containers for Elixir application deployment. Bonus content: A boilerplate Dockerfile that you can use for all Elixir (and Phoenix) applications.
https://medium.com/@pentacent/getting-started-with-elixir-docker-982e2a16213c
plymio_ast v1.0.0
Just published v1.0.0 of my plymio_ast package.
New version because there are breaking changes. Full details in the Changelog.
I have adopted also an API that returns either {:ok, value} or {:error, error}` where error will be an Exception.
plymio_option v0.2.0
Just published the latest release of my plymio_option package.
The package offers a potpourri of utility functions for managing Keyword options.
Main change is I have adopted an API that returns either or {:error, error}` where error will be an Exception.
Elixir with Love
Here’s my short recap from the Elixir with Love conference last week. With a mix of great talks about technology and community, I left the event excited about the future of Elixir. https://blog.echobind.com/elixir-with-love-f1fe5e9a1f2
Building a Static Site with Elixir
Our latest episode is live. In it we see what it takes to build a static site with Elixir.
Watch it here: https://elixircasts.io/static-site-with-elixir
Do you miss `User.create(params)`? Try BaseModel, ActiveRecord for Ecto.
Db.Repo.all(from c in Comment, where: c.post_id == ^post_id)
Ecto has always seemed more verbose, and harder to read than it needs to be. I’d rather write:
Comment.where(post: post)
Don’t want to write CRUD for every model? Let BaseModel write it for you: add use BaseModel, repo: MyApp.Repo to the top of your models, and immediately gain a fluent API for your data:
-
create(params) -
all -
find(id) -
first(where_clause) -
first_or_create(where_clause) -
where(where_clause) -
count(where_clause \\ []) -
update(struct, params) -
update_where(where_clause, params) -
delete(id_or_struct) -
delete_where(where_clause) -
delete_all
BaseModel resolves associations automatically, supports Ecto validations, saves lots of keystrokes on the console while developing and debugging, and encourages good separation of persistence code from the rest of your app.
Check it out on Github.
How to automatically run stale tests on file change in Elixir
Short blog article with script to automatically run stale tests whenever file is changed https://medium.com/@andrew_dryga/run-stale-tests-on-file-change-in-elixir-6f8aac829973
Introducing phxsockets.io
I wanted to share with you a small project that I have been working on for the last weeks.
It is a small tool for assisting you while developing or testing Phoenix sockets and channels, or in other words, a minified version of the famous Postman app but for Phoenix WebSockets.
It is still under development, and I am planning to add some cool features, so suggestions and feedback are very welcome :)
Happy coding!
A package with some extra phoenix generators
I often want to quickly create a controller or view, not necessarily tied to an entire context/model.
Right now I copy an existing controller/view, and strip it down to a new one. These generators look pretty small, but imo it would be a great workflow improvement to be able to generate these from the command line.
There wasn’t any interest in maintaining this in Phoenix itself, so I made a little package with controller and view generators. Might expand later!
https://github.com/sebastiandedeyne/phoenix_extra_generators
A short overview of Elixir executables with escripts
A short intro to escripts, what they are, how they integrate with mix and why you should avoid using archives.
https://monades.roperzh.com/overview-elixir-executables-escripts/
@rrrene joins @spawnfest's jury :)
What a better place to share this news than here, right? Thanks @rrrene for joining us on https://spawnfest.github.io/judges
