valum-framework / valum

Web micro-framework written in Vala
https://valum-framework.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
225 stars 23 forks source link

Reverse rules #158

Closed arteymix closed 7 years ago

arteymix commented 8 years ago

The first step is to have a more flexible way of handling rules. I have extracted the code to provide a minimal lexer.

The next step is to lex the rule and inject parameters where they should end.

For now, it's okay to support only string until we get typed parameters.

Usage sample:

Route? home = null;

home = app.get ("home/<page>", (req, res) => {
    HashTable<string, string> @params = new HashTable<string ,string> ();
    @params["page"] = "login";
    var login_uri = home.get_path (@params);
});
arteymix commented 8 years ago

The more I think about it, the less I desire typed parameters. I just don't see how to address the feature conveniently.

Anyway, some expectations:

arteymix commented 7 years ago

This has been resolved by 27566dd181ff81d03fb221d23d2945cd8c46d03b.