views:

231

answers:

2

I am having to look into some code and consider working in a Python framework called Glashammer.

I know and love Django. I have some experience with Appengine native framework and Django on Appengine.

I'd like to know from you that have used one or more of those, how Glahammer compares and contrasts with others. What are there any Pros and Cons and what else do I need to be aware of.

+3  A: 

After a bit of googling (and finding your question:) and half an hour of reading docs and code I can say that

Glashammmer is great because it:

  • is well-documented;
  • is lightweight and very flexible;
  • provides almost everything to rapidly build a complex web app -- unlike Werkzeug itself;
  • does not suffer from NIH syndrome which is arguably the Django's greatest wart;
  • does not impose database-related libraries and thus supports whatever storage one could use from Python. Django only supports a number of relational databases and assumes you are happy with them. Of course you can drop Django ORM but this renders admin -- the Django's strongest point -- useless;
  • appliances are the best way to define views I've seen so far.

Galashammer is not so great because it:

  • has shorter development history and much smaller community than Django's, which leads to:
    • inevitably lower quality of core code, and
    • inevitably lower quantity of contributed code;
  • makes use of some components that may be unstable (e.g. flatland which is in alpha stage, though it's an arbitrary label and may be irrelevant to quality; moreover, it's only used in glashammer.utils.yconfig);
  • does not provide an API to define models (e.g. some declarative wrapper with backends), so the "pluginability" of applications can be significantly weaker that in Django (applications will make too many assumptions about the environment).

Anyway, I think this framework is worth diving into.

Andy Mikhaylenko
Thanks for the good summary. One point, about model-definition API in Glashammer: If you are using an RDBMS, you should probably use SQLAlchemy's declarative extension, it's nearly as easy as Django, but you get the SQLALchemy loveliness.
Ali A
I'd prefer a lightweight backend-agnostic modeling framework with backend-specific field/query extensions. This would improve the "pluginability". I'm developing such thing (http://pypi.python.org/pypi/pymodels) for schemaless databases but with no plans on integration with SQLAlchemy. A more universal approach can be seen in the Svarga framework which I consider more or less equal to Glashammer. (Though I've chosen Glashammer for my next app because it's better documented and allows to begin with smallest working piece of code instead of learning the whole framework before you start.)
Andy Mikhaylenko
...by the way, a PyModels bundle for Glashammer can be found in http://bitbucket.org/neithere/glasnaegel/ :)I'm not sure I'm doing everything right but at least it works. I've also added some shortcuts that I'd like to see in Glashammer if you find them worth adding.
Andy Mikhaylenko
+1  A: 

I am highly biased, because I am the Glashammer author. But the pros for me are:

  • Werkzeug-based framework removes much of the boilerplate in creating Werkzeug based applications
  • Easy pluggability and high flexibility: 2 levels of plugins, Appliances which are reusable components and Bundles which are behavioural modifiers.
  • Well unit tested
  • Documentation is not bad (for an open source project)

Versus something like Django, I would just have to say "Werkzeug-based, with a nicer plugin framework."

Did I mention the code is beautiful like a glowing orb of ... (oh maybe this is subjective)

Ali A
Personally I think http://stackoverflow.com/questions/2283616/opinion-about-glashammer-app-engine-web-framework/2296467#2296467 is a much more well-rounded answer.
Ali A