I think for new comers to Python, it IS presented as the only choice
as many people would have difficulty "monkey-patching" another
template engine, as there have been issues in getting, to my knowledge
at least, Mako and Genshi to fully work on appengine. It seems like
this new cookbook area would be a good spot to for developers of those
other templates to put their integration recipes:
http://appengine-cookbook.appspot.com/
>
> And further, personally I think that if you find Django templates too
> limiting, you probably don't fully understand it.
It is still very controversial in the Python community to not include
the ability to run Python in the template. I think it is very
appropriate for newcomers to question how and why something works the
way it does. It is far from a foregone conclusion that Django
templates are the superior way to accomplish templating in Python.
I have personally observed two PHP developers turned off from wanting
to use Python ever again, because they were forced to use Django
templates in a project.
Of course we Python programmers could say, wow your "stupid" because
you don't do it my way, it is the best. On the other hand maybe they
have a point. Sometimes, in my opinion too, some Python in the
template is the easiest way to solve a problem.
They were a bit offended that this design decision was not delegated
to them, instead of forced upon them. I think it is ok, to question
this decision if you are from another language.
Here are links to blog entries by Shannon Behrens, a guy who wrote a
Python web framework in 2001, in which he also questions the wisdom of
Django templates:
http://jjinux.blogspot.com/search?q=django+template
I don't consider him to not understand Django templates, yet he also
doesn't use them. This is really a personal decision though, as many
people are happy with Django templates. To each their own. One thing
I do disagree though is that if you don't like some portion of Django
like templates, or the URL dispatch, you don't know how it works. I
think many people know how Django works, but only like certain parts
of it. I happen to really like the admin interface and the URL
dispatching, and not the template or ORM.
In addition, I have personally done some very large Django projects,
and have some issues with doing things with the Django templates. I
don't particularly care for them, and would prefer Genshi or Mako,
although they aren't horrible either.
One gripe I have with Google is that they need to correct their
documentation here:
http://code.google.com/appengine/docs/gettingstarted/usingwebapp.html
It states that app engine supports: Django, CherryPy, Pylons, and
web.py This is actually incorrect, as many of the components, like
templates, in Pylons are not fully tested and working. Hopefully this
gets addressed soon.
--
Noah Gift
http://noahgift.com
Note that that was written in 2006. Since then the frameworks and
template engines have remained pretty much in their same relative
positions. An exception is Mako, which I think was first released
around that time and has now become one of the frontrunners for
non-XML-style templates. Jinja also appeared, which I think has a
Django template-like syntax.
In order for Django and TurboGears to merge, one of them would have to
give up its founding philosophy.
--
Mike Orr <slugg...@gmail.com>
Additionally, the appengine is a whole new ballgame, so perhaps some
ambitious person, young or old, will read this tutorial:
http://pythonpaste.org/webob/do-it-yourself.html
And write their own appengine specific web framework that becomes the
defacto standard for appengine. Who knows, maybe writing
webframeworks will become like the Olympics, and every four years a
new champion has a chance to win the Gold medal. Of course it would
be nice if whoever did this did so in a way in which existing
libraries and work from other frameworks could be reused and or
integrated....
>
> --
> Mike Orr <slugg...@gmail.com>
I was at Google I/O and attended that talk. Yes, I think that is a
great goal for the Google App Engine team, but it is currently not a
reality. I hope this can be addressed soon, as personally I feel it
is one of the biggest issues facing the project. There are many
incredible tools from other frameworks and applications like say,
MoinMoin, that could benefit from a more complete version of Python.
At the very least the documentation should be updated to state that it
is the goal to support other frameworks than webapp.
>
> On Aug 30, 4:40 pm, Davide Rognoni <davide.rogn...@gmail.com> wrote:
>> fromhttp://www.cmlenz.net/archives/2007/06/logic-in-templates
>>
>> """How could a custom, sparingly documented, somewhat inconsistent,
>> and mostly unproven (compared to Python) mini expression language be
>> any better for template authors?"""
>
> I wasn't using Django over a year ago when that was published (just
> think: that was when oldforms was still in, eeek), but I will say one
> thing: out of all of the frameworks and libraries I have used, Django
> is THE best documented web framework I have ever come across. Also,
> that quote is comparing how proven an entire language is to a mere
> collection of template tags and constructs...
Let me preface that I use Django for many projects and I like it for
certain things. Please don't take offense anyone at my view about
flaws in Django:
This is an excellent argument actually. Why reinvent Python and keep
making special cases like threaded comments each time a new flaw in
the template design is found? This actually violates the "Zen of
Python", http://www.python.org/dev/peps/pep-0020/. Of course we can
take this discussion offline.
This is a very valid point against Django templates. Reinventing constructs
>
>> """In my humble opinion, this kind of "dumbed-down" templating results
>> in only one thing: more lines of code in the application modules,
>> lines of code that are really only about presentation, and should be
>> in the templates. And frustration every single time you need to add
>> those lines."""
>
> So Django templates aren't for everyone. Django was designed to be
> loosely coupled so you can stick in your own preferences where
> desired.
This phrase, "Django was designed to be loosely coupled", is another
complaint I have against Django, and something I frequently hear.
What does this mean? In my opinion Pylons is loosely coupled:
http://pylonsbook.com/. Django does not do things that I feel are
loosely coupled, like documenting in a published book or official
documentation how to use third party components such as SQLAlchemy,
Jinja, or setuptools. Almost every alternate popular framework
supports directly, with copious official documentation, setuptools:
http://peak.telecommunity.com/DevCenter/setuptools, and SQLAlchemy:
http://www.sqlalchemy.org/. Here are a list of alternate frameworks
in Python that people might reference:
Zope 3: http://www.zope.org/Products/Zope3
Grok: http://grok.zope.org/
Pylons: http://pylonshq.com/
Turbogears2: http://turbogears.org/2.0/
Werkzeug: http://werkzeug.pocoo.org/documentation/tutorial/
All of these support in their documentation setuptools and SQLAlchemy
and are in my opinion loosely coupled. Loosely coupled means
different things to different people and it is marketing terminology
that Django should probably drop, as it is false.
>
> On Aug 30, 4:05 pm, "Noah Gift" <noah.g...@gmail.com> wrote:
>> I think for new comers to Python, it IS presented as the only choice
>> as many people would have difficulty "monkey-patching" another
>> template engine, as there have been issues in getting, to my knowledge
>> at least, Mako and Genshi to fully work on appengine. It seems like
>> this new cookbook area would be a good spot to for developers of those
>> other templates to put their integration recipes:
>
> If I wanted to work with PHP and didn't like the fact that it allowed
> my designers to access PHP, I could certainly choose to use a template
> language. But of course, it is going to involve overcoming a barrier
> to implementation. Django templates works great for most people. For
> those who it doesn't work for, they should be prepared to have to do
> some extra work. Besides, for beginner's needs, what exactly is it
> that Django templates doesn't work for?
Again please reference this URL for many examples:
http://jjinux.blogspot.com/search?q=django+templates
My own example is nested hierarchical relationships from the model.
>
> Django templates is incredibly newbie-friendly. As mentioned, the
> documentation is (IMO) second-to-none, and there are other great
> resources, like the free talks available online covering Django, and
> djangobook, which is mostly up-to-date.
>
> But still, I don't think this conversation is the appropriate place
> for this discussion.
I just wanted to make sure, that your statement "You don't understand
how Django templates work" was properly addressed and Google
searchable, as it was not a valid argument against why Django
templates don't support Python logic. I would protest against this
common meme I hear about Django templates that if you don't like them
then you don't understand how they work. In many cases they have
severe design flaws, which are impossible to address without adding
Python back into the template, or adding one off hacks and weird
special cases which the official django template documentation if full
of. Again, this is my opinion. Feel free to contact me offline for a
more detailed answer anyone.
Unfortunately, for Google, they chose a default Template, Django, that
is fairly controversial to many people, and then they incorrectly
documented that other web frameworks, such as Pylons work, yet didn't
test this statement. Unfortunately, as a result, this has the
potential to become a flash point of criticism. Forget getting other
language support, how about just getting most of Python to work!
If I was a member of the marketing staff, I would have pursued a
strategy that ensured that defaults for appengine didn't lock you into
an ultra orthodox view of web development like Django Templates take.
By ultra orthodox I mean handcuffing the templates so you cannot
insert Python code in them. Instead I would at the least have
included two templates, or actually done my homework and tested that
another web framework really worked before claiming it did. This is
unfortunate, as now there is already some dissent among established
Python programmers:
http://spyced.blogspot.com/2008/08/app-engine-conclusions.html
I am optimistic Google will eventually address this and work to
support the incorrect language they currently have in their
documentation:
http://code.google.com/appengine/docs/gettingstarted/usingwebapp.html
>
> And for the record, Smarty has been around several years longer than
> Django.
>
>
> On Sep 1, 3:23 am, LH <shockflashm...@googlemail.com> wrote:
>> I'm a little bit confused about the discussion php vs django template
>> at all.
>>
>> The most of the posters here should take a look at the no. 1 php
>> template engine: Smartyhttp://www.smarty.net/
>>
>> Take the documentation of the template syntax, you will see that
>> Smarty and Django Template are very similar, so similar that I wrote
>> my first (not so simple) django template without even look at the docs
>> of django.
>>
>> I'm not sure which system comes first [but I heared that it was smarty
>> one time], django templates or smarty, but who ever was second knows
>> the other one while planning its own solution.
>> So a lot of php and python developers have a nearly identical handling
>> of templates in there projects.
>>
>> On Aug 31, 12:36 am, Michael Schreifels <tech...@gmail.com> wrote:
>>
>> > If I wanted to work with PHP and didn't like the fact that it allowed
>> > my designers to access PHP, I could certainly choose to use a template
>> > language. But of course, it is going to involve overcoming a barrier
>> > to implementation. Django templates works great for most people. For
>> > those who it doesn't work for, they should be prepared to have to do
>> > some extra work. Besides, for beginner's needs, what exactly is it
>> > that Django templates doesn't work for?
> >
>
--
Noah Gift
http://noahgift.com
Hmm, the docs look interesting. I would give it a try if you ported
it to Python. It looks pretty cool, plus it is used as the default by
Merb, which seems to be stealing a bit of the Rails thunder I hear.
I am starting to have doubts about continuing to develop my
applications for GAE. My concerns are not technical although I have a
some anxieties about transaction data propagation performance.
My concerns center around Google's commitment to the App Engine
project. Compared to Amazon's Web Service forums this place feels like
a technical backwater. Developers hosting on Amazon AWS post
interesting questions and get deep-dive replies promptly from Amazon
staff. Amazon is releasing new Cloud development services monthly yet
all we get is minor patches.
Here on the GAE forum elementary questions about how GAE ticks go
unanswered for months. Basic roadmap type info such as will we get SSL
or scheduled tasks is missing.
I just feel that the GAE Team is not building up any development
stream in what should be the last 4 month run up to the year-end
release. Communication with the developer community here is abysmal
compared to the investment in developer relations made by companies
such as Microsoft, Redhat or Amazon.
What's happened to the early buzz Google? Has the top bass pinched
half the team to firefight problems on another project?
Doubts about Django Template
http://groups.google.com/group/google-appengine/browse_thread/thread/3503204aed78e934#