RoR for dummies .. from nothing to knowlege

Well, i'm like a dinosaur .. an ASP classic procedural developer but I think it's' time to evolve, so I started learning RoR and OO/MVC programming.

As a First step I did the two "try" on the netbeans website and everythig was fine so i'm making a to do list of simple project for getting better and better knowlege about Ror.

righrt now i thinked this "demo" project:

1: a CRUD for making mail footer (you can insert your name , phone ,and skype) and the app will make a nice .zip with inside a personalized html to use as mail footer. (right now I have this app made with asp+mdb

2: a login system ... a user can register himself with mail validation and later logon and change his password

3: a filemanager .. you can upload , download and delete a file

next ... ?

add your comment

thanks

You can find all the needed code snippets in Advanced Rails Recipes. I would recommend using this book for pointers and code snippets.

http://railsbookclub.com/advanced-rails-recipes

(zipping up and generating files, login system through acts_as_authenticated, manipulating files)

Simone R. wrote:

well, more than find the actual code I need some hint if this demo apps can be useful for learning the "building blocks" , for sure I will buy the book for reference but in the ASP world with this 3 app you can build a good starting knowlege , maybe in RoR is differen there are other problem on wich you need to build skill before going on real programming

You might take a look at the RailsSpace book. It goes through the creation of a social network site using rails and assumes zero knowledge.

Simone R. wrote:

Vincent Bakker wrote:

You can find all the needed code snippets in Advanced Rails Recipes. I would recommend using this book for pointers and code snippets.

http://railsbookclub.com/advanced-rails-recipes

(zipping up and generating files, login system through acts_as_authenticated, manipulating files)

well, more than find the actual code I need some hint if this demo apps can be useful for learning the "building blocks" , for sure I will buy the book for reference but in the ASP world with this 3 app you can build a good starting knowlege , maybe in RoR is differen there are other problem on wich you need to build skill before going on real programming

RailsSpace, Beginning Rails or Simply Rails 2 are great learning books. These books take you through the process of developing an entire app from a to z. (social network, e-commerce site of news site)

I find these methods really handy. Not only do you get a cleared picture of the coherence of the code, you also learn a bit about plugins, generators, test driven development, ajax etc.

I would start with: Beginning Rails (http://tinyurl.com/b438x8). A file manager and a mail footer creator are not the best starting points, since an important part of Ruby on Rails is developing database driven webapps and working through the MVC principle.

i think your project is a pretty good start. if you are going to code it all by yourself, maybe even put your authentication-code into a plugin and in the end try to exchange it with sth. like restful_athentication, then you got your hands dirty enough to start a serious project. depending on your personal goals you could take a few steps into the way rails handles AJAX (prototype, ...).

in general your goals should be to: - be able to write some basic ruby-code - get an understanding for the way rails works and models, views and controllers interact with each other - work with plugins (use them and maybe write your own) and gems - write valid html and css - use some AJAX - secure your application

as i see it your demo-project allows you to dive into all these topics. everything else depends on your personal needs and plans.

oh, yeah i forgot: - be sure to test your app. either you use the built in test- framework or something like rspec.

btw: it really doesn't matter which book your reading or which tutorial you are following. your approach of getting your hands dirty and trying to build a (not so trivial) app on your own is IMHO a very good one. you will need to combine the examples of different tutorials/ books into one working app. that will teach you a lot about rails.

Simone,

lots of people don't know about Rails Guides project: http://guides.rails.info . It has wonderful up-to-date content on lots of topics.

You may want to start with "Getting Started with Rails":

--karmi

# controller: def show_all_models   # require all of your models so they get loaded   Dir.glob(RAILS_ROOT + '/app/models/*.rb').each { |file| require file }   # find all subclasses of ActiveRecord   @all_models = Object.subclasses_of(ActiveRecord::Base) end

# view: <ul>   <% @all_models.each do |model| %>     <li><%= model %></li>   <% end %> </ul>

if you are using ActiveRecordStore there is probably a model in there for that as well. if you don't want to display that one, remove it inside your controller.