-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
join 'em #526
Comments
So algorithm.py is non-essential? |
@Changaco Yeah, that's on the edge. I like algorithm.py, and it's unique to Aspen, but I'm not sure I like it enough to keep Aspen going just for its sake. Perhaps there's a future in which the Flask project finds algorithm.py interesting enough to adopt? |
@Changaco Do you think it's essential? Do you like it enough to keep Aspen going for its sake? |
I think the question is: can we easily do with other frameworks what we do with Aspen's algorithm, for example i18n of responses? If yes then algorithm.py is non-essential. |
|
Which is to say, i18n almost certainly works under Flask at least as well as it works under Aspen/Gratipay. I recall noticing somewhere their solution to injecting appropriate gettext functions into template context, though I don't recall where at the moment. |
I'm not so sure Flask-Babel is better than Liberapay's i18n, but they look similar so it should be possible to port ours to Flask. i18n was only an example though, the underlying question remains: how hackable is Flask? Are there things we can do by modifying Aspen's algorithm that can't be done by extending Flask? In any case from Aspen's point of view it makes sense to fold, but for everyone who uses Aspen it'll mean "losing" time learning another framework and migrating. |
@Changaco Do you want to take over maintenance of Aspen? We could fork out Simplates rather than killing Aspen outright. As discussed, the plan is to ship framework shims with Simplates. We could include a shim for Aspen. |
I've started a PR in #527. |
I think the strip down of the code should happen in another repo in any case. |
Okay. To inform this decision, I went and reviewed the history of Simplates and Aspen in Zeta's old public svn repo. Here's the story: 2004-08-20—First commit on 2005-01-04—Last commit on 2005-08-21—First commit on 2006-07-13—First commit on 2006-09-08—Last commit on 2006-09-19—First commit on 2006-10-11—Commit to 2006-11-13—Last commit on 2006-11-16—First commit on 2006-11-17—Last commit on |
The current Aspen repo, in other words, is a confluence of three other repos:
We dropped the server in #324. The talk here is to drop the request/response objects. If we were also dropping filesystem dispatch, then it'd be easy to say that we should fork back out a Simplates repo. Since we're keeping filesystem dispatch, I think we should only fork a new repo if someone is going to keep Aspen going as a web framework. If no-one is going to keep Aspen going, then I think we should stick with the same repo, and simply rebrand it around Simplates. |
Okay, though I think it may be a good idea to keep the master branch in a working state until the new stripped down Aspen is fully functional. |
I'm fine with that. If #527 gets too unwieldy then maybe we can start making smaller pull requests against the |
The way things are going on #527 is that we're planning to stick with the same repo, and the Aspen brand, because it includes filesystem dispatch in addition to simplates. We're talking over there about a "parasitic" web framework that depends on a host framework for most things. Aspen is becoming a plugin for Django and Flask that does filesystem dispatch and simplates. |
Ideally there will be an easy migration path from old-aspen to (probably) flask-aspen. |
I had a thought last night: if aspen becomes a framework that can integrate into others, then it should be easy to integrate it with a nano-framework based on I think we should use aspen as an umbrella name, split it into separate libraries ( I'm willing to help with all this once the rush of launching Liberapay is over. |
@pjz may have been suggesting something similar at #527 (comment):
In other words, #527 should preserve some sort of
So far #527 is still using
If we're factoring out simplates (#341), it shouldn't be tied to web programming, and therefore shouldn't be
I think the inverse will make more sense for the shells: @Changaco Up above at #526 (comment) I offered to let you take over maintenance of Aspen-the-web-framework, because at first it looked like we were letting go of Aspen and moving to Simplates as the primary project/brand. Then we realized that Aspen is really dispatch plus simplates, and we may as well keep the Aspen project/brand for the amalgamation. I agree with @pjz that we should have a barest-of-bones |
I am having a moment of weakness. I looked at the Gratipay algorithm (#527 (comment)), and realized that we won't have that anymore. Instead we'll have to ... use signals, probably? Then I typed More context: kennethreitz/records#41. The purpose of Aspen, Postgres.py, etc. has never been to be the most popular ________ in the Python community. The purpose is to be the in-house ________ for Gratipay, so that we can have a higher level of control over our stack. If we were a closed company, those projects would be proprietary. The fact that they're open-source is a side-effect of our openness. We're not primarily concerned to build large communities around those products themselves. |
You'll use whatever Flask or Django or your webframework uses. If you really don't like it, you can wrap your webframework's whatever in whatever you want instead. As far as having a higher level of control over the stack... I disagree. The point of Aspen is to add features that simply aren't present in any other web framework. In the course of this, we've discovered how much grunt work there is in maintaining the rest of the web framework (request objects, authentication, cookies, session management, etc), and that's what we're trying to move away from by turning Aspen into a plugin of other frameworks. Much like Postgres.py/Records' core value-add is the API (so making it work with as many databases as possible is a good thing), Aspen's core value-add is simplates+filesystem-dispatch, so making it work with as many web frameworks as possible is a good thing. And just as it'd be the edge of insanity to try to write your own database to base Postgres.py/Records' API on, I think it's the edge of insanity to try to write and maintain our own web framework. |
Okay, the Liberapay launch rush is pretty much over, I can spend some time on this. @whit537 I think being "Gratipay's in-house thing" is one of Aspen's problems. I invite you to reread my previous comment, in which I suggested moving the project into its own org, and splitting it. Your answer was mostly about the package names I used, but the names are details, what's important is that splitting the code could make it cleaner and easier to hack and document. If you want Aspen to stay "Gratipay's thing" then I guess my only option will be to fork it, but that would be a duplication of effort, a waste of resources. :-/ @pjz The way I see it, it could be more work to move Liberapay to Flask or Django than to clean up and maintain Aspen. |
A better parallel here would be writing our own database driver—replacing psycopg2, in other words.
|
I'm all for helping provide a migration path, but I don't think it's in Aspen's best interest to try and be a standalone webframework. |
That's one thing I don't understand, what exactly is so difficult/problematic about keeping Aspen standalone? |
|
@pjz I think that if @Changaco is willing to put effort into maintaining Aspen as a standalone web framework, then we should take that into account (i.e., the burden doesn't fall on just you and me). I think he's right that shoring up Aspen could prove to be less work than porting Gratipay and Liberapay to Flask or Django. |
@pjz Sure, ... but did we also decide to keep Aspen as a standalone web framework as @Changaco suggests? Splitting out a new org is orthogonal to that, strictly speaking, and this ticket is about whether to be a standalone web framework. @pjz You okay to keep Aspen as a full web framework, given @Changaco's intention to contribute effort to that? |
I don't care about org, though I'll admit I'm getting tired of retargeting my repos: whit537, gittip, gratipay... it would be nice to have an 'aspen' org that would stay put. I'm okay with keeping a full web framework as long as it's spun out of the main repo; I don't think churn in the web framework should cause churn in the aspen repo. |
Blah blah blah, cry me a river ... you weren't even around for the jump from Subversion to Git. ;-)
Cool. Sounds like that's the direction @Changaco is planning on taking it. And in that case, I guess we go ahead and land #527, and then if we want to salvage the |
I don't see the problem here, if you don't like/want to design APIs then leave it to someone else, use Flask's or Django's API, or even as much of both as possible to the extent that they don't conflict, so that it's easier for people to adopt Aspen.
Liberapay is using HTTP2 right now, it's not something that requires changes to Aspen. I'm not familiar enough with websockets.
It's too late, we've already implemented all that in Gratipay/Liberapay (though I'm not sure what "compression" you're talking about). Plus, my proposal above was to go both ways: allow Aspen to integrate into other frameworks, but also keep a standalone version. |
EXACTLY. That's what we're trying to do. Do you realize how much of the standalone server depends on the request object? |
I think we're on the same page, my proposal was to have several separate repos in the new org, that's what you're saying too, right? |
The discussion is continuing in AspenWeb/salon#2. |
If you can't beat 'em, join 'em. This ticket started (per the original description below) by thinking that we'd kill the Aspen project/brand and reemerge as Simplates, a plugin for Django and Flask. We took a step back from the brink when we realized that Aspen is dispatch plus simplates, and it's worth keeping Aspen for the amalgamation. The basic idea is the same, though: Aspen is becoming a "parasitic web framework," a plugin for Django and Flask.
Okay! Wow! Over on the November 2015 call, @pjz and I began talking about the Python 3 port (#524), which led back to the discussion about switching to Werkzeug (see #222 and mention on #357), and then expanded even further: What is the essence of Aspen? Answer: dispatch and simplates. What if we cut out everything non-essential? What if we killed Aspen as a brand and instead folded the dispatcher into Simplates, offering shims for Django and Flask?
Django and Flask are the Python web frameworks of record, with Pyramid/Pylons leading the also-rans:
† combined
The proposal on this ticket is to throw in the towel. Give up. Call it a day. Admit defeat. Stop writing a web framework.
Instead, we would take the most interesting parts of what we've built—simplates and the filesystem dispatcher—and repackage them under the Simplates brand. Simplates and dispatch are interesting and unique. We've already got a shim for Django. We should be able to adapt that for Flask without too much trouble, so the
simplates
library would look something like this:This would allow us to invest our time and effort where we're really adding value, and collaborate with others where we're currently reinventing the wheel.
The text was updated successfully, but these errors were encountered: