Hi

I'm a little afraid by the announced changes, but I'm sure you'll make
TG 2.0 better than TG 1.x this way.
In the other side I was a little afraid to see pylon become a better
basis
for web development than TG, and I'm happy that future TG release will
be Pylon powered :-)

I used some RAD in the past and lot of frameworks and found always
the
limit of their own design. This is the first time I didn't find these
limit with
a framework. I'm speaking of TG of course.
For example I know today why the "tg.flash" is so powerfull and so
user unfriendly (no class of messages, colors and all theses stuff).
This is because these stuff should be provided by another TG
components.
Probably lot of them will appears in the future and any developper
will be
able to chose the one he need.

Please continue to provide stuff of this quality.

May I captivate your attention on two point no well handled yet by TG

1. Form Validation: provide the form validation facilities inside the
controller itself.
2. Keeping context/session information from all method of a
controller.


By (1) I mean be able to raise validators.Invalid from anywhere in the
controller,
and get the form displayed again.
Because some operation are atomic and cannot be split between the
validation
schema and the controller.
For example a lock mechanism, using a 'filename.lock' somewhere on the
file system.
You can test if the file already exist in the validation schema doing
a
> os.path.exist('filename.lock')
but this is only in the controller, when doing a
> os.open('filename.lock', os.O_CREAT|os.O_EXCL)
That you will know if the resource is available or not !
This is problem for record creation in SQL table.

FYI the command above raise an exception if the file already exist
>Traceback (most recent call last):
>  File "<stdin>", line 1, in ?
>OSError: [Errno 17] File exists: 'filename.lock'


About (2). We (Web developers) know how crazy it is to store session
info at the server side,
because the user can use the back button at any time and resend old
Form data
and expect them to be correctly updated. This mean some session info
must be stored
into the Forms themself.
Probably some of you already typed these lines :

<input type="hidden" name="tg_paginate_limit" value="$
{tg.paginate.limit}"/>
<input type="hidden" name="tg_paginate_no" value="$
{tg.paginate.current_page}"/>
<input type="hidden" name="tg_paginate_order" value="$
{tg.paginate.order}"/>

To keep pagination info from page to page :-)

TG should help people to do the job transparently by adding all these
context
data in all Form automatically.

Here is how I did it myself , briefly!
I have added a "context_params" attribute into the controller object
containing
the name of all the variables I want to keep from page to page inside
the controller.

class Mailbox(controllers.Controller, identity.SecureResource):

    require=identity.in_any_group("manager", "domain-admin")
    context_params=[ 'email_addr', 'addr_filter', 'tg_paginate_limit',
'tg_paginate_no', 'tg_paginate_order' ]

Before my controller return a dictionary, I  check if any of these
field are set.
If not I take the original value from cherrypy.request.params.
I rewrote my own widget.Form class to verify that all these fields are
set in the form and if not
I add them in hidden fields.

Regards

On Jun 27, 2:30 pm, "Mark Ramm" <[EMAIL PROTECTED]> wrote:
> Recently there have been a number of requests for more clarity about
> the future of TurboGears, and since I've been involved heavily with a
> couple of experimental projects designed to help us explore our
> options, I'd like to help clarify things as best I can.
>
> A bit over a week ago several of us decided to get together in Atlanta
> this past weekend and hack on an experimental Pylons/TurboGears
> integration project.   We wanted to discover if we could re-implement
> the TurboGears API on top of paste+pylons in a way that would make
> TurboGears better.
>
> The goal was not just to re-implement things, but to see if that
> re-implementation actually improved the readability, flexibility, and
> ease-of-mantinance of the TurboGears project.  In other words, we
> wanted to make TurboGears: easier for new developers to work on,
> easier for us to maintain, and more flexible so we can take advantages
> new python web developments in the future.
>
> If you're interested in the details of the sprint, I blogged about it,
> and you can read it at:
>
> http://compoundthinking.com/blog/index.php/2007/06/27
>
> On all counts, I think we can now say that this experiment has been a
> huge success. And after lots of good discussion with Alberto, Kevin,
> and Ben Bangert from the Pylons project, the way forward is now much
> clearer.  The results of the sprint will become the basis for
> TurboGears 2.0.
>
> To make life easy for people who want to install TurboGears 2.0
> alongside the current version we will be creating a new package called
> tg for TurboGears 2.0.  And Alberto is planing to promote it out of
> the pygears branch into trunk today.
>
> The new tg package will implement a very large percentage of the
> current TurboGears API, and thus is intended to  provide an very easy
> upgrade path for current TurboGears users.  In particular current
> controller code should be very simple to port, and Kid, Genshi,
> SQLAlchemy, and SQLObject code will be supported, so most of your
> template and model code will require almost no changes, or will be be
> usable as is.
>
> There's still work being don on TurboGears 2, and it's hard to predict
> a release schedule in open source projects.   But if you pressed me I
> would say that I expect to see a beta in the next couple of months.
> It could be earlier, it could be later...   If you're the adventurous
> type and don't want to wait until then can check it out of subversion
> today, but expect a lot of rapid changed.
>
> At the same time the turbogears development team will continue to
> maintain and support TurboGears 1.x for our current users. We want to
> accommodate users who create new TG 1.0 projects for a long time, but
> we also want to make it easy for those who want the latest and
> greatest stuff to get started with TurboGears 2.0 as soon as possible.
>
> There will be a TurboGears 1.1 beta release in the next few weeks,
> which will fully support the current API, and will switch the default
> templating engine from Kid to Genshi, and the default ORM from
> SQLObject to SQLAlchemy.   This release will not include an upgrade to
> CherryPy 3, because that has required backwards incompatible changes,
> and has taken much more work than expected.  If someone wants to take
> up the standard, there may be a TurboGears 1.2 wiith CherryPy 3
> support, but as far as I know nobody had volenterred to do this.
>
> And of course, SQLObject and Kid will remain supported in 1.1, to give
> us full backwards compatability with current applications.  Catwalk
> and Model Designer will remain SQLObject only applications in 1.1.
>
> And that brings us back to TurboGears 2.0.  In addition to the current
> TurboGears API, the new tg package will support all kinds of new
> features that will make our user's life easier.  Many of these
> features are the direct result of our integration with Pylons, because
> we'll be getting access to a lot of great stuff they've already done.
> And we'll be sharing almost all of our infrastructure code with
> another group of great developers.
>
> The end result is that TurboGears users that have sites that need to
> scale up, will have have access to world class caching options
> (including memcached support), as well as a number of other
> performance enhancing features and options.   For the majority of us
> who are  more interested in rapid development, and deployment
> flexibility, than raw performance, TurboGears 2 will include all kinds
> of new features.   TurboGears 2 will also implement a more flexible
> Object Dispatch system, as well as direct Routes integration, so it
> will be even easier to get exactly the URL's you want.
>
> There's a lot more going on too like 1.1 TurboGears 2 will make Genshi
> and SQLAlchemy the defaults because they provide a better experience
> for the majority of web developers.  We won't be forcing our opinions
> on anybody, and other ORM's and templating engines will be supported,
> but  we'll be focusing all our documentation effort on those defaults.
>  We want to make very sure that our documentation tells a clear and
> compelling story about how this stack of components makes web
> development easier.
>
> At the same time, we'll be working to support people who want to
> develop and maintian sub-projects for automatic CRUD (like Catwalk or
> the Django interface) outside the TurboGears 2 core.  Our hope is that
> these tools will be broadly usable by anybody who is working withing
> the context of a framework that implements the Web Server Gateware
> Interface standard.   Ultimately I think Pylons, TurboGears, Paste,
> Zope, and all kinds of other python web developers toolkits will be
> working together on creating great tools for rapid development.
>
> Thanks to Pylons, Paste, SQLAlchemy, Genshi, Babel, and a whole host
> of other contributions from around the web TurboGears development is
> getting easier and more fun.   I for one, am really looking forward to
> all the good things that are in the pipeline!
>
> I'm looking forward to some spirited discussion of the TurboGears 2.0
> plan, and the plan for  TurboGears 1.1 on the TurboGears trunk mailng
> list.
>
> (http://groups.google.com/group/turbogears-trunk)
>
> --
> Mark Ramm-Christensen
> email: mark at compoundthinking dot com
> blog:www.compoundthinking.com/blog


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to