Closed Bug 863013 Opened 12 years ago Closed 12 years ago

Add "external" to contentType in schema

Categories

(Webmaker Graveyard :: MakeAPI, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kate, Assigned: mjschranz)

Details

Attachments

(1 file)

We need a type of content that refers to external links
text/html? If you have application/butter and application/thimble, and you're just linking to a page vs. image vs. video, you can use the reported type. NOTE: node-hubble can get you the content type for a remote link.
Content Type is the wrong wording in my opinion. I think it should be something more along the lines of "makeType". In either case, this will cover it for now.
Attachment #738781 - Flags: review?(kate)
Comment on attachment 738781 [details] [review] https://github.com/mozilla/MakeAPI/pull/15 `external` isn't a valid mime type, see https://en.wikipedia.org/wiki/Internet_media_type. I do think content-type is the right term. We don't want to start thinking about internal vs. external, since everything is external to the make api--it's just a URL. What sort of things are you imagining these so-called external things being? Are they web pages? That's text/html. Are they images? That's image/png, image/jpeg, ... Are they video? video/... Audio? audio/...
Attachment #738781 - Flags: review-
NOTE: we probably also need to do application/x-butter and application/x-thimble to be proper.
Last I checked, contentType was referring to the kind of "Make" this was. IE. Thimle, Popcorn or perhaps some other form of make we wind up storing information on. This is why I believe makeType is the correct term here. If I'm horrendously wrong then so be it, but on that note I don't understand why the content-type is a relevant piece of information. If it is a relevant piece of information then I think we need to add makeType to the Schema to better indicate the kind of make the information stored was for.
Status: NEW → ASSIGNED
Using contentType for the kind of make is really good--it reuses an aspect of the web that's already well defined. I'm just looking for us to not break standard mime-types if we don't have to. Content types are used to indicate to client/servers/apps what a given URL is. Having a content type of application/x-thimble says clearly, "This is something that was made in Thimble." My r- is based on us breaking the meaning of content-type in general. Whether the make api wants other fields might also be valid. I just like using the existing structure of the web when we can vs. inventing new ones.
The intent of "external" that I got from Kate when we were going over this was for basically Makes not made by our tools ( Maybe it's a cool plugin for Popcorn, maybe it's some awesome page someone made with our webcomponents ) that we would identify in our system. What would you think is the right way to classify that content type? I think I'll wind up adding another field for the schema then that is a more direct relation to the tool used.
Ok, it seems like we are actually dealing with two fields here: ( 1 ) contentType, which should make sense in the context of of standard content types and give some indication to applications (our own, or otherwise) about how to deal with whatever is at the given URL. i.e. application/x-popcorn-maker application/x-thimble text/html (for everything else -- right now) If challenges and events are made with thimble, they can be marked as such, otherwise they would be text/html. ( 2 ) makeType, which should indicate the type of make. This could include: popcornMaker thimble challenge event hacktivityKit external (something cool not made on our site, like a demo or a github repo, for example) We could store these as tags, e.g. makeType:challenge, as long as we can search properly for these. I like the idea of reading the content type of external links in the future, although I would see the restriction we have on allowing only certain content types being a problem for that
(In reply to Kate Hudson (:k88hudson) from comment #8) > Ok, it seems like we are actually dealing with two fields here: > > ( 1 ) contentType, which should make sense in the context of of standard > content types and give some indication to applications (our own, or > otherwise) about how to deal with whatever is at the given URL. > i.e. > application/x-popcorn-maker > application/x-thimble > text/html (for everything else -- right now) > > If challenges and events are made with thimble, they can be marked as such, > otherwise they would be text/html. > > ( 2 ) makeType, which should indicate the type of make. This could include: > popcornMaker > thimble > challenge > event > hacktivityKit > external (something cool not made on our site, like a demo or a github repo, > for example) > > We could store these as tags, e.g. makeType:challenge, as long as we can > search properly for these. > > I like the idea of reading the content type of external links in the future, > although I would see the restriction we have on allowing only certain > content types being a problem for that Yes, I agree with this, and propose that we take advantage of the tags field.
Comment on attachment 738781 [details] [review] https://github.com/mozilla/MakeAPI/pull/15 I've updated this all accordingly based on our discussions in person and IRC. Basically, we want to use tags here rather than bloat the Schema with more fields. I've updated the fake data to use our expected format coming from our projects ( application/x-popcorn and application/x-thimble ) and removed validation since I'm unsure if there is a good way to validate it all for things included in the URL field that aren't our projects.
Attachment #738781 - Flags: review?(kate)
Attachment #738781 - Flags: review?(david.humphrey)
Attachment #738781 - Flags: review-
Comment on attachment 738781 [details] [review] https://github.com/mozilla/MakeAPI/pull/15 application/x-butter application/x-thimble text/html Looks good.
Attachment #738781 - Flags: review?(david.humphrey) → review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: