Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3177

For GWT plugin, separate requests into a managed and unmanaged interfaces

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.2.0.RELEASE, 1.2.1.RELEASE, 1.2.2.RELEASE
    • Fix Version/s: 1.2.3.RELEASE
    • Component/s: GWT
    • Environment:
      All operating systems, all hardware specifications

      Description

      Currently when you create an entity or service, it creates a single associated request. This request is managed by Spring Roo. It is also included in the ApplicationRequestFactory. If you want to extend the methods of the entity or service, it makes sense to extend the request as well. However, given the all of relationships, it is difficult to do so if you still want to take advantage of the rest of the scaffolded capability. For instance, assume you want a request the include a new method you have added to the associated entity. To do so, you need to create a new request that extends the existing. You also need to create a new request factory or extend the existing ApplicationRequestFactory (You could create a brand new request and add it to ScaffoldRequestFactory, but this seems inconsistent with the ORM model, i.e. there should be one request per entity/service). However, if you extend the existing ApplicationRequestFactory it screws up the rest of the application, e.g. if you want to use these new requests in the scaffold activities you have to manually do through and reconfigure everything.

      A better alternative is to create a managed and unmanaged request. The unmanaged requests extend the managed requests. The ApplicationRequestFactory uses the unmanaged requests. The managed request mirrors the managed methods of the entity/service. The user can add the same custom methods to the unmanaged request. Presumably you would call the requests SomeEntityRequest and SomeEntityRequest_Roo_Gwt. This method is more consistent with what is happening on the server side.

      I have built multiple applications using the GWT plugin and find this method works much better if the developer wants to easily extend the application. I have created by own modified version of the GWT plugin and am happy to share the code. I am just not 100% sure the best way to do so.

        Attachments

          Activity

            People

            Assignee:
            stewarta Alan Stewart
            Reporter:
            thor1729 Nick Thorson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 5d
                5d
                Remaining:
                Remaining Estimate - 5d
                5d
                Logged:
                Time Spent - Not Specified
                Not Specified