Hi,

Everybody is talking about Spotlight, CoreData etc. which are really nice features but not truly new things… In my opinion, UTI (Uniform Type Identifier) could be the real innovation or at least a very good foundation for future innovations.

When I started to contribute to GNUstep one year and half ago, I really wanted to work at some point on a rich description model for file content, because starting with Mac OS 8, I observed two things : - exponential growth of applications number (thanks to internet, shareware, open source etc. combined together) - more standards at various level for file formats (like XML, PDF etc.) with possibility to describe or aggregate very different sorts of content (like text, bitmap image, sound etc.)

The result was a complete mess to correctly bind Applications and Documents especially in a flexible and stable way, HFS file type metadata needed to be pushed forward, I was myself placing great hope in Mac OS X at this point. Finally Apple decided to use only file extensions for compatibility reason, Mac users entered in the file extensions nightmare : file extensions induced overlapping metadatas (name and file type), recurrent conflicts, no standards, multiple extensions schizophrenia. With Mac OS X 10.1, things just became a bit worse because Apple introduced the possibility to have file extensions hidden on a file by file basis (unlike Windows), it was marginally better than Windows but a bit worse than Mac OS X first release. Before and after first Mac OS X release, it was even a hot topic on Apple UI list (David K. Every, John Siracusa and others sent to this list excellent analysis on the subject), but few times after Mac OS X 10.1 release the list was closed because Apple guys weren't tolerating that many contributors were ranting or discussing about facts like file extensions supported by default, Dock, Finder etc.

When I tried to start Étoilé, it quickly became evident a real components architecture coupled with document orientation would need such rich description model (for flat and aggregated content) which I desired to write initially for GNUstep. The previous autumn iirc, Stefan and Nicolas started to talk about roles concept, by talking with them, we realized it was probably the missing piece for the rich content description model needed by Étoilé from the components point of view.

What I wrote on the wiki some months ago :
- Advanced File Types Support
We think Services (aka GNUstep applications) deserve better file formats support by taking in account complex granularity which characterize file formats (to take an example, SVG is XML, but structured plain text too). It would be done by using ExtendedWorkspaceKit built-in metadatas support, and variety of file formats would be described in Service bundles (GNUstep applications) in detailed schemas and collected by the system transparently. This possibility would allow to make use of file extensions optional.

Wiki references pages :
- http://www.dromasoftware.com/etoile/mediawiki/index.php?title=Workspace

Back to UTI…
Here is a detailed overview of UTI model, I really advise you to read it :
http://arstechnica.com/reviews/os/macosx-10.4.ars/11
http://arstechnica.com/reviews/os/macosx-10.4.ars/12

An interesting point is how it may fix some NSPasteboard related limitations in the future. John Siracusa explains also very well while MIME types choice by GNOME and KDE has leaded finally to similar failure. If you are really interested by the topic, various old discussions involving lot of debates on Freedesktop list can provide more details on MIME types issue and how this "internet" standard has been stretch in various ways for desktop environments with poor results.
Freedesktop list : http://lists.freedesktop.org/mailman/listinfo/xdg


To come back to my first attempt to define a rich description model… Here are two short draft examples I have never put on Étoilé wiki :

"primary type" describes format at most basic level, essentially : text or binary "structural type" describes format structure : XML plist vs NeXT plist for example "sub structural" types are possible : for example plist structure can be used as a basis for custom document format "semantic type" describes format meaning : this a source code file, this is an image file
"sub semantic" types are possible : this a vectorial image file
"characteristic" type describes what makes this precise format unique, it is the file format identifier.

Structural type, Semantic type can both be hierarchical (but a values list may be sufficient) as we have seen.

Now two examples…

For an Objective-C implementation file
- primary : text
- structural : text
- semantic : sourcecode
- sub semantic : implementation
- characteristic : objc
- extension : m

For an SVG file :
- primary : text
- structural : xml
- semantic image
- sub semantic : vectorial
- characteristic : svg
- extension : svg, SVG

Rich description model for an Objective-C implementation file and encoded in an XML plist (TK prefix is purely arbitrary) :
<dict>
<key>TKPrimaryType</key>
<string>text</string>
<key>TKStructuralType</key>
<string>text</string>
<key>TKSemanticType</key>
<dict>
<key>TKDescription</key>
<string>Implementation</string>
<key>TKValue</key>
<array>
<string>sourcecode</string>
<array>
<string>implementation</string>
</array>
</array>
</dict>
<key>TKCharacteristicType</key>
<dict>
<key>TKDescription</key>
<string>Objective-C</string>
<key>TKValue</key>
<string>objc</string>
</dict>
</dict>

This is just quick draft and shouldn't be seen as a definitive answer. I admit I'm very pleased with Apple UTI model and I think it is probably a good idea to adopt it because it is simple and efficient, may be with some twists inherited from my proposal or other ideas I haven't thought… Now the big problem is surely the missing bridge between an UTI-like model and roles concept or more precisely how we are going to implement/describe roles in Étoilé.

sorry for the long mail :-)
Quentin.

--
Quentin Mathé
[EMAIL PROTECTED]

Reply via email to