Re: Differentiating Kohana modules from Gallery modules
Shad Laws <shad-xpYdmXCiSuZWk0Htik3J/[email protected]> Wed, 1 May 2013 22:36:17 +0200
| Newsgroups | gmane.comp.web.gallery.devel |
|---|---|
| Message-ID | <CA+z51A4ix9tEVciaS7YVygpwh9=u5kazxpTWQDqSVxvee4-h2Q@mail.gmail.com> |
--===============3804056703403180620==
Content-Type: multipart/alternative; boundary=047d7b343c6617093404dbae1323
--047d7b343c6617093404dbae1323
Content-Type: text/plain; charset=UTF-8
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 ]
>
--047d7b343c6617093404dbae1323
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div style><span style=3D"font-family:arial,sans-serif;fon=
t-size:13px">Hey Bharat,</span></div><div style><span style=3D"font-family:=
arial,sans-serif;font-size:13px"><br></span></div><div style><span style=3D=
"font-family:arial,sans-serif;font-size:13px">I agree - it's a bit odd =
to have them in the same place. =C2=A0There's a few other things I was =
thinking would be nice to accomplish with a re-org, too:</span></div>
<div style><span style=3D"font-family:arial,sans-serif;font-size:13px">- se=
parate contrib stuff from the main codebase</span></div><div style><span st=
yle=3D"font-family:arial,sans-serif;font-size:13px">- separate site-specifi=
c mods from the main codebase</span></div>
<div style><span style=3D"font-family:arial,sans-serif;font-size:13px">- ma=
ke our lib directory less of an exception to all rules</span></div><div sty=
le><span style=3D"font-family:arial,sans-serif;font-size:13px">- make it cl=
ear what can and cannot be overridden in the gallery module</span></div>
<div style><br></div><div style><font face=3D"arial, sans-serif">In the end=
, I think this would give us a structure that is:</font></div><div style><f=
ont face=3D"arial, sans-serif">- easier for us to maintain</font></div><div=
style>
<font face=3D"arial, sans-serif">- easier for users to maintain and upgrade=
</font></div><div style><font face=3D"arial, sans-serif">- easier for us to=
communicate to other devs</font></div><div style><font face=3D"arial, sans=
-serif">- easier for us to communicate to Kohana</font></div>
<div style><font face=3D"arial, sans-serif"><br></font></div><div style><fo=
nt face=3D"arial, sans-serif">This was one of my meta points with the whole=
upgrade discussion a couple weeks ago... sorry I didn't reply sooner. =
=C2=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. =C2=A0APPPATH and SYSPATH are important, but MODPATH re=
ally isn't. =C2=A0In fact, grepping for MODPATH will find one match in =
Debug::path() which can (and should!) be easily overridden. =C2=A0However, =
there's a big boon to having *everything* (including SYSPATH and APPPAT=
H) use the same module structure.</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">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. =C2=A0These should never be modified by the end user. =C2=A0A=
Gallery-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=C2=A0</span><span class=3D"" style=3D"fon=
t-family:arial,sans-serif;font-size:13px">modules</span><span style=3D"font=
-family:arial,sans-serif;font-size:13px">; no=C2=A0</span><a href=3D"http:/=
/module.info/" target=3D"_blank" style=3D"font-family:arial,sans-serif;font=
-size:13px">module.info</a><span style=3D"font-family:arial,sans-serif;font=
-size:13px">=C2=A0files here</span><br style=3D"font-family:arial,sans-seri=
f;font-size:13px">
<span style=3D"font-family:arial,sans-serif;font-size:13px">-=C2=A0</span><=
span class=3D"" style=3D"font-family:arial,sans-serif;font-size:13px">modul=
es</span><span style=3D"font-family:arial,sans-serif;font-size:13px">-galle=
ry: all other=C2=A0</span><span class=3D"" style=3D"font-family:arial,sans-=
serif;font-size:13px">modules</span><span style=3D"font-family:arial,sans-s=
erif;font-size:13px">=C2=A0gallery ships with</span><br style=3D"font-famil=
y:arial,sans-serif;font-size:13px">
<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 class=3D"" style=3D"font-family:arial,sans-serif;font-siz=
e:13px">contrib</span><span style=3D"font-family:arial,sans-serif;font-size=
:13px">" directories. =C2=A0The end user may need to *install* these, =
but should never *modify* them. =C2=A0</span><span style=3D"font-family:ari=
al,sans-serif;font-size:13px">These are shipped empty, with only a README f=
ile each.</span><br style=3D"font-family:arial,sans-serif;font-size:13px">
<span style=3D"font-family:arial,sans-serif;font-size:13px">-=C2=A0</span><=
span class=3D"" style=3D"font-family:arial,sans-serif;font-size:13px">modul=
es</span><span style=3D"font-family:arial,sans-serif;font-size:13px">-</spa=
n><span class=3D"" style=3D"font-family:arial,sans-serif;font-size:13px">co=
ntrib</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 class=3D"" style=3D"font-family:arial,sans-serif;font-size:13px">con=
trib</span><br style=3D"font-family:arial,sans-serif;font-size:13px"><br st=
yle=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. =C2=A0This is where all config, custo=
m code, and other tweaks should go. =C2=A0The end user is highly encouraged=
to modify stuff here :-).</span><br style=3D"font-family:arial,sans-serif;=
font-size: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. =C2=
=A0This is where all of our data goes. =C2=A0The end user shouldn't nee=
d to modify 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. =C2=A0For brevity, I've omitted all files and subdirs with =
the exception of vendor.</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"cou=
rier new, monospace" style=3D"font-size:13px">gallery<br>|-- bin<br>|-- cor=
e<br>| =C2=A0 |-- application =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 [Note 1]<br>| =C2=A0 | =C2=A0 `-- vendor<br>| =C2=A0 | =C2=A0 =
=C2=A0 =C2=A0 `-- htmlpurifier<br>
| =C2=A0 |-- cache<br>| =C2=A0 |-- database<br>| =C2=A0 |-- formo<br>| =C2=
=A0 |-- orm<br>| =C2=A0 |-- image<br>| =C2=A0 |-- pagination<br>| =C2=A0 |-=
- unittest<br>| =C2=A0 `-- system<br>|-- installer<br>|--=C2=A0<span class=
=3D"">modules</span>-<span class=3D"">contrib</span><br>
|--=C2=A0<span class=3D"">modules</span>-gallery<br>| =C2=A0 |-- akismet<br=
>| =C2=A0 |-- comment<br>| =C2=A0 |-- exif<br>| =C2=A0 | =C2=A0 `-- vendor<=
br>| =C2=A0 | =C2=A0 =C2=A0 =C2=A0 `-- exifer<br>| =C2=A0 |-- g2_import<br>=
| =C2=A0 |-- gallery =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 [Note 2]<br>| =C2=A0 | =C2=A0 `-- vendor<br>
| =C2=A0 | =C2=A0 =C2=A0 =C2=A0 |-- jquery-file-upload =C2=A0[Note 3]<br>| =
=C2=A0 | =C2=A0 =C2=A0 =C2=A0 |-- mediaelementjs<br>| =C2=A0 | =C2=A0 =C2=
=A0 =C2=A0 `-- joomla<br>| =C2=A0 |-- gallery_unittest<br>| =C2=A0 |-- imag=
e_block<br>| =C2=A0 |-- info<br>| =C2=A0 |-- notification<br>| =C2=A0 |-- o=
rganize<br>| =C2=A0 |-- recaptcha<br>
| =C2=A0 |-- rest<br>| =C2=A0 |-- rss<br>| =C2=A0 |-- search<br>| =C2=A0 |-=
- server_add<br>| =C2=A0 |-- slideshow<br>| =C2=A0 |-- tag<br>| =C2=A0 |-- =
user<br>| =C2=A0 |-- watermark<br>|-- site =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[Note 4]<=
br>|-- themes-<span class=3D"">contrib</span><br>
|-- themes-gallery<br>| =C2=A0 |-- admin_wind<br>| =C2=A0 |-- lib =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 [Note 5]<br>| =C2=A0 `-- wind<br>`-- var =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Note=
6]<br>=C2=A0 =C2=A0 |-- albums<br>=C2=A0 =C2=A0 |-- caches<br>=C2=A0 =C2=
=A0 |-- logs<br>=C2=A0 =C2=A0 |--=C2=A0<span class=3D"">modules</span><br>
=C2=A0 =C2=A0 |-- resizes<br>=C2=A0 =C2=A0 |-- thumbs<br>=C2=A0 =C2=A0 |-- =
tmp<br>=C2=A0 =C2=A0 `-- uploads<br></font><br style=3D"font-family:arial,s=
ans-serif;font-size:13px"><span style=3D"font-family:arial,sans-serif;font-=
size:13px">Note 1: application includes bootstrap, purifier, and load_modul=
es/load_themes code. =C2=A0This stuff can never be overridden.</span><br st=
yle=3D"font-family:arial,sans-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. =C2=A0It's full of a bunch of templates, which they can modify =
(and then remove .tmpl) to change Gallery without actually touching the cor=
e or=C2=A0</span><span class=3D"" style=3D"font-family:arial,sans-serif;fon=
t-size:13px">contrib</span><span style=3D"font-family:arial,sans-serif;font=
-size:13px">=C2=A0files. =C2=A0This is a nice "contrib module breeding=
ground," too.</span><br style=3D"font-family:arial,sans-serif;font-si=
ze: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 =C2=A0 =
(tells how to use this directory)<br>|-- init.tmpl =C2=A0 (this takes the p=
lace of the old local.php file)<br>
|-- assets<br>| =C2=A0 |-- apple-touch-icon.png.tmpl =C2=A0 (these images u=
sed to be in lib)<br>| =C2=A0 |-- favicon.ico.tmpl<br>| =C2=A0 |-- logo.png=
.tmpl<br>| =C2=A0 |-- site.css.tmpl =C2=A0 =C2=A0 (custom css, which is loa=
ded last, goes here)<br>| =C2=A0 `-- site.js.tmpl =C2=A0 =C2=A0 =C2=A0(cust=
om js, which is loaded last, goes here)<br>
|-- classes<br>| =C2=A0 |-- Example.php.tmpl =C2=A0(tells how to override a=
class instead of modifying it directly)<br>| =C2=A0 `-- Hook =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(each template includes a list of possib=
le functions)<br>| =C2=A0 =C2=A0 =C2=A0 |-- Rest<br>| =C2=A0 =C2=A0 =C2=A0 =
| =C2=A0 `-- Site.php.tmpl<br>
| =C2=A0 =C2=A0 =C2=A0 |-- SiteEvent.php.tmpl<br>| =C2=A0 =C2=A0 =C2=A0 |--=
SiteRss.php.tmpl<br>| =C2=A0 =C2=A0 =C2=A0 |-- SiteTask.php.tmpl<br>| =C2=
=A0 =C2=A0 =C2=A0 `-- SiteTheme.php.tmpl<br>`-- config<br>=C2=A0 =C2=A0 `--=
database.php =C2=A0 =C2=A0 =C2=A0(this was var/database.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=C2=A0<=
/span><span class=3D"" style=3D"font-family:arial,sans-serif;font-size:13px=
">modules</span><span style=3D"font-family:arial,sans-serif;font-size:13px"=
>, remove the things that aren't specific to the theme (uploader and mo=
vie player), and then put it as a theme subdir. =C2=A0I used a couple wildc=
ards for brevity below. =C2=A0The end result would look like this:</span><b=
r 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">lib<br>|-- assets<br>| =C2=A0=
|-- apple-touch-icon.png<br>| =C2=A0 |-- favicon.ico<br>| =C2=A0 |-- logo.=
png<br>| =C2=A0 |-- gallery*.js<br>
`-- vendor<br>=C2=A0 =C2=A0 |-- jquery*.js<br>=C2=A0 =C2=A0 |-- json*.js<br=
>=C2=A0 =C2=A0 |-- superfish<br>=C2=A0 =C2=A0 `-- yui<br></font><br style=
=3D"font-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-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 class=3D"">modules</span>-gall=
ery/gallery_unittest (if TEST_MODE)<br>core/unittest (if TEST_MODE)<br>site=
<br>
[active theme]<br>themes-gallery/lib<br>[active=C2=A0<span class=3D"">modul=
es</span>...]<br>[active identity provider]<br><span class=3D"">modules</sp=
an>-gallery/gallery<br></font><span style=3D"font-family:'courier new&#=
39;,monospace;font-size:13px">core/cache</span><br style=3D"font-family:=
9;courier new',monospace;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=C2=A0</span><span class=3D"" style=3D"font-family:arial,san=
s-serif;font-size:13px">modules</span><span style=3D"font-family:arial,sans=
-serif;font-size:13px">=C2=A0before the whole list. =C2=A0Note that the gal=
lery module is *not* in here, since anything we'd use from it could nev=
er be overridden (and hence that bit of code should be in the application d=
ir 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">O=
n 1 May 2013 20:09, Bharat Mediratta <span dir=3D"ltr"><<a href=3D"mailt=
o:[email protected]" target=3D"_blank">[email protected]</a>></span> w=
rote:<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"><br><div>Now in 3.1.x we ha=
ve a bunch of Kohana modules that are slightly different but sit right next=
to Gallery modules:</div>
<div>=C2=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)=C2=A0</div><div><br>=
</div><div>This is somewhat confusing. =C2=A0I was thinking that it might m=
ake sense to have a separate subdirectory for Kohana modules to make it cle=
ar that they're really different. =C2=A0I haven't thought much furt=
her than this. =C2=A0I'm sure there'll be some complications becaus=
e expect all modules to be directly under MODPATH. =C2=A0Any thoughts? =C2=
=A0Perhaps we can prefix all the module names with an underscore or somethi=
ng to visually differentiate them? =C2=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. =C2=A0I don't alw=
ays want to grep all the non-Gallery code when I'm looking for stuff to=
change. =C2=A0The File_Structure_Test is doing more work (see GalleryCodeF=
ilterIterator for an example)=C2=A0</div>
<div>than it needs to. =C2=A0Devs might be a little less confused.. :-)</di=
v><div><br></div><div>thoughts?</div><span class=3D"HOEnZb"><font color=3D"=
#888888"><div>-Bharat</div></font></span></div>
<br>-----------------------------------------------------------------------=
-------<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>
--047d7b343c6617093404dbae1323--
--===============3804056703403180620==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
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
--===============3804056703403180620==
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 ]
--===============3804056703403180620==--