Re: Speed Issues

alex black <[email protected]> Tue, 5 Jul 2005 13:10:31 -0700
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
> While RoR is fking cool in many ways.  In my opinion, it is not 
> _quite_ the holy of grails for building large websites.  This is due 
> largely to the design of MVC, and lack of a "nested application" 
> concept.

in a controller action method:

render_component :controller => "static",  :action => "whatever"

> For instance, (and I'm speaking largely out of ignorance).. I cannot 
> find an elegant way to have "site-wide" templates (header/footer) in 
> an MVC implementation without having to explicitly link to them from 
> each application's template.  There is no "top node" level in which 
> this can be done in RoR, or in any MVC design I've seen.

application.rb

class ApplicationController < ActionController::Base

then...

class CompanyController < ApplicationController
(so you inherit all of its helpers and templates)

it assumes if you have a layouts/application.rhtml to apply it to all 
pages. if you want to change the layout it's easy, all single, clear 
statements in ruby.

you define an application.rhtml which is a layout, which can include 
other layouts, and it is automatically applied to all views unless you 
specify another template.

you can include partials (templates) and render controllers _WITHIN_ 
templates.



> This effectively means that you're RoR apps are being developed 
> specific to the website's presentation.  Doing this means that 
> applications are not immediately portable from site to site.  You 
> would need to alter the applications templates to adapt to another 
> site's header and footer.

nope, works like a charm. all applications can be made completely 
portable and configurable via components, and easily packaged into 
gems, views are not complete, they are all partials.

I have many, many template includes and controllers rendering bits. It 
works wonderfully.

I don't want to sound like I just joined a cult, but I kind of did. 
Once you actually sit down and build an app with rails, everything and 
I mean _everything_ else feels like fumbling around in the darkness. It 
just _works_.

> The importance of this is argueable, but it does hender the ability to 
> create a vast library of portable applications as we we're trying to 
> do with nodes & vortex.

nope.

rails does this elegantly, right now.

come on jason, I wouldn't jump on a dumbass bandwagon, would I ;)?

> PS. Hi. =)

hey! :)


_a



-- 
alex black, founder
the turing studio, inc.

510.666.0074
[email protected]
http://www.turingstudio.com

2600 10th street, suite 635
berkeley, ca 94710


_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev