Hello everyone.
These days I’ve bought a MacBook Pro with Osx Snow Leopard 64-bit pre installed.
Having to develop mainly in Rails and Django on MySQL and PostgreSQL, I’ve found some difficulties to install and properly configure all packages.
The main problems were due to the presence of 32bit libraries and other at 64bit. For example, Python or [...]
Tags: mysql, osx, rails, ruby, snow leopard
Posted in Development, Metodologies, Ruby |
With the today’s post I shall conclude my series on Ruby On Rails Best Practices . This is not because the required topics are completed, but rather because after the release of Rails 3.0, some constructs have been changed and should be reviewed.
Probably in future we will return to talk about best practices, but [...]
Tags: after_filter, before_filter, Best Practices, helpers, rails, ruby on rails
Posted in Development, Metodologies, Ruby |
Migrations, in my opinion, are one of the best things in Rails since these allow the creation and populating the database using ruby code without having to worry about which type of db run below.
That said, even writing the migration is better to follow some best practices.
1. DB Index
The first practice I strongly recommend is [...]
Tags: migrations, rails, ruby on rails, seed
Posted in Development, Metodologies, Ruby |
Today’s post discusses the first of the behavioral pattern shown by the GoF, the chain of responsibility.
This pattern expects a series of commands to be executed and a set of objects capable to handle them.
Each of these “handler” objects can send the command to the next handler in the chain if it is not able [...]
Tags: design patterns, ruby, ruby on rails
Posted in Development, Metodologies, Ruby |
[POST UPDATE ON 19/07/2010 - 15:45]
Continuing our analysis of the Rails Best Practices today we’ll see two other tricks to make more readable method of the controller.
1. Methods within model
Suppose we have the classic user registry defined in such a way that an admin user can enable or disable other users.
The deactivate method inside user [...]
Tags: Best Practices, controller, factory method, ruby on rails
Posted in Development, Metodologies, Ruby |
COMMENTS