News for hackers. Stuff that matters.
Re:Apple forces each iOS app to have its own independent sys... by jmillikin on Monday March 25, 2013 @01:22AM (#5435623)
Android has direct filesystem access, but I can't think of the last time I ever used it. The "sharing" mechanism provides a much nicer experience than forcing the user to fumble around in a tree abstraction that hasn't changed in ~40 years. I eagerly await the day when filenames become completely opaque identifiers, never exposed in the UI.

iOS's problem is that there is no standardized way for third-party apps to allow other apps access to a particular document. That's what the OP is actually asking for. Just because desktops have historically implemented this feature as an N-ary tree of (string, blob) pairs doesn't matter.

Re:Apple forces each iOS app to have its own independent sys... by Negitivefrags on Monday March 25, 2013 @01:36AM (#5435654)
There seems to be a prevailing attitude among some that the "users" don't like trees of files and we should all move to something more advanced. It has always seemed weird to me.

Is something being 40 years old make it bad? Humans naturally like to put things in hierarchies. It is a very well understood concept by everyone.

Re:Apple forces each iOS app to have its own independent sys... by jmillikin on Monday March 25, 2013 @01:57AM (#5435715)
I'm a user. I hate file hierarchies. IMO, the ideal interface to a computer's data storage system would have two ways to find a document:

1) A list of most-recently-seen documents. Each application would have its own list of documents it had seen, and there would be a per-user list for documents from all apps. Documents are added to the lists when they're created, opened, downloaded, etc. There is no limit on number of documents in the list, and the list is searchable. Some modern applications have primitive equivalents, but not as the primary document-opening interface.

2) Give each list a search box, with results as a flat list of extracted metadata. Honestly, just clone the current standard web search engine UI and use that. A search box is the closest computers have come to being user-friendly, and is certainly nicer than dropping the user into a file manager.

---

Example: Firefox's "recent documents" list would be a combination of browser history and downloads panel. To open a file you just downloaded, find it in either Firefox's list, or the global list, and click/tap it. To open a web page you just created in a text editor, you would click/tap it in the global documents list and indicate that Firefox should handle it (e.g. with an Android-style app selector).

Keep existing file-management API calls as they are, and don't tie them into the document system. I don't want a game to add a new document entry for every .so or .png it loads. Application developers can decide how best to represent their document in terms of low-level filesystem objects (a directory, a flat text file, a binary blob, whatever fits the document best).

Re:Apple forces each iOS app to have its own independent sys... by mooism2 on Monday March 25, 2013 @05:33AM (#5436194)
People can cope fine with hierarchies when different things go at different levels of the hierarchy. Recursive hierarchies? A bit harder.

So: God at the top, then the king, then the barons/lords/etc until you get to the peasants at the bottom. Easy to understand.

Or: shopping centre at the top, then different floors in the shopping centre, then various shops, then aisles in the shop, then vaguely demarcated lengths of aisle, then shelves, then individual items on shelves. Fine.

But: a folder at the top, then more folders in that folder, and further folders in those folders? And all those folders look the same (only the names are different. Actually, sometimes the names are the same as well). That is a bit confusing for most people.

Also consider menus. A menu bar across the top, with a single level of drop down menus underneath? Easy peasy. A start button with a pop up menu, that contains more pop up menus, that contain still more pop up menus? Disorienting. Microsoft thought the only thing holding back deep hierarchical menus was mouse control, so when they refined that for Windows 95 they went crazy with menus inside menus inside menus. Mistake. They've been trying to flatten and differentiate different levels of the start menu ever since.

Meanwhile, programmers need to be good at abstraction, so have no problem with undifferentiated folders within folders within folders.

Re:Apple forces each iOS app to have its own independent sys... by m_eiman on Monday March 25, 2013 @02:13AM (#5435748)
It is a very well understood concept by everyone.

Yet the first thing anyone does when they're looking for something is to Google it, not go to Yahoo's front page, look for the relevant category, find a suitable sub-category, ad nauseam. There's a reason search won that battle.

Re:Apple forces each iOS app to have its own independent sys... by petsos on Monday March 25, 2013 @01:38AM (#5435660)
> It is a very well understood concept by everyone.

No it is not.

Re:Apple forces each iOS app to have its own independent sys... by Negitivefrags on Monday March 25, 2013 @01:41AM (#5435666)
People can navigate a web page. They can find a food item in a menu or in the supermarket. There are a million examples. Hierarchical navigation is central to living in society.
Re:Apple forces each iOS app to have its own independent sys... by LaGrange on Monday March 25, 2013 @01:54AM (#5435708)
> People can navigate a web page.

Not very well, which is why so much time is spent trying to avoid increasing navigation depth and reducing the amount of views to minimum.

> They can find a food item in a menu or in the supermarket.

First time I see a menu that's comparable to a filesystem tree I'm going to burst out in laughter and think it's a gimmick. A supermarket is closer to an art statement about inherent chaos of modern lives than to anything hierarchical.

Yes, there are hierarchical systems, the big one being a common management structure (which works eh), and administrative subdivision of countries (hint: people almost never actually traverse that tree, they always go directly for a specific entity in it. Also, they routinely get lost in it). They're a bother and used when they can't be avoided, or when nobody bothered to work on something better. Or when you need to sort a bunch of numbers or something. The reason for avoidance being, besides the low transparency, complex data maps into trees really poorly.

Re:Apple forces each iOS app to have its own independent sys... by danilocampos on Monday March 25, 2013 @01:49AM (#5435692)
The quibble isn't with the hierarchies. It's with the navigation. The point is that some do not enjoy navigating anything, hierarchical or not. That's why librarians' assistants have jobs.

So if you have a magical medium where information can be abstracted behind any means of retrieval, you give the apes what they want: their bananas in a pile, instead of in tiny, head-scratch-inducing drawers.

Re:Apple forces each iOS app to have its own independent sys... by ghshephard on Monday March 25, 2013 @01:51AM (#5435701)
The vast majority of computer users (outside of knowledge workers, and techies) are completely befuddled by hierarchial navigation. Eliminating it was one of the great steps forward on the iPhone.
Re:Apple forces each iOS app to have its own independent sys... by chii on Monday March 25, 2013 @02:21AM (#5435767)
you can tell someone's orientation towards hierachical file systems by how they normally put their files right now.

I observed two different distinct species - one will just dump everything into the desktop (or the My Documents) folder. The other will place all of their files in subdirectories, or sub-sub directories, in a very organized manner. If you look at their real life organization techniques, it would very likely be the same.

Re:Apple forces each iOS app to have its own independent sys... by coldtea on Monday March 25, 2013 @09:33AM (#5436840)
>People can navigate a web page.

Barely. Perhaps you never read the complaints people have about webpage navigation, or noticed that almost no user understands hierarchical URLs.

You know what the top Google searches are? Stuff like "fb", "facebook", "twitter" etc. Because people cannot even understand they can write the URL on the address bar or remember it.

>They can find a food item in a menu or in the supermarket.

You kidding me? People can barely find stuff in the supermarket, and only after searching and scanning with their eyes the shelves. For items they haven't bought in a while, they have to check the sings over every isle, or ask a supermarket employee.

Really bad example.

Re:Apple forces each iOS app to have its own independent sys... by wandermatt on Monday March 25, 2013 @01:52AM (#5435703)
If someone is able to purchase food at a supermarket does it follow that this same individual cannot also have difficulty understanding a hierarchical filesystem?
Re:Apple forces each iOS app to have its own independent sys... by Turing_Machine on Monday March 25, 2013 @06:48AM (#5436382)
Hierarchical navigation is useful/necessary when a physical item can only be in one clearly-defined location.

That's not the case for computer documents.

Re:Apple forces each iOS app to have its own independent sys... by rayiner on Monday March 25, 2013 @02:07AM (#5435736)
Who actually puts things in hierarchies, besides technical people? That always struck me as the most ridiculous thing about the "folder" metaphor--when have you ever seen people put folders inside folders?!
Re:Apple forces each iOS app to have its own independent sys... by strlen on Monday March 25, 2013 @03:38PM (#5439186)
They way I view is similar to de-normalization/"pre-materializing" in a database: the real solution is for a file to be tagged with pieces of metadata, maintain a real-time index, and then to be able to perform exact queries instantly (something like LinkedIn's faceted search) against this metadata.

E.g., first I want to find all files tagged with "code", then I want to find all files tagged with "current project". Then I get a list of all files in a current project and possible tags I could look for (e.g., it will show many are also tagged with "java" or with "C++" so I can add those tags to my search).

The problem is historically (that is, until recently) these kind of queries have been prohibitively expensive in both space and time: there's time complexity of doing a boolean query on the index, there's the space complexity of storing the index amenable to those queries both on memory and in-disk. This is difficult to in the context of legacy desktop machines (think minimal requirements to run Windows XP: 256mb of RAM, 5400 rpm disk, pentium III cpu) that were prevalent until just a few years ago.

Instead, the solution chosen is the same solution that folks building distributed "NoSQL" databases or sharded SQL database setup go for: group all related data into a few rows (in this case directories) and treat the data as hierarchical (a return to pre-RDBMS era).

Today if your working set fits in main memory (which is most probably the case for even the biggest data collections on most people's personal desktops), there's no longer a performance related reason to use a single-node (non-partitioned) "NoSQL"-style setup (there may be other reasons to, e.g., wanting to have a more flexible schema, saving time, wanting to scale out later, etc...)

I suspect the real reason we haven't done this with file systems is due to legacy: I have data organized into files and folders going back to ~1998 that I do not want to lose and can't afford to tag manually.

The support from my theory comes from the fact that the first systems to embrace non-hierarchical file system have been legacy-free devices where important storage (for 99% of the people out there...) is either on the SIM card (addresses), in the cloud (mail) or is de-facto tagged and has to be copied over in any case (photos which have EXIF tags and are stored in photo album apps or cloud services).

The same has also been happening on the other end of the spectrum: e.g., large scale distributed storage system for much similar reasons (i.e., they are the first of their kind, so there was a "license" to build these systems in a legacy-free fashion).

tl;dr Hierarchical storage is a non-functional requirement. Functional requirement is being able to do complex exact queries.

Re:Apple forces each iOS app to have its own independent sys... by rdouble on Monday March 25, 2013 @02:17AM (#5435757)
Every designer I've known falls into one of two camps: they either have an incredibly detailed folder hierarchy or else they store every file they've ever created or downloaded on the desktop.
Re:Apple forces each iOS app to have its own independent sys... by anigbrowl on Monday March 25, 2013 @02:37AM (#5435788)
Librarians.
Re:Apple forces each iOS app to have its own independent sys... by coldtea on Monday March 25, 2013 @09:24AM (#5436798)
>There seems to be a prevailing attitude among some that the "users" don't like trees of files and we should all move to something more advanced.It has always seemed weird to me.

The opposite should feel weird to you. The notion that files belong in some kind of tree structure. It's just an artificial implementation we came up with, more Platonic than realistic.

A file doesn't belong in some "node" in a "tree". It belongs to multiple nodes all around the tree, including "nodes" that only make sense for that one only.

A tree hierarchy FS doesn't reflect that (except if you go crazy with symbolic links). And then it doesn't scale with lots of tags, or tens of thousands of files.

A tagging/metadata system is a far better way to manage those files, and closer to they way we think (associating attributes with objects, remembering based on keywords, etc).

Re:Apple forces each iOS app to have its own independent sys... by tuananh on Monday March 25, 2013 @01:51AM (#5435700)
tree hierarchy of more than 3 levels is a big mess.
Re:Apple forces each iOS app to have its own independent sys... by yareally on Monday March 25, 2013 @01:49AM (#5435691)
Filesystem is mostly useful for a number of cases (though perhaps not the average person), but I am glad it's there and one can access external storage or /system (read only) without root.

It's pretty useful for the following conditions:

1) root users that want move around and change config files (boot animations, system wide theming, etc). Also for flashing stuff in recovery where you need to point to the file you want.

2) ROM modders/developers - looking at various files live on the device and also for low level things such as filesystem access in recovery to get yourself out of a jam.

3) app developers - I like to use sftp on my device and sshfs on my pc to directly access sqlite dbs for apps I am working on and play with the db directly without having to reinstall the app to update it.

4) Those that want apps that obey filesystem rules versus global (like for a music player, I use one that reads by directory instead of just dumping everything in by tags).

Re:Apple forces each iOS app to have its own independent sys... by shawn-butler on Monday March 25, 2013 @03:51AM (#5435904)
Isn't this exactly what UIDocumentInteractionController, etc accomplishes? [0] Each application registers the data types for which it is a "viewer". Application with the content provides a way to open the document interaction controller with reference to the document, iOS supplies icons of apps that can open it, user selects app and it opens with a different launch options so it opens the content directly.

There is nothing more fine-grained than file-type but mime-types, win32 registry keys, etc have always just been conventions really outside of a few well-known types. BFS (beos) tried to add in metadata attributes to the filesystem and it was pretty slick, admittedly.

I guess I can kind of see the complaint about wasting space on duplicates but if one app is a viewer, and the other is an editor... well I think the OP comment is kind or obtuse. Sandboxing files is a much better approach for lots of reasons.

Apple made the right decision, let each application organize access to its information in the way it best sees fit. If it's a tree view, ok if it is some skeumorphic bookshelf, ok.

[0]: http://developer.apple.com/library/ios/#documentation/UIKit/...

Re:Apple forces each iOS app to have its own independent sys... by jimmaswell on Monday March 25, 2013 @01:50AM (#5435697)
I use Android's filesystem to move files from SD to internal or reverse, from the downloads folder to more appropriate categorized folders, and to find files to delete for more room. I appreciate having this ability a lot. Things like this should just be standard for any OS. I also open some local html files with file:// on firefox mobile sometimes.
Re:Apple forces each iOS app to have its own independent sys... by kaiwen1 on Monday March 25, 2013 @02:17AM (#5435760)
That's correct. I'm not advocating a tree-based file system. I'm advocating a shared file system. If that system improves on the tree, I'm all for it.
Re:Apple forces each iOS app to have its own independent sys... by seppo0010 on Monday March 25, 2013 @01:36AM (#5435653)
Android's data provider interfaces are so neat on this subject. I can't believe iOS did not implement anything like it yet.
Re:Apple forces each iOS app to have its own independent sys... by shawn-butler on Monday March 25, 2013 @03:40AM (#5435884)
If you mean ContentProvider [0] that is really only useful for highly structured data. Falls apart pretty quickly for non-relational data files and documents as well as media, or do you have some counter examples I could consider?

[0]: http://developer.android.com/reference/android/content/Conte...

Re:Apple forces each iOS app to have its own independent sys... by seppo0010 on Monday March 25, 2013 @09:00AM (#5436712)
That is what I meant. Can you explain why in falls apart?