Arc Forumnew | comments | leaders | submitlogin
6 points by EliAndrewC 6173 days ago | link | parent

If I were using Python and CherryPy then I'd say something like:

    class Root:
        def form(self):
          return render("form.html")
        
        def link(self, foo):
          cherrypy.session["foo"] = foo
          return render("link.html")
        
        def message(self):
          data = {"foo": cherrypy.session["foo"]}
          return render("message.html", data)
Obviously I'd need to write three templates for the three pages.

This is a neat example, since it shows how terse Arc can be. I'd be interested to see how well this scales to a large site. For example, I normally like keeping my HTML and Python code separate, so that when I have thousands of lines of each, it's easier to sift through it all and find what I'm looking for. However, if my code were consistently this much shorter, then that wouldn't be as necessary.