toff63 / functional-website

Simple template showing how a website looks like applying functional concepts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Functional design for a website.

Simple template showing how a website looks like applying functional concepts

The base of Functional design is to use composition everywhere and reuse as much as possible pure functions. Another strong concept in the Haskell language family (Scala, F# and other funcional programming with strong type system) also tend to type everything.

##Core type of code

In most application, the code either:

  • move data from one layer to another
  • transform data to comply with other layer contract
  • process business values

##Application design

In the current version, I forced seperated:

I also created test to demo how to simulate flow stubing the Dao: MyWebsiteDataFlowTest.scala

##TODO

I am quiete happy with the current design. However, I would like to add typing to ease the implementation of new features and the creation of more validations. I also need to illustrate the idea of ViewModel.

About

Simple template showing how a website looks like applying functional concepts

License:Apache License 2.0


Languages

Language:Scala 98.6%Language:JavaScript 1.4%Language:CSS 0.0%