On 9/3/07, skyogre <[EMAIL PROTECTED]> wrote:
>
>
>
> On 4 сент, 01:57, Florent Aide <[EMAIL PROTECTED]> wrote:
> > skyogre a  crit :> Hi.
> >
> > > I liked the turbogears style of templates usage. Decorators are used
> > > to specify the template and function flash() or exceptions are used to
> > > display the result of the operation.
> >
> > > Is there a way to get the similar usage in pylons-based code?
> >
> > TurboGears 2 is based on Pylons, so you would get the best of both
> > worlds if you are not afraid of bleeding-edge :)
>
> Frankly speaking I'm afraid a little. It seems to me that turbogears
> guys are going to break everything in the next milestone and make a
> completely new framework. Though they will try to leave the same API
> as in 1.0 it will relatevely be broken and the code style will change.
> So it will be hard to improve and support my project if further
> framework developement will go on in the same manner.

TurboGears is switching paradigms from CherryPy to Pylons; that
necessitates a lot of changes.  It also provides the opportunity to
make other design changes that will make TG more robust and flexible
over the long term, which will hopefully lessen the need for further
non-compatible changes later.  TG 1 was built on an idea so they
weren't quite sure where it would go.  TG 2 is built on the practical
experience of TG 1 plus the experience of  the
WSGI/Paste/Pylons/Django projects, which didn't exist or were still in
their infancy when TG 1 was formed.

A second paradigm shift -- TG 3 -- is unlikely because Pylons/Paste
are intentionally modular, so if you don't like some aspect it's
relatively easy to bypass it in favor of something else, and if a new
innovation comes along it should be relatively easy to include it in
Pylons/Paste and thus be inherited by TG rather than requiring another
paradigm shift.  Given that TG 2 was being planned even before TG 1
was released, and TG 1 will likely have a 2-3 year total lifetime
before TG 2 is released (and will continue to be supported after
that), we can guess that TG 2 will have *at least* a 3-4 year lifetime
before any TG 3 is released that requires significant changes in
user's applications.

Python itself is going through a similar evolution.  Python 3.0a1 was
released last week, and 3.0 final is expected next year.  As with
TurboGears, they're attempting to pack all foreseeable changes into
that release so that users will only have to update their applications
once rather than several times.

Pylons is in a different situation because 1.0 isn't released yet.
Greater differences are tolerated between Pylons 0.9.x releases in
order to make for a more robust and stable 1.0 for the longer term.
These changes will of course affect TG 2, although they won't
necessarily affect TG 2 *applications*.  In any case, I doubt TG 2
will be finalized before Pylons 1 is, which is probably sometime next
year.

There are two other interesting aspects of TG 2.

1) TG 2 is implemented as a Pylons controller base class.  This means
you can use that base class in Pylons applications to access TG's
@expose and other decorators and dispatching mechanism.  Indeed, the
hardest part of a hybrid application will be deciding whether it's a
"Pylons application" or a "TurboGears application"; i.e., which icon
to put at the bottom of the webpage.

2) TG is spinning off several components which were bundled in TG 1.
These will be Pylons-compatible and/or WSGI-compatible, making them
accessible both to Pylons applications as well as TG applications.

The whole thing really points to a framework (r)evolution.  People
were tired of non-interoperable web frameworks so they invented WSGI,
Paste, and Pylons.  Now TG is built on top of Pylons.  I think I heard
that Django is interested in Paste's proposed Request/Response objects
(WebOb).  All this points to greater interoperability, which means
that any innovation in any of these frameworks can be more easily
ported to the others.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to