Haskell on Rails

or: How I Learned to Stop Worrying and Love the Compiler

James Dabbs

@

I

Haskell

II

Yesod

III

Ruby

Haskell

Yesod

&

Haskell

Yesod

&

Haskell

Ruby

&

Old Chestnuts

Immutable data

=

😻

nil

=

🙀

Composition

Prefer composition over inheritance

Gang of Four, Sandi Metz, et al.

–

Haskell

Ruby

Haskell

Ruby

Haskell

Ruby

Haskell

Ruby

Haskell

Ruby

Rack works because it's composable

It's composable because functional

}

}

Configuration

Execution

Mocking is required when our decomposition strategy has failed.

Eric Elliott

–

Layers &

Boundaries

Model:

View:

problem domain objects  ⇄  database

domain objects  →  HTML / JSON

Model:

View:

Validation:

problem domain objects  ⇄  database

domain objects  →  HTML / JSON

user input  →  domain objects

Hanami:

dry-rb:

ROM:

https://hanamirb.org

https://dry-rb.org

http://rom-rb.org

@solnica

Haskell on Rails

or: How I Learned to Stop Worrying and Love the Compiler

James Dabbs

@

Made with Slides.com