I just recently got saw a presentation of django-users on the Python Users
Berlin group. And while I was seriously impressed by the speed the guys
developed great looking apps with buttloads of functionality, I didn't see
much that really wouldn't be possible with TG - if it's not already there.
Some examples:
- TG and TW widgeting is IMHO a *much* better approach on organizing python,
JS, HTML & JS than django offers. Nothing in e.g. (new)forms is as powerful
as tw.forms (or the old tg-form-widgets), and while you *can* structurize
your templates to make them more re-usable, *nobody* forces you - or even
gives you examples on to how to do that properly. But creating a widget is a
straightforward thing.
- the ORM is very explicit and simple compared to SA (and even SO)
- it's nice to have a way to map arbitrary urls to your controllers - but
it's not so nice that you *have* to do it. And TG2 comes with routes - which
we happily mix with the standard approach of creating urls through
hierachical controllers
- the validation wasn't much more than what the above url-scheme offered.
Then you can of course validate forms, but that's explicit code in your
controllers. Nothing compared to the power & flexibility of FormEncode and
@validate IMHO.
> I've gotten used to their templating system, too... I like the idea of XML
> templates better, but I'm getting used to their philosophy, and it is dead
> easy to extend their template language to do really sophisticated things.
> The templatetag system gives you a good way to violate MVC when it needs to
> be violated... no need to push data into the view for "side content" not
> directly related to the main content. Helps keep things cleanly separate.
> Could probably do something like that in Genshi, though?...
Sure! It is already done, you can pull in anything you like in e.g.
master.html, by using <?python ...?> processing instructions for example. And
there are callback-lists defined (in TG1, the variable_providers) that you
could register a callback to enrich the template variable space.
IMHO, the biggest advantage of TG is one of it's weakest points at the same
time: the component-and-best-of-breed-structure. It's great for many reasons
e.g. Mark has elaborated on - but it's a weakness when it comes to
documentation & maybe sometimes consistency. If I want to know how something
works, I have to dig into *several* docs & codebases. Or we start writing a
full coverage, but then how's that integrating with the original docs, and to
keep in sync?
Tackling this is for me the biggest challenge.
Diz
I agree with Diez that technically tg is not inferior to django in any
respect, apps can be "mounted" easily via the WSGI mechanism. But I'm
also wondering sometimes why is it that django is much more popular.
Being technically good doesn't always guarantee success (I'm sure we
all agree on this) and I'm wondering if maybe it's the marketing of tg
or something else that is somewhat behind django these days.
I personally don't care about popularity, I'm using tg because I like
it, but for the general well being of a project it doesn't hurt to be
popular :)
Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
I think that a very big factor in the popularity of Django is that Guido
van Rossum mentioned once in a blog post that he likes Django and is
using it for his own foray into web development (an area of software
development he hadn't explored that much apparently until then). AFAIK
he is still using Django for his development at Google.
This came at a time when the race for which would be the most popular
Python web framework was still undecided and many people from the
outside got the impression that Guido blessed Django as the "official"
Python web framework and I still meet people who believe it to be that way.
At the same time, the Django people had a very impressive marketing
output (screen casts etc.) and a good looking web site (regularly
updated & improved). They also managed to keep their marketing effort at
a high level and keep Django "in the news" by regular information about
new developments etc.
This attracted many new users and contributors and therefor created a
positive feedback loop: more contributors --> more things get done and
marketing effort --> more visibility --> more user & contributors etc.
I'm not claiming that Django's popularity is solely based on marketing,
but I think that if TurboGears had managed to put in the same marketing
effort it would be much more popular and widely used today than is the case.
TurboGears suffered from two changes of leadership within one year, a
long time where it wasn't clear which direction it would be taking -
probably because we didn't know it ourselves for some time - and when we
did, we didn't take enough care to make our plans widely known. When the
project was back on track strategy-wise, it had already lost many of
it's earlier contributors and users and progress has been rather slow
since then due to lack of "personnel".
If we are being honest, TurboGears today, while being once a contender
for the most popular Python web framework, now is often not even
mentioned when people talk about Python web frameworks. I think, it will
take a long time to recover from this situation, if it is possible at
all. Of course popularity is not everything, but it is very important to
keep an open source project alive - see below.
> I personally don't care about popularity, I'm using tg because I like
> it, but for the general well being of a project it doesn't hurt to be
> popular :)
As already mentioned above, I think popularity is very important. The
nature of open source projects is very fragile since core developers may
drop out at any time for different reasons so there needs to be a steady
influx of new contributors to give them time to get involved and advance
to a level where they have a good understanding of the overall project
structure, the code and the customs of the community.
It took me about one and a half years, I think, to obtain a knowledge of
the TG 1.x code base where I could say with confidence that I mostly
understand what's going on in the different parts. This may have been
aggravated by the complexity of the TG 1.x code which IMHO grew too fast
and too unstructured, while at the same time being severely
under-documented (and I don't mean user documentation). I have kept away
from much involvement with TG 2 until now, because, to be honest, I'm
shying away from the effort of digging into another code base of similar
complexity.
Putting in such an effort is only reasonable if there is an "outer"
motivation for this. I contribute to TG because sometimes it's fun and
because I use it for my business, but if you want to maintain a project
that's useful for many people, it is not enough to care for your own
needs only, but you also need to attend to the problems of other users
(be they big or small) and keep an eye on the path the project and the
code takes. This is where the popularity comes in. More popularity means
more positive user feedback and hopefully more people willing to help
out because they want to be part of the popular project. And for me,
this is a very big part of the motivation for my work on TG. If I sense
that nobody cares about what I do, I will feel frustrated and loose
interest very quickly.
For TurboGears it has been difficult in the past months (or even years)
to find contributors who are willing and able to contribute something
other than tickets and patches. IMHO the TG core team members (and I
count myself among them) have failed to recognize the importance of the
other areas of project development besides coding and the danger of
neglecting them or, if they did, failed to do something about it. This
is not surprising since most of us are developers by trade and so are
susceptible to a wrong perspective, but it is still lamentable.
This post turned out longer than I intended and I ended up venting some
of my frustrations and thus probably sounding more negative than I
really feel about this, but some of these things had been on my mind for
some time and wanted out... ;)
Chris
Excellent summary, Chris. I also remember Guido's remark and at that
time I was about to choose between frameworks and naturally I was
biased towards django as a direct result of his comments. But after
digging into both I decided to go with tg and I didn't regret that
decision.
Django started earlier than TurboGears and had more mailing list
members than we did for most all of the lifespan of the two projects.
But it's probably worth reminding folks that Zope probably has been
and continues to be more widely deployed than either TG or Django.
Django is currently seeing popularity in the python web framework
space that's unparalleled in the history of Python, with the possible
exception of the early days of zope. And django is a great toolkit
that brings lots of people to python, so I think we should all be
happy about that.
I also think that the number of people using TurboGears continues to
go up, not down. The thing is just that django users are going up at
a much faster rate than TG. I think some of this comes down to the
Django team having better docs, better marketing, and a more solid
record of steady momentum.
But, with all that said I think TurboGears is at the begining of a new
era. We've got a couple of major releases coming out in the next few
weeks, and TG2 has brought together a set of libraries that makes TG2
technically superior to Django in a number of ways, and we have an
oportunity to bring a whole new set of people into the python
web-framework fold.
Someone just told me that they spent two days creating an ext.js+tg2
app with database transactions across four different DB's and some
other fancy features. I also recently got to see a demo of a very
spiffy TG2 app that went live a couple of weeks ago:
And my company Compound Thinking is about to release it's first TG2
app into production in the next couple of weeks. There's a lot to be
excited about, but if we're going to succeed we need to push forward
that last few inches, get a stable release finalized, continue to
improve the docs, and start being much more active about telling
people the cool stuff that we've done.
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog
I agree with the above. IMHO I would also add ( though none of us like
to admin it ) that Django has also had a better record of being pretty
fanatical with regard to new user experience. This includes docs, but
also includes things like not releasing new features until they are
documented and make sure they don't break.
I think the big thing in a nutshell is that the Django team put
*attracting users* at the very top of the list. That is a major major
philosophical difference with pretty far reaching consequences. IMHO TG
lets features trump new user experience instead, which is great for
getting good code, but bad for marketing. ( not that I know the right
balance or anything )
>
> But, with all that said I think TurboGears is at the begining of a new
> era. We've got a couple of major releases coming out in the next few
> weeks, and TG2 has brought together a set of libraries that makes TG2
> technically superior to Django in a number of ways, and we have an
> oportunity to bring a whole new set of people into the python
> web-framework fold.
The key to this taking off will be docs and consistency. Perhaps
something that tests tutorials to make sure that they are never out of
sync with the installable package? Do we already have something like
that? ( I know lots of great google summer of code stuff happened ).
my two cents
Iain
Thanks a lot for this remark. This is the kind of feed-back that gives
a warm feeling when we read it.
Florent.
Yes, that's surely one of the crucial points. Actually, it was also TG's
paradigm to choose the best of breed for you already. The devastating
things was when the choice of SQLObject and Kid and later even CherryPy
was replaced by something different, and things started to fray out.
That's not to say that the new choice wasn't better, but I think this
was and is still the biggest hurdle for newbies because it creates a lot
of incertitude and forces them to make decisions at an early point.
-- Christoph
IMHO, that has never been the design goal of TurboGears. We want to
provide a full-stack best-of-breed system. It's just that we got
mixed up a bit on what gets included in that full stack and that left
a few too many choices in front of the new user (kid vs genshi, SA vs
SO)
Pylons wants to be maximally flexible. TG wants to be maximally
useful out of the box, and reasonably flexible. ;)
--Mark
Agreed. I consider myself an experienced programmer in general and
experienced in python in particular, nevertheless I'd prefer the
developers make choices for me concerning tg. It doesn't limit me in
any way since the developers are much more experienced in the field of
"web development" so surely they will make a better choice than me.
Most importantly if the choice is already made for me I don't waste
time researching the subject.
That is why sane defaults that are BANG, IN YOUR FACE are very
important so that guys like me don't even see the various
possibilities and so tg looks like django in this respect. Guys who do
want the freedom still can make the choices if they wish, so for them
tg is better than django.
All in all the ONE AND ONLY ONE WAY TO DO IT aspect should be in the
forefront, docs, tutorials, website, etc, experienced guys will find
the endless possibilities and choices anyway since, welll, they are
experienced :)
I'm not a 'webdev' guru , I don't really know about WSGI or Routes or
whatever and I had to struggle for every single new thing I wanted to do.
When I left a few months ago, TG people were working on the 1.06 rev,
the 1.1, (the 1.5 rev??) end the 2.0!! Stop writng code : write
documentation (this is something I wanted to write for quite a while now)
Django is far from perfect, but compared to TG it is usable and this is
with no doubt why Django is more popular
I still keep an eye on TG but I can't use it at the moment : it's for
the elit.
Cheers
Philippe
That is true IMHO. I used Django for several commercial projects, and
the TG tool choice is a lot better for our 1 to 2 person teams.
That said, the converse *could* also be true. A lot of the strength of
the SQLAlchemy/ToscaWidget/Genshi combination comes from the ease of
integrating and sending data between those layers, and I guess it
wouldn't be nearly as attractive to teams where the coder in question
did not understand each layer. But if you are using each layer yourself,
the combination is fantastic. If you have non coding designers doing
templates, it's possible that Genshi would not be attractive and
ToscaWidgets might be more pain than it's worth.
Iain
I realise its less than trivial, but where you rely on components docs,
perhaps you could try to syndicate their docs content on turbogears.org
- it makes people less scared of the "jump" across to a new package, but
it still allows the docs to be updated by those who know & develop the
components.
There is inevitably the question of HOW the components are integrated
into TG. I mean, you're not just handing us a bundle of components and
saying "here, these might be useful". They are (thankfully) structured
into a framework, but often I'm not quite sure whether my problem is
with TG or a component. If I want to change a behaviour, can I go
straight to the component, or do I have to ask TG to change it for me?
Again, I realise this is not an easy thing to document, but its where I
have the most trouble.
But I am still with TG! For me, the use of SQLAlchemy was enough to make
up my mind, and over time I'm sure there'll be other instances where I'm
glad I'm using a package devoted to a purpose, rather than somebody's
"good enough" imitation.
My 2 cents.
the thread has reached a certain age, and many issues have been discussed and
adressed.
But just the last couple of days I encountered one that IMHO isn't addressed
so far - and even if I don't know if there is any cure for it, I'd like to
share my frustrations.
I'm a itch-scratching-developer. I don't take problems as given, I dive into
code, and figure out what works how, why & why not.
Eventually, this sometimes makes me a commiter - TG1.x is an example for that,
and even a few bits of code inside TG2 are from me. Also for SQLObject.
However, especially with TG2, I now have to face a situation that is simply
unnerving, even if one likes to take action - I have to follow, report to and
deal with half a dozen software packages and their respective mailinglists,
issue trackers, potentially coding conventions or other community-environment
influenced aspects. And these might fail me, or at least I can't interact
with each of them the same way.
Take the trac of paster, just for an example. It's only partially working, but
you can get a ticket list >200 entries, with sereval of these several years
old. The offered version list maximum for reporting is something around 1.4.2
or so - we are at 1.7.2.
Maybe the trac isn't used. Maybe I need to go to IRC - which is a bummer, as
I'm not allowed by my sysad to use IRC. The ML has roughly a mailing per day.
I can't just put a ticket into TG2 trac, and hope it will percolate to the
proper places. Or can I? Because evetually, it *is* TG2 who get's the blame -
for e.g. paster not coping with (admittedly & sadly) malformed HTTP-headers.
This IMHO a barrier to attract new developers, either core or only the
occasional bug-fixer. Unless I *fully* dive in & become a active member of
*all* these projects, I doubt there is a good chance to get things through.
I don't know if and how django deals with this - they are monolitic from the
outside, but surely the must have responsibilities shared amongst several
persons, and most probably not everybody is allowed or encouraged to change
code wherever he likes. But I presume it's easier for them.
As I said, I'm not sure how to cope with this - but I think it's worth
pondering about.
Diez
As a solution I suggest having at least *one* TG developer volunteer who
will watch closely and participate in the development of every project
that TG depends on, and make this role as a "go-between" somewhat
official and known to the other developers.
For instance, many TG users complained about MochiKit not getting a new
release out, but in fact nobody seemed to contact the MochiKit team and
at least request a release. Only after I did that and helped out with
some issues that were considered as blockers, the new release got a move
on. And there are other projects we depend on that need some input,
stimulation and help from us TG developers.
-- Christoph
Hmm, I don't know if this will work out. The latest tg2 install from SVN
has more than 45 direct and indirect dependencies! Do we really want to
create components for all of them? If not, on what do we base the
decision to include one dependency in the list of components or not?
Also, we had components in track for Kid, SQLObject, CherryPy and other
in trac in the past, but for TG1 I moved all open tickets away from
these components, because nobody ever looked after them.
So IMHO, this would only work, if we have a maintainer for *every*
third-party component who actively looks after tickets in these
components and makes sure they are reported to & synced with upstream.
This seems like a lot of work to me and I wonder if there maybe is a
better way?
Chris
The Linux distro-style (where each package has maintainer(s)) using
Launchpad.net (which is good to synchronize with upstream projects plus a
million more things).
TurboGears is analogue to Linux distros in that they're simply a collection of
packages that play well with each other and their development model has proven
to be successful over many years -- so why try to invent another model for the
same situation?
But of course, we would have to take this model seriously, learning from
mature distros (e.g., having an official contact/maintainer(s) for a package,
change a maintainer if he becomes inactive for much time). We'll also need
more contributors, as I think we're not enough for this.
I've been practicing this within TG2 and I think it can work. I only maintain
auth-related stuff (documentation, questions on IRC and mailing lists, code in
the quickstart template and TG2 itself) and, in spite of my little spare time,
issues are usually resolved quickly... That's because I'm focused on
repoze.who and repoze.what *only*.
But again, this could only work if we have *more* contributors who commit
themselves to be the maintainers of certain packages within TG.
Cheers.
--
Gustavo Narea.
General Secretary.
GNU/Linux Matters <http://gnulinuxmatters.org/>.
Sorry about the noise.
Cheers.
I don't know Debian too much but I can tell you how Fedora does it:
There are maintainers for each package (at least one). It is strongly
encouraged that there are at least 2 co-maintainers for each package.
Furthermore 'maintaining' a package does not mean that only this person
may touch it. Most packages can be changed by the 'provenpackager' group
(all maintainers which (co-)maintain > 10 packages are part of the group).
Of course there should be a good reason to touch a package which is
owned by someone else but it is not that unusual. And I think having
people responsible for some selected packages could be a tool to
increase upstream collaboration/communication. This could be a good
'job' to get people into the developer community.
We should take care not to overload some persons.
fs
Yea perhaps Ubuntu went overboardin the other direction, but I totally
agree that having some focus helps. And I'd love to recruit some
people who can help focus our upstream development efforts.
But I think this whole subject deserves a new thread at some point so
that people who aren't interested in Django can hear about it and
volunteer to help out. :)
> But I think this whole subject deserves a new thread at some point so
> that people who aren't interested in Django can hear about it and
> volunteer to help out. :)
Sorry for the noise.
No you're right it's not a new thread, it just has a new subject line.
It still disappears into django land on evolution. ;-)
Iain
I really think this is a per-package thing, the original complain was
with Paste, mainly because it's trac was unresponsive. I remember
having this experience in the past with SQLObject, and I can tell you
it isn't pretty to keep sync of bugs. Specially when the maintainers
default response is I don't use TG please provide me a SQLObject only
test so I can take a look at it. Anyway I'm not bashing on SO, just a
history note.
My take on this is really different I totally disagree we shall become
a bug back for ALL external projects, that will be insane. A bug
report regarding an external component should fall into one of three
fields
1- a bug in TG itself that is causing the component to misbehave
2- a bug in the interaction between the component
3- a bug in the package itself.
Bugs of type 3 shouldn't be handle by the TG trac, we must take them
to the component, and if possible generate a patch and bug the
upstream maintainer to patch it, close it and release it. I do think
the ticket should stay open until the bug upstream is fixed, and we
shall make a comment with the upstream ticket, but fixes and process
should happen there not here.
Now keep in mind you do not know which type the bug is up front (or at
least the reporter doesn't) so I like the idea of tagging them
"upstream", I'm just not sure if it's a good idea to have a component
or a keyword for it.
As for the package/responsibility. I have to say that realistically we
do not have enough commiters for the one maintaner per package, but we
should have some people volunteer for the "biggest packages" and use
the proper component to assign the ticket to them. And even though you
are the primary responsible for said ticket anyone can take care of
fixing it.