Celem projektu jest niesienie pomocy osobom niepełnosprawnym. Osoby takie bardzo często z uwagi na swoje ograniczone możliwości, są pozbawione przyjemności uczestnictwa w wielu dziedzinach życia. Naszym zadaniem, a właściwie obowiązkiem wobec takich osób, jest możliwe udostępnienie pomocnych narzędzi, aby takie osoby nie czuły się ograniczone w żaden dodatkowy sposób.
Z racji rozwijających się w ogromnym tempie możliwości jakie dają media (szczególnie Internet), postanowiliśmy stworzyć kompleksowy serwis, który byłby pomocny w korzystaniu z tego medium. W serwisie będą znajdowały się zarówno narzędzia jak i wszelkie potrzebne informacje na ich temat.
Stwarzałby on nieograniczone możliwości dla producentów sprzętu rehabilitacyjnego, lekarzy i klinik, które mogłyby na jego łamach przedstawiać najnowsze możliwości leczenia lub niwelowania ograniczeń swoich pacjentów. Będzie to jedyne miejsce, gdzie osoby niepełnosprawne będą mogły wymieniać się uwagami oraz spostrzeżeniami na wiele tematów ze swojego życia.
W chwili obecnej w sieci można znaleźć podobne rozwiązania, jednak są one stworzone bardzo prowizorycznie, a ich funkcjonalność jest bardzo ograniczona. Każdy z takich serwisów, przedstawia jedynie fragment możliwości naszego serwisu, na przykład oferuje wybrane narzędzia pomocy niepełnosprawnym. Dużo, z obecnie działających rozwiązań ma charakter dodatku do bardziej rozbudowanych serwisów nie traktujących o tematyce naszego projektu (udostępnianie programów dla niepełnosprawnych w serwisie, który oferuje wszelkie rodzaje dostępnych programów).
Nasz serwis byłby kompleksowym rozwiązaniem i pewnym miejscem, gdzie ludzie dotknięci przez swoje ograniczenia mogliby udać się w poszukiwaniu pomocy. W trakcie rozwoju serwisu, umożliwiłoby to zostanie liderem w tej tematyce i dalszą promocję. Niniejszym stałby się popularny i pomocny w popularyzowaniu szczególnych rozwiązań. To z pewnością przyczyniłoby się do wykorzystania wyznaczonego miejsca w serwisie na płatną promocję produktów oferowanych przez jego sponsorów.
Funkcje dla administratora:
Funkcje dla użytkownika:
Wybór encji (obiektów) i ich atrybutów
Role id integer name string authorizable_type string authorizable_id integer created_at datetime updated_at datetime Program id integer name string platform string summary text content text tags string author_id integer creator string created_at datetime updated_at datetime href string download_href string Article id integer name string content text author_id integer created_at datetime updated_at datetime summary text type string slug string Page id integer name string content text author_id integer created_at datetime updated_at datetime summary text type string slug string User id integer email string activity_id integer fullname string nick string crypted_password string password salt string persistance_token string single_access_token string persihable_token string login_count integer failed_login_count integer last_request at datetime current_login_at datetime last_login_at datetime created_at datetime updated_at datetime is_admin boolean RoleUser id integer role_id integer user_id integer state string created_at datetime updated_at datetime DiggedSiteDigg id integer user_id integer digged_site_id integer created_at datetime updated_at datetime InternalMessage id integer sender_id integer receiver_id integer subject string parent_id integer content text xreated_at datetime updated_at datetime ForumSection id integer name string description text created_at datetime updated_at datetime Comment id integer author_id integer content string commentable_types string commentable_id string created_at datetime updated_at datetime DiggedSite id integer author_id integer href string comment text state string click_count integer created_at datetime updated_at datetime ForumPost id integer subject_id integer author_id integer content text type string created_at datetime updated_at datetime name string forum_section_id integer ForumTopic id integer subject_id integer author_id integer content text type string created_at datetime updated_at datetime name string forum_section_id integer
Diagram obsługi Artykułów (diagram dla Narzędzi jest analogiczny):
Diagram obsługi forum:
Projektowanie tabel, kluczy, kluczy obcych, powiązań między tabelami, indeksów, etc. w oparciu o zdefiniowany diagram ER
-- -- Table structure for table 'comments' -- CREATE TABLE IF NOT EXISTS 'comments' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'author_id' INT(11) DEFAULT NULL, 'content' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'commentable_type' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'commentable_id' INT(11) DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ; -- -------------------------------------------------------- -- -- Table structure for table 'digged_sites' -- CREATE TABLE IF NOT EXISTS 'digged_sites' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'author_id' INT(11) DEFAULT NULL, 'href' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'comment' text COLLATE utf8_unicode_ci, 'state' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'click_count' INT(11) DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'digged_site_diggs' -- CREATE TABLE IF NOT EXISTS 'digged_site_diggs' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'user_id' INT(11) DEFAULT NULL, 'digged_site_id' INT(11) DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'forum_posts' -- CREATE TABLE IF NOT EXISTS 'forum_posts' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'subject_id' INT(11) DEFAULT NULL, 'author_id' INT(11) DEFAULT NULL, 'content' text COLLATE utf8_unicode_ci, 'type' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, 'name' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'forum_section_id' INT(11) DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=10 ; -- -------------------------------------------------------- -- -- Table structure for table 'forum_sections' -- CREATE TABLE IF NOT EXISTS 'forum_sections' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'name' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'description' text COLLATE utf8_unicode_ci, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ; -- -------------------------------------------------------- -- -- Table structure for table 'forum_topics' -- CREATE TABLE IF NOT EXISTS 'forum_topics' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'subject_id' INT(11) DEFAULT NULL, 'author_id' INT(11) DEFAULT NULL, 'content' text COLLATE utf8_unicode_ci, 'type' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'internal_messages' -- CREATE TABLE IF NOT EXISTS 'internal_messages' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'sender_id' INT(11) DEFAULT NULL, 'receiver_id' INT(11) DEFAULT NULL, 'subject' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'parent_id' INT(11) DEFAULT NULL, 'content' text COLLATE utf8_unicode_ci, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'pages' -- CREATE TABLE IF NOT EXISTS 'pages' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'name' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'content' text COLLATE utf8_unicode_ci, 'author_id' INT(11) DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, 'summary' text COLLATE utf8_unicode_ci, 'type' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Page', 'slug' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=13 ; -- -------------------------------------------------------- -- -- Table structure for table 'programs' -- CREATE TABLE IF NOT EXISTS 'programs' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'name' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'platform' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'summary' text COLLATE utf8_unicode_ci, 'content' text COLLATE utf8_unicode_ci, 'tags' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'author_id' INT(11) DEFAULT NULL, 'creator' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, 'href' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'download_href' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ; -- -------------------------------------------------------- -- -- Table structure for table 'roles' -- CREATE TABLE IF NOT EXISTS 'roles' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'name' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'authorizable_type' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'authorizable_id' INT(11) DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'role_users' -- CREATE TABLE IF NOT EXISTS 'role_users' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'role_id' INT(11) DEFAULT NULL, 'user_id' INT(11) DEFAULT NULL, 'state' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table 'schema_migrations' -- CREATE TABLE IF NOT EXISTS 'schema_migrations' ( 'version' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY 'unique_schema_migrations' ('version') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table 'sessions' -- CREATE TABLE IF NOT EXISTS 'sessions' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'session_id' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'data' text COLLATE utf8_unicode_ci, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, PRIMARY KEY ('id'), KEY 'index_sessions_on_session_id' ('session_id'), KEY 'index_sessions_on_updated_at' ('updated_at') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=20 ; -- -------------------------------------------------------- -- -- Table structure for table 'users' -- CREATE TABLE IF NOT EXISTS 'users' ( 'id' INT(11) NOT NULL AUTO_INCREMENT, 'email' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'activity_id' INT(11) DEFAULT '0', 'fullname' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'nick' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'crypted_password' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'password_salt' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'persistence_token' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'single_access_token' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'perishable_token' VARCHAR(255) COLLATE utf8_unicode_ci NOT NULL, 'login_count' INT(11) NOT NULL DEFAULT '0', 'failed_login_count' INT(11) NOT NULL DEFAULT '0', 'last_request_at' datetime DEFAULT NULL, 'current_login_at' datetime DEFAULT NULL, 'last_login_at' datetime DEFAULT NULL, 'current_login_ip' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'last_login_ip' VARCHAR(255) COLLATE utf8_unicode_ci DEFAULT NULL, 'created_at' datetime DEFAULT NULL, 'updated_at' datetime DEFAULT NULL, 'is_admin' tinyint(1) DEFAULT '0', PRIMARY KEY ('id') ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;
Operacje na danych realizowane są przy użyciu frameworka do mapowania obiektowo-relacyjnego dla języka Ruby - ActiveRecord. Dzięki temu, operacje na danych są ekstremalnie proste, np.
@resource = User.find(1) # wyszukiwanie po id @resource = Article.find_by_slug('Home') # wyszukiwanie po nazwie zawartej w adresie @resources = Article.all(:limit => 10, :offset => 10) # wyszukanie 10 rekordów z przesunięciem o 10 @resource = User.create(params[:user]) # tworzenie rekordu @resource = User.find(1).destroy # usuwanie rekordu
Dodatkowo, dzięki wykorzystaniu biblioteki warstwy kontrolera InheritedResources, wyeliminowana została konieczność definiowania akcji użytkownika explicite. Zamiast tego, generowany jest zestaw metod:
new index show(id) edit(id) create(id) update(id) destroy(id)
Metody te same w sobie zawierają kod, który umożliwia operacje na danych. Na przykład, metoda create będzie miała następujący kształt, pomimo tego, że w kodzie kontrolera sie nie pojawi:
def create @resource = RESOURCE_CLASS.new(params[RESOURCE_NAME]) # utworzenie rekordu aktywnego o zadanych parametrach if @resource.save # zapis do bazy danych # wyrenderuj widok poprawny else # wyrenderuj stronę błędu end end
gdzie:
Baza danych została zaimplementowana na silniku mySQL w wersji 5.1. Do jej obsługi używana jest biblioteka ActiveRecord w wersji 3.0.0.beta4, będąca standardowym mechanizmem frameworku Ruby on Rails 3.
oraz gemy: