Re: Differentiating Kohana modules from Gallery modules
Bharat Mediratta <[email protected]> Fri, 31 May 2013 08:28:51 -0700
| Newsgroups | gmane.comp.web.gallery.devel |
|---|---|
| Message-ID | <CAESa+_kGZ6kHZCFQ3iBxWwsMnCmPyNNadTjS0fsvXbOarGeCZQ@mail.gmail.com> |
--===============5529822309570221608== Content-Type: multipart/alternative; boundary=001a11c3183808e8c304de054894 --001a11c3183808e8c304de054894 Content-Type: text/plain; charset=ISO-8859-1 Shad and I discussed this in person last week and I *think* the consensus was that we'd try to do something lightweight along the lines of: official gallery modules (have module.info, come with the tarball) live in modules contrib gallery modules (have module.info, come from wherever) live in modules-contrib kohana modules (no module.info) are hidden away like in system/modules I'm going to think about this some more. On Wed, May 1, 2013 at 1:36 PM, Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> wrote: > Hey Bharat, > > I agree - it's a bit odd to have them in the same place. There's a few > other things I was thinking would be nice to accomplish with a re-org, too: > - separate contrib stuff from the main codebase > - separate site-specific mods from the main codebase > - make our lib directory less of an exception to all rules > - make it clear what can and cannot be overridden in the gallery module > > In the end, I think this would give us a structure that is: > - easier for us to maintain > - easier for users to maintain and upgrade > - easier for us to communicate to other devs > - easier for us to communicate to Kohana > > This was one of my meta points with the whole upgrade discussion a couple > weeks ago... sorry I didn't reply sooner. I revised what I wrote back > then, and v2 is below. > > ---- > > OVERVIEW > > Kohana 3 is pretty agnostic when it comes to module/theme locations. > APPPATH and SYSPATH are important, but MODPATH really isn't. In fact, > grepping for MODPATH will find one match in Debug::path() which can (and > should!) be easily overridden. However, there's a big boon to having > *everything* (including SYSPATH and APPPATH) use the same module structure. > > We leveraged these facts some in Gallery 3.0.x (e.g. MODPATH vs. > THEMEPATH), but I say we should do so more in Gallery 3.1.x. > > So, here's my new idea using eight main subdirectories. > > First, the installer. > - installer > > Next, the three "core" directories. These should never be modified by the > end user. A Gallery-wide upgrade simply deletes and replaces these. > - core: application, system, and all third-party modules; no module.info files > here > - modules-gallery: all other modules gallery ships with > - themes-gallery: wind, admin_wind, and lib > > Then, the two "contrib" directories. The end user may need to *install* > these, but should never *modify* them. These are shipped empty, with > only a README file each. > - modules-contrib > - themes-contrib > > Then, the two "site-specific" directories. This is where all config, > custom code, and other tweaks should go. The end user is highly encouraged > to modify stuff here :-). > - bin: shipped with only README and .htaccess files > - site: all custom code goes here; see more info below > > Finally, the var directory. This is where all of our data goes. The end > user shouldn't need to modify things directly here. > - var > > Once we do this, we can remove every instance of MODPATH and > Gallery::find_file() in the core code and replace it with > Kohana::find_file(). > > ---- > > DETAILS - MAIN > > Here's a sketch of what Gallery would look like. For brevity, I've > omitted all files and subdirs with the exception of vendor. > > gallery > |-- bin > |-- core > | |-- application [Note 1] > | | `-- vendor > | | `-- htmlpurifier > | |-- cache > | |-- database > | |-- formo > | |-- orm > | |-- image > | |-- pagination > | |-- unittest > | `-- system > |-- installer > |-- modules-contrib > |-- modules-gallery > | |-- akismet > | |-- comment > | |-- exif > | | `-- vendor > | | `-- exifer > | |-- g2_import > | |-- gallery [Note 2] > | | `-- vendor > | | |-- jquery-file-upload [Note 3] > | | |-- mediaelementjs > | | `-- joomla > | |-- gallery_unittest > | |-- image_block > | |-- info > | |-- notification > | |-- organize > | |-- recaptcha > | |-- rest > | |-- rss > | |-- search > | |-- server_add > | |-- slideshow > | |-- tag > | |-- user > | |-- watermark > |-- site [Note 4] > |-- themes-contrib > |-- themes-gallery > | |-- admin_wind > | |-- lib [Note 5] > | `-- wind > `-- var [Note 6] > |-- albums > |-- caches > |-- logs > |-- modules > |-- resizes > |-- thumbs > |-- tmp > `-- uploads > > Note 1: application includes bootstrap, purifier, and > load_modules/load_themes code. This stuff can never be overridden. > Note 2: gallery includes code to swap the active theme for admin and/or > override if needed. > Note 3: jquery-file-upload will replace uploadify/swfobject (or maybe > plupload). > Note 4: site details are below. > Note 5: lib details are below. > Note 6: var root directory is empty, and the database config has been > moved to site. > > ---- > > DETAILS - SITE AND LIB > > Both of these directories follow the standard Kohana module structure. > > My goal is to encourage end users to use the site directory for *all* > tweaks of any kind. It's full of a bunch of templates, which they can > modify (and then remove .tmpl) to change Gallery without actually touching > the core or contrib files. This is a nice "contrib module breeding > ground," too. > > site > |-- README.md (tells how to use this directory) > |-- init.tmpl (this takes the place of the old local.php file) > |-- assets > | |-- apple-touch-icon.png.tmpl (these images used to be in lib) > | |-- favicon.ico.tmpl > | |-- logo.png.tmpl > | |-- site.css.tmpl (custom css, which is loaded last, goes here) > | `-- site.js.tmpl (custom js, which is loaded last, goes here) > |-- classes > | |-- Example.php.tmpl (tells how to override a class instead of > modifying it directly) > | `-- Hook (each template includes a list of possible > functions) > | |-- Rest > | | `-- Site.php.tmpl > | |-- SiteEvent.php.tmpl > | |-- SiteRss.php.tmpl > | |-- SiteTask.php.tmpl > | `-- SiteTheme.php.tmpl > `-- config > `-- database.php (this was var/database.php in 3.0.x) > > Also, I'd like to move the lib directory around a bit to make it like the > other modules, remove the things that aren't specific to the theme > (uploader and movie player), and then put it as a theme subdir. I used a > couple wildcards for brevity below. The end result would look like this: > > lib > |-- assets > | |-- apple-touch-icon.png > | |-- favicon.ico > | |-- logo.png > | |-- gallery*.js > `-- vendor > |-- jquery*.js > |-- json*.js > |-- superfish > `-- yui > > ---- > > MODULE ORDER > > Our complete module order would look like this: > > core/application (APPPATH, req'd by Kohana) > modules-gallery/gallery_unittest (if TEST_MODE) > core/unittest (if TEST_MODE) > site > [active theme] > themes-gallery/lib > [active modules...] > [active identity provider] > modules-gallery/gallery > core/cache > core/database > core/formo > core/image > core/orm > core/pagination > core/system (SYSPATH req'd by Kohana) > > Additionally, during bootstrap and configuration, we load a few modules before > the whole list. Note that the gallery module is *not* in here, since > anything we'd use from it could never be overridden (and hence that bit of > code should be in the application dir instead). > > core/application (APPPATH req'd by Kohana) > site (allows init to be run) > core/cache > core/database > core/orm > core/system (SYSPATH req'd by Kohana) > > ---- > > Thoughts? > > Take care, > Shad > > > On 1 May 2013 20:09, Bharat Mediratta <[email protected]> wrote: > >> >> Now in 3.1.x we have a bunch of Kohana modules that are slightly >> different but sit right next to Gallery modules: >> cache, database, formo, image, orm, pagination, unittest >> >> This is a little weird in that these new modules: >> a) don't show up in the module admin >> b) are activated in a special way where we enumerate them individually >> c) lack the trappings of a gallery module (module.info, installer, etc) >> >> This is somewhat confusing. I was thinking that it might make sense to >> have a separate subdirectory for Kohana modules to make it clear that >> they're really different. I haven't thought much further than this. I'm >> sure there'll be some complications because expect all modules to be >> directly under MODPATH. Any thoughts? Perhaps we can prefix all the >> module names with an underscore or something to visually differentiate >> them? >> >> If we can separate them then it makes scanning the Gallery code >> separately from the Kohana code much easier. I don't always want to grep >> all the non-Gallery code when I'm looking for stuff to change. The >> File_Structure_Test is doing more work (see GalleryCodeFilterIterator for >> an example) >> than it needs to. Devs might be a little less confused.. :-) >> >> thoughts? >> -Bharat >> >> >> ------------------------------------------------------------------------------ >> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET >> Get 100% visibility into your production application - at no cost. >> Code-level diagnostics for performance bottlenecks with <2% overhead >> Download for free and get started troubleshooting in minutes. >> http://p.sf.net/sfu/appdyn_d2d_ap1 >> __[ g a l l e r y - d e v e l ]_________________________ >> >> [ list info/archive --> http://gallery.sf.net/lists.php ] >> [ gallery info/FAQ/download --> http://gallery.sf.net ] >> > > --001a11c3183808e8c304de054894 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><br><div style>Shad and I discussed this in person last we= ek and I <i>think</i>=A0the consensus was that we'd try to do something= lightweight along the lines of:</div><div style><br></div><div style>offic= ial gallery modules (have <a href=3D"http://module.info">module.info</a>, c= ome with the tarball) live in modules</div> <div style>contrib gallery modules (have <a href=3D"http://module.info">mod= ule.info</a>, come from wherever) live in modules-contrib</div><div style>k= ohana modules (no <a href=3D"http://module.info">module.info</a>) are hidde= n away like in system/modules</div> <div style><br></div><div style>I'm going to think about this some more= .</div><div style><br></div><div style><br></div></div><div class=3D"gmail_= extra"><br><br><div class=3D"gmail_quote">On Wed, May 1, 2013 at 1:36 PM, S= had Laws <span dir=3D"ltr"><<a href=3D"mailto:shad-xpYdmXCiSuZWk0Htik3J/[email protected]" target= =3D"_blank">shad-xpYdmXCiSuZWk0Htik3J/[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><span style=3D"font-fa= mily:arial,sans-serif;font-size:13px">Hey Bharat,</span></div><div><span st= yle=3D"font-family:arial,sans-serif;font-size:13px"><br> </span></div><div><span style=3D"font-family:arial,sans-serif;font-size:13p= x">I agree - it's a bit odd to have them in the same place. =A0There= 9;s a few other things I was thinking would be nice to accomplish with a re= -org, too:</span></div> <div><span style=3D"font-family:arial,sans-serif;font-size:13px">- separate= contrib stuff from the main codebase</span></div><div><span style=3D"font-= family:arial,sans-serif;font-size:13px">- separate site-specific mods from = the main codebase</span></div> <div><span style=3D"font-family:arial,sans-serif;font-size:13px">- make our= lib directory less of an exception to all rules</span></div><div><span sty= le=3D"font-family:arial,sans-serif;font-size:13px">- make it clear what can= and cannot be overridden in the gallery module</span></div> <div><br></div><div><font face=3D"arial, sans-serif">In the end, I think th= is would give us a structure that is:</font></div><div><font face=3D"arial,= sans-serif">- easier for us to maintain</font></div><div> <font face=3D"arial, sans-serif">- easier for users to maintain and upgrade= </font></div><div><font face=3D"arial, sans-serif">- easier for us to commu= nicate to other devs</font></div><div><font face=3D"arial, sans-serif">- ea= sier for us to communicate to Kohana</font></div> <div><font face=3D"arial, sans-serif"><br></font></div><div><font face=3D"a= rial, sans-serif">This was one of my meta points with the whole upgrade dis= cussion a couple weeks ago... sorry I didn't reply sooner. =A0I revised= what I wrote back then, and v2 is below.</font></div> <span style=3D"font-family:arial,sans-serif;font-size:13px"><div><span styl= e=3D"font-family:arial,sans-serif;font-size:13px"><br></span></div>----</sp= an><br style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"f= ont-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">OVERVIEW</span>= <br style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"font= -family:arial,sans-serif;font-size:13px"><span style=3D"font-family:arial,s= ans-serif;font-size:13px">Kohana 3 is pretty agnostic when it comes to modu= le/theme locations. =A0APPPATH and SYSPATH are important, but MODPATH reall= y isn't. =A0In fact, grepping for MODPATH will find one match in Debug:= :path() which can (and should!) be easily overridden. =A0However, there'= ;s a big boon to having *everything* (including SYSPATH and APPPATH) use th= e same module structure.</span><br style=3D"font-family:arial,sans-serif;fo= nt-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">We leveraged these facts some in= Gallery 3.0.x (e.g. MODPATH vs. THEMEPATH), but I say we should do so more= in Gallery 3.1.x.</span><br style=3D"font-family:arial,sans-serif;font-siz= e:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">So, here's my new idea using= eight main subdirectories.</span><br style=3D"font-family:arial,sans-serif= ;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">First, the installer.</span><br = style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"font-f= amily:arial,sans-serif;font-size:13px">- installer</span><br style=3D"font-= family:arial,sans-serif;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">Next, the three "core"= directories. =A0These should never be modified by the end user. =A0A Galle= ry-wide upgrade simply deletes and replaces these.</span><br style=3D"font-= family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">- core: applica= tion, system, and all third-party=A0</span><span style=3D"font-family:arial= ,sans-serif;font-size:13px">modules</span><span style=3D"font-family:arial,= sans-serif;font-size:13px">; no=A0</span><a href=3D"http://module.info/" st= yle=3D"font-family:arial,sans-serif;font-size:13px" target=3D"_blank">modul= e.info</a><span style=3D"font-family:arial,sans-serif;font-size:13px">=A0fi= les here</span><br style=3D"font-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">-=A0</span><spa= n style=3D"font-family:arial,sans-serif;font-size:13px">modules</span><span= style=3D"font-family:arial,sans-serif;font-size:13px">-gallery: all other= =A0</span><span style=3D"font-family:arial,sans-serif;font-size:13px">modul= es</span><span style=3D"font-family:arial,sans-serif;font-size:13px">=A0gal= lery ships with</span><br style=3D"font-family:arial,sans-serif;font-size:1= 3px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">- themes-galler= y: wind, admin_wind, and lib</span><br style=3D"font-family:arial,sans-seri= f;font-size:13px"><br style=3D"font-family:arial,sans-serif;font-size:13px"= > <span style=3D"font-family:arial,sans-serif;font-size:13px">Then, the two &= quot;</span><span style=3D"font-family:arial,sans-serif;font-size:13px">con= trib</span><span style=3D"font-family:arial,sans-serif;font-size:13px">&quo= t; directories. =A0The end user may need to *install* these, but should nev= er *modify* them. =A0</span><span style=3D"font-family:arial,sans-serif;fon= t-size:13px">These are shipped empty, with only a README file each.</span><= br style=3D"font-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">-=A0</span><spa= n style=3D"font-family:arial,sans-serif;font-size:13px">modules</span><span= style=3D"font-family:arial,sans-serif;font-size:13px">-</span><span style= =3D"font-family:arial,sans-serif;font-size:13px">contrib</span><br style=3D= "font-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">- themes-</span= ><span style=3D"font-family:arial,sans-serif;font-size:13px">contrib</span>= <br style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"font= -family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Then, the two &= quot;site-specific" directories. =A0This is where all config, custom c= ode, and other tweaks should go. =A0The end user is highly encouraged to mo= dify stuff here :-).</span><br style=3D"font-family:arial,sans-serif;font-s= ize:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">- bin: shipped = with only README and .htaccess files</span><br style=3D"font-family:arial,s= ans-serif;font-size:13px"><span style=3D"font-family:arial,sans-serif;font-= size:13px">- site: all custom code goes here; see more info below</span><br= style=3D"font-family:arial,sans-serif;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">Finally, the var directory. =A0T= his is where all of our data goes. =A0The end user shouldn't need to mo= dify things directly here.</span><br style=3D"font-family:arial,sans-serif;= font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">- var</span><br= style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"font-fa= mily:arial,sans-serif;font-size:13px"><span style=3D"font-family:arial,sans= -serif;font-size:13px">Once we do this, we can remove every instance of MOD= PATH and Gallery::find_file() in the core code and replace it with Kohana::= find_file().</span><br style=3D"font-family:arial,sans-serif;font-size:13px= "> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">----</span><br style=3D"font-fam= ily:arial,sans-serif;font-size:13px"><br style=3D"font-family:arial,sans-se= rif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">DETAILS - MAIN<= /span><br style=3D"font-family:arial,sans-serif;font-size:13px"><br style= =3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"font-family= :arial,sans-serif;font-size:13px">Here's a sketch of what Gallery would= look like. =A0For brevity, I've omitted all files and subdirs with the= exception of vendor.</span><br style=3D"font-family:arial,sans-serif;font-= size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><font face=3D"cou= rier new, monospace" style=3D"font-size:13px">gallery<br>|-- bin<br>|-- cor= e<br>| =A0 |-- application =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [Note 1]<br>| = =A0 | =A0 `-- vendor<br>| =A0 | =A0 =A0 =A0 `-- htmlpurifier<br> | =A0 |-- cache<br>| =A0 |-- database<br>| =A0 |-- formo<br>| =A0 |-- orm<b= r>| =A0 |-- image<br>| =A0 |-- pagination<br>| =A0 |-- unittest<br>| =A0 `-= - system<br>|-- installer<br>|--=A0<span>modules</span>-<span>contrib</span= ><br> |--=A0<span>modules</span>-gallery<br>| =A0 |-- akismet<br>| =A0 |-- commen= t<br>| =A0 |-- exif<br>| =A0 | =A0 `-- vendor<br>| =A0 | =A0 =A0 =A0 `-- ex= ifer<br>| =A0 |-- g2_import<br>| =A0 |-- gallery =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 [Note 2]<br>| =A0 | =A0 `-- vendor<br> | =A0 | =A0 =A0 =A0 |-- jquery-file-upload =A0[Note 3]<br>| =A0 | =A0 =A0 = =A0 |-- mediaelementjs<br>| =A0 | =A0 =A0 =A0 `-- joomla<br>| =A0 |-- galle= ry_unittest<br>| =A0 |-- image_block<br>| =A0 |-- info<br>| =A0 |-- notific= ation<br>| =A0 |-- organize<br>| =A0 |-- recaptcha<br> | =A0 |-- rest<br>| =A0 |-- rss<br>| =A0 |-- search<br>| =A0 |-- server_add= <br>| =A0 |-- slideshow<br>| =A0 |-- tag<br>| =A0 |-- user<br>| =A0 |-- wat= ermark<br>|-- site =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[= Note 4]<br>|-- themes-<span>contrib</span><br> |-- themes-gallery<br>| =A0 |-- admin_wind<br>| =A0 |-- lib =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [Note 5]<br>| =A0 `-- wind<br>`-- var =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [Note 6]<br>=A0 =A0 |--= albums<br>=A0 =A0 |-- caches<br>=A0 =A0 |-- logs<br>=A0 =A0 |--=A0<span>mo= dules</span><br> =A0 =A0 |-- resizes<br>=A0 =A0 |-- thumbs<br>=A0 =A0 |-- tmp<br>=A0 =A0 `--= uploads<br></font><br style=3D"font-family:arial,sans-serif;font-size:13px= "><span style=3D"font-family:arial,sans-serif;font-size:13px">Note 1: appli= cation includes bootstrap, purifier, and load_modules/load_themes code. =A0= This stuff can never be overridden.</span><br style=3D"font-family:arial,sa= ns-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Note 2: gallery= includes code to swap the active theme for admin and/or override if needed= .</span><br style=3D"font-family:arial,sans-serif;font-size:13px"><span sty= le=3D"font-family:arial,sans-serif;font-size:13px">Note 3: jquery-file-uplo= ad will replace uploadify/swfobject (or maybe plupload).</span><br style=3D= "font-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Note 4: site de= tails are below.</span><br style=3D"font-family:arial,sans-serif;font-size:= 13px"><span style=3D"font-family:arial,sans-serif;font-size:13px">Note 5: l= ib details are below.</span><br style=3D"font-family:arial,sans-serif;font-= size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Note 6: var roo= t directory is empty, and the database config has been moved to site.</span= ><br style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"fon= t-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">----</span><br = style=3D"font-family:arial,sans-serif;font-size:13px"><br style=3D"font-fam= ily:arial,sans-serif;font-size:13px"><span style=3D"font-family:arial,sans-= serif;font-size:13px">DETAILS - SITE AND LIB</span><br style=3D"font-family= :arial,sans-serif;font-size:13px"> <br>Both of these directories follow the standard Kohana module structure.<= div><br><span style=3D"font-family:arial,sans-serif;font-size:13px">My goal= is to encourage end users to use the site directory for *all* tweaks of an= y kind. =A0It's full of a bunch of templates, which they can modify (an= d then remove .tmpl) to change Gallery without actually touching the core o= r=A0</span><span style=3D"font-family:arial,sans-serif;font-size:13px">cont= rib</span><span style=3D"font-family:arial,sans-serif;font-size:13px">=A0fi= les. =A0This is a nice "contrib module breeding ground," too.</sp= an><br style=3D"font-family:arial,sans-serif;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><font face=3D"cou= rier new, monospace" style=3D"font-size:13px">site<br>|-- README.md =A0 (te= lls how to use this directory)<br>|-- init.tmpl =A0 (this takes the place o= f the old local.php file)<br> |-- assets<br>| =A0 |-- apple-touch-icon.png.tmpl =A0 (these images used to= be in lib)<br>| =A0 |-- favicon.ico.tmpl<br>| =A0 |-- logo.png.tmpl<br>| = =A0 |-- site.css.tmpl =A0 =A0 (custom css, which is loaded last, goes here)= <br>| =A0 `-- site.js.tmpl =A0 =A0 =A0(custom js, which is loaded last, goe= s here)<br> |-- classes<br>| =A0 |-- Example.php.tmpl =A0(tells how to override a class= instead of modifying it directly)<br>| =A0 `-- Hook =A0 =A0 =A0 =A0 =A0 = =A0 =A0(each template includes a list of possible functions)<br>| =A0 =A0 = =A0 |-- Rest<br>| =A0 =A0 =A0 | =A0 `-- Site.php.tmpl<br> | =A0 =A0 =A0 |-- SiteEvent.php.tmpl<br>| =A0 =A0 =A0 |-- SiteRss.php.tmpl<= br>| =A0 =A0 =A0 |-- SiteTask.php.tmpl<br>| =A0 =A0 =A0 `-- SiteTheme.php.t= mpl<br>`-- config<br>=A0 =A0 `-- database.php =A0 =A0 =A0(this was var/data= base.php in 3.0.x)<br></font><br style=3D"font-family:arial,sans-serif;font= -size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Also, I'd l= ike to move the lib directory around a bit to make it like the other=A0</sp= an><span style=3D"font-family:arial,sans-serif;font-size:13px">modules</spa= n><span style=3D"font-family:arial,sans-serif;font-size:13px">, remove the = things that aren't specific to the theme (uploader and movie player), a= nd then put it as a theme subdir. =A0I used a couple wildcards for brevity = below. =A0The end result would look like this:</span><br style=3D"font-fami= ly:arial,sans-serif;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><font face=3D"cou= rier new, monospace" style=3D"font-size:13px">lib<br>|-- assets<br>| =A0 |-= - apple-touch-icon.png<br>| =A0 |-- favicon.ico<br>| =A0 |-- logo.png<br>| = =A0 |-- gallery*.js<br> `-- vendor<br>=A0 =A0 |-- jquery*.js<br>=A0 =A0 |-- json*.js<br>=A0 =A0 |--= superfish<br>=A0 =A0 `-- yui<br></font><br style=3D"font-family:arial,sans= -serif;font-size:13px"><span style=3D"font-family:arial,sans-serif;font-siz= e:13px">----</span><br style=3D"font-family:arial,sans-serif;font-size:13px= "> <br style=3D"font-family:arial,sans-serif;font-size:13px"><span style=3D"fo= nt-family:arial,sans-serif;font-size:13px">MODULE ORDER</span><br style=3D"= font-family:arial,sans-serif;font-size:13px"><br style=3D"font-family:arial= ,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Our complete mo= dule order would look like this:</span><br style=3D"font-family:arial,sans-= serif;font-size:13px"><br style=3D"font-family:arial,sans-serif;font-size:1= 3px"> <font face=3D"courier new, monospace" style=3D"font-size:13px">core/applica= tion (APPPATH, req'd by Kohana)<br><span>modules</span>-gallery/gallery= _unittest (if TEST_MODE)<br>core/unittest (if TEST_MODE)<br>site<br> [active theme]<br>themes-gallery/lib<br>[active=A0<span>modules</span>...]<= br>[active identity provider]<br><span>modules</span>-gallery/gallery<br></= font><span style=3D"font-family:'courier new',monospace;font-size:1= 3px">core/cache</span><br style=3D"font-family:'courier new',monosp= ace;font-size:13px"> <span style=3D"font-family:'courier new',monospace;font-size:13px">= core/database</span><br style=3D"font-family:'courier new',monospac= e;font-size:13px"><span style=3D"font-family:'courier new',monospac= e;font-size:13px">core/formo</span><br style=3D"font-family:'courier ne= w',monospace;font-size:13px"> <span style=3D"font-family:'courier new',monospace;font-size:13px">= core/image</span><br style=3D"font-family:'courier new',monospace;f= ont-size:13px"><span style=3D"font-family:'courier new',monospace;f= ont-size:13px">core/orm</span><br style=3D"font-family:'courier new'= ;,monospace;font-size:13px"> <font face=3D"courier new, monospace" style=3D"font-size:13px">core/paginat= ion<br>core/system (SYSPATH req'd by Kohana)<br></font><br style=3D"fon= t-family:arial,sans-serif;font-size:13px"><span style=3D"font-family:arial,= sans-serif;font-size:13px">Additionally, during bootstrap and configuration= , we load a few=A0</span><span style=3D"font-family:arial,sans-serif;font-s= ize:13px">modules</span><span style=3D"font-family:arial,sans-serif;font-si= ze:13px">=A0before the whole list. =A0Note that the gallery module is *not*= in here, since anything we'd use from it could never be overridden (an= d hence that bit of code should be in the application dir instead).</span><= br style=3D"font-family:arial,sans-serif;font-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><font face=3D"cou= rier new, monospace" style=3D"font-size:13px">core/application (APPPATH req= 'd by Kohana)<br>site (allows init to be run)<br>core/cache<br></font><= span style=3D"font-family:'courier new',monospace;font-size:13px">c= ore/database</span><br style=3D"font-family:'courier new',monospace= ;font-size:13px"> <font face=3D"courier new, monospace" style=3D"font-size:13px">core/orm<br>= core/system (SYSPATH req'd by Kohana)<br></font><br style=3D"font-famil= y:arial,sans-serif;font-size:13px"><span style=3D"font-family:arial,sans-se= rif;font-size:13px">----</span><br style=3D"font-family:arial,sans-serif;fo= nt-size:13px"> <br style=3D"font-family:arial,sans-serif;font-size:13px"><font face=3D"ari= al, sans-serif">Thoughts?</font></div><div><br style=3D"font-family:arial,s= ans-serif"><span style=3D"font-family:arial,sans-serif;font-size:13px">Take= care,</span><br style=3D"font-family:arial,sans-serif;font-size:13px"> <span style=3D"font-family:arial,sans-serif;font-size:13px">Shad</span><br>= </div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote"><= div><div class=3D"h5">On 1 May 2013 20:09, Bharat Mediratta <span dir=3D"lt= r"><<a href=3D"mailto:[email protected]" target=3D"_blank">bharat@menal= to.com</a>></span> wrote:<br> </div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo= rder-left:1px #ccc solid;padding-left:1ex"><div><div class=3D"h5"><div dir= =3D"ltr"><br><div>Now in 3.1.x we have a bunch of Kohana modules that are s= lightly different but sit right next to Gallery modules:</div> <div>=A0 cache, database, formo, image, orm, pagination, unittest<br> </div><div><br></div><div>This is a little weird in that these new modules:= </div><div>a) don't show up in the module admin</div><div>b) are activa= ted in a special way where we enumerate them individually</div> <div>c) lack the trappings of a gallery module (<a href=3D"http://module.in= fo" target=3D"_blank">module.info</a>, installer, etc)=A0</div><div><br></d= iv><div>This is somewhat confusing. =A0I was thinking that it might make se= nse to have a separate subdirectory for Kohana modules to make it clear tha= t they're really different. =A0I haven't thought much further than = this. =A0I'm sure there'll be some complications because expect all= modules to be directly under MODPATH. =A0Any thoughts? =A0Perhaps we can p= refix all the module names with an underscore or something to visually diff= erentiate them? =A0</div> <div><br></div><div>If we can separate them then it makes scanning the Gall= ery code separately from the Kohana code much easier. =A0I don't always= want to grep all the non-Gallery code when I'm looking for stuff to ch= ange. =A0The File_Structure_Test is doing more work (see GalleryCodeFilterI= terator for an example)=A0</div> <div>than it needs to. =A0Devs might be a little less confused.. :-)</div><= div><br></div><div>thoughts?</div><span><font color=3D"#888888"><div>-Bhara= t</div></font></span></div> <br></div></div>-----------------------------------------------------------= -------------------<br> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET<br> Get 100% visibility into your production application - at no cost.<br> Code-level diagnostics for performance bottlenecks with <2% overhead<br> Download for free and get started troubleshooting in minutes.<br> <a href=3D"http://p.sf.net/sfu/appdyn_d2d_ap1" target=3D"_blank">http://p.s= f.net/sfu/appdyn_d2d_ap1</a><br>__[ g a l l e r y - d e v e l ]____________= _____________<br> <br> [ list info/archive --> <a href=3D"http://gallery.sf.net/lists.php" targ= et=3D"_blank">http://gallery.sf.net/lists.php</a> ]<br> [ gallery info/FAQ/download --> <a href=3D"http://gallery.sf.net" target= =3D"_blank">http://gallery.sf.net</a> ]<br></blockquote></div><br></div> </blockquote></div><br></div> --001a11c3183808e8c304de054894-- --===============5529822309570221608== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 --===============5529822309570221608== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline __[ g a l l e r y - d e v e l ]_________________________ [ list info/archive --> http://gallery.sf.net/lists.php ] [ gallery info/FAQ/download --> http://gallery.sf.net ] --===============5529822309570221608==--