Ecto Course




What's in this preview?

We want you to get the feel for typical Groxio content and the reasons we provide each type of content. Each Groxio module comes in four scheduled releases consisting of the central PDF, videos, and resource links. Later releases have projects as well. You can see part of the first release here.

An explicit, repo-based database mapping and query service for Elixir



Buy Course Today!



Preview PDF!



Preview Epub!




Release Schedule: 2021-06-01 through 2021-08-09

Version: June 1, 2021


Just $70.00, A La Carte
(other options available)




Programmer Passport Ecto






Why a book?

The scientific teaching method we follow is the Dreyfus learning model. Books provide the metaphors experts need to build context, step-by-step instructions for beginners, and the exercises that intermediates need to learn.

Itinerary


1. Design and Setup

2. Query Composition

3. Relationships

4. Advanced Abstractions (transactions, sql abstractions)

Why an itinerary?

The itinerary is a virtual guide. This optional list describes the highlights of each release to maximize your learning time.

Description

Ecto is the de facto persistence layer for Elixir. It works best with relational databases, but some extensions are emerging for other data base abstractions too. The database layer lets you fetch database data so you can deal with it in your application or create data in your appliction and save it to the database in a reliable way.


The primary features are an API that features a clean separation between functions that work with data, and functions that interact directly with the database system. Ecto also features changesets which let users deal with user input in a practical way that enables both effective user interfaces and database integrity.

History

Shortly after the creation of Elixir in 2013, José Valim worked with Eric Meadows-Jönsson on Ecto over the Google Summer of Code. Github shows those two are the top contributors to Ecto, but the project has seen contributions from more than 100 developers spanning the life of the project.




Course Objectives

Groxio courses focus on concepts rather than features. Since the Elixir community has plenty of support for Ecto features and mappings, we’ll spend more of our time working through design concepts. We’ll weave in the concepts you’ve seen in other Groxio courses like the CRC (construct - reduce - convert) pattern and the software layering system created in Designing Elixir Systems with OTP.


When you’re done, you’ll be able to:

  1. Create an Ecto project with and without Phoenix.

  2. Construct layered Ecto models, and understand which layers go where.

  3. Build composable query systems that offer flexibility to a core query layer.

  4. Learn basic Ecto mappings such as belongs-to and has-one.

  5. Work with relationships using explicit loading and aggregations.

  6. Extend the Ecto ecosystem by dropping into SQL

Videos

Public & Private




Why videos?

Groxio language modules have two kinds of videos. Our overview videos set the history and context of a language, or wrap up the work we've done, and are free to support language ecosystems. Our coding instruction videos, mostly starting with the second release, are paid content, and each one offers a live coding project.

Every learning level benefits from pair programming. Our videos are professional, but do not scrub away every tiny mistake. That way, you can see how experienced programmers deal with errors and changes in code organization.

Intro. Design for Ecto

Ecto is the database library for Elixir. It has everal interesting features. One of the most important is the design decision to separate database access through a repo from the pure functional features of working with data. This video walks through the layers of an Elixir system, and where your Ecto code fits.

Video

1. Ecto Without Phoenix

Ecto is the database layer behind Elixir. Most Elixir developers learn to use it through the Phoenix framework, but you don't have to. This video walks through the steps to creating an Ecto project, plugging in the supervisor, and dialing in your configuration using an idiomatic Elixir mix project.
Subscriber content

Video

2. Ecto Schemas

Ecto schemas define a mapping between a database table and an Elixir data structure. None of the database access actually happens in the schema, though. This video will walk you through the schema itself, it's purpose, and how to fit your schemas into a well-designed Elixir application.
Subscriber content

Community Resources

Cool quick trips for Ecto




Why resource links?

Each new chapter has a set of links, separated into three categories. The categories reflect different competency levels and resources that match that stage of learning, for each Groxio release.

Learn It

These resources will get you on the path to learning with background information, tooling and exercises.

Do It

You decide how deep to go. These resources are exercises and projects to cement your learning.

Grok It

These resources will help you put your new knowledge into context so you'll be better at your everyday job.

Projects

Longer Excursions (chapters 3 and 4)






Why projects?

The Dreyfus model is originally instruction for pilots. A typical pilot course is based on reading material to understand context, and then flying a plane. Our videos and PDFs are important, but in the end, programmers need to program in order to learn. Our projects offer different levels of assistance, from "give me the answer" to "make this test pass".