[jifty-devel] Some naming questions about fragments
alexmv at bestpractical.com
Tue Dec 27 23:55:52 EST 2005
On Tue, 2005-12-27 at 23:02 -0500, David Glasser wrote:
> For consistency with _elements, should we rename fragments to
Fragments are accessible from any browser, so I *think* they shouldn't
get an underscore, which to me implies "private."
> Is there a good reason that we're floating around all three terms
> "region", "page region", and "fragment"? (Is it "region is a block
> on the page, fragment is mason on disk" or something? Or are they
> basically the same?)
The difference is niggling, and possibly not important. I think I
defined them in the glossary. Let me look. [comes back] Yup. Here
A section of HTML contained in a "region". Fragments are a kind of
standalone Mason component which the browser can request
individually. Because of this, they can only take strings and scalars
as arguments, not references or objects!
region is a "fragment". Think of the region as the box and the
fragment as the content in the box. See Jifty::PageRegion.
> Also, for convenience, should the app script make empty _elements and
> fragments directories?
> (And if every region must come from a fragments path, can't we just
> make that implicit in the path arg to Jifty->web->region? Or would
> that break because sometimes we're loading from the share/__jifty
> fragments dir?)
I know we considered it, but left it in mostly for explicit-ness. The
share/__jifty/framgents could be moved to share/fragements/__jifty if we
decided that that was the way to go.
More information about the jifty-devel