#179 Webapp brainstorming

brian Fri 21 Mar 2008

Brainstorming notes Tue 11 Mar 08:

  • Need new WebSession API
  • Tough discussion on responsibility split b/w web vs webapp vs fand
  • We decided the right level for the WebService itself is to have a single pipeline of Weblets which it runs through sequentially (with any Weblet having the ability to terminate early)
  • The webapp pod defines a bunch of WebSteps (weblets) for ext mapping, caching security, chroming, views, etc
  • Fand boot script file defines the web app:
    wisp::WispService
    {
      port = 8080
      pipeline =
      [
        webapp::AuthenticateStep,
        webapp::ResolveStep { extMap = ["html", "fan"] },
        webapp::ChromeStep,
        webapp::ViewStep,
      ]
    }

brian Fri 21 Mar 2008

I checked the code according to our new design:

  • I moved Widget/Page to webui and commented webui out for now
  • I decided to have the pipeline use a new WebStep class so that Weblet didn't have to be const (it didn't seem like requiring Weblet to be const was a good move since things like the Page maintain buffer, state, etc)
  • I stubbed out: FindResourceStep, FindViewStep, and ServiceViewSteps in webapp
  • FindViewStep is now based on the typedb
  • web::FileWeblet now implements the @webView=File.type facet
  • You can use fand/demo/boot.fan to play around

brian Fri 21 Mar 2008

I added cookie support to the web API

To get cookie in request:

Str val = req.cookies["foo"]

To set a cookie in response:

res.cookies.add(Cookie { name="foo"; value="123"; maxAge=3day })

Login or Signup to reply.