This is not meant to be a full documentation of what this program can do. In fact, I have not even written one yet since I doubt that anyone will find any use for it. Basically, this is a single project file generator. It generates the necessary HTML for creating a nice looking webpage for your files. Here is a preview for it:
So far, it has a simple GUI that probably goes against every HCI rule there is out there. Coding GUI in Java without a GUI editor is not a fun task. Adding a new UI element can easily make the layout look like crap. However, I think it is pretty clear how you would use this project generator.
You would code your project first with all the necessary files. Then you will fire up this program, include the Author, Title, Description, etc and also the files. Those files will be links to where the user can actually get to them. After that, you will save this file itself in an XML format so that you can read it again and modify it to include more files, source code, etc. Since including source code is not merely sufficient, I added the ability to generate slides for it. Those slides will be written in the Markdown syntax and then automatically converted to HTML and linked together. By that I mean that there will be Prev | Next links at the bottom right of each slide. The engine to convert from Markdown to HTML is provided by Pete Bevin.
That is part one of the project and was completed about a month ago. The second part of the project allows the user to place comments on the individual pages themselves. For that I will be using Ruby on Rails.
Using Ruby on Rails makes the project fairly simple. It took me some time to familiarize myself with the new methods of Rails. Currently, Rails is at version 0.11 and the last time I played with it was at version 0.9. There have been some interesting changes but non too drastic that it requires any serious relearning.
To get the second part working, we had to set up a MySQL database to store those files. That was not too hard. And using CocoaMySQL made it even simpler. However the main problem came about from the Rails model verification. It seems that every model in Rails should be able to perform some form of referential integrity check using belongs_to and belongs_to_and_has_many. However, I have yet to figure out how to do it. Without figuring out those things, deleting comments violated referential integrity and caused me a lot of headaches.
Nevertheless, I am amazed with how easy and fast it was to set up something using Rails. It make it easy to get something up and running so that you can see the results. And the clear separation between model, view and controller makes it hard for you to try to lump everything together like you would do in a PHP program. And that makes it really fun to develop with. Using Textmate helped considerably too.
Below are some resources that I have found useful while using Ruby on Rails:
- MySQL Cookbook by O’Reilly
- MySQL Reference Manual
- Programming Ruby (The Pickaxe book) by Pragmatic Bookshelf
- Why’s (Poignant) Guide to Ruby
- Ruby’s User Guide
- Ruby Sidebar for Firefox
Lastly, though I really like all the documentation and tutorials that people have contributed, I cannot wait for the book on Rails that is supposed to come out soon (within the next 6 months). Having a book that puts everything together using one writing style would make it much easier for the beginner.Tweet
comments powered by Disqus