Re: GWT & Appfuse

12 messages Options
Embed this post
Permalink
mraible

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
(cc'ing dev list)

It's likely I'll create a version of AppFuse Light with GWT, but I
doubt I'll do it in the near future. I hope to release AppFuse 2.1
first (which will include "light" archetypes). I wouldn't get your
hopes up in waiting for me to do the work. However, I'd be happy to
assist you in doing it. AppFuse Light is now modular and uses the
AppFuse backend.

http://raibledesigns.com/rd/entry/appfuse_light_converted_to_maven

Here's how I believe GWT should be integrated:

1. Create an appfuse-ws archetype that serves up RESTful services
(http://issues.appfuse.org/browse/APF-897).
2. Create an appfuse-gwt archetype that consumes those services. This
archetype would contain a proxy servlet that allows #1 to be on a
separate host/port.

In addition to #1, I hope to convert the Struts 2 and Spring MVC
archetypes to use those framework's REST support.

For #2, we could use SmartGWT or GXT. SmartGWT might be better since
Sanjiv is a committer on this project. ;-)

Cheers,

Matt

On Tue, Feb 24, 2009 at 2:31 AM, Roy Porter <[hidden email]> wrote:

> Matt,
>
> I see from your blog that you're spending some time with GWT at the moment.
> What's your plan, are you going to integrate GWT as another UI Option for
> Appfuse?
>
> The reason I'm asking is that I actually checked out all of the Appfuse code
> from the svn repository yesterday, with the intention of starting off adding
> some GWT stuff in there. My intention was to start by getting a basic Maven
> archetype together for GWT as an Appfuse UI.
>
> However, if you're planning on doing this yourself in the near future, then
> there's no point in me starting doing it, I'd have to learn how to write
> archetype's for a start (not that it looks too difficult) but you'd
> obviously do it much quicker.
>
> In parallel with this, I've setup a GWT developers site, with the intention
> of having GWT related news, tutorials and help on there, the tutorials would
> start off with simple stuff, but move onto using Appfuse with GWT (which I'd
> look at dual-posting to the Appfuse site also, or something similar).
>
> There's a big but here however, our 2nd child is due in a couple of weeks at
> which point my time and inclination to work on this may lessen in favour of
> sleep ;-)
>
>
>
> Oh, and by the way, the future roadmap timeline on the project information
> page on the Appfuse site could really do with updating ;-) Appfuse 3 was due
> out Q1 2008 ;-)
>
> Cheers,
>
>
> Roy.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

RoyPorter

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink

mraible wrote:
Here's how I believe GWT should be integrated:

1. Create an appfuse-ws archetype that serves up RESTful services
(http://issues.appfuse.org/browse/APF-897).
2. Create an appfuse-gwt archetype that consumes those services. This
archetype would contain a proxy servlet that allows #1 to be on a
separate host/port.

In addition to #1, I hope to convert the Struts 2 and Spring MVC
archetypes to use those framework's REST support.

For #2, we could use SmartGWT or GXT. SmartGWT might be better since
Sanjiv is a committer on this project. ;-)
I was going to bring up this on the mailing list anyway, Matt, you've come up with one way of integrating GWT into a back-end - i.e. using RESTful services.

This is actually the way I initially investigated when going down the GWT route, I put it to one side in the end for a number of reasons:
a. I didn't feel that there a stable Restful solution that was suitable for us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
b. I have some concerns about not making the client too thick - we didn't have the time to learn how to architecture a proper RESTful system at the same time as using GWT for the first time, I had concerns that we may end up with all the business logic in the client, rather than on the server.

I'm not a RESTful expert though, so will bow to more experience people in this respect. I still haven't totally discarded using it myself, but there's question marks in my mind at the moment.

Alternatives .... there's 2 that spring to mind ...

1. If we're talking hibernate as the persistence mechanism, then Gilead (formerly Hibernate4GWT) is an option.

2. Map the valueobjects to DTO's using Dozer, or equivalent. We can therefore be picky and cut down what get's transferred across the wire to the client.

The latter DTO option is what we've used currently. I was not happy at the project start that Hibernate4GWT was polished enough, and I had some concerns about the amount of traffic that would go to the client if we just sent our current models over. Also there was the high likelihood that some of managers would also be exposed to non java consumers as web services, so our use of some of the Java Collection classes in the model objects could have caused issues. (Our DTO's flatten out any collection objects to arrays.)

In the process of implementing this, I took the GenericManager and created a generic Mapping version of it, so that the mapping between model objects and dto's was handled in the base class (with the option of overriding, if necessary).

So, our back-end consists of Manager's and DAO's as normal (for appfuse), our GWT client talks to the managers directly using the Spring MVC DispatcherServlet.

Moving onto your point 2, I agree with having whatever back-end on a different port, so that you can still use Hosted mode for development of the client.

GWT 1.6 is going to bring some very good improvements in - Jetty as the hosted  mode server for one, and better design of where compiled artifacts go, amongst many others ...

As for SmartGWT, that's a no-brainer, in my opinion, our current project relies upon GWT-EXT, but I've had plans for some time to remove this in favour of SmartGWT.

As for my maven/appfuse archetype proposal, what I was thinking about doing was one or both of Gilead/DTO mapping, and create a GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on this. Is it worth doing? or should we be following Matt's route? Or are a tutorial or two (of the non RESTful routes) explaining the integration of GWT with Appfuse enough?

Roy.


Mike Horwitz

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
I had a go at adding GWT to AppFuse. In terms of getting the basics going it was all pretty straightforward. The sticking point was security with GWT -I am probably a bit new to GWT. In the server driven AppFuse this is all pretty simple - the server side decides what to include on the page. Although this could be done in GWT, is there any value in making security decisions inside jsp code? My impression is that the app would have to substantially refactored from a security perspective to make it all work?

Mike


2009/2/24 RoyPorter <[hidden email]>



mraible wrote:
>
> Here's how I believe GWT should be integrated:
>
> 1. Create an appfuse-ws archetype that serves up RESTful services
> (http://issues.appfuse.org/browse/APF-897).
> 2. Create an appfuse-gwt archetype that consumes those services. This
> archetype would contain a proxy servlet that allows #1 to be on a
> separate host/port.
>
> In addition to #1, I hope to convert the Struts 2 and Spring MVC
> archetypes to use those framework's REST support.
>
> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
> Sanjiv is a committer on this project. ;-)
>

I was going to bring up this on the mailing list anyway, Matt, you've come
up with one way of integrating GWT into a back-end - i.e. using RESTful
services.

This is actually the way I initially investigated when going down the GWT
route, I put it to one side in the end for a number of reasons:
a. I didn't feel that there a stable Restful solution that was suitable for
us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
b. I have some concerns about not making the client too thick - we didn't
have the time to learn how to architecture a proper RESTful system at the
same time as using GWT for the first time, I had concerns that we may end up
with all the business logic in the client, rather than on the server.

I'm not a RESTful expert though, so will bow to more experience people in
this respect. I still haven't totally discarded using it myself, but there's
question marks in my mind at the moment.

Alternatives .... there's 2 that spring to mind ...

1. If we're talking hibernate as the persistence mechanism, then Gilead
(formerly Hibernate4GWT) is an option.

2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
therefore be picky and cut down what get's transferred across the wire to
the client.

The latter DTO option is what we've used currently. I was not happy at the
project start that Hibernate4GWT was polished enough, and I had some
concerns about the amount of traffic that would go to the client if we just
sent our current models over. Also there was the high likelihood that some
of managers would also be exposed to non java consumers as web services, so
our use of some of the Java Collection classes in the model objects could
have caused issues. (Our DTO's flatten out any collection objects to
arrays.)

In the process of implementing this, I took the GenericManager and created a
generic Mapping version of it, so that the mapping between model objects and
dto's was handled in the base class (with the option of overriding, if
necessary).

So, our back-end consists of Manager's and DAO's as normal (for appfuse),
our GWT client talks to the managers directly using the Spring MVC
DispatcherServlet.

Moving onto your point 2, I agree with having whatever back-end on a
different port, so that you can still use Hosted mode for development of the
client.

GWT 1.6 is going to bring some very good improvements in - Jetty as the
hosted  mode server for one, and better design of where compiled artifacts
go, amongst many others ...

As for SmartGWT, that's a no-brainer, in my opinion, our current project
relies upon GWT-EXT, but I've had plans for some time to remove this in
favour of SmartGWT.

As for my maven/appfuse archetype proposal, what I was thinking about doing
was one or both of Gilead/DTO mapping, and create a
GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
this. Is it worth doing? or should we be following Matt's route? Or are a
tutorial or two (of the non RESTful routes) explaining the integration of
GWT with Appfuse enough?

Roy.



--
View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
Sent from the AppFuse - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


mraible

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
In reply to this post by RoyPorter
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:

>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

David Whitehurst

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
I whipped up a GWT thing last night and loved it!  I have two questions:

1) Does it seem uncomfortable to have all those private newly created instances?  Just feels wrong.  I'm going for my Refactoring book.
2) Restful services in one app and client (GWT) in another?  (and ... I see the answer below).

Guys, this is good stuff I think because e.g. I have form drawings that I'll continue to discuss and I think I'm going to hold off on showing any UI with my client for a while.  I truly think that UI causes problems in design and analysis (even though I'm prototyping what might be the product).  And, by discussing the user mechanics, the Restful stuff will be solid and tested at 100%.

Matt, thanks for the other mail.  I'm hooked now too I think.  I did the entire first form last night and thought to myself, "all I need is CSS now".  The Restful stuff will be well understood and rigid.

Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if you can give me blind instructions as to what I can do.  I am actually going to be structuring two projects that will be similar first but without all the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff helps I'll share.  Security is going to my biggest thing because I'm preparing to change the accounting world.  But, I think AppFuse and the Spring security model will be perfect..  I'll pass out "Trust me" buttons when I'm done.


David

On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]> wrote:
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


David Whitehurst

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
I'm just adding some things here about security.  The user would be authenticated using Spring security.  Once authenticated, authorization would be be based on requests at the browser I'd expect.  The app I'm doing now will have several roles and I don't see any reason why the entire app can't be built first and secured later.  With GWT being Java-before-javascript, I feel more comfortable writing any authorization choice code using Java for this logic.  You no authorized, you no see. ... and you no get data.  Now, the question would be, "can GWT work with Spring security?".  I would assume so, but I don't enough about GWT yet to say.


David

On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]> wrote:
I whipped up a GWT thing last night and loved it!  I have two questions:

1) Does it seem uncomfortable to have all those private newly created instances?  Just feels wrong.  I'm going for my Refactoring book.
2) Restful services in one app and client (GWT) in another?  (and ... I see the answer below).

Guys, this is good stuff I think because e.g. I have form drawings that I'll continue to discuss and I think I'm going to hold off on showing any UI with my client for a while.  I truly think that UI causes problems in design and analysis (even though I'm prototyping what might be the product).  And, by discussing the user mechanics, the Restful stuff will be solid and tested at 100%.

Matt, thanks for the other mail.  I'm hooked now too I think.  I did the entire first form last night and thought to myself, "all I need is CSS now".  The Restful stuff will be well understood and rigid.

Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if you can give me blind instructions as to what I can do.  I am actually going to be structuring two projects that will be similar first but without all the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff helps I'll share.  Security is going to my biggest thing because I'm preparing to change the accounting world.  But, I think AppFuse and the Spring security model will be perfect..  I'll pass out "Trust me" buttons when I'm done.


David


On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]> wrote:
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



David Whitehurst

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
Matt:

What are your suggestions if I want to start the Restful Web Services Maven project?  I'm just going to add Maven around the fairly simple GWT example I started.  I now need some form of Restful service app.  I have already started an AppFuse for my prototype by it's overly complicated for just the Restful web services.

Have you seen any examples where Struts2 is used to serve JSON.  I haven't done anything like this yet, but can the output be just simple XML?  I expect so.  I'm reading tonight more about what GWT needs.

David

On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email]> wrote:
I'm just adding some things here about security.  The user would be authenticated using Spring security.  Once authenticated, authorization would be be based on requests at the browser I'd expect.  The app I'm doing now will have several roles and I don't see any reason why the entire app can't be built first and secured later.  With GWT being Java-before-javascript, I feel more comfortable writing any authorization choice code using Java for this logic.  You no authorized, you no see. ... and you no get data.  Now, the question would be, "can GWT work with Spring security?".  I would assume so, but I don't enough about GWT yet to say.


David


On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]> wrote:
I whipped up a GWT thing last night and loved it!  I have two questions:

1) Does it seem uncomfortable to have all those private newly created instances?  Just feels wrong.  I'm going for my Refactoring book.
2) Restful services in one app and client (GWT) in another?  (and ... I see the answer below).

Guys, this is good stuff I think because e.g. I have form drawings that I'll continue to discuss and I think I'm going to hold off on showing any UI with my client for a while.  I truly think that UI causes problems in design and analysis (even though I'm prototyping what might be the product).  And, by discussing the user mechanics, the Restful stuff will be solid and tested at 100%.

Matt, thanks for the other mail.  I'm hooked now too I think.  I did the entire first form last night and thought to myself, "all I need is CSS now".  The Restful stuff will be well understood and rigid.

Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if you can give me blind instructions as to what I can do.  I am actually going to be structuring two projects that will be similar first but without all the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff helps I'll share.  Security is going to my biggest thing because I'm preparing to change the accounting world.  But, I think AppFuse and the Spring security model will be perfect..  I'll pass out "Trust me" buttons when I'm done.


David


On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]> wrote:
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




mraible

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
If you know Struts 2 well, I'd add the REST plugin and JSONResult. I hope to do this for 2.1 In both basic and light archetypes.

On Mar 5, 2009, at 11:55 AM, David Whitehurst <[hidden email]> wrote:

Matt:

What are your suggestions if I want to start the Restful Web Services Maven project?  I'm just going to add Maven around the fairly simple GWT example I started.  I now need some form of Restful service app.  I have already started an AppFuse for my prototype by it's overly complicated for just the Restful web services.

Have you seen any examples where Struts2 is used to serve JSON.  I haven't done anything like this yet, but can the output be just simple XML?  I expect so.  I'm reading tonight more about what GWT needs.

David

On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email]> wrote:
I'm just adding some things here about security.  The user would be authenticated using Spring security.  Once authenticated, authorization would be be based on requests at the browser I'd expect.  The app I'm doing now will have several roles and I don't see any reason why the entire app can't be built first and secured later.  With GWT being Java-before-javascript, I feel more comfortable writing any authorization choice code using Java for this logic.  You no authorized, you no see. ... and you no get data.  Now, the question would be, "can GWT work with Spring security?".  I would assume so, but I don't enough about GWT yet to say.


David


On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]> wrote:
I whipped up a GWT thing last night and loved it!  I have two questions:

1) Does it seem uncomfortable to have all those private newly created instances?  Just feels wrong.  I'm going for my Refactoring book.
2) Restful services in one app and client (GWT) in another?  (and ... I see the answer below).

Guys, this is good stuff I think because e.g. I have form drawings that I'll continue to discuss and I think I'm going to hold off on showing any UI with my client for a while.  I truly think that UI causes problems in design and analysis (even though I'm prototyping what might be the product).  And, by discussing the user mechanics, the Restful stuff will be solid and tested at 100%.

Matt, thanks for the other mail.  I'm hooked now too I think.  I did the entire first form last night and thought to myself, "all I need is CSS now".  The Restful stuff will be well understood and rigid.

Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if you can give me blind instructions as to what I can do.  I am actually going to be structuring two projects that will be similar first but without all the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff helps I'll share.  Security is going to my biggest thing because I'm preparing to change the accounting world.  But, I think AppFuse and the Spring security model will be perfect..  I'll pass out "Trust me" buttons when I'm done.


David


On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]> wrote:
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




David Whitehurst

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
I guess I'm saying that with some guidance, I'll help with the archetypes.  I want the archetype ultimately.  I'll look at the mavenized light version and then start a branch.  That work?


David


On Thu, Mar 5, 2009 at 1:59 PM, Matt Raible <[hidden email]> wrote:
If you know Struts 2 well, I'd add the REST plugin and JSONResult. I hope to do this for 2.1 In both basic and light archetypes.


On Mar 5, 2009, at 11:55 AM, David Whitehurst <[hidden email]> wrote:

Matt:

What are your suggestions if I want to start the Restful Web Services Maven project?  I'm just going to add Maven around the fairly simple GWT example I started.  I now need some form of Restful service app.  I have already started an AppFuse for my prototype by it's overly complicated for just the Restful web services.

Have you seen any examples where Struts2 is used to serve JSON.  I haven't done anything like this yet, but can the output be just simple XML?  I expect so.  I'm reading tonight more about what GWT needs.

David

On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email][hidden email]> wrote:
I'm just adding some things here about security.  The user would be authenticated using Spring security.  Once authenticated, authorization would be be based on requests at the browser I'd expect.  The app I'm doing now will have several roles and I don't see any reason why the entire app can't be built first and secured later.  With GWT being Java-before-javascript, I feel more comfortable writing any authorization choice code using Java for this logic.  You no authorized, you no see. ... and you no get data.  Now, the question would be, "can GWT work with Spring security?".  I would assume so, but I don't enough about GWT yet to say.


David


On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email][hidden email]> wrote:
I whipped up a GWT thing last night and loved it!  I have two questions:

1) Does it seem uncomfortable to have all those private newly created instances?  Just feels wrong.  I'm going for my Refactoring book.
2) Restful services in one app and client (GWT) in another?  (and ... I see the answer below).

Guys, this is good stuff I think because e.g. I have form drawings that I'll continue to discuss and I think I'm going to hold off on showing any UI with my client for a while.  I truly think that UI causes problems in design and analysis (even though I'm prototyping what might be the product).  And, by discussing the user mechanics, the Restful stuff will be solid and tested at 100%.

Matt, thanks for the other mail.  I'm hooked now too I think.  I did the entire first form last night and thought to myself, "all I need is CSS now".  The Restful stuff will be well understood and rigid.

Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if you can give me blind instructions as to what I can do.  I am actually going to be structuring two projects that will be similar first but without all the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff helps I'll share.  Security is going to my biggest thing because I'm preparing to change the accounting world.  But, I think AppFuse and the Spring security model will be perfect..  I'll pass out "Trust me" buttons when I'm done.


David


On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email][hidden email]> wrote:
On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email][hidden email]> wrote:
>
>
>
> mraible wrote:
>>
>> Here's how I believe GWT should be integrated:
>>
>> 1. Create an appfuse-ws archetype that serves up RESTful services
>> (http://issues.appfuse.org/browse/APF-897).
>> 2. Create an appfuse-gwt archetype that consumes those services. This
>> archetype would contain a proxy servlet that allows #1 to be on a
>> separate host/port.
>>
>> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>> archetypes to use those framework's REST support.
>>
>> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>> Sanjiv is a committer on this project. ;-)
>>
>
> I was going to bring up this on the mailing list anyway, Matt, you've come
> up with one way of integrating GWT into a back-end - i.e. using RESTful
> services.
>
> This is actually the way I initially investigated when going down the GWT
> route, I put it to one side in the end for a number of reasons:
> a. I didn't feel that there a stable Restful solution that was suitable for
> us (RESTlet has a GWT plug-in now, so that's possibly no longer the case).
> b. I have some concerns about not making the client too thick - we didn't
> have the time to learn how to architecture a proper RESTful system at the
> same time as using GWT for the first time, I had concerns that we may end up
> with all the business logic in the client, rather than on the server.
>
> I'm not a RESTful expert though, so will bow to more experience people in
> this respect. I still haven't totally discarded using it myself, but there's
> question marks in my mind at the moment.
>
> Alternatives .... there's 2 that spring to mind ...
>
> 1. If we're talking hibernate as the persistence mechanism, then Gilead
> (formerly Hibernate4GWT) is an option.
>
> 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
> therefore be picky and cut down what get's transferred across the wire to
> the client.
>
> The latter DTO option is what we've used currently. I was not happy at the
> project start that Hibernate4GWT was polished enough, and I had some
> concerns about the amount of traffic that would go to the client if we just
> sent our current models over. Also there was the high likelihood that some
> of managers would also be exposed to non java consumers as web services, so
> our use of some of the Java Collection classes in the model objects could
> have caused issues. (Our DTO's flatten out any collection objects to
> arrays.)
>
> In the process of implementing this, I took the GenericManager and created a
> generic Mapping version of it, so that the mapping between model objects and
> dto's was handled in the base class (with the option of overriding, if
> necessary).
>
> So, our back-end consists of Manager's and DAO's as normal (for appfuse),
> our GWT client talks to the managers directly using the Spring MVC
> DispatcherServlet.
>
> Moving onto your point 2, I agree with having whatever back-end on a
> different port, so that you can still use Hosted mode for development of the
> client.
>
> GWT 1.6 is going to bring some very good improvements in - Jetty as the
> hosted  mode server for one, and better design of where compiled artifacts
> go, amongst many others ...
>
> As for SmartGWT, that's a no-brainer, in my opinion, our current project
> relies upon GWT-EXT, but I've had plans for some time to remove this in
> favour of SmartGWT.
>
> As for my maven/appfuse archetype proposal, what I was thinking about doing
> was one or both of Gilead/DTO mapping, and create a
> GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts on
> this. Is it worth doing? or should we be following Matt's route? Or are a
> tutorial or two (of the non RESTful routes) explaining the integration of
> GWT with Appfuse enough?

The architecture I've been using is to use GWT's RequestBuilder to
talk to RESTful services that return JSON. We hand-craft our GWT model
objects from the domain objects on the server-side. Sure, it's not
efficient, but it only takes a few minutes to code up the model
object. We're using GXT, which has a slew of data-related classes we
extend.

http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html

Then we wrote our own JsonMarshaler that can easily initialize our
model objects with JSON. Since I'm familiar with this setup, I'd
probably implement something similar initially (unless others
contribute of course).

Cheers,

Matt

>
> Roy.
>
>
>
> --
> View this message in context: http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
> Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email][hidden email]
> For additional commands, e-mail: [hidden email][hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email][hidden email]
For additional commands, e-mail: [hidden email][hidden email]





mraible

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
If you're going to enhance Struts 2 to use REST, go ahead and do that on trunk.

Matt

On Thu, Mar 5, 2009 at 12:07 PM, David Whitehurst
<[hidden email]> wrote:

> I guess I'm saying that with some guidance, I'll help with the archetypes.
> I want the archetype ultimately.  I'll look at the mavenized light version
> and then start a branch.  That work?
>
>
> David
>
>
> On Thu, Mar 5, 2009 at 1:59 PM, Matt Raible <[hidden email]> wrote:
>>
>> If you know Struts 2 well, I'd add the REST plugin and JSONResult. I hope
>> to do this for 2.1 In both basic and light archetypes.
>>
>> On Mar 5, 2009, at 11:55 AM, David Whitehurst <[hidden email]>
>> wrote:
>>
>> Matt:
>>
>> What are your suggestions if I want to start the Restful Web Services
>> Maven project?  I'm just going to add Maven around the fairly simple GWT
>> example I started.  I now need some form of Restful service app.  I have
>> already started an AppFuse for my prototype by it's overly complicated for
>> just the Restful web services.
>>
>> Have you seen any examples where Struts2 is used to serve JSON.  I haven't
>> done anything like this yet, but can the output be just simple XML?  I
>> expect so.  I'm reading tonight more about what GWT needs.
>>
>> David
>>
>> On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email]>
>> wrote:
>>>
>>> I'm just adding some things here about security.  The user would be
>>> authenticated using Spring security.  Once authenticated, authorization
>>> would be be based on requests at the browser I'd expect.  The app I'm doing
>>> now will have several roles and I don't see any reason why the entire app
>>> can't be built first and secured later.  With GWT being
>>> Java-before-javascript, I feel more comfortable writing any authorization
>>> choice code using Java for this logic.  You no authorized, you no see. ...
>>> and you no get data.  Now, the question would be, "can GWT work with Spring
>>> security?".  I would assume so, but I don't enough about GWT yet to say.
>>>
>>>
>>> David
>>>
>>> On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]>
>>> wrote:
>>>>
>>>> I whipped up a GWT thing last night and loved it!  I have two questions:
>>>>
>>>> 1) Does it seem uncomfortable to have all those private newly created
>>>> instances?  Just feels wrong.  I'm going for my Refactoring book.
>>>> 2) Restful services in one app and client (GWT) in another?  (and ... I
>>>> see the answer below).
>>>>
>>>> Guys, this is good stuff I think because e.g. I have form drawings that
>>>> I'll continue to discuss and I think I'm going to hold off on showing any UI
>>>> with my client for a while.  I truly think that UI causes problems in design
>>>> and analysis (even though I'm prototyping what might be the product).  And,
>>>> by discussing the user mechanics, the Restful stuff will be solid and tested
>>>> at 100%.
>>>>
>>>> Matt, thanks for the other mail.  I'm hooked now too I think.  I did the
>>>> entire first form last night and thought to myself, "all I need is CSS
>>>> now".  The Restful stuff will be well understood and rigid.
>>>>
>>>> Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if
>>>> you can give me blind instructions as to what I can do.  I am actually going
>>>> to be structuring two projects that will be similar first but without all
>>>> the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff
>>>> helps I'll share.  Security is going to my biggest thing because I'm
>>>> preparing to change the accounting world.  But, I think AppFuse and the
>>>> Spring security model will be perfect..  I'll pass out "Trust me" buttons
>>>> when I'm done.
>>>>
>>>>
>>>> David
>>>>
>>>> On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]>
>>>> wrote:
>>>>>
>>>>> On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>>>>> >
>>>>> >
>>>>> >
>>>>> > mraible wrote:
>>>>> >>
>>>>> >> Here's how I believe GWT should be integrated:
>>>>> >>
>>>>> >> 1. Create an appfuse-ws archetype that serves up RESTful services
>>>>> >> (http://issues.appfuse.org/browse/APF-897).
>>>>> >> 2. Create an appfuse-gwt archetype that consumes those services.
>>>>> >> This
>>>>> >> archetype would contain a proxy servlet that allows #1 to be on a
>>>>> >> separate host/port.
>>>>> >>
>>>>> >> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>>>>> >> archetypes to use those framework's REST support.
>>>>> >>
>>>>> >> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>>>>> >> Sanjiv is a committer on this project. ;-)
>>>>> >>
>>>>> >
>>>>> > I was going to bring up this on the mailing list anyway, Matt, you've
>>>>> > come
>>>>> > up with one way of integrating GWT into a back-end - i.e. using
>>>>> > RESTful
>>>>> > services.
>>>>> >
>>>>> > This is actually the way I initially investigated when going down the
>>>>> > GWT
>>>>> > route, I put it to one side in the end for a number of reasons:
>>>>> > a. I didn't feel that there a stable Restful solution that was
>>>>> > suitable for
>>>>> > us (RESTlet has a GWT plug-in now, so that's possibly no longer the
>>>>> > case).
>>>>> > b. I have some concerns about not making the client too thick - we
>>>>> > didn't
>>>>> > have the time to learn how to architecture a proper RESTful system at
>>>>> > the
>>>>> > same time as using GWT for the first time, I had concerns that we may
>>>>> > end up
>>>>> > with all the business logic in the client, rather than on the server.
>>>>> >
>>>>> > I'm not a RESTful expert though, so will bow to more experience
>>>>> > people in
>>>>> > this respect. I still haven't totally discarded using it myself, but
>>>>> > there's
>>>>> > question marks in my mind at the moment.
>>>>> >
>>>>> > Alternatives .... there's 2 that spring to mind ...
>>>>> >
>>>>> > 1. If we're talking hibernate as the persistence mechanism, then
>>>>> > Gilead
>>>>> > (formerly Hibernate4GWT) is an option.
>>>>> >
>>>>> > 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
>>>>> > therefore be picky and cut down what get's transferred across the
>>>>> > wire to
>>>>> > the client.
>>>>> >
>>>>> > The latter DTO option is what we've used currently. I was not happy
>>>>> > at the
>>>>> > project start that Hibernate4GWT was polished enough, and I had some
>>>>> > concerns about the amount of traffic that would go to the client if
>>>>> > we just
>>>>> > sent our current models over. Also there was the high likelihood that
>>>>> > some
>>>>> > of managers would also be exposed to non java consumers as web
>>>>> > services, so
>>>>> > our use of some of the Java Collection classes in the model objects
>>>>> > could
>>>>> > have caused issues. (Our DTO's flatten out any collection objects to
>>>>> > arrays.)
>>>>> >
>>>>> > In the process of implementing this, I took the GenericManager and
>>>>> > created a
>>>>> > generic Mapping version of it, so that the mapping between model
>>>>> > objects and
>>>>> > dto's was handled in the base class (with the option of overriding,
>>>>> > if
>>>>> > necessary).
>>>>> >
>>>>> > So, our back-end consists of Manager's and DAO's as normal (for
>>>>> > appfuse),
>>>>> > our GWT client talks to the managers directly using the Spring MVC
>>>>> > DispatcherServlet.
>>>>> >
>>>>> > Moving onto your point 2, I agree with having whatever back-end on a
>>>>> > different port, so that you can still use Hosted mode for development
>>>>> > of the
>>>>> > client.
>>>>> >
>>>>> > GWT 1.6 is going to bring some very good improvements in - Jetty as
>>>>> > the
>>>>> > hosted  mode server for one, and better design of where compiled
>>>>> > artifacts
>>>>> > go, amongst many others ...
>>>>> >
>>>>> > As for SmartGWT, that's a no-brainer, in my opinion, our current
>>>>> > project
>>>>> > relies upon GWT-EXT, but I've had plans for some time to remove this
>>>>> > in
>>>>> > favour of SmartGWT.
>>>>> >
>>>>> > As for my maven/appfuse archetype proposal, what I was thinking about
>>>>> > doing
>>>>> > was one or both of Gilead/DTO mapping, and create a
>>>>> > GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts
>>>>> > on
>>>>> > this. Is it worth doing? or should we be following Matt's route? Or
>>>>> > are a
>>>>> > tutorial or two (of the non RESTful routes) explaining the
>>>>> > integration of
>>>>> > GWT with Appfuse enough?
>>>>>
>>>>> The architecture I've been using is to use GWT's RequestBuilder to
>>>>> talk to RESTful services that return JSON. We hand-craft our GWT model
>>>>> objects from the domain objects on the server-side. Sure, it's not
>>>>> efficient, but it only takes a few minutes to code up the model
>>>>> object. We're using GXT, which has a slew of data-related classes we
>>>>> extend.
>>>>>
>>>>>
>>>>> http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html
>>>>>
>>>>> Then we wrote our own JsonMarshaler that can easily initialize our
>>>>> model objects with JSON. Since I'm familiar with this setup, I'd
>>>>> probably implement something similar initially (unless others
>>>>> contribute of course).
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Matt
>>>>>
>>>>> >
>>>>> > Roy.
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > View this message in context:
>>>>> > http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
>>>>> > Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>>>>> >
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: [hidden email]
>>>>> > For additional commands, e-mail: [hidden email]
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>
>>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

David Whitehurst

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
Thanks.  I'm going to do a bit of reading tonight.  Struts version needs to be increased on my latest archetype project so, I'm going to break that first.  And, then I'll just do what's necessary in trunk.


David

On Thu, Mar 5, 2009 at 2:44 PM, Matt Raible <[hidden email]> wrote:
If you're going to enhance Struts 2 to use REST, go ahead and do that on trunk.

Matt

On Thu, Mar 5, 2009 at 12:07 PM, David Whitehurst
<[hidden email]> wrote:
> I guess I'm saying that with some guidance, I'll help with the archetypes.
> I want the archetype ultimately.  I'll look at the mavenized light version
> and then start a branch.  That work?
>
>
> David
>
>
> On Thu, Mar 5, 2009 at 1:59 PM, Matt Raible <[hidden email]> wrote:
>>
>> If you know Struts 2 well, I'd add the REST plugin and JSONResult. I hope
>> to do this for 2.1 In both basic and light archetypes.
>>
>> On Mar 5, 2009, at 11:55 AM, David Whitehurst <[hidden email]>
>> wrote:
>>
>> Matt:
>>
>> What are your suggestions if I want to start the Restful Web Services
>> Maven project?  I'm just going to add Maven around the fairly simple GWT
>> example I started.  I now need some form of Restful service app.  I have
>> already started an AppFuse for my prototype by it's overly complicated for
>> just the Restful web services.
>>
>> Have you seen any examples where Struts2 is used to serve JSON.  I haven't
>> done anything like this yet, but can the output be just simple XML?  I
>> expect so.  I'm reading tonight more about what GWT needs.
>>
>> David
>>
>> On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email]>
>> wrote:
>>>
>>> I'm just adding some things here about security.  The user would be
>>> authenticated using Spring security.  Once authenticated, authorization
>>> would be be based on requests at the browser I'd expect.  The app I'm doing
>>> now will have several roles and I don't see any reason why the entire app
>>> can't be built first and secured later.  With GWT being
>>> Java-before-javascript, I feel more comfortable writing any authorization
>>> choice code using Java for this logic.  You no authorized, you no see. ...
>>> and you no get data.  Now, the question would be, "can GWT work with Spring
>>> security?".  I would assume so, but I don't enough about GWT yet to say.
>>>
>>>
>>> David
>>>
>>> On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]>
>>> wrote:
>>>>
>>>> I whipped up a GWT thing last night and loved it!  I have two questions:
>>>>
>>>> 1) Does it seem uncomfortable to have all those private newly created
>>>> instances?  Just feels wrong.  I'm going for my Refactoring book.
>>>> 2) Restful services in one app and client (GWT) in another?  (and ... I
>>>> see the answer below).
>>>>
>>>> Guys, this is good stuff I think because e.g. I have form drawings that
>>>> I'll continue to discuss and I think I'm going to hold off on showing any UI
>>>> with my client for a while.  I truly think that UI causes problems in design
>>>> and analysis (even though I'm prototyping what might be the product).  And,
>>>> by discussing the user mechanics, the Restful stuff will be solid and tested
>>>> at 100%.
>>>>
>>>> Matt, thanks for the other mail.  I'm hooked now too I think.  I did the
>>>> entire first form last night and thought to myself, "all I need is CSS
>>>> now".  The Restful stuff will be well understood and rigid.
>>>>
>>>> Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if
>>>> you can give me blind instructions as to what I can do.  I am actually going
>>>> to be structuring two projects that will be similar first but without all
>>>> the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff
>>>> helps I'll share.  Security is going to my biggest thing because I'm
>>>> preparing to change the accounting world.  But, I think AppFuse and the
>>>> Spring security model will be perfect..  I'll pass out "Trust me" buttons
>>>> when I'm done.
>>>>
>>>>
>>>> David
>>>>
>>>> On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]>
>>>> wrote:
>>>>>
>>>>> On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>>>>> >
>>>>> >
>>>>> >
>>>>> > mraible wrote:
>>>>> >>
>>>>> >> Here's how I believe GWT should be integrated:
>>>>> >>
>>>>> >> 1. Create an appfuse-ws archetype that serves up RESTful services
>>>>> >> (http://issues.appfuse.org/browse/APF-897).
>>>>> >> 2. Create an appfuse-gwt archetype that consumes those services.
>>>>> >> This
>>>>> >> archetype would contain a proxy servlet that allows #1 to be on a
>>>>> >> separate host/port.
>>>>> >>
>>>>> >> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>>>>> >> archetypes to use those framework's REST support.
>>>>> >>
>>>>> >> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>>>>> >> Sanjiv is a committer on this project. ;-)
>>>>> >>
>>>>> >
>>>>> > I was going to bring up this on the mailing list anyway, Matt, you've
>>>>> > come
>>>>> > up with one way of integrating GWT into a back-end - i.e. using
>>>>> > RESTful
>>>>> > services.
>>>>> >
>>>>> > This is actually the way I initially investigated when going down the
>>>>> > GWT
>>>>> > route, I put it to one side in the end for a number of reasons:
>>>>> > a. I didn't feel that there a stable Restful solution that was
>>>>> > suitable for
>>>>> > us (RESTlet has a GWT plug-in now, so that's possibly no longer the
>>>>> > case).
>>>>> > b. I have some concerns about not making the client too thick - we
>>>>> > didn't
>>>>> > have the time to learn how to architecture a proper RESTful system at
>>>>> > the
>>>>> > same time as using GWT for the first time, I had concerns that we may
>>>>> > end up
>>>>> > with all the business logic in the client, rather than on the server.
>>>>> >
>>>>> > I'm not a RESTful expert though, so will bow to more experience
>>>>> > people in
>>>>> > this respect. I still haven't totally discarded using it myself, but
>>>>> > there's
>>>>> > question marks in my mind at the moment.
>>>>> >
>>>>> > Alternatives .... there's 2 that spring to mind ...
>>>>> >
>>>>> > 1. If we're talking hibernate as the persistence mechanism, then
>>>>> > Gilead
>>>>> > (formerly Hibernate4GWT) is an option.
>>>>> >
>>>>> > 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
>>>>> > therefore be picky and cut down what get's transferred across the
>>>>> > wire to
>>>>> > the client.
>>>>> >
>>>>> > The latter DTO option is what we've used currently. I was not happy
>>>>> > at the
>>>>> > project start that Hibernate4GWT was polished enough, and I had some
>>>>> > concerns about the amount of traffic that would go to the client if
>>>>> > we just
>>>>> > sent our current models over. Also there was the high likelihood that
>>>>> > some
>>>>> > of managers would also be exposed to non java consumers as web
>>>>> > services, so
>>>>> > our use of some of the Java Collection classes in the model objects
>>>>> > could
>>>>> > have caused issues. (Our DTO's flatten out any collection objects to
>>>>> > arrays.)
>>>>> >
>>>>> > In the process of implementing this, I took the GenericManager and
>>>>> > created a
>>>>> > generic Mapping version of it, so that the mapping between model
>>>>> > objects and
>>>>> > dto's was handled in the base class (with the option of overriding,
>>>>> > if
>>>>> > necessary).
>>>>> >
>>>>> > So, our back-end consists of Manager's and DAO's as normal (for
>>>>> > appfuse),
>>>>> > our GWT client talks to the managers directly using the Spring MVC
>>>>> > DispatcherServlet.
>>>>> >
>>>>> > Moving onto your point 2, I agree with having whatever back-end on a
>>>>> > different port, so that you can still use Hosted mode for development
>>>>> > of the
>>>>> > client.
>>>>> >
>>>>> > GWT 1.6 is going to bring some very good improvements in - Jetty as
>>>>> > the
>>>>> > hosted  mode server for one, and better design of where compiled
>>>>> > artifacts
>>>>> > go, amongst many others ...
>>>>> >
>>>>> > As for SmartGWT, that's a no-brainer, in my opinion, our current
>>>>> > project
>>>>> > relies upon GWT-EXT, but I've had plans for some time to remove this
>>>>> > in
>>>>> > favour of SmartGWT.
>>>>> >
>>>>> > As for my maven/appfuse archetype proposal, what I was thinking about
>>>>> > doing
>>>>> > was one or both of Gilead/DTO mapping, and create a
>>>>> > GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts
>>>>> > on
>>>>> > this. Is it worth doing? or should we be following Matt's route? Or
>>>>> > are a
>>>>> > tutorial or two (of the non RESTful routes) explaining the
>>>>> > integration of
>>>>> > GWT with Appfuse enough?
>>>>>
>>>>> The architecture I've been using is to use GWT's RequestBuilder to
>>>>> talk to RESTful services that return JSON. We hand-craft our GWT model
>>>>> objects from the domain objects on the server-side. Sure, it's not
>>>>> efficient, but it only takes a few minutes to code up the model
>>>>> object. We're using GXT, which has a slew of data-related classes we
>>>>> extend.
>>>>>
>>>>>
>>>>> http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html
>>>>>
>>>>> Then we wrote our own JsonMarshaler that can easily initialize our
>>>>> model objects with JSON. Since I'm familiar with this setup, I'd
>>>>> probably implement something similar initially (unless others
>>>>> contribute of course).
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Matt
>>>>>
>>>>> >
>>>>> > Roy.
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > View this message in context:
>>>>> > http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
>>>>> > Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>>>>> >
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: [hidden email]
>>>>> > For additional commands, e-mail: [hidden email]
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>
>>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Musachy Barroso

Re: GWT & Appfuse

Reply Threaded More More options
Print post
Permalink
In reply to this post by David Whitehurst
The REST plugin in Struts 2 can output json or xml. There is also a
JSON plugin to serialize/deserialize actions and requests. There is
also a GWT plugin that integrates Struts 2 with GWT.

regards
musachy

On Thu, Mar 5, 2009 at 1:55 PM, David Whitehurst <[hidden email]> wrote:

> Matt:
>
> What are your suggestions if I want to start the Restful Web Services Maven
> project?  I'm just going to add Maven around the fairly simple GWT example I
> started.  I now need some form of Restful service app.  I have already
> started an AppFuse for my prototype by it's overly complicated for just the
> Restful web services.
>
> Have you seen any examples where Struts2 is used to serve JSON.  I haven't
> done anything like this yet, but can the output be just simple XML?  I
> expect so.  I'm reading tonight more about what GWT needs.
>
> David
>
> On Thu, Mar 5, 2009 at 8:12 AM, David Whitehurst <[hidden email]>
> wrote:
>>
>> I'm just adding some things here about security.  The user would be
>> authenticated using Spring security.  Once authenticated, authorization
>> would be be based on requests at the browser I'd expect.  The app I'm doing
>> now will have several roles and I don't see any reason why the entire app
>> can't be built first and secured later.  With GWT being
>> Java-before-javascript, I feel more comfortable writing any authorization
>> choice code using Java for this logic.  You no authorized, you no see. ...
>> and you no get data.  Now, the question would be, "can GWT work with Spring
>> security?".  I would assume so, but I don't enough about GWT yet to say.
>>
>>
>> David
>>
>> On Thu, Mar 5, 2009 at 7:58 AM, David Whitehurst <[hidden email]>
>> wrote:
>>>
>>> I whipped up a GWT thing last night and loved it!  I have two questions:
>>>
>>> 1) Does it seem uncomfortable to have all those private newly created
>>> instances?  Just feels wrong.  I'm going for my Refactoring book.
>>> 2) Restful services in one app and client (GWT) in another?  (and ... I
>>> see the answer below).
>>>
>>> Guys, this is good stuff I think because e.g. I have form drawings that
>>> I'll continue to discuss and I think I'm going to hold off on showing any UI
>>> with my client for a while.  I truly think that UI causes problems in design
>>> and analysis (even though I'm prototyping what might be the product).  And,
>>> by discussing the user mechanics, the Restful stuff will be solid and tested
>>> at 100%.
>>>
>>> Matt, thanks for the other mail.  I'm hooked now too I think.  I did the
>>> entire first form last night and thought to myself, "all I need is CSS
>>> now".  The Restful stuff will be well understood and rigid.
>>>
>>> Mike, if you rough out AppFuse restful and GWT archetypes, I'll help if
>>> you can give me blind instructions as to what I can do.  I am actually going
>>> to be structuring two projects that will be similar first but without all
>>> the AppFuse complexity (security, struts-menu, templates, etc).  If my stuff
>>> helps I'll share.  Security is going to my biggest thing because I'm
>>> preparing to change the accounting world.  But, I think AppFuse and the
>>> Spring security model will be perfect..  I'll pass out "Trust me" buttons
>>> when I'm done.
>>>
>>>
>>> David
>>>
>>> On Thu, Mar 5, 2009 at 12:37 AM, Matt Raible <[hidden email]>
>>> wrote:
>>>>
>>>> On Tue, Feb 24, 2009 at 2:14 PM, RoyPorter <[hidden email]> wrote:
>>>> >
>>>> >
>>>> >
>>>> > mraible wrote:
>>>> >>
>>>> >> Here's how I believe GWT should be integrated:
>>>> >>
>>>> >> 1. Create an appfuse-ws archetype that serves up RESTful services
>>>> >> (http://issues.appfuse.org/browse/APF-897).
>>>> >> 2. Create an appfuse-gwt archetype that consumes those services. This
>>>> >> archetype would contain a proxy servlet that allows #1 to be on a
>>>> >> separate host/port.
>>>> >>
>>>> >> In addition to #1, I hope to convert the Struts 2 and Spring MVC
>>>> >> archetypes to use those framework's REST support.
>>>> >>
>>>> >> For #2, we could use SmartGWT or GXT. SmartGWT might be better since
>>>> >> Sanjiv is a committer on this project. ;-)
>>>> >>
>>>> >
>>>> > I was going to bring up this on the mailing list anyway, Matt, you've
>>>> > come
>>>> > up with one way of integrating GWT into a back-end - i.e. using
>>>> > RESTful
>>>> > services.
>>>> >
>>>> > This is actually the way I initially investigated when going down the
>>>> > GWT
>>>> > route, I put it to one side in the end for a number of reasons:
>>>> > a. I didn't feel that there a stable Restful solution that was
>>>> > suitable for
>>>> > us (RESTlet has a GWT plug-in now, so that's possibly no longer the
>>>> > case).
>>>> > b. I have some concerns about not making the client too thick - we
>>>> > didn't
>>>> > have the time to learn how to architecture a proper RESTful system at
>>>> > the
>>>> > same time as using GWT for the first time, I had concerns that we may
>>>> > end up
>>>> > with all the business logic in the client, rather than on the server.
>>>> >
>>>> > I'm not a RESTful expert though, so will bow to more experience people
>>>> > in
>>>> > this respect. I still haven't totally discarded using it myself, but
>>>> > there's
>>>> > question marks in my mind at the moment.
>>>> >
>>>> > Alternatives .... there's 2 that spring to mind ...
>>>> >
>>>> > 1. If we're talking hibernate as the persistence mechanism, then
>>>> > Gilead
>>>> > (formerly Hibernate4GWT) is an option.
>>>> >
>>>> > 2. Map the valueobjects to DTO's using Dozer, or equivalent. We can
>>>> > therefore be picky and cut down what get's transferred across the wire
>>>> > to
>>>> > the client.
>>>> >
>>>> > The latter DTO option is what we've used currently. I was not happy at
>>>> > the
>>>> > project start that Hibernate4GWT was polished enough, and I had some
>>>> > concerns about the amount of traffic that would go to the client if we
>>>> > just
>>>> > sent our current models over. Also there was the high likelihood that
>>>> > some
>>>> > of managers would also be exposed to non java consumers as web
>>>> > services, so
>>>> > our use of some of the Java Collection classes in the model objects
>>>> > could
>>>> > have caused issues. (Our DTO's flatten out any collection objects to
>>>> > arrays.)
>>>> >
>>>> > In the process of implementing this, I took the GenericManager and
>>>> > created a
>>>> > generic Mapping version of it, so that the mapping between model
>>>> > objects and
>>>> > dto's was handled in the base class (with the option of overriding, if
>>>> > necessary).
>>>> >
>>>> > So, our back-end consists of Manager's and DAO's as normal (for
>>>> > appfuse),
>>>> > our GWT client talks to the managers directly using the Spring MVC
>>>> > DispatcherServlet.
>>>> >
>>>> > Moving onto your point 2, I agree with having whatever back-end on a
>>>> > different port, so that you can still use Hosted mode for development
>>>> > of the
>>>> > client.
>>>> >
>>>> > GWT 1.6 is going to bring some very good improvements in - Jetty as
>>>> > the
>>>> > hosted  mode server for one, and better design of where compiled
>>>> > artifacts
>>>> > go, amongst many others ...
>>>> >
>>>> > As for SmartGWT, that's a no-brainer, in my opinion, our current
>>>> > project
>>>> > relies upon GWT-EXT, but I've had plans for some time to remove this
>>>> > in
>>>> > favour of SmartGWT.
>>>> >
>>>> > As for my maven/appfuse archetype proposal, what I was thinking about
>>>> > doing
>>>> > was one or both of Gilead/DTO mapping, and create a
>>>> > GWT/SpringMVC/{Hibernate} archetype. I'd appreciate people's thoughts
>>>> > on
>>>> > this. Is it worth doing? or should we be following Matt's route? Or
>>>> > are a
>>>> > tutorial or two (of the non RESTful routes) explaining the integration
>>>> > of
>>>> > GWT with Appfuse enough?
>>>>
>>>> The architecture I've been using is to use GWT's RequestBuilder to
>>>> talk to RESTful services that return JSON. We hand-craft our GWT model
>>>> objects from the domain objects on the server-side. Sure, it's not
>>>> efficient, but it only takes a few minutes to code up the model
>>>> object. We're using GXT, which has a slew of data-related classes we
>>>> extend.
>>>>
>>>>
>>>> http://extjs.com/deploy/gxtdocs/com/extjs/gxt/ui/client/data/package-summary.html
>>>>
>>>> Then we wrote our own JsonMarshaler that can easily initialize our
>>>> model objects with JSON. Since I'm familiar with this setup, I'd
>>>> probably implement something similar initially (unless others
>>>> contribute of course).
>>>>
>>>> Cheers,
>>>>
>>>> Matt
>>>>
>>>> >
>>>> > Roy.
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > View this message in context:
>>>> > http://www.nabble.com/Re%3A-GWT---Appfuse-tp22184159s2369p22190832.html
>>>> > Sent from the AppFuse - Dev mailing list archive at Nabble.com.
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: [hidden email]
>>>> > For additional commands, e-mail: [hidden email]
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>
>>
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]