<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6178209.post113393768462707703..comments</id><updated>2007-04-16T05:50:18.537-05:00</updated><category term='kanban'/><category term='mocks'/><category term='design'/><category term='lean'/><category term='testing'/><category term='agile'/><category term='DSL'/><category term='Redpoint'/><title type='text'>Comments on Igor's Blog: My Ruby Tipping Point</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.igorstoyanov.com/feeds/113393768462707703/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default'/><link rel='alternate' type='text/html' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html'/><author><name>Igor</name><uri>http://www.blogger.com/profile/12832903167357753682</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6178209.post-113405961619490216</id><published>2005-12-08T10:33:00.000-06:00</published><updated>2005-12-08T10:33:00.000-06:00</updated><title type='text'>I think the trick is to have the validation &lt;b&gt;rul...</title><content type='html'>I think the trick is to have the validation &lt;B&gt;rules&lt;/B&gt; in the domain model, but have the validation applied in the view and the controller, such that users can get instant feedback as they type into a form, and that controllers can call the validation code and redirect people to the appropriate location when validation fails.&lt;BR/&gt;&lt;BR/&gt;In Struts, I always had the Struts Validation delegate to the domain objects at the controller level, but it was difficult for this to flow all of the way down to the html form.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113405961619490216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113405961619490216'/><link rel='alternate' type='text/html' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html?showComment=1134059580000#c113405961619490216' title=''/><author><name>Matt M</name><uri>http://www.blogger.com/profile/16098483018096096360</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html' ref='tag:blogger.com,1999:blog-6178209.post-113393768462707703' source='http://www.blogger.com/feeds/6178209/posts/default/113393768462707703' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1324041634'/></entry><entry><id>tag:blogger.com,1999:blog-6178209.post-113397148740577130</id><published>2005-12-07T10:04:00.000-06:00</published><updated>2005-12-07T10:04:00.000-06:00</updated><title type='text'>I had a similar epiphany coming from ASP.Net.  ASP...</title><content type='html'>I had a similar epiphany coming from ASP.Net.  ASP.Net has some nice validation server controls for the views that are &lt;I&gt;very&lt;/I&gt; tempting to use.&lt;BR/&gt;&lt;BR/&gt;Seeing how Rails puts that logic in the model makes a lot more sense.  You can now reuse your validations everywhere the model is just used, not just the one or two forms it's a part of.  &lt;BR/&gt;&lt;BR/&gt;Regarding comment #1: there's isn't much sharing of domain objects across projects in ruby on rails.  Each project has its own domain models with their own validations and other business rules.  Common logic can easily be refactored out into acts_as_* plugins or mixins as well.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113397148740577130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113397148740577130'/><link rel='alternate' type='text/html' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html?showComment=1133971440000#c113397148740577130' title=''/><author><name>Rick</name><uri>http://techno-weenie.net</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html' ref='tag:blogger.com,1999:blog-6178209.post-113393768462707703' source='http://www.blogger.com/feeds/6178209/posts/default/113393768462707703' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-627504745'/></entry><entry><id>tag:blogger.com,1999:blog-6178209.post-113396995347590485</id><published>2005-12-07T09:39:00.000-06:00</published><updated>2005-12-07T09:39:00.000-06:00</updated><title type='text'>Developer seeking guidance or ideas.&lt;br&gt;&lt;br&gt;I subs...</title><content type='html'>Developer seeking guidance or ideas.&lt;BR/&gt;&lt;BR/&gt;I subscribe to the view that validation should belong to domain objects like you described. It is more like my domain objects always say they are responsible for validating and making sure data is correct. But the issue I have with this approach is often some of my domain objects will be used across different projects and business rules vary based on the context. Can you suggest a clean approach how to handle this?&lt;BR/&gt;&lt;BR/&gt;Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113396995347590485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6178209/113393768462707703/comments/default/113396995347590485'/><link rel='alternate' type='text/html' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html?showComment=1133969940000#c113396995347590485' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.igorstoyanov.com/2005/12/my-ruby-tipping-point.html' ref='tag:blogger.com,1999:blog-6178209.post-113393768462707703' source='http://www.blogger.com/feeds/6178209/posts/default/113393768462707703' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-696889891'/></entry></feed>
