I''m going to start a new series on the cool stuff behind Camping, and would like some feedback from the campers. Are everything understandable? Any grammar/spelling errors? And please don''t spread the link, I''ll publish a spreadable link later :-) http://judofyr.net/drafts/camping-explained:the-beginning.html -- Magnus Holm
I like it. The self-eval is stuff that was there when I jumped in at 1.5, so I knew how it worked, but it remains fascinating. Suggested future topics: How a class can inherit from something that takes arguments (Index < R ''/''), and what it takes to override #service for middleware. I don''t understand the latter, and only half-understand the former. -- Eric On Sun, Jul 20, 2008 at 2:16 PM, Magnus Holm <judofyr at gmail.com> wrote:> I''m going to start a new series on the cool stuff behind Camping, and would > like some feedback from the campers. Are everything understandable? Any > grammar/spelling errors? And please don''t spread the link, I''ll publish a > spreadable link later :-) > > http://judofyr.net/drafts/camping-explained:the-beginning.html > > -- > Magnus Holm > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
Neat! I like it ^_^ As for those queries, Eric, I believe the answer is that R is a method which returns a class. Overriding services for middleware works because it''s the job of ''service'' to call the get, post, type methods in the Controllers. By overriding it, we can use ''super'' to call the original service method which runs the app controller, but we can add code above and below that call to ''super''. :)
I get that R is a method which returns the class; but it also uses a lesser-known Ruby callback called Class#inherited (http://www.ruby-doc.org/core/classes/Class.html#M000454) that blows my mind and could use talking about. The reason talking about #service would be cool is because it''s not an obvious function to decipher, yet is key to any developers getting into Camping who might want to expand it like you and Magnus did. -- Eric On Sun, Jul 20, 2008 at 6:13 PM, Bluebie, Jenna <blueberry at creativepony.com> wrote:> Neat! I like it ^_^ > > As for those queries, Eric, I believe the answer is that R is a method which > returns a class. > > Overriding services for middleware works because it''s the job of ''service'' > to call the get, post, type methods in the Controllers. By overriding it, we > can use ''super'' to call the original service method which runs the app > controller, but we can add code above and below that call to ''super''. :) > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
Both R and #service will be covered! Here''s the published url: http://judofyr.net/posts/camping-explained:the-beginning.html :-) On Mon, Jul 21, 2008 at 12:48 AM, Eric Mill <kprojection at gmail.com> wrote:> I get that R is a method which returns the class; but it also uses a > lesser-known Ruby callback called Class#inherited > (http://www.ruby-doc.org/core/classes/Class.html#M000454) that blows > my mind and could use talking about. > > The reason talking about #service would be cool is because it''s not an > obvious function to decipher, yet is key to any developers getting > into Camping who might want to expand it like you and Magnus did. > > -- Eric > > On Sun, Jul 20, 2008 at 6:13 PM, Bluebie, Jenna > <blueberry at creativepony.com> wrote: >> Neat! I like it ^_^ >> >> As for those queries, Eric, I believe the answer is that R is a method which >> returns a class. >> >> Overriding services for middleware works because it''s the job of ''service'' >> to call the get, post, type methods in the Controllers. By overriding it, we >> can use ''super'' to call the original service method which runs the app >> controller, but we can add code above and below that call to ''super''. :) >> _______________________________________________ >> Camping-list mailing list >> Camping-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/camping-list >> > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >-- Magnus Holm