Better HN
topnewbestaskshowjobs
Log inSign up

apoirier

4 karma · joined Sep 26, 2008 (18y ago) · 7 submissions

Submissions

comment 14y ago · link · parent

Yes, Nagare (http://www.nagare.org) is a continuation-aware Web framework with the same components model than Seaside.

Python Stackless is used to take continuations and also to serialize all the states, which can be stored, by configuration, in memory or to an external Memcached server. With the later setting, all the continuations can freely migrate across the machines of a cluster.

comment 15y ago · link · parent

Nagare (http://nagare.org) for Stackless Python

comment 17y ago · link · parent

For a real different coding style, more like a desktop development, take a look at Nagare (http://www.nagare.org), a continuation and components based web framework. And it also comes with an integrated HTTP server (and a fastCGI one) ;)

comment 17y ago · link · parent

Nagare (http://www.nagare.org) is really different. Not yet-another-MVC-framework clone but based on a true components architecture and using continuation, like the Seaside framework, to free the developers of the Web constraints.

comment 17y ago · link · parent

The python Nagare framework use both approaches of programmatic HTML and minimalist HTML templating. For example, to create a HTML list, in a div, from a Python list:

  from nagare.namespaces import xhtml

  l = ['the', 'mandatory', 'hello', 'world']

  h = xhtml.Renderer()
  with h.div(id='content'):
      with h.ul:
          h << [h.li(element) for element in l]

  print h.root.write_htmlstring()
Or a (X)HTML template can have nodes annotated with a 'meld:id=<id>' attribut. They are then retreived and manipulated in Python.

In both cases, one of the main goal is not to reinvent a new syntax / templating language but to use normal Python with all its power. Also the generated (X)HTML is always well-formed.

http://www.nagare.org/trac/wiki/PresentationTier

comment 17y ago · link · parent

We use Nagare (http://www.nagare.org) for our most important customers projects, A framework with a very different approach to web development than the classic MVC / url routing / session object / template frameworks.

comment 18y ago · link · parent

The complete canonical example of the counter. Of course with the back button and browser fork working.

Launched with : nagare-admin serve-module counter.py:Counter counter ===============================================

  from nagare import presentation

  # A pure python Counter class
  class Counter:
    def __init__(self, v=0):
        self.v = v

    def increase(self):
        self.v += 1

    def decrease(self):
        self.v -= 1

  # Default HTML view on the Counter class
  @presentation.render_for(Counter)
  def render(self, h, *args):
    return h.div(
               h.p('Value: ', self.v),
               h.a('++').action(self.increase),
               ' | ',
               h.a('--').action(self.decrease)
           )