On 12/19/06, Max Ischenko <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have created a Pylons project (with paster create --template=pylons
> qw) and I am a bit intimidated with amount of data pre-generated for
> me: 33 files with 573 lines in them (16Kb)! Similar situation in
> TurboGears, btw.
>
> Is it really necessarily? Is it because no one yet figured out how to
> simplify things or this approach does provide some benefits?
>
> Now there is a pile code developer may never touch but the framework
> still expects it to work and have no control over it. E.g. any changes
> in framework' APIs should take this into account.
>
> May be it's just me, but Robaccia(*) approach feels much better: you
> start with a clean state and add cruft as needed.  I remember Python
> people ditching Java frameworks for being too verbose and bragging
> about zero-configuration Python apps.
>
> * - http://bitworking.org/news/Why_so_many_Python_web_frameworks

If you use a library, you're in charge of calling the library's
functions.  If you use a framework, the framework is in charge of
calling your functions.

If you use a library, to get a "full stack", you need to do more work,
but things are more flexible.  If you use a framework, to get a "full
stack", you might not need to do any work, but things are usually less
flexible (my framework Aquarium had many tricks to get around this :).

To get the flexibility of a library without making you do all the work
necessary to get a "full stack", Ben has decided to generate a lot of
the boilerplate code for you.  Then, you can tweak it to meet your
needs.  Your statement that "Now there is a pile code developer may
never touch but the framework still expects it to work" isn't
necessarily true.  In fact, you're expected to modify it, otherwise it
would be moved into the framework.

By the way, if you're like me, you might wonder how to upgrade all
this stuff.  It turns out that you can re-execute the template on top
of the existing project, and it'll will "do the right thing and be
intelligent."

Furthermore, the past has shown that if Ben needs you to make a change
to that boilerplate and you forget to read the release notes, he'll
raise SyntaxWarnings if something is missing.  I find this to be a
really nice compromise between the two extremes of:  1) never make
backwards incompatible changes 2) make backwards incompatible changes
as long as they're documented.  The SyntaxWarnings make sure you don't
shoot yourself in the foot, and usually they tell you exactly how to
fix your situation.

Happy Hacking!
-jj

-- 
http://jjinux.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
 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