canteen
the little framework that could
(documentation coming soon)
Minimal Python web framework :)
License: MIT License
Write a new template loader that can load templates via the package get_data
API, so setup.py
-style installs can be supported for Canteen-powered apps.
Add declarative configuration and supporting code structure to define and understand "compiled" assets, such as LESS and CoffeeScript. This can be the supporting structure for tools that autocompile or at least recognize their existence.
This should come with a few extra things:
We need a simple logo for Canteen; one that gracefully encapsulates how it feels to work with and use Canteen in your toolchain. Micah is a boss at this stuff so obvs it's in his wheelhouse :)
This is dependent on picking a name, of course, which is a separate issue (#7)
Make a second pass at initial docstrings. This round should include less-critical modules:
util
- (struct
, decorators
, debug
, config
, cli
)rpc
- (protocol.jsonrpc
and exceptions
)dispatch
and test
Figure out how we can support Jade-style templates. Is it a preprocessor for Jinja2, or its own template system?
Build a full interface for writing tests against a Canteen-powered application. We can probably use some sweet internals in Werkzeug for HTTP-level stuff, and realtime stuff is easy enough since it only needs a simple WSGI environment.
Allow use of config
during construction time, when it may not have loaded before elements in Canteen.
Figure out a creative way to fix this that hopefully doesn't include the use of environment variables or hard-coded imports from Canteen into a developer's app, as that gets knar with circular dependencies/code ordering problems.
Add simple scripts (that mirror things like web
and fcm
) for managing a local Canteen app environment. They should be deployable from a similar mechanism to the Application Seed (#16).
Design and build the initial structure for a pervasive Dependency Injection system, that frees the developer from having to use or remember structure in their code by automatically loading, optimizing, and managing stateless business logic and exposing it via touchpoints for input and output (such as the World Wide Web).
Write a simple guide/reference that outlines what exists in the base template context provided by Canteen.
Support for arbitrary Service Middleware is important to support features like caching, authentication/authorization, audit and error handling in the Service Layer.
Good candidate for implementation via Content Filters (#12).
Make a first pass at adding docstrings everywhere they should be. Don't add parameters yet, just method descriptions.
These modules are most critical:
core
(meta
, injection
, api
and runtime
)base
(handler
, logic
, page
and protocol
)logic
(http
and realtime
)runtime
(werkzeug
, wsgiref
, uwsgi
, gevent
and tornado
)Even though we probably won't be on Apache long and definitely won't be using mod_spdy
or AppEngine, this is likely how Nginx will eventually handle SPDY Push and it's an easy win.
Essentially, all that is required is to add HTTP headers for associated static assets, under the name "X-Associated-Content". If Canteen is running behind mod_spdy
on Apache or on AppEngine, the resources will be pushed (with an optional priority
value) to the client along with the HTML response proper.
This issue is basically the SPDY-relevant version of generic HTTP Link Headers (#13), and is also a good candidate for implementation via Content Filters (#12).
Add core support for dispatching Canteen in an acyclic fashion, without requirement for a request/response cycle.
This enables future features like WebSockets.
Once Service Middleware (#21) is fully supported, we need to write some base auth[entication,orization] middleware that allows basic and configurable protection for service methods.
Add builtin support for generating Content-Security-Policy
headers. This should probably go in HTTP logic and be heavily configurable.
Definitely a good idea to support report-only
mode too.
Natively support at least one environment for WebSocket-style dispatch. It should be possible to invoke Services over WebSockets automatically and author handlers that use a realtime-friendly interface.
This is dependent on support for Acyclic Dispatch (#18).
We need a new name for Canteen! It was originally meant to be a placeholder name, and besides, it locks us into being a joke about Flask for the rest of time. Also there is a new PHP framework called Canteen (no joke!) that also specializes in DI, so it's just not a potable name to keep.
Also it's gross
Support loading assets via get_data()
so webapps can fully be installed via setup.py
. Related to #24, which is the same thing but for templates.
Support the expression of related static assets as HTTP Link
headers. According to spec, sending such a header is equivalent to specifying a <link rel=''>
tag in the HTML inline.
Currently, Chrome doesn't handle this properly and it seems only newer versions of Firefox and Opera would benefit, making this a good candidate for implementation via Content Filters (#12). Support for it now would mean instant use later when support improves (as it seems it will).
Relevant specifications:
http://www.w3.org/wiki/LinkHeader
http://tools.ietf.org/html/rfc5988
Browser notes:
http://www.chromium.org/spdy/link-headers-and-server-hint/link-rel-subresource
https://developer.mozilla.org/en-US/docs/Link_prefetching_FAQ
http://css-tricks.com/using-css-without-html/
http://meyerweb.com/eric/thoughts/2009/01/22/using-http-headers-to-serve-styles/
https://support.google.com/webmasters/answer/139394?hl=en
Note about rel="canonical" (should have its own issue someday): http://googlewebmastercentral.blogspot.com/2011/06/supporting-relcanonical-http-headers.html
Add a simple way to "autogenerate" a small seed app in the standard Canteen style. This should make it easier to get started with a getting started app, etc.
Design and build a structure to rewrite and transform Python AST as it is imported. This will allow better deferred processing of interdependent modules at construction time.
More details to come
Write a tutorial for basic Canteen stuff, like making a Page or a Service. Basically package the simple Canteen lesson given to Keenies as a browsable/readable tutorial.
Design and construct core functionality in Canteen to expose an extensible interface to register, conditionally enable, execute and contain arbitrary filters on content at various stages of the request/response cycle.
Specifically, these filters should be conditionally executed based on request or runtime environment, such as an HTTP request's User-Agent
header, or the presence of gevent
versus tornado
.
More to come on interface details.
The server just crashes after code changes. It just crashes.
That's only half the equation - if it restarted, things would be wonderful.
But it doesn't.
It just crashes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.