Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

Softpanorama University Library

The Orthodox File Manager (OFM) Paradigm

by Dr Nikolai Bezroukov


 

Prev Contents   Next

Ch. 2: The Current Status and the Directions of the Development of the OFM Paradigm

Introduction

This chapter is largely based on all the content of the book, therefore, although it is important to read it in order to be able better compare different OFM implementations, some features might not be clear from the first reading and I recommend to reread it after reading the other chapters of the book. 

In order to evaluate the current generation of OFMs and see the future trends one needs to understand the driving force behind OFM development and its potential.  There are two questions here:

In the past the driving force behind OFM development were needs of system administrators, especially BBS sysops, Unix, Linux and FreeBSD administrators as well as all categories of programmers. Their job contains a large doze of file manipulations and they are often qualified enough to implement software themselves.

Currently BBS are almost extinct and are replaced by much bigger number of WEB administrators. That means that social base of OFM recently increased.

That probably explain why there are so many implementations of OFMs.  My feeling is that that fact also explains why OFM proved to be so important tool for sysops and sysadmins as well as advanced users: they substantially increase the productivity of complex file  manipulations. I also believe that there are some important limitations of  GUI tools in the environment were one need to manipulate filesystems with a large number of files dispersed in many directories like is that case in large WEB-sites or BBS. Some of the servers that sysadmin need to support are remote and it is not accidental that most OFMs now support FTP virtual file system (VFS). Now it's a standard feature of any decent OFM.

I am less convinced for the users who do not perform a lot of file operations on daily basis. For them a standard file manager maybe quite adequate. But if they do, OFM might be a big improvement. 

There is a significant mortality among OFMs and leaders periodically change. The table below tries to catch more or less current snapshot of the field.

OFM name
(and link to a book chapter)
NC FC DN FAR Total Commander Nico NCW MC XNC Drall
OFM Type Classic Classic Classic Classic GUI GUI   GUI Classic GUI Web
Status of development
(active if the the version is less then six month old, stalled if a year, frozen if more the a year)
Aban-
doned
Stalled ndn
and
dnosp
Stalled Active Active Abandoned Active Active Stalled
Last stable version 5.0 2.30 beta
(as of Nov, 2003)
See dnosp

and
ndn
  
1.70
(beta 5 as of May 15, 2003)
7.0
(Jun, 2007)
5.61
( as of Jun May, 2007)
2.0 4.6.1
(Jun2007)
5.0.4  (as of Jun, 2007) 1.16.0.0
(as of  Feb 2005)
OS supported DOS
 OS/2, NT,
Win 9x

DOS, Win9x, WinNT,
Linux (ndn)

 Win9x, NT  Win9x, NT, XP
(there is an independent attempt to clone TC for Unix)
Win9x, NT Win95/NT Unix
 (versions for Win95, NT,OS/2 exist but are not that  impressive)
Unix Multi-platform
(Perl)
Size of compressed distribution 1.4M   0.2M ~1M 1M   1.5M 0.83    2M 1.56 M 1M 29K
Software type and download link (if different from the development Commercial Shareware Open source:
2 major versions:
dnosp
and
ndn
Shareware Shareware Shareware Commercial GNU
License
GNU License GNU License
Price $90 ? $25 $0 $25 $30 $20
£21/€ 35
$0 $0 $0

The essence of OFM paradigm: OFMs as a new command line interface for the Unix shells

Although originated in DOS, in my view OFMs can and should be considered as a new generation of Unix shells command line interface, the interface that simplifies working with the command line shell environment. I would say that this is essentially a breakthrough in the creation of the shell command line interface. The only thing that is lacking is a component model and the integration with a suitable scripting language as a macro languages (for example, scripting host in Windows, TCL in Unix). That means that the importance of OFMs is closely related to the importance of shell environment. As David Korn aptly said (bold italic is mine  - BNN):

There are many people who use UNIX or Linux who IMHO do not understand UNIX. UNIX is not just an operating system, it is a way of doing things, and the shell plays a key role by providing the glue that makes it work. The UNIX methodology relies heavily on reuse of a set of tools rather than on building monolithic applications. Even Perl programmers often miss the point, writing the heart and soul of the application as Perl script without making use of the UNIX toolkit.

Paradoxically that means that Unix is a better environment for OFMs then Windows.

 What enhancement we can expect 
in the next generation of OFMs?

I  think that OFMs is still have a long way to maturity and that OFM paradigm is currently in a rather early stage of development. There is still a lot of space for improvement of OFM-style manipulation of files and directories that users should request from the developers. Among them:

The importance of history:
those who cannot remember the past
are condemned to repeat it

The famous quotation by  George Santayana "Those who cannot remember the past are condemned to repeat it" has a very literate meaning in file managers. You really need to retype things that OFM does not remember for you. In this sense the amount of history that a particular OFM can remember can be a crude, but important measure of a particular OFM quality. A bare (and unsatisfactory) minimum is the history of command line. More optimal is the addition of at least:

But generally for each operation history is an extremely useful add on that greatly enhance the usability.  Best OFMs like FAR remember even history of F5 and F6 operations.

Another important idea that OFM introduced is that history of viewed and edited files can be considered a special kind of a panel and most file operation are applicable to it.  In a sense it's additional temporary panel like DN or FAR temporary panels.

Other not so obvious interaction is that command history and user menu are interconnected in a sense that semantically user menu can be considered as a favorite list for the command history. That mean that one should have the ability to directly move entries form command history to the user menu and that command history probably should have a hidden field -- frequency count and be able to sort entries by this field.

The importance of  Virtual File Systems (VFS)

One of the main challenges in creating a good file manager is to provide access to vast amount of information about files in a particular file system. Filesystem today use the same paradigm as Unix in early 70th: hierarchical naming system in which files are contained within directories. This paradigm does not scale well for multi-gigabyte filesystem with hundreds of directories and thousands of files. For example a typical Windows installation contains almost 50K files on the drive C:  The main OFM innovation in this area is addition of semantic directories that in rudimentary form were results of some search. Ctrl-R proved to be a very natural key for reevaluating a query.

Virtual file systems are filesystems than provide regular local drive/file/directory style access to things that are not located locally or not in one directory or not a files at all.  The best OFMS have several of them implemented. Almost all are implementing at least one (usually archive VFS). A rich variety of VFS in OFM were introduced by DN and further (independently) developed by MC, FAR and Total Commander.

There are several such VFS

  • Xtree "flat" VFS. Historically the first VFS.  Provided "flat" view on all the files in a particular  branch of the file system (directory and all of its subdirectories). Now several OFMs implement this virtual filesystem (Total Commander and Northern Commander).

  • Xtree VFS is just a special (but very important) case of search VFS and it gives to the user the ability to view a directory with all subdirectories as a single virtual directory. Any subtree can then be viewed as a flat list of  files as if no directories exist. This way for example duplicates are instantly visible. This idea was pioneered in Xtree file manager around 1987 and is a natural and very important special case of the OFM search VFS paradigm.

    As I mentioned before, filters on subtree are essentially a search function for subtree and in future implementations this two functions should be merged.

    This flat directory tree VFS was first introduced in Xtree (as early as in 1987) and this capability probably was the single most important reason of  XTree popularity. As a limited imitation of the Xtree VFS exists in all DOS OFMs as result of the search for the file mask *.* (which actually can be panelized in NC5) but I am convinced than because of importance this VFS should be a standard in all modern OFMs.

    Such a VFS provides really important functionality not fount in any known to me Windows-style file manager. With Xtree-line of file managers discontinued (by the way by Symantec ;-), it can became a distinctive mark of OFMs. Separate implementation is warranted based just on importance of this feature for understanding and manipulating subtree content.

    Search VFS

    The idea of search VFS was discovered by many authors, but were fist introduced on mass scale in NC5 via panelize command.  It provides possibility to view results of search in a special panel -- essentially virtual directory. Using DOS tradition this directories were not mounted at all and they existed as a new type of virtual disk with links instead of files (please remember that DOS file system does not support links).  

    Search capabilities are usually quite powerful and include at least grep-like capabilities including search for regular expressions. Some advanced OFMs (DN, FAR) are capable to search in archives too.

    At the same time FindFile panel in OFMs can in reality be considered just a double width regular panel. The main problem here is that on a regular panel path is not necessary, while on a search panel it's often really helpful. That means that there should be two modes of displaying files in search VFS panel (with and without full path) and those modes can probably be useful for regular panels too. The possibility of  the transformation of this panel to a half screen panel as in NC5 in an interesting possibility, but it should not be required in order to be able to perform all (other than View and Edit) operations of files on the Search VFS panel.

    On Unix a search panel can be implemented by linking all found file to some temp directory, so its easier than in Windows environment.

    One additional operation that was introduced in Search VFS is go (or zoom) operation when one can open a new panel using the full path of particular file.

    It's important to understand that file filters are a special and very limited case of search VFS applied to the current directory.

    Briefcase VFS

    Briefcase VFS provide a possibility that was present in Unix from day one -- links to files and directories on existing drives can point into single (virtual or real) directory (or drive in DOS world).

    Although semantically it is very close to UNIX link,  briefcase was first introduced in windows 95 as a Document folder.

    Now it probably should be a standard feature in all UNIX implementations of OFMs. But the idea of briefcase has an additional important feature -- file could get into briefcase not only manually but automatically, based on some criteria -- usually recent usage. For example each recently opened file that is not an executable. The second feature of briefcase that files should disappear from briefcase if they were not used for a certain about of time (for example one month).

    Now let's discuss operations. It is possible to copy files from different directories to the briefcase drive (directory) and then work with this links as if they are were stored on this drive. All file operations should be supported.  .

    Script-based VFS -- generalization of NC5 panelize option introduced in MC

    The idea of ScriptVFS is to provide a user with the possibility to view in the panel the result of execution of any script that produce a list of fully qualified file names. The only restriction is that each line of script output should be a fully qualified file name. Other than that script can of arbitrary complexity. Currently it is supported in two major OFM implementations -- DN (DN idea was based on files.bbs concept) and MC -- the first OFM that implement this VFS correctly. BTW MC preserved the name of NC5 option (panelize) and we can call this type of VFS  a "PanelizeVFS".

    ScriptVFS is the most general case and several other OFM features can be considered as a special cases of this VFS:

    Again I would like to stress that OFM implementers probably just need to generalize filters to have Script-based VFS -- an old and not widely used concept can be extended into new and much more useful domain.

    FTP VFS

    The first FTP VFS was probably Alex FTP filesystem that lets users access files in FTP sites around the world just like they access local files. Alex pathnames are composed of 3 parts. First is /alex. Second is a reversed hostname. Last is the path on that host. For example, /alex/edu/berkeley/pub/virus.patch is a file at berkeley.edu. See also

  • Post on netnews about Alex
  • Alex README file
  • Alex NIR entry
  • Usenix paper on Alex intro.ps
  • Source code README
  • It was implemented as a part of OS in Plan 9. See Plan 9 -sys-man--4-ftpfs. Gnu Hurd also included it as a part of design (see Towards a New Strategy of OS Design). Unfortunately Linux does not implement it at all :-(.

    In Windows  environment the best implementation is probably WebDrive FTP Client Software by RiverFront Software -- a  autonomous FTP VFS subsystem that essentially makes a separate FTP VFS implementation in OFMs redundant. This was probably the most important breakthrough in OFM for the 1999 and paradoxically it was produced by the company that has nothing to do with OFM development. Currently limited to Windows 9x and NT  environments.

    WebDrive is a Windows 95/98 FTP software client  that allows you to map an Internet FTP site to a local drive utilizing the standard FTP protocol. This enables you to connect to an FTP site and perform familiar file operations like copy, xcopy, and directory functions with the Windows explorer,  a DOS box, or any other application like Microsoft Word, Excel, etc. WebDrive instantly FTP enables any application that reads or writes files by allowing the application to read files from or write files to the FTP site.

    Until now, in order to upload or download files from an FTP site, you needed to run a client FTP utility that presented a user interface to manually select the files to transfer. The WebDrive FTP client makes the FTP site an extension of the file system which enables you to use any application to upload or download files to the FTP site transparently.  For more details, click here

    The same idea can be extended to HTTP. HTTP VFS client was implemented by Oleg Kiselyov for MC  on several OSes (Linux 2.0.27, HP-UX 9000/7xx, Sun Ultra-2/Solaris 2.6) and  WinNT/Win95. This is an open source implementation http://pobox.com/~oleg/ftp/packages/http-vfs.tar.gz [86,492 bytes]

    The main drawback is that the client requires a separate VFS server.
     http://pobox.com/~oleg/ftp/packages/VFS-server-pl.tar.gz [8532 bytes]

    Selections, Filters, FindFile and Panelize Operations

    As we already seen the development of OFMs reveals that some of features that are present in OFM from NC2 days after generalizations in subsequent generations of OFMs tend to overlap. I would like to suggest a new paradigm of understanding of the selections, filters and Find File operation.   That does not mean that this is an optimal way to implement this features, but it does provide an additional light on their interaction.

    I would like to suggest generalizing selections, filters and Find File operation via concepts of selection level (slevel) and visibility.

    Historically sets of operations for filters, selections and Find File operations in OFMs were quite distinct. For example one can select a single file, but cannot hide a single file (you can hide a group of file with same extension, though). There is a possibility to perform an operation on all selected files, but not on all visible (non-filtered) files after applying some filter.

    Logically there is no difference between selections and filters. Selections are just a specialized filter that does not hide filtered files and changes the color of selected files.

    I would like to decouple the question of what is visible on the screen from the question of what file meets a specified criteria.

    The idea is to introduce a slevel for each file/directory. Slevel is a small integer (byte) and thus slevel can vary from 0 (everything is hidden) to 255 (all files selected). Bit operations should also be possible for additional flexibility, e.g. slevel & '00001011'

    To implement filters, selections and FileFind VFS we should have just two operations:

    That mean that the usual filter in OFMs can be understood as some kind of macro operation. In pseudocode it can be something like:

    set slevel N for "*.exe

    view N as "normal"

    or

    set slevel N for subtree "*.exe"

    view N as "normal"

    Selection can have the highest slevel (255). Selecting the group of files via mask now can be viewed as a macro operation as well:

    set slevel 0 for "*.*"

    set slevel 255 for "*.exe view 0 as normal, 255 as "highlighted"

    In other words filter operation is essentially the operation of hiding all files that have slevel different from the slevel of other files and selection operation is viewing the files with slevel 255 without hiding all other files.

    That approach provides additional flexibility -- dynamical switching of views by changing the list of displayed slevels is possible. For example from *.exe to "*.html" if they have different slevels, etc.

    Other interesting possibilities: it's now possible to assign backup and temporary files the lowest slevel, then files older that month higher slevel and files modified today the highest slevel and change this views.

    Slevel essentially introduce some virtual tree on top of existing directory tree, so operations of expand and collapse are also possible.

    Similarly FindFile operation should be considered as a filter as it displays only files meeting some criteria. It's like assigning a special slevel to these files. For example

    set slevel N for subtree "*.html" && age() <  7

    view N as "normal"

    From this point of view the view of results of FileFind operation should be displayed as a regular double sized panel (full screen panel) but traditionally it should have a different color that regular panels in order to stress it different nature -- a set of links in a temporary directory

    If you consider FindFile operation as an interface to grep then next generalization is easy -- we just permit underling command to be different. This way we get panelize operation that is present in MC.

    Future Directions:
    Content Based Access in Hierarchical File Systems

    The need of built in into OFM some kind of  search engine is now quite apparent. Several implementations exist, with  Glimpse is probably one of the well known examples in this area. It is a powerful indexing and query system that allows you to search through all your files quickly. It can be used by individuals for their personal file systems as well as by organizations for large data collections. Glimpse is the default search engine in Harvest. The Glimpse package contains several programs, the most important of which are glimpse, glimpseindex, agrep (that was ported to DOS and Windows), and glimpseserver. To index all files in the a directory tree rooted at DIR, you simply say

    	glimpseindex DIR 

    (E.g., glimpseindex ~ indexes all your files.) Afterwards, glimpse can search through all these files much the same way as agrep (or any other grep), except that you don't have to specify file names and the search is faster.  For example,

    	 glimpse -1 unbelievable 

    will find all occurrences (in all your files!) of "unbelievable" allowing one spelling error;

    	 glimpse -F mail arizona 

    will find all occurrences of "arizona" in all files with "mail" somewhere in their name;

    	 glimpse  'Arizona desert;windsurfing' 

    will find all lines that contain both "Arizona desert" and "windsurfing".

    	 glimpse  -W 'Arizona;~football' 

    will find all lines containing "Arizona" in files that do not contain the word "football".

    Glimpse supports three types of indexes: a tiny one (2-3% of the size of all files), a small one (7-9%), and a medium one (20-30%). The larger the index the faster the search. For most applications, the small index (glimpseindex -o) is the best choice. Glimpse supports most of agrep's options (agrep is our powerful version of grep, and it is part of glimpse) including approximate matching (e.g., finding misspelled words), Boolean queries, and regular expressions. In some form those ideas might be beneficial for future OFMs.

    Epilog: complexity versus features;
    The importance of statistics.

    Quick growth of functionality of OFM managers lead to an additional complexity that became the major problem.  For example Total Commander implementation consists of approximatly 100K  lines of code. That is a medium size application at least. A typical OFM now support hundreds of commands with the functionality that sometimes overlap. That means that without the statistics of usage it's almost impossible to understand if a given feature worth the implementation effort, should it be incorporated to the core or left as a plug-in. 

    But there is something more is any good program than just a rich feature set. This is a level of integration of features and it is usually called architectural integrity. For any given the total lines of code and number of modules or classes some OFM architectures provide better architectural integrity that the others.

    Famous "the effect of second system" law in software engineering described by Frederick Brooks Jr. stated that the second system of the same developer is usually a failure, because the developer fail to recognize the difference between essential features and cosmetic enhancements and assigning priorities properly.

    I would like to stress again that the key to further OFM development is not so much an addition of features for the sake of features. It is about integration of existing features on a new level and an introduction of abilities to adapt to changes in environment, in particular to the arrival of those 100G harddrives, the wide use of  WEB-servers, etc.

    Integration-related enhancements are probably more essential than adding new functionality. That means that the introduction of macrorecoding, scripting language and key mapping should have a higher priority than anything else.

    There is also the question of size. What is the optimal size for OFM, if such thing exist? Small is beautiful and smaller OFM are preferable in certain environment, for example for troubleshooting. Part of the appeal of Volkov Commander(VC) was and still is the fact that no other OFM can beat VC as a troubleshooting tool.

    As for a regular usage the question of size became more convoluted. As features add complexity and size, should we distinguish the categories of OFMs like in wresting for the comparison to be fair ?  For example is VC better than DN as the number of advanced features it implements divided by size is probably much higher that in DN ?

    Should we like in wrestling consider size as a limit for fair competition, so that only programs of approximately the same size should be considered as belonging to the same category (say, under 0.1M, under 0.5M, under 1M and over 1M)?

    The similar question is "To what extent additional features are beneficial to the user?".  This is the most difficult question. I use OFMs since approximately 1988 and still I cannot master all the features in a classic feature set and periodically discover (or rediscover ;-) something new and interesting while I was writing this book. As Windows software development has shown adding more and more features is not always  better.  At the same time for professional it is nice to have all features the money can buy (as MS Office popularity demonstrates quite clearly :-) even if some will never be used.

    The usage of scripting language (for example Python) and the concept of plugins as used in Netscape and in FAR seems to be one possible solution to the complexity and size issue. FAR was the first to implements Netscape-style plugins in OFMs. It was following by Total Commander. I think that his is a healthy trend: if user do not need feature or group of features, he can uninstall or never install a particular plug-in.

    Without plugins it is very difficult to remove a feature once it was implemented even if it is somewhat redundant. So I would like to stress that like in Web servers there should be a log subsystem that can be used by both implementer and user for tuning application.

    This question of complexity currently is not addressed properly in the OFM standard. What we need is some reliable statistics to see how the particular features are used in at least most popular OFM implementations and if the particular feature provides sufficient return on investment to implement it in order to be included in the standard feature list.  Some features in current implementations are definitely depreciated and probably can be deleted from the part 1 of the OFM standard. But it is difficult to do without studying the statistics of actual usage.

    Prev Contents   Next

    Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

    Disclaimer:

    Created Jan 2, 1997.  Last modified: August 14, 2009