Well I'll pitch in here since I'm probably pretty close to your target
audience.  I'm not a web developer, I'm a biologist turned
bioinformatician with a few years of perl experience, and no web dev
background.  I didn't know that web frameworks existed a year ago, but I
needed to build web interfaces to my databases and tools so I started
googleing.  I was thrilled to find Jesse's CGI::App article on perl.com.
Also looked at Mason, Maypole, EmbedPerl etc.  Non-felt quite right.  CA
seemed like the right combo of easy to pick up, but big enough for room
to expand.  Some thoughts on the recent posts:

Template Toolkit is a fabulous piece of work, and if I were god I'd make
it CA's default. Since I'm not, I think Michael's AnyTemplate should
play a very prominent role in CA's future, and in this book.  It
supports CA's flexibility.  You could pitch HTML Template for those who
expect their data structures to be simple, but for complex db schemas
the combo of TT and CDBI allowing me to drill deeply into my db from the
template saved me A LOT of code writing and is incredibly useful. If I
were reading your book a year ago, I would have definitely wanted to
learn about TT.  I was equally excited to find CDBI - I immediately
threw away hundreds of lines of code.  If you are starting out and using
a db I can't imagine why you wouldn't want to use CDBI, so I think it
too should be well covered.

I got CA up and running pretty quickly, but integrating all the bits and
pieces to build a mature app has taken me quite a while (session,
auth.*, config, etc.)  Having all of those pieces together in one book
would have saved me a lot of time.

BTW, I think if you are going to push best practices like MVC early on,
you should push best practices like testing, XHTML, and CSS.  If you've
writing for beginners like me, might as well get us into good habits
before we have time to develop the bad one.

Barry


-----Original Message-----
From: Michael Graham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 08, 2005 7:55 PM
To: cgiapp@lists.erlbaum.net
Subject: Re: [cgiapp] Re: RFC: synopsis for CGI::App book


> > FWIW, I agree.  I think it's very important to define the target
> > audience(s) and the goals of the book.  This should really be
teaching
> > CGI::App development.

[snip]

> I told my friend in Perl there is always more than one way to do it
but
> how far can you take that before everything goes fuzzy?

Very good points.

I agree you should make certain technology decisions and run with them.

For instance, I'll agree that the issue of persistent environments (like
mod_perl) can be safely tucked away in its own chapter or appendix.

Templating is a bit of a special case because the cgiapp community (and
the Perl community at large) is so "enthusiastically" divided over what
is the "best" templating system.  My personal belief is we should accept
the split and embrace all the different choices out there.  (That's why
I wrote CAP::AnyTemplate.)

So the reason I'm suggesting you showcase TT more is not because I
prefer it over HT (although I do).  I'm suggesting you give it equal
play because I don't think it would be a good advertisement for
CGI::Application to suggest that that C::A primarly works with HT, and
the other templating choices are afterthoughts.

For instance, you can type:

  use CGI::Application::Plugin::AnyTemplate;

and you instantly have a simple, unified interface to the three or four
most common Perl templating systems out there.   That's pretty
integrated.

I'm not suggesting you push AnyTemplate, but I am pointing out that just
because it's in a plugin doesn't make it an afterthought and it doesn't
make it any less easy to use.

As most of us on this list know, pretty well all the plugins are very
easy to use, very well integrated, and each adds great functionality.

Their main disadvantage at the moment is that their documentation is all
over CPAN, so you have to go digging to find out what the best practices
actually are.

But I think that here is one of the great opportunities for a book like
this:  to take all the diverse plugins that are out there and make a
coherent and fully documented guide to the platform as a whole.

In another message, you wrote:

> The reason I split this into two chapters is that CGI::Apps
integration
> with HTML::Template means you can get an immediate advantage over
straight
> CGI.pm right away.

While CGI::Application did originally evolve from CGI programming, today
it is a complete "enterprise-quality" web application platform with a
feature set rivaling Catalyst, Ruby on Rails, various Java frameworks,
etc.

So even though its roots are in CGI programming, does that really matter
any more?  Should we be thinking of it in terms of "improved CGI
programming"?

IMO, as a developer, all we really need to know about CGI.pm is the API
of the 'query' method.  And 95% of that is how to use 'query->param',
which isn't all that hard.

It seems to me that the chapter sequence you've chosen echoes
CGI::Application's evolutionary advancements over CGI programming:

   Ch 1: Common Gateway Interface
   Ch 2: Architecture of a CGI::App
   Ch 3: Run modes
   Ch 4: Templates
   ...

While this is historically true, I wonder:  how common are 'plain' CGI
programmers these days?  I would think that you would be more likely to
find PHP programmers or users of other web frameworks, or developers who
have no web experience.

I think that some better starting points might be:

  * separating code and design with templates
  * application run modes (e.g. browse, read, edit, add, delete)
  * sessions
  * processing forms (validation and sticky forms)

These are topics very familiar to most experienced web programmers, but
straightforward enough that non-web programmers can pick them up pretty
quickly.  They also happen to be features of CGI::Application that are
both extremely powerful and at the same time very easy to use, so you
get a lot of bang for your buck right up front.


Michael



---
Michael Graham <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to