# \#composition

**URL:** https://forum.elixirforum.com/tag/composition/1449.md

[Latest](https://forum.elixirforum.com/latest.md) · [Categories](https://forum.elixirforum.com/categories.md) · [Tags](https://forum.elixirforum.com/tags.md)

---

## [Responsibilites of components in a phoenix liveview](https://forum.elixirforum.com/t/responsibilites-of-components-in-a-phoenix-liveview/50980)

<div class="topic-metadata">

**Author:** [@mhdtrifork](https://forum.elixirforum.com/u/mhdtrifork)\
**Replies:** 11\
**Last updated:** [November 16, 2023, 5:33pm UTC](https://forum.elixirforum.com/t/responsibilites-of-components-in-a-phoenix-liveview/50980 "2023-11-16T17:33:35Z")

</div>

Hi there, im pretty new to Elixir, Phoenix and Liveview. I come from an app developer background. Im having a little hard time, wrapping my head around, how to properly compartmentalize (is that a word?) an advanced vie…

---

## [Inheritance in Elixir](https://forum.elixirforum.com/t/inheritance-in-elixir/58085)

<div class="topic-metadata">

**Author:** [@fceruti](https://forum.elixirforum.com/u/fceruti)\
**Replies:** 6\
**Last updated:** [September 5, 2023, 5:55am UTC](https://forum.elixirforum.com/t/inheritance-in-elixir/58085 "2023-09-05T05:55:58Z")

</div>

I’m working on a cool library (news about that in a few weeks :smiley:), and there’s no sugar coating this: I really want to use inheritance. I’m no Elixir n00b, at least not completely. I’ve enjoyed the functional para…

---

## [How do you approach Ecto.Multi composition?](https://forum.elixirforum.com/t/how-do-you-approach-ecto-multi-composition/53593)

<div class="topic-metadata">

**Author:** [@rbino](https://forum.elixirforum.com/u/rbino)\
**Replies:** 1\
**Last updated:** [April 20, 2023, 10:30am UTC](https://forum.elixirforum.com/t/how-do-you-approach-ecto-multi-composition/53593 "2023-04-20T10:30:37Z")

</div>

I’m finding myself working with Ecto.Multi more and more recently, and I’m trying to understand what are the best practices to work with them. My question for this topic is: what is the suggested approach to factor out …

---

## [Composing Types with TypedStruct?](https://forum.elixirforum.com/t/composing-types-with-typedstruct/54450)

<div class="topic-metadata">

**Author:** [@Fl4m3Ph03n1x](https://forum.elixirforum.com/u/Fl4m3Ph03n1x)\
**Replies:** 6\
**Last updated:** [March 10, 2023, 9:14am UTC](https://forum.elixirforum.com/t/composing-types-with-typedstruct/54450 "2023-03-10T09:14:36Z")

</div>

Background Let’s say I have a TypedStruct that has some common fields: typedstruct do @typedoc "A product." field(:item\_id, String.t()) field(:name, String.t()) field(:brand, String.t()) end This is …

---

## [Would you find ComposableHtml library useful?](https://forum.elixirforum.com/t/would-you-find-composablehtml-library-useful/29001)

<div class="topic-metadata">

**Author:** [@tomekowal](https://forum.elixirforum.com/u/tomekowal)\
**Replies:** 6\
**Last updated:** [April 30, 2020, 4:34pm UTC](https://forum.elixirforum.com/t/would-you-find-composablehtml-library-useful/29001 "2020-04-30T16:34:58Z")

</div>

I’ve recently found myself writing many Phoenix templates and wanted to streamline my experience. I often want to set some defaults, e.g. in Bootstrap a table usually has a class “table” \<table class="table"\> But then I…

---

## [Optimize the Ecto.Query using Ecto.SubQuery](https://forum.elixirforum.com/t/optimize-the-ecto-query-using-ecto-subquery/23222)

<div class="topic-metadata">

**Author:** [@ycv005](https://forum.elixirforum.com/u/ycv005)\
**Replies:** 2\
**Last updated:** [June 20, 2019, 4:58am UTC](https://forum.elixirforum.com/t/optimize-the-ecto-query-using-ecto-subquery/23222 "2019-06-20T04:58:44Z")

</div>

I want to combine two queries into 1 query to optimize my code. I tried my own by getting error. Also, In doc, it is given that Subqueries are currently only supported in the from and join fields.. So, does following ca…

---

## [Functional and non-functional composition](https://forum.elixirforum.com/t/functional-and-non-functional-composition/21151)

<div class="topic-metadata">

**Author:** [@joeerl](https://forum.elixirforum.com/u/joeerl)\
**Replies:** 20\
**Last updated:** [March 28, 2019, 6:51pm UTC](https://forum.elixirforum.com/t/functional-and-non-functional-composition/21151 "2019-03-28T18:51:32Z")

</div>

On thing that bugs me and I’d like to comment on. Programs have functional and non functional properties Pure functional programs compose - this means that f(g(X)) behaves as if you had written: Y = g(X) and then comp…
