[Catalyst] CatalystX::CRUD::Tutorial...looking for missing pieces.

Adam Mackler nabble at mackler.org
Wed Jan 6 17:56:00 GMT 2010

Hello, I'm back with more questions.  I followed along with the first
mentioned tutorial (from Advent Calendar day 7).

Before I get to my real burning issue, I'll just mention a couple
things that got me, and maybe others.  With this and another Garden
tutorial I get two error dialogs with each HTTP reponse: 

"Please download a copy of ExtJS 2.2+ from http://extjs.com/ and
install it locally on a static web server. Then update your local
root/crud/tt_config.tt file."


"Please download a copy of LiveGrid Javascript lib from
http://code.google.com/p/ext-ux-livegrid/ and install it locally on a
static web server. Then update your local root/crud/tt_config.tt file."

The page source shows references to javascript files on
static.msi.unm.edu and yui.yahooapis.com, so I'm guessing the error
dialogs are indicating that the javascript files will be coming from
those two sites rather than my server.  In other words it shouldn't
stop the application from working.  If I'm wrong here, please let me
know.  Anyway, I would like to make those messages go away.

I downloaded the two menioned items, ExtJS and LiveGRid, with no
problems, but my certainty ends there.  (BTW I have zero experience
with Javascript, and my only expeience with TT is from Catalyst
Tutorials--I've been happily using Mason for years.)  My confusion
here has several bases: First, the term "update" with regard to the
tt_config.tt, since I have no such file.  I'm taking that to mean
"create" rather than update.

Next, based on reading the pod for Rose::DBx::Garden::Catalyst::View,
I've concluded the error messages above mean to say "update your local
root/rdgc..." when they say "root/crud..."  If I'm wrong here, please
let me know.

So, assuming I need to create root/rdgc/tt_config.tt, and in that file
there needs to be references to the extjs and livegrid items, what is
the form of that configuration file?  Also it seems that whatever
information would go into tt_config can alternatively go into
myapp.conf.  The only thing in there now is the application name, so
again it seems more like creating rather than updating any existing
template configuration information.

The notice to install ExtJS and LiveGrid seems to be coming from
yui_header.tt in the CatalystX/CRUD/YUI/TT/crud directory of my perl

Not knowing what format the tt_config.tt file is supposed to be, I
made a number of guesses at configuring myapp.conf that look similar
to this:

name MyApp
  ExtJS root/static/ext-3.1.0

but didn't work, so I won't reproduce them here.  I feel there are
javascript variables called ExtJS and LiveGrid that must be set a
certain way to use my locally installed javascript libraries.  How
that is I have not yet figured out and would gratefully learn.

BTW, these are the google searches I've tried with regard to this

  site:template-toolkit.org extjs
  site:template-toolkit.org livegrid
  Catalyst::View::TT tt_config.tt

(also, this is somewhat tangential, but lest I forget that I'm seeing
this, searching the list archives at www.mail-archive.com for
"tt_config.tt" yields simultaneous claims that there are "45 matches"
and "No matches"!)

Searching the mailing list archives for "extjs" yielded 125 results,
but looking through the subject lines and excerpts on the results page
did not suggest any contained mention of this question of how to make
the locally-installed js libraries work.

I also came across this somewhat dated page discussing Catalyst and
ExtJS: http://www.catalystframework.org/calendar/2007/1.  Obviously I
didn't find my answer there, but it was useful enough to mention here.

On Tue, Jan 05, 2010 at 12:12:16PM -0600, Peter Karman wrote:
> Hi Adam,
> Try the tutorial here:
> http://www.catalystframework.org/calendar/2007/7
> It uses Rose::DBx::Garden::Catalyst, which assumes you are using RDBO.
> If you want to use DBIx::Class as your ORM package, you can do that too,
> but it requires a little more manual intervention at present as I
> haven't CPANified the bootstrapping code I have lying around somewhere.
> Either way, there are example apps for both RDBO and DBIC in their
> respective test directories here:
> http://cpansearch.perl.org/src/KARMAN/CatalystX-CRUD-ModelAdapter-DBIC-0.11/t/example
> http://cpansearch.perl.org/src/KARMAN/CatalystX-CRUD-Model-RDBO-0.22/t/lib/
> Feel free to post back here with any questions/comments/patches.
> pek
> -- 
> Peter Karman  .  http://peknet.com/  .  peter at peknet.com
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

More information about the Catalyst mailing list