Asp.net document online browser design and development

Source: Internet
Author: User

Main contents of this article:

1. Function Overview

2. install and configure

3. Program Structure

4. Running Effect

1. Function Overview

I recently studied online document browsers. I feel that this is worth encapsulating as a platform-level component. Why? Because in our traditional application system or website, our Document Browsing function has great limitations on the client, for example, if a customer wants to browse a word-format document on his client, he must install the office suite and a pdf reader when browsing the PDF file. In this way, the user experience can be imagined. In order to improve the user experience, it is necessary to enhance the quality of each application product to form a platform-level component.

The main functions of the online document browser include file upload, file format conversion, and file browsing.

1.1. Objectives

 Try to provide customers with a plug-in-free browsing environment. In this way, non-popular plug-ins such as COM and Silverlight are basically excluded, and Flash is the first choice. Currently, Flash is basically bound to a browser, its versatility is very strong, and it is correct to use it.

Low latency in Document Browsing. Large attachments can be asynchronously formatted. For example, the large attachments can be split into one page and displayed on the first page, this ensures real-time performance.

Diverse File Upload formats: supports uploading GIF, PNG, JPG, PDF, txt, DOC (x), ppt (x), and XLS (X). The file output is in swf format.

1.2 requirement Matrix

After learning about the basic functions of the document browser and our application goals, how can we analyze the specific requirements? Here we use the demand matrix to sort out the requirements, requirement = Function + quality + constraint. This formula is indeed clear. Now I basically use it for requirement analysis. See, we have fully analyzed all the requirements from three aspects: organization, user, and development, so that we can do design, technology selection, and development.

1.3 Technology Selection

File Upload Component: jquery. uploadify;

Office conversion PDF: Microsoft. Office. InterOP. Excel, Microsoft. Office. InterOP. Word, etc;

PDF \ image conversion SWF: swftools;

Document Browsing component: flexpapper;

2. Installation configuration (server)

Configuration before running:

1. Install swftools.exe (Baidu search and download, version 0.9)

2. Install office2010

3. Enable the Print Spooler service (usually enabled by default)

4. Operating System: Windows XP and later versions.

Run Configuration:

1. Configure basic information for detection ,:

The test results are "yes" and click "on to step2"

2. The basic browser information of the configuration document is as follows:

 

The Save path of the uploaded file is the address where the uploaded file is saved.

The SwF generation path is the path where the source file is converted to the SWF file.

3. Program Structure

According to the full analysis of requirements, the conversion of document formats is both the difficulty and the core of the program. The conversion design must be very elegant, and the general purpose and maintainability are the top priorities, this is implemented in the factory mode. If a new document format needs to be converted, you only need to inherit the document to convert the abstract base class, the configuration information and default conversion methods in the abstract base class can be reused directly. For details about the class diagram, see:

 

 

4. Running Effect

Through this encapsulation, we provide a unified online document browser component for each development project, which can be achieved by directly calling the interface in the project. For the running effect, see because flexpapper is open-source, if we are not satisfied with the component appearance, we can directly modify the source code of flexpapper to implement it. Therefore, we can quickly respond to changes in requirements and implement them accurately!

 

 

 

Supports uploading GIF, PNG, JPG, PDF, txt, DOC (x), ppt (x), and XLS (X)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.