> > after going through this entire discussion and looking at issue:
>  > https://issues.apache.org/jira/browse/SLING-387
>  > i would like to raise the following point.
>  >
>  > i think it is important that this change was originally suggested to
>  > make the simple cases as simple and intuitive as possible for
>  > the user of sling and not to come up with something that is really
>  > easy and consistent to map for the sling implementation.
>
>
> I partially agree: But a simple implementation tends to be simpler to
>  explain and thus simpler to use.
>
>
>  > let me try to explain with an example:
>  > as a user of sling i would like to have my app in
>  > /apps/myapp and lets say i have a node of resourceType
>  > "myapp/homepage" at "/content/myapp".
>  >
>  > i would like to to be able to structure my applications as follows:
>  >
>  > (1) /apps/myapp/homepage/hompage.esp (or html.esp or GET.esp)
>  > (2) /apps/myapp/homepage/edit.esp (or edit.html.esp)
>  > (3) /apps/myapp/homepage/header/highlight.jpg.esp
>  > (4) /apps/myapp/homepage/header/selected.jpg.esp
>  > (5) /apps/myapp/homepage/header/small.jpg.esp
>  >
>  > where
>  >
>  > /content/myapp.html -> (1)
>  > /content/myapp.edit.html -> (2)
>  > /content/myapp.header.highlight.jpg -> (3)
>  > /content/myapp.header.selected.jpg -> (4)
>  > /content/myapp.header.small.jpg -> (5)
>  >
>  > i think it is important that we avoid unnecessary repetition at any point
>  > and we would allow for enough flexibility in the /apps directory allow
>  > the user to come up with something short, distinct and meaningful.
>
>
> That sounds clear at first sight. But it amounts to a whole lot of work
>  to implement. This also means a whole lot of CPU to burn. And a whole
>  lot of code means a whole lot of potential bugs ;-)
>
>  I also wonder, why "/apps/myapp/homepage/header/highlight.jpg.esp" would
>  be easier to use than "/apps/myapp/homepage/header.highlight.jpg.esp" ?
>  It is eaven easier to manage: no need to move files in the hierarchy,
>  just rename them. And it is easier to explain: Instead of saying "build
>  a path from the selector by replacing dots by slashes" we just say
>  "append or use the selectors".
>
>  Therefore, I honestly consider the current proposal superior to using
>  paths.
almost....i have a real usecase where i prefer a 'directory' over a
selector. in case of a 'navigation' image, i want to put additional
resources and scripts in an own directory, so currently i do:

/apps/myapp/page/nav/png.jsp   (generates the  png)
/apps/myapp/page/nav/background.jpg  (used by the above script as background)
/apps/myapp/page/nav/html.jsp  (used to dump the <img ... /> tag)

if i only can use selectors, this becomes awkward and even messy if i
have a lot of "selections".

IMO, the initial concern for the current resolution was that all
scripts were named "html.jsp" and that this is very annoying during
development.

i suggest only to change that the scripts "may" repeat the last part
of the resource type, eg:
/apps/myapp/page/page.jsp or
/apps/myapp/page/nav/nav.png.jsp

--
toby

Reply via email to