From 83c473947589cd90fc74fb59e9c9c28a677583c3 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 6 Dec 2020 10:04:08 -0500 Subject: Finish Devalloc miso app prototype After hours of trying to get a page abstraction working in a Miso app (both Devalloc and Hero) I had a revelation: Miso is an SPA - *single* page application - framework, and so trying to put multiple pages into it is fundamentally at odds with the rest of the architecture. Of course this is also a problem with Elm's pattern of nesting models in order to create a page abstraction. They can pull it off because they don't also try to do isomorphic rendering. In hindsight this should be obvious... if I actually do want some kind of page-like abstraction or separation, then I need a much more complex server that can embed different Miso apps based on some logic. But this is more like multi-tenancy, or something. Also I'm starting to think that I don't want Devalloc to be an SPA anyway, so I'll try an experimental branch where I rip it out and just use Servant, Lucid, and Turbolinks. --- Biz/Devalloc/Page/Home.hs | 95 --------------------------------------------- Biz/Devalloc/Page/Signup.hs | 46 ---------------------- 2 files changed, 141 deletions(-) delete mode 100644 Biz/Devalloc/Page/Home.hs delete mode 100644 Biz/Devalloc/Page/Signup.hs (limited to 'Biz/Devalloc/Page') diff --git a/Biz/Devalloc/Page/Home.hs b/Biz/Devalloc/Page/Home.hs deleted file mode 100644 index 9e90e70..0000000 --- a/Biz/Devalloc/Page/Home.hs +++ /dev/null @@ -1,95 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE NoImplicitPrelude #-} - -module Biz.Devalloc.Page.Home - ( Move (..), - Path, - Form (..), - path, - view, - host, - ) -where - -import Alpha -import Biz.App (HtmlApp (..)) -import Miso -import Miso.String -import Servant.API -import Servant.Links -import Servant.Server (Handler) - -data Move = NoMove - -type Path = View Move - -newtype Form = Form - { uri :: URI - } - -path :: URI -path = linkURI <| safeLink (Proxy :: Proxy Path) (Proxy :: Proxy Path) - -host :: Handler (HtmlApp (View Move)) -host = - Form {uri = path} - |> view - |> HtmlApp - |> pure - -signup :: View Move -signup = - p_ - [] - [ a_ - [href_ "mailto:ben@bsima.me?subject=Devalloc+signup"] - [text "Request access via email"] - ] - -view :: Form -> View Move -view _ = - div_ - [] - [ h1_ [] [text "Devalloc"], - p_ - [] - [ text - "Devalloc analyzes your codebase trends, finds patterns \ - \ in how your developers work, and protects against tech debt." - ], - p_ [] [text "Just hook it up to your CI system - it will warn you when it finds a problem."], - signup, - h2_ [] [text "Identify blackholes in your codebase"], - p_ - [] - [ text - <| Miso.String.intercalate - " " - [ "What if none of your active employees have touched some part of the codebase?", - "This happens too often with legacy code, and then it turns into a huge source of tech debt.", - "Devalloc finds these \"blackholes\" and warns you about them so you can be proactive in eliminating tech debt." - ] - ], - h2_ - [] - [text "Protect against lost knowledge"], - p_ - [] - [text "Not everyone can know every part of a codebase. By finding pieces of code that only 1 or 2 people have touched, devalloc identifes siloed knowledge. This allows you to protect against the risk of this knowledge leaving the company if an employee leaves."], - h2_ - [] - [text "Don't just measure code coverage - also know your dev coverage"], - p_ - [] - [text "No matter how smart your employees are, if you are under- or over-utilizing your developers then you will never get optimal performance from your team."], - ul_ - [] - [ li_ [] [text "Find developer hot spots in your code: which pieces of code get continually rewritten, taking up valuable dev time?"], - li_ [] [text "Know how your devs work best: which ones have depth of knowledge, and which ones have breadth?"] - ], - p_ [] [text "(Paid only)"], - h2_ [] [text "See how your teams *actually* organize themselves with cluster analysis"], - p_ [] [text "Does your team feel splintered or not cohesive? Which developers work best together? Devalloc analyzes the collaboration patterns between devs and helps you form optimal pairings and teams based on shared code and mindspace."], - p_ [] [text "(Paid only)"], - signup - ] diff --git a/Biz/Devalloc/Page/Signup.hs b/Biz/Devalloc/Page/Signup.hs deleted file mode 100644 index 8debf53..0000000 --- a/Biz/Devalloc/Page/Signup.hs +++ /dev/null @@ -1,46 +0,0 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE NoImplicitPrelude #-} - -module Biz.Devalloc.Page.Signup - ( Move (..), - Path, - Form (..), - path, - view, - host, - ) -where - -import Alpha -import Biz.App (HtmlApp (..)) -import Miso -import Miso.String -import Servant.API -import Servant.Links -import Servant.Server (Handler) - -data Move = NoMove - -type Path = View Move - -newtype Form = Form - { uri :: URI - } - -path :: URI -path = linkURI <| safeLink (Proxy :: Proxy Path) (Proxy :: Proxy Path) - -host :: Handler (HtmlApp (View Move)) -host = - Form {uri = path} - |> view - |> HtmlApp - |> pure - -view :: Form -> View Move -view _ = - div_ - [] - [ h1_ [] [text "Signup coming soon"], - p_ [] [a_ [href_ "/"] [text "Go back home"]] - ] -- cgit v1.2.3