Skip to content

Commit

Permalink
Start on view documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
noelwelsh committed Jan 22, 2025
1 parent 40867f3 commit c4c32fa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/src/pages/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Architecture

Krop uses a model-view-controller (MVC) architecture, which divides a web application into three components:

- models, which manages the data in the application;
- [views](views.md), which is responsible for generating the user interface; and
- controllers, which handles actions from the user interface and implements the application logic.
4 changes: 3 additions & 1 deletion docs/src/pages/directory.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
laika.navigationOrder = [
README.md
quick-start.md
principles.md
architecture.md
application.md
server.md
views.md
routes
principles.md
]
17 changes: 17 additions & 0 deletions docs/src/pages/views.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Views

Views are responsible for generating the user interface of your application.
A user interface could be HTML displayed in a web browser, JSON returned from an API endpoint, or code that runs client-side.
As there are several different kinds of user interfaces there are several different systems for creating views.


## Static Files

## Templates

Krop uses [Twirl][twirl] for templates, which are views that are mostly text with a few pieces of programmatic content. Templates are ideal for generating HTML.

By default templates are found in `backend/src/main/twirl/`.


[twirl]: https://www.playframework.com/documentation/3.0.x/ScalaTemplates
2 changes: 0 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ object Dependencies {
val catsEffectVersion = "3.5.1"
val fs2Version = "3.6.1"
val http4sVersion = "1.0.0-M41"
val endpoints4sVersion = "1.10.0"
val endpoints4sOpenApiVersion = "4.4.0"
val scalaJsDomVersion = "2.4.0"
val scalaTagsVersion = "0.13.1"
val log4catsVersion = "2.7.0"
Expand Down

0 comments on commit c4c32fa

Please sign in to comment.