DWR

dwr.xml could use a more verbose DTD to make features more discoverable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: 4.0
  • Component/s: Core
  • Description:
    Hide
    See mailing list thread "Specificity in DTDs"

    On the one hand: simple DTD/XSD and very extensible:

    <dwr>
      <allow>
        <create creator="new" javascript="Remote">
          <param name="class" value="com.example.Remote"/>
        </create>
        <create creator="spring" javascript="Demo">
          <param name="bean" value="SpringBean"/>
        </create>
        <convert converter="bean" match="com.example.dto.Person" javascript="*">
          <param name="constructor" value="(String name, int age)"/>
        </convert>
      </allow>
    </dwr>


    On the other hand, far less extensible, but less verbose and a good editor can use the DTD to tell you what's available.

    <dwr>
      <allow>
        <new class="java.util.Date" javascript="JDate"/>
        <spring bean="SpringBean" javascript="Demo"/>
        <bean match="com.example.dto.Person" constructor="(String name, int age)"/>
      </allow>
    </dwr>

    The latter option has many benefits.

    We could ship an xsl with dwr which it uses to transparently turn the full version into the more verbose version that we have now.
    Show
    See mailing list thread "Specificity in DTDs" On the one hand: simple DTD/XSD and very extensible: <dwr>   <allow>     <create creator="new" javascript="Remote">       <param name="class" value="com.example.Remote"/>     </create>     <create creator="spring" javascript="Demo">       <param name="bean" value="SpringBean"/>     </create>     <convert converter="bean" match="com.example.dto.Person" javascript="*">       <param name="constructor" value="(String name, int age)"/>     </convert>   </allow> </dwr> On the other hand, far less extensible, but less verbose and a good editor can use the DTD to tell you what's available. <dwr>   <allow>     <new class="java.util.Date" javascript="JDate"/>     <spring bean="SpringBean" javascript="Demo"/>     <bean match="com.example.dto.Person" constructor="(String name, int age)"/>   </allow> </dwr> The latter option has many benefits. We could ship an xsl with dwr which it uses to transparently turn the full version into the more verbose version that we have now.

Activity

There are no comments yet on this issue.

People

Dates

  • Created:
    01/Sep/08 12:32 PM
    Updated:
    01/Dec/09 7:00 PM