Saturday, April 6, 2013

Web frameworks and architectural description language

I've been toying with Mojolicious lately, gearing up to get over my fear of complexity and jump in with some simple UI for some little projects.  There's a great Flask megatutorial series I'd like to follow along with, reimplementing the various steps in Mojolicious. (See also this example blogging app in Mojolicious::Lite.)  But "porting" a tutorial begs trips the usual circuit breakers in my mind:

Namely, a Flask webapp and a Mojo webapp are both projections of the same abstract webapp, and what I really want is to describe that abstract webapp in a higher-level language.

I should really just no longer call it Decl.  I should just call it Hylaea right off the bat.  [pause]  Yeah, that name is pretty uncluttered!  There's a guy in Paris calls himself Hylaean (tweets some interesting stuff, not a lot of activity on Github and it shows he prefers the MS ecosystem - a guy worth following, actually) but that's about it outside the Anathem Wiki, and "Hylaea" without the 'n' is free as a bird.

Anyway, there is a semantic abstraction of the notion of the webapp that can be expressed in Mojolicious or in Flask or in, you know, any of the thirty thousand other webapp frameworks out there, am I right?  But the abstraction, at some level, is the same for all of them, it's just that by working in one or another stack or language you might be led in different directions in development due to the affordances of the environment (that's a cogsci term I find particularly apt here).

That stack/language/environment/ecosystem is what we call the architecture on which we're developing a given app - but the way we think about the structure of the app or program or whatever (because this obviously goes way beyond webapps) is some kind of shared semantic structure that I think is amenable to externalization.

Note, of course, that the specific description of a particular architecture or app is a kind of "skeletal form" - because it doesn't encode all the knowledge about a thing, it just identifies it and evokes the library of concepts stored in the (getting back to Hofstadterian research here) the Lexicon.

Meditation prompt: is there a difference between Decl and Hylaea?  I kind of think there is.  Decl is an interpreter in Perl for declarative structures, but remains a pretty Perly thing.  Logic is still represented in Perl, for example.  Hylaea might be the overall programming system or something. Let's consider this for a while.

No comments:

Post a Comment