Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review again MessageBoard example #2

Open
1 of 6 tasks
t0yv0 opened this issue Jul 15, 2014 · 1 comment
Open
1 of 6 tasks

Review again MessageBoard example #2

t0yv0 opened this issue Jul 15, 2014 · 1 comment

Comments

@t0yv0
Copy link
Contributor

t0yv0 commented Jul 15, 2014

I have tried to clean up a bit. It's a great sample! Indeed, Flow seems not so useful here.. Some thoughts/tasks:

  • review Helpers section and move to main lib if needed (or utility module)
  • review LoginForm - see how using View instead of Var.Set for error-msgs
  • need better styling, looks a little odd
  • "hallway usability test" - grab someone and let them use it, record comments
  • improve login checking with (slow) async, let's see if we can make it realistic
  • check if things are "too generative" - are we reusing DOM nodes enough?
@t0yv0
Copy link
Contributor Author

t0yv0 commented Jul 16, 2014

For async login, this could work:

let u : Var<string> = ...
let p : Var<string> = ...
let input : Var<Credentials> = ...
let output =
   input.View
   |> View.MapAsync (fun cred ->
          async {
               let! ok = Server.Check cred
               if ok then .. else ..
          })
let onLogin () =
   input.Value <- Credentials.Create u.Value p.Value

This avoids the checking-on-every-sneeze, and uses Async support in the view layer, kind of.

Need to think about feeback a bit - the end result of this seems to contribute to LoggedIn: View<option<User>>. Currently too many Vars..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants