My first Hobo application: My Library

Hello, just as I have published the previous article about Hobo, discovering the full featured rails over layer framework, I can’t wait to publish my first test: creating a very simple Web Application to manage a library.

The first step is just to provide an interface to list all my books
So please, follow the guide !
Installation of the framework
Just run the following command in your prefered terminal (gnome-terminal for example in Ubuntu):
 sudo gem install rails
 sudo gem install hobo
 sudo gem install sqlite3-ruby -v=1.2.3
 sudo apt-get install sqlite3
First App
Now we are going to create our first Hobo application
 hobo MyLibrary
focus in the just create app directory
 cd MyLibrary
And now create our first datamodel :  a book modelisation
 script/generate hobo_model_resource book title:string author:string year:integer resume:text note:integer
now, we are going to create this model persistence into the default sqlite3  database
 script/generate hobo_migration 
(choose the ‘m’ option)
Ok, done.  now run the rails server (WebBrick):
Look at the title of the application : »My Library » !  Just because we call our project « MyLibrary » (without any space), Hobo kindly titled our welcome page with a beautiful « My Library » in a plain old good english. 
Identify yourself by creating the first user account which will act as administrator for this new application.
And now start playing with your books collection !
1. your first connection to « My Library »
2. The welcome page (also modifiable 
3. Let see our books collection
4. Go and create our first book in our collection
5. Fill all the fields, and « Create Book »
6. and it’s done, the first book is ready to be parsed
Yes I am impressed to discover how the Hobo dev team has been very careful with all details.
The new Hobo player.

Les commentaires sont fermés.

Propulsé par

Retour en haut ↑

%d blogueurs aiment cette page :