This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
Abstract-This project is part of the ongoing Open Web Applications effort led by Mozilla to liberate users from the closed, locked apps and app stores. Open Web Applications bring the power and the freedom of the web to desktops, tablets, and cellphones. The objective of this project is to implement an open web application for editing rich text documents.
Keywords: web app, open source, documents, repository, IndexedDB
In modern world, the phrase 'Using a computer' has become equivalent t 'Using an internet'. Today many people prefer web applications to the dedicated desktop softwares. The couple of examples where this migration is happening are chatting with friends, shopping online, listening music, checking emails and many more. Since the behavior of people is changing, the tools on the computer in which the behaviors are expressed needs to be changed as well. The void that exists between the traditional desktop softwares and the web applications is what has motivated Mozilla to launch a new experiment of what is called as Open Web Apps (OWA).
OPEN WEB APPS
These new types of applications that we envision can be defined by the following factors.
Integrable: They provide the rich experience and the convenience of desktop applications but preserve the web special features as well.
They are Discoverable.
The defining features of Open Web applications are as follows.
Easy to Launch: Open Web apps are always within at arm's reach and super easy to launch.
Free or Paid: They are free or paid depending on the decision of the developer and the organization.
Platform Integration: They integrate better with the underlying platform than traditional web apps.
Desktop and Mobile: They work efficiently in both desktop and mobile devices.
Open Distribution: They can be distributed by developers to recruit users without any gatekeepers. Also they can be distributed to potentially competing online stores as well.
The prudent typical and the technical view of the system which is proposed by Mozilla is as follows.
Applications are developed by anyone using standard web technologies. These applications appear to users in kind of lists or thumbnails (Fig. 1)
Fig 1. Applications developed
Users are offered these applications through the application stores or by the developers themselves.(Refer Fig 2.)
Fig 2. User is offered to install application
When these apps are installed or purchased, they are stored in repositories which are a client side collection of installed applications. (Refer Fig3.)
Fig 3. Repository at client side
Along with this facility, the browser support may provide the best of the experience to the user.
To fill the gap, Mozilla came up with the concept of "Application Dashboard".
Application Dashboard is a prototype built completely using HTML5 and made available to the users that can be used to manage their applications. It is currently functional and provides the following services.
View the particular app.
Update the app.
Delete if no more required.
Fig 4. Application Dashboard
Key Factors used in Dashboard are:
Local Storage of Applications
X-Document Messaging is used by server to send message to the repositories that may include updates or other facilities.
Hence to Summarize the Open Web Apps:
Can be "installed" to a dashboard within your mobile or desktop Web browser, or to your native OS desktop or mobile home screen.
Work in all modern Web browsers, while enabling each browser to compete on app presentation, organization and management user interfaces.
Support paid apps by means of an authorization model that uses existing identity systems like OpenID.
Support portable purchases: An app purchased for one browser works in other browsers, and across multiple desktop and mobile platforms without repurchase.
Can request access to one or more advanced and/or privacy-sensitive capabilities that they would like access to (like geo-location) which the system will mediate, giving the user the ability to opt-in to them if desired.
Can be distributed by developers directly to users without any gatekeeper, and distributed through multiple stores, allowing stores to compete on customer service, price, policies, app discoverability, ratings, reviews and other attributes.
Can receive notifications from the cloud.
Support deep search across apps: Apps can implement an interface that enables the app container (generally the Web browser) to provide the user with a cross-app search experience that links deeply into any app that can satisfy the search.
Design Features And Implementation
The Open Web Application will be able to edit the rich text documents in the browser itself, without the need of a word processor being installed on the user's machine.
Local Storage of User Data
All the data and documents of the user will be stored locally.
Export to Standard Formats
The user will be able to export the edited documents into standard formats like .doc, .rtf.
No Internet Connection Required
The application will not require an internet connection during its usage.
Easy to install
The user will only have to install the application from the internet similar to a browser plug-in.
Saves HDD Space
No need to install a word processor which occupies a condsiderable amount of HDD space, instead a one-time installation of this application would suffice the purpose and also occupy minimal space on the HDD.
The application will run on devices like desktops, tablets, laptops and mobile phones.
The coding style and conventions followed are as per the documentation at the Mozilla Developer Network.The source code of this application can be found our Github repository named richtextdoc_edit_OWA.
Before proceeding with the implementation, we need to create a set of issues which act as to-do list for the entire project.
The issues are :
Adapt to all screen sizes: Since OWA is not limited only to desktop systems, it must adjust itself to all the devices and the editor should occupy the entire screen.
Import from HTML: By definition, the contentEditable editor let users edit HTML. Using the recent File API, users can open a HTML file in the editor.
Export to HTML: This feature enables exporting the contents of the editor as a html file.
Import from URI : This feature let users open a remote file in the editor.
Load from/Save to database : The editor should be able to save the current document as HTML to a local database (either IndexedDB or LocalStorage) and to read documents as HTML back from the local database.
Auto-save : The current document should be auto-saved to a local database regularly.
The issues which have been implemented are :
Pack Content Editable Demo as an Open Web App. AÂ manifest file has been added thatÂ contains information that a Web browser needs to interact with an app. A manifest is one of the key things that distinguish an Open Web App from a website. It is aÂ JSONÂ file with a name and description for the app, and it can also contain the origin of the app, icons, and the permissions required by the app, among other things.
Import from HTML. Allows the user to browse to the location of the HTML file and open it in the editor. The formatting characteristics of the text in the original file remain unaltered. Also simple text files can be opened as well.
Adapt to all Screen Sizes.
Load from/Save to database.
IndexedDB is an API for storage of structured data at the client side. It uses indices to store and retrieve objects in a database. IndexedDB provides separate API's for Asynchronous access and Synchronous access. The Synchronous API is intended for use only inside Web Workers and has not yet been implemented by the major browsers. The Asynchronous API is the one that is normally used.
IndexedDB is an alternative to WebSQL Database, which has been deprecated by the W3C. In IndexedDB, a database may contain one or more uniquely named Object Stores. The Object Store stores the records in the form of key-value pairs.
In the OWA, we are using the indexedDB to store and retrieve documents of the user.
Each entry is an object with fields - timestamp (number, which serves as key), filename (string, the document name), text (string, the contents of the document, generally in html).
Structure of Database Used:
Key Path: timestamp
Field (text): Document Name
Field (text): Document Contents [Generally in HTML]
The remaining issues would be implemented in near future.
The Open Web Application will be available on the Mozilla
Market Place for the users to download. If the application
is well received by the users, then it may be integrated with the Firefox OS which is a mobile OS to be launched by Mozilla.