Emerald Hand Wiki

Sider - Dev - Design

Modified: 2007/03/21 17:42 by Ornus - Categorized as: Development, Sider
Back to development section


Edit

Introduction

This article is about general Sider design and technologies it uses. Its main goal is to help you better understand how Sider works and how to extend it.

Edit

Platform

Sider is running on top of .NET technology. You don't actually extend it by writing .NET code. Instead Sider parses types and views files to provide support for different documents based on parsed code.

Edit

Document

All user information is stored in a variety of documents. Documents can have different structure, based what is stored in them, but are all XML by nature.

A document isn't necessarily a file on the hard drive. It is any XML node adhering to a specific structure described by a type. A document that user creates and works with is in fact often a collection of documents, each describing a small piece of information.

This approach allows us to have granulated information structure and reuse different types. It also simplifies the data handling for the view, since each document is independent of other documents and can be worked on separately.

Edit

Extensions

Sider can be extended through files with logic for Sider to handle different situation. Each extension comes with a small XML file that describes what extension is and provides information for Sider to use it correctly (extension ID, name, and links to other related files). These files have .xml extension and name corresponding to the type of extension (i.e. "type.xml", "view.xml", "viewComponent.xml").

On start up Sider looks for these files to load extensions.

Edit

Type

Type describes structure of the information to be stored in the document and provides operations to work with it. Sider learns to handle new documents by parsing different types.

Type describes a document structure by providing XML schema (XSD). When document is loaded or modified it is validated using that schema. The document needs to adhere to it in order for different processes to handle the information correctly. For example views can only show valid documents.

Documents should only be modified through operations provided by the type. This ensures that document will always be valid. A type needs to provide a JavaScript file for views to use to update the document in response to the user input.

XPath is widely used by the operations to specify which document and which part of the document to update.

Edit

View

Views are used to show the document to the user. They are shown using a web browser (IE currently) and are generally written with HTML and JavaScript. In addition web browser can support other technologies, such as ActiveX, Flash, SVG, and so on.

XSLT is used to generate HTML for the browser. All JavaScript files are included automatically and are available when the view is loaded.

The hardest part is usually to create interactive interface to allow users work with the document. We try to simplify this process. Types provide logic for work with the document. View just needs to be aware which document to change and where it is located (in relation to the root XML node. XPath is used to locate each document).

In addition different JavaScript libraries and controls can be used to simplify JavaScript code development. View components exist specifically to allow code reuse between different views.

Copyright © 2006-2008 Emerald Hand, Inc. All rights reserved.
Powered by ScrewTurn Wiki version 2.0.34. Some of the icons created by FamFamFam.