Is CXC the right tool for this job?

8 views
Skip to first unread message

mackler

unread,
Jan 25, 2011, 4:52:20 AM1/25/11
to CatalystX::CRUD
I'm in the planning stages of a new database-driven web application,
and I'm trying to decide whether CatalystX::CRUD is the most
appropriate technology to use for my Catalyst Controllers.

My plan is to use Ext JS to create all the forms for the user
interface, and use REST requests and AJAX/JSON to communicate between
the client-browser and the server.

Brief examination of CXC is leading me to believe that HTML Forms are
an integral part of CXC. I don't believe I will need the server to
ever make an HTML Form. What appeals to me about CXC is related to my
hope that I can avoid writing the crud-functions that will update
records in the database. But after a bit of experimentation I'm
already dealing with complaints that I didn't set "form_class" in my
CatalystX::CRUD::Controller subclass.

Is CXC what I want to be using? I see there is another perl module
claiming to do REST requests. It seems very minimal compared to CXC,
but maybe CXC is more than I need.

Any input or suggestions will be greatly appreciated!

Adam Mackler

Peter Karman

unread,
Feb 2, 2011, 9:39:17 AM2/2/11
to CatalystX::CRUD
Hey Adam,

Sorry to take so long in response here; I'm out of town.

CXC itself can definitely be used with ExtJS. I use ExtJS almost
exclusively now myself.

The Form component of CXC is definitely not exclusively for HTML and
is intended primarily as a validation layer between the client and the
Model. It can be used for HTML generation (as CatalystX::CRUD::YUI
does) but does not have to be. My long-standing intention has been to
create a CatalystX::CRUD::ExtJS that does exactly what you are doing,
but using a (as-yet-unwritten) Rose::HTMLx::Form::ExtJS class to
generate the JS for the forms, rather than the HTML for the forms.
That way the client-side validation could be automatically created to
match the server-side validation, plus all the other UI niceties.

For ExtJS you can also turn on the CatalystX::CRUD::REST compatability
quite nicely.

So, yes, what you want is definitely possible and is in fact what
CatalystX::CRUD was intended for: a View-agnostic glue between
Controller, Model, Form and ORM.

FWIW, I have a ExtJS CRUD .js lib I've developed for $work that will
be open-sourced at the end of this month. It's not designed for
Catalyst or CXC but is instead server agnostic. Let me know if you're
interested and I can point you at it once it is available.
Reply all
Reply to author
Forward
0 new messages