Quantcast

Spring Framework + DWR

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Spring Framework + DWR

Babelex
This link may be of interest on the Ajax/DWR and spring front :

http://www.oreillynet.com/pub/wlg/8649

Which I found from :

http://ajaxian.com/archives/2005/12/spring_and_dwr.html

Which also has some other links arpound the same subject

--
regards
babelex
http://babelex.blogspot.com/
#OpenSource means free to innovate#
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

graemer
Thanks I will take a look, but personally I've never been that
convinced with DWR. It promotes fine grained remote calls to the
javascript (as oppose to batch calls) by exposing java interfaces
which i'm not sure is a good idea. Hence why we went down the OpenRico
route.

But, having said that Grails' Ajax support is in its infancy so it go
any direction at this point and we are looking at a number of
potential solutions

Graeme

On 12/12/05, Babelex <[hidden email]> wrote:

> This link may be of interest on the Ajax/DWR and spring front :
>
> http://www.oreillynet.com/pub/wlg/8649
>
> Which I found from :
>
>  http://ajaxian.com/archives/2005/12/spring_and_dwr.html
>
> Which also has some other links arpound the same subject
>
> --
> regards
> babelex
> http://babelex.blogspot.com/
> #OpenSource means free to innovate#
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

Babelex
I would love to see what you guys have done so far on the ajax front, can you like me to any info on the OpenRico route you have looked at?

On 12/12/05, Graeme Rocher <[hidden email]> wrote:
Thanks I will take a look, but personally I've never been that
convinced with DWR. It promotes fine grained remote calls to the
javascript (as oppose to batch calls) by exposing java interfaces
which i'm not sure is a good idea. Hence why we went down the OpenRico
route.

--
regards
babelex
http://babelex.blogspot.com/
#OpenSource means free to innovate#
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

Ken Pelletier
In reply to this post by graemer
My take on it (and I use DWR and have also used Prototype and Dojo)  
is that the granularity of the service you expose is as fine or  
coarse as you want it to be.

While DWR allows you to just take any old POJO and expose it, it  
seems to me that a more natural thing to do would be to create  
service facades and expose them - this gets you the granularity  
you're after with a very easy deployment and management model.

I just attended the Spring Experience conference last week where I  
attended a session on Spring/DWR, and I came away with the impression  
that it can be a good combination if your backend is already in Java.

- Ken

On Dec 12, 2005, at 9:34 AM, Graeme Rocher wrote:

> Thanks I will take a look, but personally I've never been that
> convinced with DWR. It promotes fine grained remote calls to the
> javascript (as oppose to batch calls) by exposing java interfaces
> which i'm not sure is a good idea. Hence why we went down the OpenRico
> route.
>
> But, having said that Grails' Ajax support is in its infancy so it go
> any direction at this point and we are looking at a number of
> potential solutions
>
> Graeme
>
> On 12/12/05, Babelex <[hidden email]> wrote:
>> This link may be of interest on the Ajax/DWR and spring front :
>>
>> http://www.oreillynet.com/pub/wlg/8649
>>
>> Which I found from :
>>
>>  http://ajaxian.com/archives/2005/12/spring_and_dwr.html
>>
>> Which also has some other links arpound the same subject
>>
>> --
>> regards
>> babelex
>> http://babelex.blogspot.com/
>> #OpenSource means free to innovate#

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

Babelex


On 12/12/05, Ken Pelletier <[hidden email]> wrote:
My take on it (and I use DWR and have also used Prototype and Dojo)
is that the granularity of the service you expose is as fine or
coarse as you want it to be.

It's difficult to decide, we are currently evualting ajax options for our projects. I must admit I didn't realise that Graiuls was using OpenRico which has some very interesting features such as the ajax engine, even if we don't use grails we will almost certainly use this as it fits our plans and models nicely. However their are many occasions where this appraoch is not right and simple rpc type calls offere a better solution. In short we will probably mix and match

While DWR allows you to just take any old POJO and expose it, it
seems to me that a more natural thing to do would be to create
service facades and expose them - this gets you the granularity
you're after with a very easy deployment and management model.


We also aren't tied into spring in any way, in fact our models vary considerably as we have inherited a lot of different stuff over the years (Like many others here I would expect).


But we are still interested in Grails with ajax from the why re-invent it again for newer projects, particularly for smaller quick turnaround stuff.

I'm very interested to see how it has and will devlop further

--
regards
babelex
http://babelex.blogspot.com/
#OpenSource means free to innovate#
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

graemer
In reply to this post by Ken Pelletier
On 12/12/05, Ken Pelletier <[hidden email]> wrote:
> My take on it (and I use DWR and have also used Prototype and Dojo)
> is that the granularity of the service you expose is as fine or
> coarse as you want it to be.
>
> While DWR allows you to just take any old POJO and expose it, it
> seems to me that a more natural thing to do would be to create
> service facades and expose them - this gets you the granularity
> you're after with a very easy deployment and management model.

I do agree with you on this Ken and in fact I have intentions to
integrate something similar for Grails service classes (see
http://grails.codehaus.org/Services).

The plan is to allow you to expose service classes in different ways
(soap/ajax/xml-rpc etc.) and it all gets automatically configured for
you. So if you had a UserService class for example you could do:

class UserService {
      @Property expose = [ "soap", "ajax", "xml-rpc" ]

      def getUsers() {
             return User.list()
      }
}

The "getUsers()" method in this class would then be exposed via Soap
(probably using XFire), ajax ( DWR is a good candidate) and xml-rpc

Cheers,
Graeme

>
> I just attended the Spring Experience conference last week where I
> attended a session on Spring/DWR, and I came away with the impression
> that it can be a good combination if your backend is already in Java.
>
> - Ken
>
> On Dec 12, 2005, at 9:34 AM, Graeme Rocher wrote:
>
> > Thanks I will take a look, but personally I've never been that
> > convinced with DWR. It promotes fine grained remote calls to the
> > javascript (as oppose to batch calls) by exposing java interfaces
> > which i'm not sure is a good idea. Hence why we went down the OpenRico
> > route.
> >
> > But, having said that Grails' Ajax support is in its infancy so it go
> > any direction at this point and we are looking at a number of
> > potential solutions
> >
> > Graeme
> >
> > On 12/12/05, Babelex <[hidden email]> wrote:
> >> This link may be of interest on the Ajax/DWR and spring front :
> >>
> >> http://www.oreillynet.com/pub/wlg/8649
> >>
> >> Which I found from :
> >>
> >>  http://ajaxian.com/archives/2005/12/spring_and_dwr.html
> >>
> >> Which also has some other links arpound the same subject
> >>
> >> --
> >> regards
> >> babelex
> >> http://babelex.blogspot.com/
> >> #OpenSource means free to innovate#
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spring Framework + DWR

Babelex

The plan is to allow you to expose service classes in different ways
(soap/ajax/xml-rpc etc.) and it all gets automatically configured for
you. So if you had a UserService class for example you could do:

class UserService {
      @Property expose = [ "soap", "ajax", "xml-rpc" ]

      def getUsers() {
             return User.list()
      }
}

The "getUsers()" method in this class would then be exposed via Soap
(probably using XFire), ajax ( DWR is a good candidate) and xml-rpc

And expose as "rest" also? we use a lot of rest based service patterns (i.e. resource/collection and parameters). It would be usefull to cover all bases here. 


--
regards
babelex
http://babelex.blogspot.com/
#OpenSource means free to innovate#
Loading...