Click here to Skip to main content
Click here to Skip to main content

DesktopBrowser - A Web Based File Explorer for Media Desktops

, 25 Jun 2011 GPL3
Rate this:
Please Sign up or sign in to vote.
A presentation of DesktopBrowser open-source project, a web based file explorer for media desktops.
Screenshot

Introduction

For a long time, I've been having difficulties using my living-room 'media center' desktop, particularly, using Windows explorer. It seems that standard Windows operating systems were not designed to be viewed on a 46" LCD screen with 1920x1080 HD resolution. Zooming is not possible, filtering and sorting is very limited, and many features that I thought were pretty basic were missing.

After thinking about it for a while, I asked myself, why doesn't the web have that problem? I can easily browse the web on my media center desktop, browsers today are very powerful, and provide very good user experience. So why can't I browse through my files the same way I browse through the web?

That is why I wrote DesktopBrowser, it's a simple web app, that runs locally on IIS Express, and gives you the ability to browse through your local and network drives, from within your browser. It's an open-source project, maintained at GoogleCode.

Features

  • Quick filter (client side)
  • Image view - with preview of first photo from each folder
  • Sorting by any column(s)
  • Folder size calculation
  • Next/previous sibling folder navigation
  • Browser back, forward and bookmarks are fully supported
  • Columns: Name, Last Modified, Size, Extension

Prerequisites

To run the app, you'll need to install the following prerequisites:

To use the code, you'll also need:

Using the Code

This project is written as a web application project. It uses SharpKit to maintain client-side code in C#. Please install it before building the project.

The project contains 3 basic components:

  • SiteService - A service that provides all APIs to be invoked by the server / client
  • Default.aspx page - Main page for the file explorer, it receives a SiteService request object in the URL
  • Default.aspx.cs file - JavaScript code-behind that provides client-side behaviors, maintained in C# using SharpKit

When a browser navigates to Default.aspx, the page parses the query string into the SiteRequest object. It invokes the GetFiles method on the SiteService class using the specified request, and renders the output using response got from the service.

var service = new SiteService();
var req = SiteRequest.Load(Context.Request);
var file = service.GetFile(req.Path);
req.Path = file.Path;
if (!file.IsFolder)
{
    service.Execute(file.Path);
}
else
{
    var folder = file;
    FilesGrid1.Files = service.GetFiles(req);
}

Points of Interest

I've used IIS Express in this project, to overcome certain security issues regarding process execution. This project can run on standard IIS, but some features will not work.

SharpKit is a very helpful tool when writing client-side code, maintaining the code is easy because code is compiled.

To make the app more responsive, I've used Response.BufferOutput = false. This sends the page as it renders. I also used System.IO.DirectoryInfo.EnumerateFiles() method. The combination of these two methods gave out responsive UI even in big and complicated requests.

History

  • 25th June, 2011: Initial post 

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Dan-el Khen
Architect SharpKit
Israel Israel
Founder of SharpKit
Follow on   Twitter

Comments and Discussions

 
GeneralMy vote of 2 PinmemberWcohen25-Jan-12 0:14 
Questiondid you try windows 7? Pinmemberrodrigo.ratan27-Jun-11 12:00 
QuestionArticle lacking PinmemberDaveAuld25-Jun-11 4:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 25 Jun 2011
Article Copyright 2011 by Dan-el Khen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid