<?xml version='1.0'?>
<?xml-stylesheet type='text/xsl' href='/xsl/minuslab.xsl' ?>

<minuslab_page>
	<header area="code"/>
	<code sub="orion">

		<content>

			<p>Orion3 is based around the concept of a simple database schema which can describe many things.  It's not specific to a photo gallery software, meaning the application logic is layered on top of this database.</p>

			<h4>TagDB Info</h4>
			<p>The TagDB schema is a simple layout which uses recursion to describe things.  There are two types of rows.  The first type, called a source, is a row which does not refer to another row.  This is typically a reference outside of the database, in the case of Orion, an image file.  The other type of row is a reference, which contains a reference number to another row in the database.  This means that one tag describes another tag.  With Orion, all the metadata about the image, as well as any user defined tags, are described in reference rows.</p>

			<img src="http://d.minuslab.net/files/tagdb-pic.png" alt="table" style="float: right;" />
			<p>The schema of the database can be seen here.  There is a reference number field, a key/value text pair, and a field of extra info.  The extra is used for things that don't necessarily need their own reference row.  In Orion, it will be used for things like metadata about a user comment, like the comment author, time written, author links, etc.  Things like that do not need to be searched for, and therefore do not need to be in their own rows.  A date/time field may also be added for more options.</p>

			<h4>Orion3</h4>

			<p>Orion3 is a layer on top of this TagDB schema.  The source elements, as said, will be rows with the key name of "file" and the value containing the file name.  It is expected that the image files will all remain in the same directory, and given unique names when they are imported into Orion.  When an image is inserted into the database, a few reference rows will be inserted as well, which contain info like filesize, exif data, dimensions, etc.  Thumbnails can optionally be created upon the import, with many sizes, in both aspect ratio preserving sizes and square sizes.  These will also be inserted as reference rows to the initial image.</p>

			<p>Orion itself is not to be a system for displaying images on the front side of the site.  It is a layer below that, in order to allow site designers to have full integration with their sites.  Orion is more about the management tools on the backend of a site, and providing an API that allows developers to get the image files they want on the front side.  It's flexible enough to view images by a set of metadata, the typical "gallery" approach to photos, or a flickr-like photostream.</p>

			<h4>Management Tools</h4>

			<p>The main goals of the management backend part are to manage the importing of pictures, and assigning tags to those photos.  The importing of image files can be done in three ways.  First, the files can be dropped into a directory on the webserver, and recognized as being ready to import by the importer.  Second, an archive file (zip/tar) can be uploaded, from which all the files will be extracted out of it and imported.  The third is allowing multiple files to be uploaded using an AJAX style form.</p>

			<p>When these files are imported, they can have a number of user tags assigned to them, such as a gallery name.  Any number of tags can be assigned using an AJAX style interface.</p>

			<p>After the import stage, the control side should provide methods to view all images in a variety of ways, and to tag potentially multiple images.  It would be nice to figure out if it is possible to use Javascript to rubberband select images in view.</p>

		</content>

	</code>
</minuslab_page>

