abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <dan.diepho...@mulesource.com>
Subject Re: Modeling Media Versions
Date Mon, 08 Oct 2007 19:30:14 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Brian Moseley wrote:
  <pre wrap="">On 10/8/07, Dan Diephouse <a class="moz-txt-link-rfc2396E" href="mailto:dan.diephouse@mulesource.com">&lt;dan.diephouse@mulesource.com&gt;</a>

  <blockquote type="cite">
    <pre wrap="">The second one seems more correct, but I dislike how its two steps
you have to create a resource without the initial image. Is there
anything wrong with doing the first one?
  <pre wrap=""><!---->
I think you have more resources than you think you do:

/images  - atom:collection
  /foo  - atom:entry
    /versions - atom:collection
      /1 - atom:entry
      /1.jpg - media

The versions collection really is an independent resource that should
have its on address, which removes the confusing need to POST to an

I suggest POSTing an entry to /images to create both /images/foo and
/images/foo/versions/, then POSTing to /images/foo/versions/ to create
/images/foo/versions/1 and /images/foo/versions/1.jpg.

Thinking of it like this makes the two step process seem more natural,
IMO. You are creating four resources after all.
I see what you're saying, although it still seems quite a hassle for me
and my users. (sorry, I'm a stickler for this stuff) In my app I don't
create an actual database entry for the image until I have the first
version. So I would have to keep some stuff in memory for a while until
the first image is POSTed (and if it isn't, clean the faux entry up).
Also, its annoying for the user because they have to go through a two
step process. By creating that first entry on /images, they're
supplying a lot of redundant/empty information - like title, created
date, summary, etc. I'd rather this be filled in automatically. :-)<br>
Which leads me back to wanting to just POST to /images... Is there
anything wrong with just POSTing to /images and having /images/foo,
/images/foo/versions, /images/foo/versions/1 and
/images/foo/versions/1.jpg all created in that POST?<br>
Or maybe I'm just fitting a square peg in a round hole! :-D<br>
- Dan<br>
<pre class="moz-signature" cols="72">-- 
Dan Diephouse
<a class="moz-txt-link-freetext" href="http://mulesource.com">http://mulesource.com</a>
| <a class="moz-txt-link-freetext" href="http://netzooid.com/blog">http://netzooid.com/blog</a></pre>

View raw message