Download 51.11 Kb.
eSUSU Development Team
C2C Microfinance Application - eSUSU
System Implementation Document
Copyright 2008 by Denis Rhoden, and eSUSU Development Team
About This Document
Table of Contents
1. Introduction 1
1.1. Purpose 1
1.2. Scope 1
2. Development Environment 1
2.1. MySQL 1
2.2. Ruby on Rails 1
2.3. WEBrick 1
2.4. Open SSL 1
3. Tools 2
3.1. Aptana Studio 2
3.2. HeidiSQL 2
3.3. Version Control, SVN 3
3.4. Google Groups 3
3.5. Microsoft Office Tools 3
4. Libraries 1
4.1. Restful Authentication Plugin for Ruby 1
5. Coding Guidelines 2
5.1. Ruby Tutorials 2
5.2. Model-View-Controller Pattern 2
The purpose of this document is to provide information about some of the specific implementation methods used in development. The document provides both descriptions and rationale for each of the methods used. This is done to help new members to the eSusu team quickly begin development.
The scope of this document includes specific technologies used in implementation.
MySQL is widely used RDBMS, with millions of production level installations in use, including many of the internet’s most trafficked commercial servers. Detailed information on the product is readily available from an eclectic pool of open resources backed by its active community and its developer MySQL AB. MySQL is installed as a Windows service. Ruby on Rails can easily identify and transact with MySQL installations, minimizing the amount of setup time required.
For more information see http://www.mysql.com/
A MySQL reference manual is available at: http://dev.mysql.com/doc/refman/5.0/en/index.html
For information about Ruby on Rails, please see the Software Design Document section 2.
WEBrick is the default HTTP server that comes with Rails. It supports all of the features we are using, including HTTPS. WEBrick is consistent with RoR’s convention before configuration philosophy, allowing us to get a working webserver running in a minimal amount of time. RoR will find WEBrick automatically; the only configuration needed is for using SSL. Using a more popular web server, such as Apache, would require the installation of supporting modules and additional configuration to support a standard RoR setup.
WEBrick’s major shortcomings include its lack of documentation and the fact that many competing packages have been tested much more thoroughly in production level systems. WEBrick was selected for usage in a lightweight development environment. A review of options regarding HTTP server software would be wise before eSusu releases.
OpenSSL is an open source implementation for Secure Sockets Layer, and Transport Layer Security Protocols. It offers a library of encryption tools used to generate the encryption keys necessary for eSusu’s security requirements, allowing eSusu to work on the HTTPS protocol.
For more information see: http://www.openssl.org/
Aptana Studio is an open source IDE that is similar to Eclipse for the Java platform. A free official RoR plugin called Rad Rails is available and needed for eSusu development.
The following is taken from http://www.aptana.com/rails
* Integrated Rails shell console
* Default-install and config of Ruby interpreter, database and debugger
(Everything you need to get started fast)
* Code completion with type inferencing
* Code assist for Ruby, CSS, JS, and HTML inside RHTML files
* Type hierarchy view
* Go to declaration
* Call hierarchy
* Full implementation of RDT (Eclipse's Ruby Development Tools project)
* Integrated Profiler (Pro Version Only)
Managing MySQL from the command line can be cumbersome. HeidiSQL provides a much needed GUI front end for MySQL.
The following is taken from http://www.heidisql.com/
HeidiSQL is an easy-to-use interface and a "working-horse" for web-developers using the popular MySQL-Database. It allows you to manage and browse your databases and tables from an intuitive Windows® interface.
With HeidiSQL you will also be able to
* generate nice SQL-exports
* synchronize tables between two databases
* manage user-privileges
* import text-files
* export table-data as CSV, HTML and XML
* browse and edit table-data using a comfortable grid
* batch-insert ascii or binary files into tables
* write queries with customizable syntax-highlighting and code-completion
* monitor and kill client-processes
* connect to servers via commandline
* and much more
Subversion (SVN) is one of the few widely accepted version management systems available for free on the web, its only primary competitor being CVS. SVN was chosen because of its ease of use, proven stability, and free repositories available on Google code.
SVN client tools used by the development team include the official SVN plugin for Aptana Studio, and Tortoise SVN. Both have similar, easy to use GUI interfaces. Tortoise SVN integrates with Widows explorer, which is convenient because it can be used alongside the standard Windows file management tools. Google code also has a web tool that lets users retrieve files from inside the repository.
For more information on TortoiseSVN see:
Google Groups was used by the eSusu developers as a communication tool. It seamlessly integrates with Google accounts, which are free and widely available. The most useful Group features are a message board and file hosting.
Visio is one of the most well developed diagramming tools available. It was designed to be used for creating a wide variety of diagrams. The learning curve is low, and its widespread use across many diverse problem domains means experience in its use is commonplace among people. Adhering to a standard diagramming tool gives our documentation a uniform look, and allows us to update our diagrams as eSusu grows.
We chose Word to edit our documentation because it is a popular standard. Like the other Office Tools, many people are already familiar with its use. It uses a “what you see is what you get” philosophy, meaning users can see a visualization of the final document as they are editing, allowing us to make changes more quickly.
Libraries used for the implementation of the eSusu system are components of software that are distributed separately from the core of the environment.
The restful authentication Rails Plugin was specifically used for a foundation to securely manage user authentication:
The decision to use the plugin was made in order to leverage the tried and proven algorithms, architecture, and intellectual knowledge of those in the open source community. The plugin is also flexible from a developers stand point; allowing changes and modifications.
Details can be found here http://agilewebdevelopment.com/plugins/restful_authentication
Ruby has gained increasing popularity over the last few years with programmers. Guidelines are important in every programming language and help a programmer write legible code. When code is shared, the guidelines help other programmers understand and quickly come up to speed.
Ruby has several naming quirks that might slow you down when you begin programming. While there is a little bit of a learning curve, once you get used to the special features, it will make coding with ruby a breeze. There are some great resources available online that can help with Ruby Development. Some of them are listed below
The above resource is contains a wealth of information that covers everything from starting out with Ruby on Rails to coding specific parts of the project that are isolated because of the inherent Model-View-Controller based Architecture. It also provides guidelines on testing rails applications.
While Ruby of Rails is a wonderful platform to code on, it does not have as large a customer base as does Java or .Net. But it is a growing community and has incredible potential to grow. As a result, the amount of online help in terms of forums is significantly lesser.
The Rails Architecture is organized around the Model-View-Controller Architecture, usually just called as MVC. The main benefits that MVC provides are:
A model represents the information (data) of the application and the rules to manipulate that data. In the case of Rails, models are primarily used for managing the rules of interaction with a corresponding database table. In most cases, one table in your database will correspond to one model in your application. The bulk of your application's business logic will be concentrated in the models.
The View represents the user interface of your application. In Rails, views are often HTML files with embedded Ruby code that performs tasks related solely to the presentation of the data. Views handle the job of providing data to the web browser or other tool that is used to make requests from your application.
The Controllers provide the "glue" between models and views. In Rails, controllers are responsible for processing the incoming requests from the web browser, interrogating the models for data, and passing that data on to the views for presentation.