Why doesn''t Rails use aspect-oriented programming? e.g. for loggers -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Can you give an example of how you would implement this? On Fri, Apr 5, 2013 at 11:19 PM, Bakhtiyor Homidov <bakhtiyor.h@gmail.com>wrote:> Why doesn''t Rails use aspect-oriented programming? e.g. for loggers > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-core+unsubscribe@googlegroups.com. > To post to this group, send email to rubyonrails-core@googlegroups.com. > Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Rails uses tons of AOP. It just doesn''t explicitly call out the fact that it is AOP. The filters in controllers and models are a good example. And in fact the loggers do use AOP. All the SQL logging, for example, is done by a component that plugs in to the notifications that are sent by ActiveRecord when it performs a query. On Friday, April 5, 2013 11:19:35 PM UTC-7, Bakhtiyor Homidov wrote:> > Why doesn''t Rails use aspect-oriented programming? e.g. for loggers >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Primarily because ruby is more dynamic that java, where aspects are more commonly used. In Ruby you can get by with reopening classes, and using modules. On Saturday, 6 April 2013 07:19:35 UTC+1, Bakhtiyor Homidov wrote:> > Why doesn''t Rails use aspect-oriented programming? e.g. for loggers >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscribe@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.