peerreynders
by Darin Wilson and Eric Meadows-Jönsson
Languages may come and go, but the relational database endures. Learn how to use Ecto, the premier database library for Elixir, to connect your Elixir and Phoenix apps to databases of the SQL and NoSQL variety. Get a firm handle on Ecto fundamentals with a module-by-module tour of the critical parts of Ecto. Then move on to more advanced topics and advice on best practices with a series of recipes that provide clear, step-by-step instructions on scenarios commonly encountered by app developers. Co-authored by the creator of Ecto, this title provides all the essentials you need to use Ecto effectively.
Don’t forget you can get 35% off the ebook using the code ‘devtalk.com’ ![]()
Trending in Books
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
I have a sharing session about the Elixir ecosystem for Erlang developers. I feel that people are still confused about the differences be...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming












Showing Posts 11 to 20- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
peerreynders
The b1.0 release contains:
Part - I: Ecto Fundamentals
Part - II: Ecto Applied
7. Adding Ecto To An Elixir Application Without Phoenix
8. Working With Changesets And Phoenix Forms
9. Testing With Sandboxes
10. Creating And Using Custom Types
11. Inserting and Updating with Upserts
13. Working with Embedded Schemas
Coming soon…:
12. Optimizing Your Application Design
14. Creating Polymorphic Associations
15. Optimizing iEX For Ecto
16. Using Schemas Without Tables
17. Changing Your Database Pooling Strategy
18. Adding Streaming And High Throughput
19. Working with Database Functions
Given that covering Ecto in any real breadth and depth is really outside the scope of Programming Phoenix ≥ 1.4 it might be beneficial to cover Programming Ecto chapters 1-6 before hitting Programming Phoenix ≥ 1.4 chapter 4 Ecto and Changesets (though of course it is not strictly necessary).
AstonJ
Do you mean Part I, sections 1-6?
I was going to start on Programming Phoenix next, so curious why specifically you think 1-6 of this book should be read first - does PP kind of throw you into the deep end?
Like the sound of that - would be good if the book details how to use Ecto as per PragDave’s thoughts in his course as per Discussion: Don't add a database layer to your Phoenix application
peerreynders
Part I: pp. 3 - 116 (first six chapters)
That’s not it at all. It’s easy enough to simply follow along in PP without much trouble … however that doesn’t mean you will necessarily be left with a sense of what to do in your own application when the time comes.
Understandably PP would defer to Ecto’s documentation for further in depth study (and possibly What’s New in Ecto) after some introduction in 4. Ecto and Changesets (pp. 51-70) and 7. Ecto Queries and Constraints (pp. 118-142).
Having PE Part I under your belt (in particular 4. Making Changes With Changesets (pp. 61-84)) those chapters would be largely review and you would likely have a much better sense of what is going on.
On a personal note, I just prefer having some focused time with a particular technology. By necessity in PP you are constantly context switching between
Plug & Router,Controllers & Views,EExtemplates andEcto. HavingEctoalready more or less settled quiets things down a bit.That chapter, in detail, deals with the type of application setup already seen in the Getting Started Guide while elaborating on other aspects like how to set up multiple Repos. So “without Phoenix” relates more to the fact that one is doing work manually that otherwise a Phoenix generator would tend to do.
tiagodavi
I’ve bough this book. It’s really great to improve your skills using Ecto.
danbruder
Bought it. Enjoying it so far!
peerreynders
2018-06-20
BartOtten
Will this book be updated to Ecto 3.0 once it’s released? I want to buy it but have a few books I have to read first. Would be pitty if the book is a bit outdated once I get to it
ericmj
Yes, it will be updated to Ecto 3.0 once the release candidate is out.
joaquinalcerro
Nice to know and by the way I totally recommend this book!! Very easy to read and follow. Thanks @ericmj @darinwilson
tme_317
This is a great book! I’m always on the lookout for new beta versions to be published so I can read the new chapters that are released.
I don’t think PragProg allows forums anymore on their site (only errata) and I have a question about the latest chapter 12. First, I really appreciate that chapter since many times books don’t get into higher level application design topics (maybe to avoid “flame wars”)
Question I have is about the good “general rule” advice to put all pure functions manipulating queries, changesets, and multis into their associated schema modules and put all the impure code into context modules. Right now I put all changeset code in the schema modules but usually leave the multi (and query) code in the context module… generally since my multis and queries are affecting multiple DB tables/schemas so they don’t really belong in any specific schema module. Are you recommending maybe using
Multi.mergeextensively to build up the whole multi in the context module calling functions in the schema modules… or something else?I looked at the sample code that comes with the book and can’t find much use of multi (yet). Are there any large/decent scale OSS projects I can study that follow the recommended pattern… especially as it relates to Multi or query use defined in schema modules?
@darinwilson