You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2007/10/15 18:07:51 UTC

[jira] Created: (SLING-52) microsling: SlingScriptResolver should use more user-friendly script names

microsling: SlingScriptResolver should use more user-friendly script names
--------------------------------------------------------------------------

                 Key: SLING-52
                 URL: https://issues.apache.org/jira/browse/SLING-52
             Project: Sling
          Issue Type: Improvement
          Components: microsling
            Reporter: Bertrand Delacretaz
            Priority: Minor


Script names like get.text_html.vlt are not very user-friendly: GET is the most often used method by far so we could probably get rid of it in names, and we could use only the second part of the response content-type, at least for well-known content types.

So script names could be something like:

html.vlt = GET that returns HTML
edit/html.vlt = same but with an "edit" selector, request = something.edit.html

pdf.xsl = GET that returns PDF (we don't have that one yet though)

POST.js = POST that is processed in javascript (response Content-Type is defined by POST code)
PUT.js = same for a PUT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SLING-52) microsling: SlingScriptResolver should use more user-friendly script names

Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bertrand Delacretaz resolved SLING-52.
--------------------------------------

    Resolution: Fixed

Implemented in revision 585188

The name is build from the HTTP method name, selectors, desired response content-type and script extension, for example

  print/a4/html.js

for a GET request with "print.a4" selectors and a text/html content-type.

  POST.js

for a POST request and the js script engine.

See the ScriptFilenameBuilderTest class for more examples.

> microsling: SlingScriptResolver should use more user-friendly script names
> --------------------------------------------------------------------------
>
>                 Key: SLING-52
>                 URL: https://issues.apache.org/jira/browse/SLING-52
>             Project: Sling
>          Issue Type: Improvement
>          Components: microsling
>            Reporter: Bertrand Delacretaz
>            Priority: Minor
>
> Script names like get.text_html.vlt are not very user-friendly: GET is the most often used method by far so we could probably get rid of it in names, and we could use only the second part of the response content-type, at least for well-known content types.
> So script names could be something like:
> html.vlt = GET that returns HTML
> edit/html.vlt = same but with an "edit" selector, request = something.edit.html
> pdf.xsl = GET that returns PDF (we don't have that one yet though)
> POST.js = POST that is processed in javascript (response Content-Type is defined by POST code)
> PUT.js = same for a PUT

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.