From: Raphael Bauduin Date: 2004-07-26T21:16:51+09:00 Subject: Re: rubyonrails and cgikit comparison Florian Weber wrote: > > On Jul 26, 2004, at 12:56 Uhr, Raphael Bauduin wrote: > >> Florian Weber wrote: >> >>>> He's saying that he does not want to have 'foo' referencing something >>>> real (i.e. the parameters passed to the page) cause that adds coupling >>>> beetween the view logic and the business logic. >>> >>> i guess it all depends on what you prefer. the business data and the >>> view will always be coupled more or less. if you like the abstraction >>> of having some mediator/binding/etc or wanna do it directly.. >>> the question is though: if the person who does the templates is the >>> same person who does the rest of the (ruby) coding, what do you gain >>> by the indirection of bindings/etc? >> >> >> When I work with a designer, I design a _very_ basic template, and let >> the designer do the layout and all the work on the template. And the >> designer doesn't have to deal with values coming from my code, he >> doesn't care, and shouldn't. >> So whatever I code, I won't break his layout. And whatever he does on >> the template, he won't break the code. Very reassuring in both ways! > > > > but what for example if the attribute of a item in a repitition gets > renamed. > for example you decide replace the single 'address' attribute in your > ruby object to 'address1' and 'address2'. you will most likely also change > your binding file to represent those changes.. then the designer will also > have to change the template file.. The designer is there for that I guess. I tell him, "hey, the structure of the address has changed. Replace the cgikit address by 2 tags address1 and address2. Those are just strings". And he know he just has to add and where he sees fit. Again, he doesn't care of the name of my variable eg. > > but like i said, what do you gain by the indirection if the ruby and the > html programmer are the same person? I guess it's a question of preference, I find it a bit cleaner. But do you mean you expect every ruby coder to master HTML like a web designer? Let me return the question: don't you think there a gain if the ruby and html coders are different persons? (One gain being that none can break the other part's work, like mentioned in my previous mail) Raph