« Dependent Type Constraints Part Two | Main | Why All the Hate? »

06/03/2009

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Dave Rolsky

[this is good] I'm not sure I get the MyApp::Web thing.MyApp::Model is, IMO, just a dumb convention. I prefer to just have MyApp::User, MyApp::Group, and so on. I figure if I'm going to use this convenient second-level namespace, I might as well use it for my core classes.I find MyApp::Web::Model really confusing. Do you have a non-web model as well? The model is the model, and is not web-specific (at least if you're doing it right). Yes, I'm familiar with the Reaction concepts of Interface vs Domain model, and that makes sense too, but that's not what you're proposing, AFAICT.I can sort of see MyApp::Web::Controller, although it's somewhat hard for me to imagine a non-web controller (do I need a full-blown set of controllers for a CLI?).That leaves MyApp::Web::View, which seems reasonable.I do love the use of share. I already do that myself, and also do the etc thing. I hate the Catalyst convention of root, which is completely arbitrary and bears no relation to any standard I know of.

John Napiorkowski

Yeah, I think the real meat of the model stuff should go into MyApp layer. Right now the default for Catalyst is to create these M/V/C directories and although the are probably needed for now (I see ...Web::Model as adapter or facade over the real models, just to decouple the website side) My hope is eventually we can ditch this in favor of something a bit simpler and more meaningful. That is for another thought experiment though, right now I am trying to work through my deployment pain and organization and wondering if we could do this better. There might be an easier solution to this than I have already proposed.

Michael Peters

I completely agree (with the shared data thing, not the Catalyst stuff since I don't use it) and this is needed for more than just Catalyst applications. I ran into lots of these problems with Smolder. File::ShareDir helped some, but it didn't get me all the way and I still needed to do a lot of work on my own. If you put some work into this, please think about how it can be abstracted outside of Catalyst to be useful to everyone.

John Napiorkowski

Somes of the guts for this already exist on CPAN, if you look up: File::BaseDir you can find it. So I'm not completely certain which additional bits I'd write would also be good as stand alone modules. Maybe the helpers for building install scripts and so forth and some plugins to Module::Install.Making this work properly on Windows and MacOS are also important to me, so I'd need a sort of base API with plugins to mimic the XDG locations.

The comments to this entry are closed.