On Sat, Jan 31, 2009 at 7:53 AM, Tim Perrett <[email protected]> wrote:

>
>
> Hey David,
>
> Ok splendid - another alternative it is.
>
> FYI - I added a few more HTTP code representations to HttpResponse.scala
> last night... Nothing crazy, but just some other ones I needed. I also need
> to add some extra parameters to some of them so they directly represent the
> RFC spec, but they are OK for the moment :-)


Excellent.

Next time you're in the Response code, can you put all the responses in a
single file?


>
>
> Cheers
>
> Tim
>
> On 31/01/2009 15:48, "David Pollak" <[email protected]> wrote:
>
> > Tim,
> >
> > Please don't change the existing XMLApiHelpers, but feel free to create
> an
> > alternative.  I expect different people are going to have different
> styles and
> > providing them with lots of alternatives will be important.
> >
> > I'm planning another alternative that will returns failures as different
> HTTP
> > codes to make things more RESTful.
> >
> > Thanks,
> >
> > David
> >
> > On Sat, Jan 31, 2009 at 3:07 AM, Tim Perrett <[email protected]>
> wrote:
> >>
> >> Guys,
> >>
> >> Just doing some work with the XMLApiHelper and im finding some things
> >> that can be improved. For instance, the trait provides createTag which
> >> you then have to override like so:
> >>
> >> def createTag(in: NodeSeq) = <api>{in}</api>
> >>
> >> IMO, it seems that this isnt ideal as if you were returning a list of
> >> users, your xml would be:
> >>
> >> <api>
> >>   <user>....</user>
> >>   <user>....</user>
> >> </api>
> >>
> >> It would be better to have a configurable root node, so its a more
> >> logical semantic:
> >>
> >> <users>
> >>   <user>....</user>
> >>   <user>....</user>
> >> </users>
> >>
> >> I've been playing around with the best way to do it and by changing
> >> the implicits and the xml build methods I now have it so that you can
> >> do:
> >>
> >> def listAllUsers = {
> >>   ...
> >>   ("users", listOfUsers)
> >> }
> >>
> >> This appears to be the best way to do it, otherwise things start
> >> getting messy?
> >>
> >> Whilst I can make these changes code wise, im very aware that ESME
> >> uses this helper a lot and this would mean some significant breaking
> >> changes in the api construction, both for ESME, and no doubt other
> >> projects. IMHO, the change is worth the hassle as it will make
> >> services up of more logically formed xml.
> >>
> >> What are people's thoughts?
> >>
> >> Cheers
> >>
> >> Tim
> >>
> >
> >
>
>
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to