Archive for the ‘Uncategorized’ Category

Pycon 2010 Dump… Sorta

Monday, March 1st, 2010

I decided this year I am going to forego my Pycon dump, and focus on the news that matters most to my readership.  There are plenty of reviews of talks, and I went to a bunch of good ones, had a great time at wsgi house, blah, blah, blah.  What _you_ probably care about is what’s cutting edge in TurboGears, and the sprints are where it’s at.

We had 12 sprinters on day 1, I think 10 on day 2 and then 8, 4.  So yeah, there’s some manpower behind the next-gen TG stuff.  And that was our focus.  I don’t think anyone lifted a 2.0 finger, all the effort has gone into 2.1.  With Luke Macken’s help, we closed 21 tickets.  I think we have all the road-blocks out of the way for the forthcoming b2 release, which will likely be the last beta before release candidates.  The api is pretty solid now, I don’t expect to expand it an more, so it’s going to be feature frozen in b2.  There are only 2 blocker tickets before 2.1rc1.

Mark Ramm and Jenny Steele overhauled the visual components of the 2.1 docs and came up with a better way of updating our public face.  Jenny has also put forth an effort in c5t (a new cms based on mongo and tg2) to improve our image library capabilities.  She also spent some time updating the TG admin so it looks way better now.  I’ll post some screenshots when I do the 2.1b2 release.

C5t got quite a bit of love actually.  Rick Copeland added Ming 0.2 support since the api changed a bit from 0.1. Christopher Brown fixed a bunch of the styling.  Kevin Mitchell added some tests.  Jason Galyon worked on per-page authz, and Jorge Vargas worked on the editor implementation.  I created a new c5t.website project so that we can work on the core and the public image independently.  This is valuable especially since c5t does not ship with TW1, but we wanted to add mongodb support to the admin on the website, and TW1 is required for Sprox to do it’s magic in the admin presently.

Kai Groner and Eric J (sorry I don’t know your last name) both made some contributions to Sprox.  Eric added Ming support after I refactored the database orm later organization in Sprox.  Ming is a layer on top of pymongo that allows you to enforce schemata in your collections.  This is perfect for selecting validators (the validator in the schema becomes Sprox’s schema), and fairly simple to select widgets with.  Eric had every provider test that works with SAORM working, except for one that looks like a pymongo bug on the limit operator.  Kai worked on handling inline-forms in Sprox.  Looks like most of the provider code is working, we just need to add in tw.dynforms in an intelligent way to hook the rest of the application up.  While this is not a trivial task, it looks as if we are about half-way there for supporting inline forms. All of this work will go into sprox 0.7.

I also spent some time with Sprox, and added jquery support, but it’s not ready for release.  At the end of the sprints I had a working jquery table with pagination in the TG Admin, but some polish is going to be required to get that fully working.  When I’m done, you will be able to easily swap between nothing, dojo, and jquery, and mootools support, or mix and match at any level.  You can also switch between mongo, or any rdbms SA supports, and hopefully couchdb soon.  It’s kinda scary that’s true.

Tutorial Day One, Sprint Day Two

Thursday, February 25th, 2010

One of the great things we have going with TurboGears is that the framework itself takes so little time to learn, that you can literally contribute on day two without much in the way of guidance.  If you have web skills at all, you can be providing a positive input into the design and execution of TurboGears in a short time, say, 6 hours.

I’m returning from Pycon tomorrow, and I’ll give a dump of that on Monday, but for now I need to write to promote my tutorial in Montreal.  The conference has decided to provide the tutorial FREE (as in beer) to any Montréal-Python guy who goes to the conference, just use this link:http://confoo.ca/pymontreal.

Oh, and I am told that Yannick will be providing some homebrew for thoseof us who are sprinting, regardless of whether we attend the conference.

Day “2” sprint will be more like day 5, as the ConFoo.ca conference sits squarely in the middle, but in any event here is the announcement.

TurboGears has been confirmed for May 15 and 16 in Washington DC.  Alex Clark has been helping me organize the event at Radio Free Asia.  Please join us for a full-day TurboGears tutorial.  We can explore topics like the TurboGears Admin, CRUD interface, even our Mongo Support.  2.1 will be out by then since we are nearing our second beta release.

Please spread the word about these important events, and I hope to see you all soon!

Contribution can free you

Monday, January 25th, 2010

freedomIn the past few months I’ve talked a bit about contribution, sprints, and my own form of freedom of expression: Open Source Software.  I think it’s great to find something that works for you, something that you can latch onto and become a part of.  I’m not talking about becoming a parasite or a sink on a piece of software, but an actually joining forces with like minds and producing something new, interesting, unique.  Sharing your knowledge benefits your own community, friends, family, and yourself.  Doing so freely is extremely liberating.

One of my goals for 2010 is to liberate TurboGears from the bonds of our technical-biased development strategy.   In 2009 we needed to focus on the technology and build a stable platform with which to build upon.  We are there.  TG 2.1b1 is released tonight, and  it has the required speed, ease of use,  and a heck of  a lot more docs than last year.  We do realize that more documentation is needed and have asked numerous times for help.

The problem with asking for help is that first of all people want to be part of something successful, something well known in their own community.  They also want to give back to something they use, or someone who has helped them.  This is where I come in.  I can offer the descriptions of technical supremacy of the components TurboGears brings together, like SQAlchemy, Mako, Abstract Dispatch, until I’m blue in the face, but if no one tries it on their own, or there is an insufficient killer app to use something, it will not garner the attention, nor the following to be a successful product.  I’ve been explaining the technical bits of TG for a while, and have seen modest results.

Deciding to take action is one of the hardest things in life to do.  The thing is, once you have made a decision to take action, taking actual action becomes easier.  I choose to bring TG to you, the developers, hackers, engineers.  I am putting myself out there to help you make web applications more quickly, easily, and without hitting the  proverbial wall that so many developers using other frameworks hit.

On Saturday I will visit Dallas Texas, where my good friend Jason Galyon will be hosting my workshop.  The goal of the workshop is to work with people interested in TurboGears, to work at their level to bring forth a web application that is applicable to them.  Bring a database, we’ll see how it works with the new TG admin.  Bring nothing and walk home with a wiki.  Bring an existing app and spruce it up with a widget or two.  Providing a self-driven workshop is the goal.  Company Dallas is the location, we are starting around 8:30am, cost: $0.  8 people are already signed up.

company-dallas


On Sunday you have the opportunity to give-back by sprinting.  We’ll start at 8:30 again, same place as the workshop.  The goal of the sprint is to breath some life into c5t a cms I started with a few others to bridge mongodb, mako, and TurboGears into a blazing-fast, useful way of storing documents.  We need: Someone to finish up the calendaring, a search, someone artistic to create an eye-pleasing theme, and lots and lots of testing.  I plan to work entirely on testing, you guys can do the fun stuff.  We could also use someone to help start some documentation.  I’m hoping to release a beta of c5t before Pycon.

I plan on doing the first half of my workshop at Pycon.  The difference is that here it will cost between $100 and $150 to take the tutorial depending on the total number of tutorials you are taking, but it is well worth the money if you need to get up and going with a TurboGears app.  The tutorial cost is free for me, as I have waived my honoraria.  My tutorial is actually in danger of being axed because I need 10 members to sign up and currently have 6.  Please register today if you have not already done so!

pycon-2010-banner

Also at pycon, I will be participating in a discussion panel for form generation hosted by Brandon Rhodes.  I will be expressing my knowledge of Sprox, my own personal foray into the arena.  Other experts such as Jacob Kaplan Moss and Chris McDonnough will sit in on the panel as well.

Pycon is such an awesome conference because they build a 4-day sprint into every event.  What’s even more awesome is the number of people that show up and contribute.  You can bet i’ll be there all 4 days.

A week after I return to Denver, I will leave for Montreal for my first visit outside of the country.  It’s amazing I have made it this long without leaving my beloved States.  Whatfor would I leave you ask?  A developer conference called Confoo.ca.    Here I will be giving my workshop again, this time it will be a full-day  workshop with lunch provided.  The cost is $300, which includes lunch.  I waived my honoraria to bring the cost down by $300.

confoo-wide

At Confoo.ca I will also give a general talk on TurboGears, to spread the good word about how we have evolved over our lifetime, and where we fit into the future of WSGI and the greater web ecosphere.

Again, I am working to organize a 1 day sprint in Montreal following the conference.  Stay tuned for details.

It’s going to be a busy few months.  I’m looking forward to it professionally, but it’s going to definitely be a challenge to be away from my family for all that time.  What helps me get through that is knowing that people out there benefit from my work and I help make their development lives better.  So, if you see me in the hall say hello and tell me what you are up to, or drop me an email if something I contributed has helped you out.  Better yet, show up to a sprint and give back and see how your contributions can make a difference while also liberating you.

New Resume

Saturday, January 2nd, 2010

Trainstop

Hey guys, I’ve been busy for a bit, but I made up this new resume for the TG tour, looking for feedback if you’d like to comment.

cheers.

-chris

TurboGears 2010 North American Tour

Thursday, December 10th, 2009

I’ve got a lot invested in TurboGears, but I’m not seeing the kind of uptake I’d like to see for such a useful piece of software.  It’s time for this to change. I’m putting my money where my mouth is.  I have decided to organize a series of tutorials throughout the continent, bringing TG to you, so you don’t have to come to us.  If you’d like to be trained by one of the main contributors to the framework, please feel free to attend.  The price for admission will be free or low-cost.  The tutorials are a mix of self-driven and hands on.  Here is the schedule as predictably as I can post it.

Jan 2, 2010 – Boston, MA – RedHat Headquarters

Jan 29 or 30th – Dallas, TX – Company Dallas

Feb 17th – Atlanta, GA – PYCON – $150.00

Mar 9 or 13 -Montréal, Canada – to be determined

Apr 24 – Boulder, CO – Bivio

I am also looking for a west-coast volunteer to help me organize something in the San Fran/Los Angeles area.  If anyone has an appropriate venue and a place for me to stay I would be happy to come out and give a tutorial.

Other tentative places for tutorials are: Ann Arbor, MI, and Washington DC or Baltimore, MD.  If anyone has a user group in these locations and would like to help organize, I would be appreciative of the support.  I would also not mind running the tutorial coupled with a sprint in a more exotic location like Crested Butte, CO.  There is an inexpensive hostel there with free wifi, some great skiing/mountain biking/hiking to be had.

Here is a rough itinerary:

Relational Database Applications with TurboGears
———————————————————————-
This tutorial is intended to be an un-tutorial. The idea is simple.  Bring me a public database, (or 4) and share with the class as we explore  the new admin-level RESTful features that TurboGears2 employs.

At the end of the class, the goal is for everyone to have a working TG2 application, with a working admin, at least one customized form or table, based on a database they, or another student brought to class.

I will ask the students to do some prep-work. For those who would like to
share a database, or a database schema, they should bring with them a database dump, be it a sqlite file on a memory stick, or a pgdump file, or a mysqldump file. If the students would like to share with the class, that’d be the best way to run the tutorial, and if people provide me with dumps of reasonable sizes ahead of time, I will distribute them with the class material.

We will then split up into teams of people working on similar database systems.

Intro Talk
++++++++++
A 10 minute talk to introduce myself and describe what SA and TG2  aim to do for relational databases. I will also discuss goals for the tutorial.

Part I
++++++++
The goal of part one is to break the ice with everyone, getting them into groups  and getting the first database interactions happening.

* Student Database descriptions (10 mins)
* Splitting into groups (5 mins)
* Copying/Loading databases all around (10 mins)
* Install SQLAlchemy and SQLAutocode (5 mins)
* Run sqlautocode on your loaded database. (30 mins)


We will discuss the different options sqlautocode provides,  and take a look at the output it produces.
* Set up TG2 and Quickstart a new App. (20 mins)

Part II
++++++++
The goal of part 2 is to integrate the work done in Part I and  explore the ways we can put the turbogears admin and sprox to good use.

* Integrate sqlautocode with the quickstarted TG app. (10 mins)
* Fire up the admin, see how it works with the existing schema. (5 mins)
* Modify the TG code to replace the default TG AdminConfig with A customizable one. (10 mins)
* See where the class would like to customize their admin, following necessary parts of:
http://turbogears.org…
http://www.sprox.org/…
http://www.sprox.org/…
as needed (60 minutes)

Bonus
+++++++
If we need extra filler at the end (not likely), or, if people want to meet after the afternoon session, I will have a mini-tutorial for BootAlchemy. BootAlchemy allows people to load Yaml files directly into a relational database.

Requirements
+++++++++++++

* Laptop with Python 2.5 or 2.6 installed.
* Database system of your choice (Postgres, Sqlite, MySQL)
* Python drivers for your desired database system installed. (psychopg2, pg8000, pysqlite, mysql-python)

cheers.

-chris


TurboGears 2.1a3 Released!

Sunday, November 29th, 2009

In keeping with our monthly releases, the TurboGears team presents 2.1a3. This release is primarily a bugfix release. There are no compatibility issues with this release. Here are the major items fixed.
* Fixed problems with Beaker Secret Key functionality. (Thanks
Sanjiv)
* Fixed infinite loop problem associated with lookup.
* Fixed RestController so delete() works with nested RCs.
* Refactored configuration support to handle non-SA persistance.
* Deprecated lookup in favor of _lookup.

This is likely to be the last alpha version before the beta lock down. b1 may have some minor api changes from this point, but it does not look like there is anything major. We are this means that we will be in bugfix-only mode starting mid-january, as we march to a final release for Pycon in 2010. The documentation team spent a considerable amount of time working the docs, they are posted at: http://www.turbogears.org/2.1/docs/ . Our todo list is down to 114, from the 140 we ballooned to since the last sprint. It would be great to have the todo list under 50 before formal release, but we have been working on those items which are priority, so the docs are really not in that bad of shape despite the high number of todo items.

TurboGears Black Friday Sprint

Friday, November 13th, 2009

If you are from the US, you may be familiar with the custom of racing to your local commercialization hub before the sun rises and beating your fellow man over the head to get that cute little fifi doll your daughter wants for christmas.  This endeavor is often fueled by the previous day’s binge on tryptophan-laced poultry.

black_friday

TurboGears wants you to know there _is_ an alternative to this ruckus behavior.  While it may not offer a method of transference of the latest flu virus strain, you may come hang out with the leaders of our community on irc://#turbogears@irc.freenode.net . and ask questions and help your fellow man.  In the spirit of thanksgiving, you may decide it would be good to return the 1000s of lines of code contributed by helping us document that mess*!

November 27, 2009 starting around 9am MST, ending when Chris passes out, we will convene and work on the 134 todo items left in our documentation.  If some of you are near Denver/Boulder that day, I would be happy to organize an on-site meetup, please let me know.  So, the day after thanksgiving, why not act gluttonous for one more day (with your writing) and lets see if we cant close another 60 todo Items as we did on the last doc push.  Be you an advanced super 37173 user, or someone completely new to TG, we have got something for you to do!  Lets work together to make the formal 2.1 release of TG the best yet, with the highest level of completed documentation evar!

cheers.

-chris

* the term “mess” is not used literally in this sense.

Open Source and San Francisco

Tuesday, November 3rd, 2009

It’s October again, and that means Open Source folks are meeting at Google in Mountain View, CA.  Last year I had such an enlightening experience that I wanted to do my best to make it even better.  One thing that Icruiser_gatehave realized is that it is hard to participate in a conference without some free time.  Your brain functions better if you arrive, settle in, get your bearings, and then start the real work.

On Thursday I arrived in San Fran, and immediately sprinted to the coast.  I live 1000+ miles from the ocean, and although I see myself as a mountain person, there is something compelling about swimming in the cold surf, emerging with a layer of brine.  After a few hours of work in a coffee shop overlooking the sea, I headed into the interior to meet with my TurboGears pals and get the conference started.


Friday Jorge and I toured San Francisco.  We decided to rent some bikes an ride across the Golden Gate Bridge.  I like this kind of self-guided tour, and we definitely got lost but had a good time in the process.  We arrived in Sausalito after crossing the bridge, and grabbed a bit to eat before taking the ferry home.   Later on we met up with Mark and the rest of the Google Summer of Code folks for some socializing.

Friday night we finally hashed out the json/return type challenges with TG.  Sticking with 2.0 implementation, you may only return a dict from your controller method if you expect the normal TG rendering to occur.  However, if you return an iterable object, the Pylons machinery will take over and stream your content.  This represents a problem because if you return a list and set the exposed renderer to json, it will return your dict in string form.  To protect the developer from making the mistake of creating a CRSF attack, this behavior will now raise a meaningful exception.  Having Mark and Jorge around to make this decision definitely sped up the implementation.

Saturday we arrived bright and early at Google and got started with the conference.  The mentor summit is a self-organizing conference, which means the talks are determined on the spot rather than pre-planned.  More and more I am finding myself drawn to these types of meetings.  They provide a much more interactive approach to conferencing as apposed to the eyes forward norm.

gsoc_boardThe best session I attended was Recruiting and Retaining Awesome People I had proposed a sprint-related session, and decided it would be best to merge with Donnie Berkholz since his session was similar in scope.  After all, sprinting is just one concept in the scope of recruitment.   We had a large number of attendees, and had to re-arrange the eye’s forward setup the room had because it did not allow for the discussion we both wanted to generate.

There was excellent discussion, and I took a few new ideas away from this session.  To highlight a few:

Toxic People – Placing a label on a person as toxic can be dangerous both to the people involved in the labeling, and to the community at large.  If you can isolate the toxic behavior and catalyze a new response from the person, someone who is viewed as toxic may then become a valuable contributor to your project.  Don’t be quick to label a person unless they simply do not respond to requests for changing of toxic behavior.

Code Review – Providing prompt and complete code review is a reward for the contributors work.  I think this is especially true in OSS where we write our code in a public domain, and are therefore expecting that others will look at our work.  The work in OSS is more than just the final product, it’s the code itself.  By providing feedback on a patch, pull request, or documentation augmentation, you are growing a potential long term contributor, even if your review is critical.  Reviewing code allows you to set expectations for your code project so you can further mold the codebase to meet your organization’s needs.

Socializing – The modus operandi for most technical IRC channels is to focus closely on the topic.  This keeps the signal to noise ratio high, but makes the room feel stale.  By interacting with your users in a more personable manner, it’s easier to build the interpersonal relationships that are required for contribution longevity in a project.

Thanks to Toshio for taking such detailed notes for this session.

For some reason I was having a hard time being motivated by the sessions.  It seemed odd to me that there were only 1/2 of the session rooms booked at any one time on Saturday.  I discussed this with Jim Baker, one of my Python colleagues in Boulder, CO.  He responded by providing a “How to write a Python Interpreter” session that was remarkably well attended.  The group was a mix of Python users, developers, and those interested in interpreters in general.  One of the session members was a major contributor to PyPy.  It seems obvious to me that python is going to move to the next level soon in terms of performance.  One of the things discussed was the usage of language constructs to provide the interpreter information about a class, method, module, in order to constrain execution and therefore provide faster execution.  Consider the use of __slots__ in Python classes.  If you know there are only certain attributes in a class, you have additional information that can be used by the interpreter to limit frame size, etc.  This is great for memory limiting techniques.  Now, apply this idea to performance techniques, and you can see that there are many opportunities to give the Python interpreter hints about execution that would allow it to do less work and therefore increase speed.

When I wasn’t participating in sessions, I was doing my best to share experiences, theories, etc. in the hallway track with other attendees.  I was also working on the TurboGears 2.1a2 release.  It’s funny, because our release process is more manual than I like, and therefore takes a few hours to complete, but if you split it up 10 minutes here, 30 minutes there, you can get a remarkable amount done even in the midst of something else major going on.  I’m not sure if this time usage technique has any merit, but I have used it at previous conferences.  It feels very easy to capitalize on the energy from the conference and get some work done, I’m not exactly sure why yet, but I’ll have to think about it some more.  In any event, 2.1a2 is released and ready for testing/consumption.  I think we are going to have 1 more alpha before we lock down the api.  Mark wants to change lookup to _lookup, so we have to add that and deprecate, deprecate, deprecate.

Sunday was more of the same in terms of sessions, but the attendees seemed to step it up and provide some interesting topics.  My favorite talk of the day was one regarding turning open source into a sustainable profession.  A number of topics were discussed, but this general forum lead us to group open source financial success into three categories:

Software Product Licensing – Turn your OSS project into something that is salable, either by providing a pay-for layer on top, or licensing it in such a way that corporations are responsible to pay for what they use, still allowing the OSS developers to have their way without incurring the costs.

Sell Your Organization – If your organization can offer value to an industry, it is very likely that an industry leader will want to purchase the rights to that intellectual property wholesale.  MySQL is the example of this that stands out in my mind the most.

Software as a Service – Consulting is one of the main ways developers can benefit financially from their work in the open domain.

I actually would like to explore a few of these in depth, and I think the next open-space conference I attend I will try and set up a session about at least Software as a Service to explore ideas about how to give away your software and thrive simultaneously.

Google continues to provide a valuable service to the community with the Google Summer of Code program.  I am convinced their motives for running such a program are noble.  One of the sessions I participated in was the Google Highly Open Participation (GHOP) session, and basically it was just an informative session for me.  I wanted to know more about the program, and the result is that TurboGears will likely work with the PSF in the future to participate in this program.

One of the reasons I get a lot out of conference like the Mentor Sum is that there isa large variety of technologies in attendance.  This moves me out of my normally Python-centric interactions with other developers.  While I think that Python is the best way to express myself as a developer, it is also interesting to see how other developers solve similar problems in their own domain.

TG’s Killer Features: The Admin (Yes, TG Does, and it rocks)

Tuesday, October 20th, 2009

catwalk_overview.pngTurboGears 1 had Catwalk.  This provided a crud-based interface for your models.  It was directly tied to SQLObject, which meant when you moved on to SQLAlchemy, you couldn’t take it with you.  Since TG2 decided to only support SA (SQLALchemy) out of the box, we lost our only Admin-like competitor, and this really hurt the project.  Although many people didn’t use Catwalk beyond trying it out, many hung on to the fact that they _needed_ this kind of interface when making the decision about what framework to use.  Since other frameworks have this sort of interface, TG really lost out.

SQL ALCHEMY

When I first set out to build an Admin interface for TG, I didn’t really think about what kind of impact it could have on a developer’s ability to code.  I simply wanted to provide the developer with a way to get at their database tables.  DBSprockets was the result.  It _sort of_ worked, but the problem was that it was table-based, and therefore lacked the ability to leverage the developer provided mapping that every TG project utilizing the SA ORM (Object Relational Mapper) contains.  This was mildly successful, and while my first attempt to make it easier to use outside of an admin interface (something called “primitives” ) was less than successful, it became clear to me that the auto-generated forms could be useful in their own right.

Spurred on by an unsuccessful attempt to use the peak-rules based form generator called Rum, I was determined to make it easier to auto-generate forms, and make something easy enough for the masses to grok.  Sprox was born.  Sprox allowed me to drop much of the cruft that DBSprockets contained, and allowed me to provide a much easier way to define what I wanted customized in a form in a declarative manner.  I was inspired by SA’s declarative extension, so much of the framework is modeled after that design style.

sprox-flow

The one design methodology I kept from DBSprockets was the database abstraction layer.  I still have the idea that we should be able to support our SQLObject users, and we also need to be able to support the plethora of persistence solutions that have yet to be discovered or created.  This abstraction layer probably seems unnecessary, considering that SA itself is an abstraction layer, but this layer allows you to provide access to numerous ways of interacting with a persistence mechanism.  In this way, Sprox is able to talk to both MySQL, and MongoDB.  Preliminary support for this has begun in the Sprox 0.7 fork, to be released in early 2010.

Sprox is really the bricks in the house that is the TurboGears Admin.  After some trials with what I called Catwalk2, I decided that it would be easy enough to provide a framework for developers to use Sprox, as well as develop a configurable admin.  In 2.0 the auto-configured TG Admin was called Catwalk2, in 2.1 we have dropped Catwalk altogether and just provided TGAdmin configured, which makes it easier to follow documentation about how to change the configuration.

The Turbogears Admin System is made up of 4 main components.  These connect together to provide a system that you can customize at every layer

Sprox – We already have discussed this, it provides a way to generate forms from DB Schema.

CrudRestController – This provides a restful interface to each one of the models in your Application’s persistence layer.  It utilizes TG’s RestController to enable RESTful urls to work with your models.

AdminConfig – Allows the developer to override settings in the admin to customize those things which may be different from what Sprox provides as a default.  It also allows you to override the default behavior of CrudRestController, in the event that you need to modify the way your models interact with the database.

AdminController – Combines the above 3 things to provide a set of controllers for manipulating your models.

One of the benefits of using a configuration-based Admin is that this allows the developer to override functionality at any layer. The developer is not confined to providing an all or nothing solution.  With the AdminConfig, you can limit the models, swap out forms with Sprox autogenerated ones or provide your own customized ToscaWidgets forms.  The developer may choose to  override one method of the crud, or provide a different set of authorization predicates.  Templates are overridable, so you are not stuck with the default look-and feel.  The admin supports both Mako and Genshi quickstarts, which means that your project’s master template is supported regardless of which template language you have decided to use (Mako is much faster).  You are also not limited by the number of admins you choose to create within your TG application.  This would allow you to create an admin-level admin, or simple crud based web application for user-level users in the same application.

The most compelling thing about the Admin for me is the fact that each layer can be used independently.  Sometimes you want to provide your users with _just_ a crud interface on one model.  It is simple enough to pull out the CrudRestController and use it as a stand-alone in your project.  Often times I will want to provide just one form that might have many fields in it.  I may just use sprox by itself for that.  The admin system allows you to customize at the layer you need to modify without getting in your way.

../../../_images/listing_ss.png

Here is the use-case I thought about when I designed the Admin.  You meet with a customer who already has a database.   You connect to their database, extract the necessary schema information.  You then take this schema information, and generate a TG application that allows you to see their database.  The customer then provides feedback about what their interface should look like for each model while you peruse their data in the Admin.  Some things you fix on the fly, and can show the customer how it looks on the spot.  Other things you take notes on, and work on later.  Perhaps they have a complex validation scheme, or require form that has a drastically different look than: fieldname [value].

Later you return to the customer after creating CRCs for each model requested.  Something is wrong though, the customer needs the database interaction to work differently in the back end.  You modify the controller methods of your CRCs to do so.   The customer is pleased with the quick turn around time, you are happy because you didn’t spend your week writing the same crud interface over and over and over.

Use case or not, I have been able to successfully accomplish the goals of my clients in a shorter time frame by modifying only those things that are different from the intelligent set of defaults that Sprox and CRC provide. Having crud, and customizable forms and tables often gets me 90% of the way there, and the last 10% is where I want to work anyway.  The fact that Sprox provides infinitely scrolling tables is nice too. :-)


A TurboGears Weekend in review

Sunday, October 11th, 2009

A few weeks ago the Front Range Pythoneers decided to organize an “Uncon” where people show up to discuss various topics on-the-spot.  This is the sort of event I really enjoy participating in, so I of course agreed to attend.  At the same time, I was approached by the guys from Developer Day to do a talk on TurboGears.  You can imagine the conundrum I faced, but thanks to the willingness of the DD organizers to be flexible, and some creative planning, I was able to participate in both.

Speaking at Developer Day was a new experience for me because I was talking to folks that were not necessarily versed in Python,never-mind TurboGears.  The conference appeared to be somewhat Rails heavy, but it was refreshing to see organizers reaching out to the greater web community to provide a well rounded conference.  The nice thing about speaking to a wider audience was that I was able to expound some of the history of the Python web, as well as describe TurboGears at a high level without worrying about boring the audience.  I was quite nervous speaking at first, because I have not done so in a few months, but seemed to settle into a groove by the time I showed an example of how easy it is to inject repoze.profile into a TG application and provide a cachegrind display to find any slowdowns in your app.  I hope that this example was able to express how versatile WSGI is.

I stayed the morning at DevDay and I am glad that I did.  Chad Fowler gave an address on what it means to remain passionate as a developer over the life of your career.  I think his idea that providing structure to your life definitely allows you to achieve amazing things.  His real-life examples were poignant and well received.  I’ll be checking out his book soon.  The other talk that I found interesting was Jeremy Hinegardner’s talk which basically discussed the numerous non-relational persistence methods available.  I thought his method for showing examples of the different methods was great. For each one he had a simple succinct example that showed the  benefits for the given persistence framework.  He allowed the audience to choose from the frameworks he discussed in his talk.  Jeremy was an engaging speaker, and I would not hesitate to sit in on one of his talks in the future.

Google in Boulder, CO by krossbow.After a bit of DD-provided BeauJos, I headed over to the UnCon.  They too were having pizza provided by Google.  Google Boulder was a great sized venue for the 40 people that attended.  It was exciting to see so many new faces in attendance.  It seemed to me that the “regulars” were doing a lot of demoing, while the new folks watched on, but there was also a lot of discussion that happened.  I showed how to use repoze.profile and runsnakerun to

analyze the results.   Zooko immediately installed runsnakerun and tried it on his app.  It is always nice to have immediate gratification for having taught someone something, even more so when the person voluntarily tries what you think is “so cool.”  I got to show off some of the work I am doing for www.getmvp.com, since much of it is prototypical of the Extension Solution that I hope to provide with a combination of Pylons and TG.  Also on display was TW2.  It was great to show how simply one could express all MVC elements of a widget in one complete package.

Sunday I ran the first TurboGears WorkShop.  If you follow my blog, you may have read a few posts about how I think we can improve sprinting, but I’ve come to the realization that our less-than-stellar sprint performance is really due to a need for improvement in the organization at large.  I have decided to add a WorkShop Series to our tireless effort for improvement of TurboGears, both from a technical aspect, and one of the community.  I was up late on Wednesday creating a basic tutorial-type plan for Sunday, and I finished up with about 80 pages of documentation to provide workshop goers, basically by selecting items from the TurboGears documentation.  My goal for the sprint was to provide sprinters with a working example of TG at the end of the day, with a little bit of work accomplished customizing the Admin.  I asked sprinters to bring their own databases, to utilize sqlautocode as an example database for their new application, and while no one provided the class with one, we were still able to succeed with one that I provided as a backup.  5/6 people succeeded in this, and while there were some rough edges, I think I have an idea that is workable for a 3-6 hour WorkShop that will succeed with a little bit of polish.

I am still formulating the ideas for TurboGears workshops.  I have started to contact folks I know throughout the country, in order to provide venues for these workshops.  So far I have Boston, Dallas, San Fancisco, Atlanta, and Boulder (Denver) lined up.  I think with little effort, I could also add Ann Arbor, and probably Washington D.C.  The idea behind a workshop is that you arrive with a varying amount of knowledge in TG, and you leave with a greater knowledge than you arrived with.  You are encouraged to bring an existing project to hack upon, or to create a new one that we can play with.  I will provide a rough outline of what we might do in the tutorial, but if the group decides to go off in a different direction, that’s okay too.  If you are interested in participating in one of these WorkShops as a mentor, or providing venue space, accommodations, etc. I would love to hear from you.  Right now I am in the organization phase, expect a blog post announcing the official plan in the near future.

Thanks!  Without the efforts of a number of individuals this weekend would have been much less successful than it actually was.  I want to thank Ben Scofield for inviting me to talk at developer day, and for shuffling the schedule so I could participate in both conferences.  Greg Holling put in a great effort to organize the Uncon, and Google provided an awesome venue for us to use.  Three volunteers from Google Boulder provided their time, and even gave a tour of the facility to conference goers.  They weren’t even Python developers…  Jim Baker and Matt Boersma both showed up to provide access to Bivio so that we could have our first-ever TG WorkShop.  Lastly, I’d like to thank Bruce Eckel for making the trip down from the mountains to provide his unique perspective.