Re: [Vala] Need some feedback for Valum, a web micro-framework!
- From: Al Thomas <astavale yahoo co uk>
- To: Vala <vala-list gnome org>
- Subject: Re: [Vala] Need some feedback for Valum, a web micro-framework!
- Date: Sat, 27 Jun 2015 11:51:34 +0000 (UTC)
From: Guillaume Poirier-Morency <guillaumepoiriermorency gmail com>
Sent: Saturday, 27 June 2015, 3:37
Subject: [Vala] Need some feedback for Valum, a web micro-framework!
I am working on a web micro-framework this summer as part of an
academic project. I plan to release a stable and production-ready
version by the end of this summer and use it to build an application.
The repository is hosted on GitHub:
https://github.com/valum-framework/valum
You may also want to review the documentation:
http://valum-framework.readthedocs.org/en/latest/
If you are interested into the project and don't mind playing with it a
little, I would gratefully take some of your feedback because I am
stabilizing the APIs for good in the incoming releases.
The project is interesting.
I like the idea of using GLib.Resource to server static resources (
http://valum-framework.readthedocs.org/en/latest/recipes/static-resource.html ). This could potentially be a
static content server at the edge of a web application. The idea raised a few questions.
If a VAPI for libsass ( https://github.com/sass/libsass ), the compiled CSS pre-processor, was to be written
would this integrate easily with Valum? It would be a nice workflow for development to change a SASS file and
to have the resources re-compiled almost immediately.
Is there a mechanism for modules to be swapped out at run-time? For example the updated static content module
has been tested and passed in development then the module is uploaded to the server and is made immediately
available using a mechanism such as inotify on Linux to get Valum to reload? Although I'm not sure of the
possible security implications of this.
I note one of your examples uses Genie (
https://github.com/valum-framework/valum/blob/master/examples/app/main.gs ).This is good for me, but again I
wondered how modular the framework is. I got the impression Valum modules (
http://valum-framework.readthedocs.org/en/latest/module.html ) were compiled into a single binary or are they
loaded at run-time?
The framework uses what looks like request and response objects, which I think is pretty common. The docs
mention middleware ( http://valum-framework.readthedocs.org/en/latest/router.html#middleware ). Have you
looked at the design process followed by the PHP Framework Interoperability Group HTTP Message interfaces
that they recently released as PSR-7? Some useful links:
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message-meta.md
https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-7-http-message.mdhttps://mwop.net/blog/2015-05-18-psr-7-accepted.htmlhttp://mtdowling.com/blog/2014/07/03/a-case-for-higher-level-php-streams/http://srcmvn.com/blog/2015/02/18/psr-7-and-the-future-of-php/http://dracony.org/replacing-controllers-with-middleware/https://mwop.net/blog/2015-01-08-on-http-middleware-and-psr-7.htmlhttps://mwop.net/blog/2015-01-26-psr-7-by-example.html
There is a useful discussion on the use of streams and it now has a separate interface. Also the response
object is immutable.It looks as though middleware is the way Valum intends to handle things like
authorization.
Finally how flexible is CTPL as the templating engine? Jinja2 and Twig are commonly used with Python and PHP
respectively. It looks as though node.js has plenty of npm modules implementing aspects of these. Does/will
CTPL be able to provide such functionality in future or does Valum allow another templating engine to be
swapped in? Templates typically follow the composite pattern (
https://tiles.apache.org/framework/tutorial/pattern.html ). Although the Scala Play framework takes an
interesting approach ( https://www.playframework.com/documentation/2.2.x/ScalaTemplates ) that seems similar
to CTPL at first glance. Is CTPL similar to Play templates? It would be nice to have an example of
site/section/page in the docs for Valum. So a single template is used for the site, this includes a
sub-template for each section of the site, then each section is made up of individual templates for different
types of page in each section. Is site/section/page possible with CTPL?
All the best for your project,
Al
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]