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

2010-01-07 Thread Peter Karman

Oliver Gorwits wrote on 1/7/10 2:36 PM:


For AutoCRUD[1] I discovered that ExtJS is now available from the
CacheFly CDN so we are freely permitted to point at those files:


lovely! thanks Oliver.

--
Peter Karman  .  http://peknet.com/  .  pe...@peknet.com

___
List: Catalyst@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/


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

2010-01-06 Thread Peter Karman

Adam Mackler wrote on 1/6/10 11:56 AM:



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.


You are correct that the application will work with the .js files coming from 
those URLs. My idea was that the package should Just Work out of the box, but 
that (a) it was impractical to bundle all the .js dependencies with the .pm 
files and (b) it was impolite to just point at known-good URLs without an 
annoying warning that you should get your own copy and stop using someone else's 
bandwidth.


To get rid of those messages, just copy the installed tt_config.tt file to your 
local app and modify it. Example:


 % cd MyApp
 % perldoc -l CatalystX::CRUD::YUI::tt
[some/perl/path/to]/CatalystX/CRUD/YUI/tt.pm

 % cp [some/perl/path/to]/CatalystX/CRUD/YUI/tt/crud/tt_config.tt \
   root/crud/tt_config.tt

 % vi root/crud/tt_config.tt

and change the URL values to your own local copy of the .js libs. I typically 
put them either in the root/static dir so that I can serve them with the 
Static::Simple plugin, or on some known web server dedicated to serving static 
content. If you want to serve them with Static::Simple (the easiest, but not 
what you want to do when you deploy to production), change the URL values to 
something like:


 ExtBaseURL  = c.uri_for('/static/extjs');
 LGBaseURL   = c.uri_for('/static/livegrid');

and unpack the .js stuff into root/static/extjs and root/static/livegrid.



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.


Yes, there is poor documentation around the tt_config.tt file. The assumption is 
that you have already copied it over and now need to modify it. But that's a 
poor assumption.


Doc patches welcome.



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.


'crud' is correct. The CatalystX::CRUD::YUI package is descended from RDGC, and 
RDGC is now mostly a wrapper around CXCY. RDGC just provides the bootstrapping 
code generation; CXCY is the actual Catalyst application.



--
Peter Karman  .  http://peknet.com/  .  pe...@peknet.com

___
List: Catalyst@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/


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

2010-01-06 Thread Peter Karman

Peter Karman wrote on 1/6/10 8:44 PM:



To get rid of those messages, just copy the installed tt_config.tt file 
to your local app and modify it. Example:


and I forgot the important part: remove this line from your local copy:

 ThisIsDefTTConfig = 1;

--
Peter Karman  .  http://peknet.com/  .  pe...@peknet.com

___
List: Catalyst@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/


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

2010-01-05 Thread Peter Karman
Adam Mackler wrote on 01/05/2010 11:05 AM:
 Hello everyone.  I'm relatively new to Catalyst, and could spend many
 hours asking questions of experts.  For the moment, this is the wall
 I've hit:
 
 Without going into too much background, I want to get CatalystX::CRUD
 implemented.  I feel that if I can just get a working example going I
 can make my own project work.  There is a tutorial,
 CatalystX::CRUD::Tutorial.  It's a good start, but hasn't been enough
 for me.  In particular there's a line in the docs: Assuming you have
 created a View and some templates, you can now search, browse, create,
 read, update and delete all your Album and Song data.
 
 I made a View, and I made some templates.  Obviously I'm still missing
 stuff, because I'm not yet searching, browsing, creating or reading
 the tutorial database data.  For example, a submit button on the forms
 I assume should be added to the tutorial example Forms.  My first
 guess put the button on the form, but hitting it just reloads the
 page.  And that's where I am: guessing, experimenting, reading,
 reading, experimenting, reading.
 
 It would be really great if there were a working example I could look
 at--or even just the missing pieces from the
 CatalystX::CRUD::Tutorial.  I figure that if there's anyone who knows
 what I want to know, this is the best place to look.
 

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/  .  pe...@peknet.com

___
List: Catalyst@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/