Hi Terry!

I have used Twisted for some small web development (mainly for practice) 
and for some big application writing (I used it successfully to write a 
complete GPS data gathering application, that's been running for about 
10 months straight now, nonstop).

Well, the main difference I see between TG and Twisted, is the ease of 
use, and cut in development time. In fact, when you work with Twisted, 
you have to know a *LOT* (as compared with  *nothing* in TG) about the 
internals of Twisted to get started, and you need to add the bits and 
pieces by hand. The main "small differences" I see are:

1) TG uses the CherryPy server, which has been used and tested 
extensively by a lot of programmers, not just inside TG.
2) TG comes with ready to use AJAX support, something Twisted/Nevow 
doesn't have (in fact can be added quite easily).
3) TG is built around SQLObject, which makes it pretty easy to use 
SQLObject, but of course you can use any engine you want (but you won't 
have support from CatWalk, etc).
4) Twisted docs are much more extensive than TG's, but understanding the 
framework requires more than reading the docs (you'd have to read some 
code as well).
5) Twisted's community is somewhat active (just enter #twisted in 
irc.freenode.net) but the code is maintained by just 2 or 3 coders. The 
code base is more mature, but I see that it's somewhat biased and some 
of them are quite ... well, I wouldn't use the word 'zealots', but if 
you ask for support under Win32 they would tell you "ah... don't know, I 
*NEVER* use Win32, I'm l337".
6) Writing code that works in TG is much simpler, making the 
signal/noise ratio of your code much higher. If you want to load a 
template and fill it with some data you get from a DB in TG you are just 
required to write about 5 lines of code, while the same work in Nevow 
could take much more.

So, in a general way, use TG if you want to start coding right away and 
have some working site in less than a week. Use Twisted if you feel 
confident enough, feel eager enough to learn a lot of things, and want 
to write code for the ages.

About a review... well, Guido van Rossum sparked a little controversy 
when he said that he didn't like none of the current frameworks in his 
personal blog, but you could read the thread to find pointers and 
discussion about different frameworks (that was, in the end, what the 
post was all about). You can find the post and comments here:

http://www.artima.com/weblogs/viewpost.jsp?thread=146149

Last but not least, seemingly you want to have a web framework with "no 
frills", maybe you should give web.py a look. Personally I don't like it 
very much, and it doesn't have much documentation (or any documentation 
at all) at this time, but it was used to build http://reddit.com and 
seems to work pretty well under high loads.

Hope this helps you, and good luck.
David Guaraglia

Terry Jones wrote:
> I've been on the TG list for just a few days. It's great to see so much
> activity.
>
> I'm considering using a Python framework for a project. I had been planning
> to use various pieces of Twisted (including Web, Cred) and Nevow. But I'm
> interested to know more about TG.
>
> Specifically, why/when would one choose TG over Twisted?
>
> I'm sure TG is much simpler in multiple ways, and it seems to share some of
> the aims of Ruby on Rails, to make building web sites backed by databases
> reasonably simple. But when it comes to more advanced functionality, I
> don't see why/if TG is a win. Some of the things being thrashed out for TG
> (like the current thread on identity) seem to be settled in Twisted.
> Additionally, some aspects of TG (e.g., in Mochikit) are explicitly based
> on stuff in Twisted / Nevow.  That's ok, of course, they're good ideas and
> I think it's right to adopt them. But that doesn't give an answer as to why
> I might be better off with TG.
>
> In my case, the simplified access to relational DBs in TG isn't important
> (rather, I'd ask whether on the contrary it's easy _not_ to use this aspect
> of TG at all - I may instead use some combination of Berkeley DB and
> ZODB). Given that, what does TG buy me? Is there something that I could not
> get by just yanking the TG component of interest into my own project?
>
> Maybe TG is significantly more lightweight than Twisted?
>
> The development community in TG seems very active, and that's not an
> impression I get from Twisted (though I could be wrong). But if Twisted is
> already relatively mature and the docs are reasonable, the need for a
> community is reduced. For example, Nevow comes with a large collection of
> working examples that one can dig around in to figure out a lot about how
> things work.
>
> If people have comments on this issue, I'd love to hear them. I'm not
> trying to start a flame war, just to gather information before committing
> one way or another to a vital piece of a project that I'm trying to build
> in a robust and scalable way. I think TG is a great project, and that it's
> an important one. I'm simply trying to assess whether it's right for the
> kind of project I'm working on, and what it buys me over Twisted (and/or
> others - e.g., Django). So maybe I'm simply asking if anyone has put
> together an overview of Python web frameworks. I guess this question may
> have been asked before, that it will be asked again, and that it would be
> good to have a ready answer for.
>
> Thanks in advance for any help / insight.
>
> Regards,
> Terry
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to