musician web-service using ruby-on-rails, soap ... - Rivier University
musician web-service using ruby-on-rails, soap ... - Rivier University
musician web-service using ruby-on-rails, soap ... - Rivier University
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
John A. Di<strong>on</strong><br />
5 Testing<br />
5.1 Functi<strong>on</strong>al Testing<br />
All testing was d<strong>on</strong>e during development. Rails encourages incremental unit testing c<strong>on</strong>current with<br />
writing the applicati<strong>on</strong> code. It also has a somewhat strict MVC architecture. The automated testing<br />
available in Rails isn’t yet fully integrated into the <str<strong>on</strong>g>web</str<strong>on</strong>g> <str<strong>on</strong>g>service</str<strong>on</strong>g>. However, prior to writing the <str<strong>on</strong>g>web</str<strong>on</strong>g><br />
<str<strong>on</strong>g>service</str<strong>on</strong>g>, I found it helpful to start by writing a traditi<strong>on</strong>al applicati<strong>on</strong> with a minimal set of functi<strong>on</strong>s.<br />
Instead, all code can be tested from a page that links to the <str<strong>on</strong>g>service</str<strong>on</strong>g>. The coding is d<strong>on</strong>e in the<br />
development envir<strong>on</strong>ment that gives feedback <strong>on</strong> the results. Within this envir<strong>on</strong>ment a separate<br />
database is used. The program can then be made live with the flick of a switch.<br />
Here is a descripti<strong>on</strong> of the development / testing cycle. In Rails, you test each part as you go.<br />
There is no need to compile or reboot the server unless a change is made to the database structure. For<br />
this reas<strong>on</strong>, I started by carefully planning out the database structure. When you encounter a bug, you fix<br />
it immediately before moving <strong>on</strong>. That minimizes final bugs in the core data of the program.<br />
The user interface required a similar build / test cycle. It compiled <strong>on</strong> my machine in a few sec<strong>on</strong>ds.<br />
Then I would start testing and making adjustments.<br />
5.2 Test Results<br />
There are two core problems identified with this program so far. The first results from the fact that I had<br />
to implement the modal windows for editing with my own custom code (modal windows are not fully<br />
implemented in Flex Beta 2). I occasi<strong>on</strong>ally have had a c<strong>on</strong>diti<strong>on</strong> that caused the program to be modal<br />
when it should not be. This was the result of receiving incorrect data from the server. The incorrect data<br />
from the server was fixed and the bug has not appeared again since. The sec<strong>on</strong>d is that even though I<br />
ensure that a user is signed <strong>on</strong> and <strong>on</strong>ly interacts with their authorized data, I have not yet implemented<br />
any handling of errors <strong>on</strong> the server side. What basically happens is that if the <str<strong>on</strong>g>service</str<strong>on</strong>g> returns NULL,<br />
which it did <strong>on</strong>ly during development, a big message is displayed in Flash. Again, this <strong>on</strong>ly happened<br />
during development and has since been fixed. Basically, I covered all the standard cases for data passed<br />
between client and server. You will also notice some checks are d<strong>on</strong>e <strong>on</strong> the server side to ensure that<br />
the data is correct; if not, it will pass back a message to the client. This needed to be d<strong>on</strong>e <strong>on</strong> the server<br />
side to cover all future clients. However, for increased security, the data should be validated as much as<br />
possible <strong>on</strong> the client side, too.<br />
6 C<strong>on</strong>clusi<strong>on</strong><br />
This software project will be hosted <strong>on</strong> the domain http://www.musicshowcase.com for <str<strong>on</strong>g>musician</str<strong>on</strong>g>s that<br />
post their music there [1]. It uses Adobe Flash versi<strong>on</strong> 9 for the client-side. It was a very fun and<br />
challenging project to work <strong>on</strong>. I learned Flex [4] and Ruby [3] this semester but I already had a good<br />
foundati<strong>on</strong> <strong>on</strong> the remainder of topics through my educati<strong>on</strong> at <strong>Rivier</strong> College.<br />
6.1 Future Directi<strong>on</strong>s<br />
I plan to c<strong>on</strong>tinue this project. My current plans are to c<strong>on</strong>tinue building the core of the site and then<br />
integrate this applicati<strong>on</strong> with the rest of the applicati<strong>on</strong> hosted at http://www.musicshowcase.com/ [1].<br />
Copyright © 2006 by John A. Di<strong>on</strong>. Published by <strong>Rivier</strong> College, with permissi<strong>on</strong>. 10<br />
ISSN 1559-9388 (<strong>on</strong>line versi<strong>on</strong>), ISSN 1559-9396 (CD-ROM versi<strong>on</strong>).