About Harmoni
From Harmoni
Contents |
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Credits
The Harmoni project is led by the Curricular Technologies group at Middlebury College.
Project Funding
The Harmoni, Segue, and Concerto projects are staffed by [Middlebury College]. Additional funding has been provided by [The National Institute for Technology and Liberal Education].
Project Leaders
- Adam Franco - Middlebury College - Project Manager, Lead Developer
- Alex Chapin - Middlebury College
Past Developers & Contributers
- Gabe Schine - Middlebury College and Kenyon College
- Christopher Shubert - Middlebury College
- Dobromir Radichkov - Middlebury College
- Eric Jansson - Associated Colleges of the South
- Karlie Verkest - Associated Colleges of the South
- Maksim Ovsjanikov - Middlebury College
- Nikitas Stomatopoulos - Middlebury College
- Niraj Dhungel - Middlebury College
- Tim Bahls - Middlebury College
What is Harmoni?
Harmoni is a combination of two things: A suite of PHP application services and a PHP web application framework/architecture. For more information on PHP, visit PHP.net. Harmoni supplies you with a modular Object Oriented PHP development environment. This means that any functionality can be changed and/or extended by writing only the code that differentiates your application. First, through the use of Harmoni services, you can save yourself hours of re-inventing the wheel for functionality such as:
* Web authentication, * File storage, * Database access to multiple SQL database types, * Debug data output, * Custom error handling, * Complex layout building and theme-able content, * And many more...
More details about the Harmoni services can be found in later chapters.
Second, Harmoni offers a powerful programming framework that draws heavily from the services and offers a very easy way to get your program to do what is unique to it and avoid all the commonalities. With the use of the framework, you can tell Harmoni, "When a user goes to this page, I want to make sure they are authenticated, that they view everything that comes out with this theme, and that when the operation succeeds, they are forwarded to another page." You don't need to worry about how they are authenticated, what database their user information comes from (if it comes from a database at all), etc. All you need to tell Harmoni is a little about how your environment is configured. It does the rest.
The Harmoni architecture structures programs in the following way: A program is made up of multiple modules, each of which are comprised of multiple actions. Actions can be anything you like -- that's where you write your code. For example, you may have a module named "user_preferences", in which are the actions: "view", "update", "save", "change_password", "commit_password", etc. From the view action, a user could click the "Change My Password" button, which would bring them to the change_password action. This action, after asking the user for their old password and new password, could send them to commit_password, which, after verifying the user's old password, commits the changes to a database and sends them back to view. The action, if the user enters an invalid old password, could send them back to change_password with an error message. These are just examples of how you could structure your program. There are countless ways to use the architecture. It's up to you to find the best to suite your needs.
More details about the architecture/framework can be found in later chapters.
Um, the name?
Some of you brilliant readers may have noticed the striking resemblance of "Harmoni" to the word in the English language, "Harmony". Well, congratulations to ya'll. Indeed they have very much to do with each other. In fact, we decided to drop the 'y' and add the 'i' for no reasons other than legal: someone else nabbed the real word.
As far why we chose Harmoni and not "Clambrit, the PHP application framework": we like to think of all the programs that run under Harmoni to work together seamlessly, having access to and using the same user authentication information (if useful), and on. In essence, they would run together harmoniously. See the connection? If not, stop reading, please - it will only hurt more.
What is O.K.I.? Why "use" it?
The Open Knowledge Initiative (O.K.I.) is an endevor started by a group of developers at MIT to create a set of service-standards to enable interoperability amongst many of the systems found in higher education. The OKI team has attacked a problem that has plagued developers of educational systems for years: while your data may be in standard formats, JPEG, HTML, XML, SCORM, etc, how do you interact with the system that holds the data in a standard way? The resulting standard created by O.K.I. is their Open Service Interface Definitions (OSIDs), currently at version 2.
Usage of the OSIDs helps to enable "true" interoperability among software -- namely configuring any program to "get your data from this other place instead of our internal one". Most interoperability today involves running some sort of export or harvesting process on the system that holds data of interest, then importing that data into an application where it will be accessed. While this paradigm can work well with read-only data sources in which all data has the same level of user-control, the export-import/harvest paradigm quickly becomes untenable when complex authorization checking is required, data-updating is required, and a host of other situations. The OSIDs do not define what data will be retrieved (that is left to the needs of those using the OSIDs), instead the OSIDs define the process for requesting and changing that data.
On a more technical level, the OSIDs are a set of Application Programming Interfaces (APIs) for a set of common services such as Authentication, Authorization, Id Management, Repository, Hierarchy, Agent and Group Managment, etc. Any of these service APIs may be exposed individually by a data-source . An example would be a museum archive exposing its implementation of the Repository OSID to allow client applications to browse and access the contents of the archive.
The OSIDs are designed to be a [programming] language-neutral specification. In order make use of them however, a client application will need to make use of them through a particular language binding. Currently language bindings for version 2 of the OSIDs exist for PHP and Java, with others on the way. Interacting with implementations in a different language can be done in a variety of ways, one of which is to use an XML-RPC OSID implementation in between the client and server:
PHP Client
- PHP OSID provider
- XML OSID client
- XML OSID provider
- Java OSID client
Java OSID provider
More on OKI can be found at http://okiproject.org/.
What is PHPDoc?
PHPDoc is the PHP equivalent of JavaDoc. If you don't know what that is, just take a quick look at any PHP file we ship with Harmoni. You'll notice a whole bunch of stuff in the comment blocks (the stuff between '/**' and '*/' -- I shouldn't have to tell you this). Aside from helpful paragraphs of text, there are a bunch of lines that start with the '@' character. They give the PHPDoc engine more information about the code. Anyway, you only need to know this if you plan on writing your own code with PHPDoc comments (which we highly suggest you do!).
Packaged up with this manual and other documentation, you'll find a folder under "docs/phpdoc". If you browse there with your browser of choice, you'll find a whole bunch of nitty gritty documentation on Harmoni. In fact, there you'll see just about everything that makes up, well, everything. Organized into "packages" (the top-left frame) you'll see a whole bunch of classes (the bottom-left frame). Clicking on any given class will give you a page telling you what that class does, how to use it, and how it integrates into the overall picture.
You can also find the Harmoni PHPDoc online at http://harmoni.sourceforge.net/harmoniDoc/phpdoc.

