Announcement Announcement Module
Collapse
No announcement yet.
Spring roo and dto ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring roo and dto ?

    Hi all,

    I have tried spring roo recently and all I have to say is it so tempted and is the exact tool I am looking for. You want to wire a new technology to your project, just run a command and then all the infrastructure has been setup, no more need to manual metadata setup. And I really like to work on springsource-certified architecture, best practice architecture...In short, I was totally shocked and really love it. However, I still have question about why we don't have services layer and dao layer. Those question has been answered when I read the reference. Still one question. What about DTO ? In my current project we have to convert back and forth between domain object and DTO using dozer. So can spring roo support this ?

  • #2
    We have no plans to implement the DTO pattern, but by all means log a JIRA ticket if there's not one there already on this topic.

    Interesting historical note: the pre-release version of Roo did use DTOs and Dozer, even to the point of contributing to the latter project.

    Comment


    • #3
      Originally posted by Andrew Swan View Post
      We have no plans to implement the DTO pattern, but by all means log a JIRA ticket if there's not one there already on this topic.

      Interesting historical note: the pre-release version of Roo did use DTOs and Dozer, even to the point of contributing to the latter project.
      Thanks for quick reply. I will consider submit a new enhancement request after I read all the reference. Now, I see add-ons to add services and repository mentioned there. I have the next question. As I understand, roo use tiles and jsp tag files and dojo to create composite views and when a page is rendered, I always saw these kind of request

      http://localhost:8080/pizzashop/reso...s/dojo_ROOT.js
      http://localhost:8080/pizzashop/reso...rm/ComboBox.js

      but I cannot find anykind of js find in the tomcat deploy folder ? Are there any magic here ?

      Comment


      • #4
        Originally posted by lamtrhieu View Post
        As I understand, roo use tiles and jsp tag files and dojo to create composite views and when a page is rendered, I always saw these kind of request

        http://localhost:8080/pizzashop/reso...s/dojo_ROOT.js
        http://localhost:8080/pizzashop/reso...rm/ComboBox.js

        but I cannot find anykind of js find in the tomcat deploy folder ? Are there any magic here ?
        Kind of. If you look in webmvc-config.xml, you will find this element:
        Code:
        <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources -->
            <mvc:resources location="/, classpath:/META-INF/web-resources/" mapping="/resources/**"/>
        So any relative URL matching the pattern "/resources/**" will be resolved by searching the classpath for the file whose name comes after the "/resources/" prefix, for example dijit/form/ComboBox.js in one of your URLs above. If you look inside spring-js-resources-2.2.1.RELEASE.jar (which Maven bundles into your WAR file's WEB-INF/lib folder), you will find a /META-INF/web-resources folder (note that this matches the "location" property of the mvc:resources element above) that contains the file dijit/form/ComboBox.js. This JavaScript file is the resource that will be loaded (it also works for any other kind of static resource such as CSS files).

        So that might be magic or not, depending on your definition.

        Comment

        Working...
        X