On Mon, Dec 19, 2011 at 19:38, <icepa...@lavabit.com> wrote: > Okay sure, you can make it simpler, but you still have to type a bunch of > stuff when you are making a controller. > > And now that we have 'set :views' I think it comes with to add the other > stuff because you immediately think, oh well then I can set controllers to > right? But you can't. That was actually the first thing I tried when I was > gonna solve the problem, which says something. How will it work? The same > way that 'set :views' works of course.
Loading views is more complex than loading plain Ruby files, so this is why it's > And what you kind of have to consider is that you will always have to > learn how to use something. I mean if you didn't want any magic at all you > wouldn't turn to a framework, you would sit there and write you own. You > still have to learn how R works when using camping for example.. And how > is the relationship between the model, the view and the controller > defined? You always have to learn things when turning to a framework. > > And let's not forget that this is NOT forced on you, if you wanted to skip > all of this and just require ever controller you can do that if you want > to. This is just a trick that you can use if you want to. That's really > what I like about Camping, it doesn't force a bunch of stuff on you. There > is things that you can do if you want to. > > For example when naming your controllers. You CAN name them 'class PageN' > instead of 'class Page < R '/page/(\d+)'. And that's also magic. It isn't > magic that you have to use. But you can, that's what I love Camping for. > > There's probably other examples of magic in Camping that I either don't > know of or can think of. > > Being able to set :views is one of the best things I've been able to do > since starting Camping. And set :controllers would be just as wonderful. > > So just consider it. I certainly understand your points, but: 1. Bytes are precious 2. These are just cleverly disguised `require`s 3. You can no longer load the files with a regular `require` Writing `require "app/controllers/foo" 5 times isn't *that* much more code. Beside, you don't have to do the one-file-per-controller. It's perfectly fine with many controllers in one file. I just think it provides too little value for the bytes it takes to implement it. Nothing stops us from implementing it as an extension (or whatever it should be called) though :-) _______________________________________________ Camping-list mailing list Camping-list@rubyforge.org http://rubyforge.org/mailman/listinfo/camping-list