From: Florian Weber Date: 2004-07-26T05:34:03+09:00 Subject: Re: rubyonrails and cgikit comparison > I agree with you - there is no point in comparing framework via the > most > simple application (how simple it would be to write "hello world" as a > regular CGI script :). > >> but i've used frameworks which are similiar to cgikit before.. and >> believe me, it can turn into a pure nightmare when you have to create >> components for the smallest little things. > > I also used frameworks that are similar to cgikit (mostly Java ones - > WebObjects, Tapestry) before and I find them very powerful for REAL > LIFE > applications ("hello world" is NOT one). I disagree it is difficult to > create components for small things, if you have good dev tools. And > without decent dev tools even a very powerful framework will inevitably > turn into nightmare, when the application grows complicated enough. i didnt really mean that its difficult. its just a overhead. why would i want to create a component for something im only going to use once? why the abstraction and indirection? even when good dev tools save you some time, it still costs more time than doing it directly and without the abstraction.. >> i really believe into using ruby as a view language. the whole >> 'every view can be described in xml'-thing is totally utopian and >> will never be happening. sooner or later you run into situations >> where things become terrible akward. what for example if you >> wanna change the style attribute of a xhtml tag based on some >> condition? > > And I don't like messing programming language with HTML, like rails do. > IMHO the perfect MVC framework should have pure HTML templates, so the > HTML & graphic guys could edit them not even knowing the framework or > underlying programming language. I admit cgikit is not very good at it > (as it introduces tag, mimicking WebObjects' tag), > but eg. Tapestry is much better at this point (and SWS too, but > Tapestry > is better - yet:). like i mentioned in a earlier email, the dream of having html & graphic people editing the templates without even knowing whats going on under the hood is a dream which will never come true. sooner or later they will have some stuff like conditions in their templates.. really check out the blog entry of martin fowler. he has some valid points. also the guy who created ant admitted that it was a terrible idea to use xml for the build files. xml just isnt made for anything even remotely related to programming/conditions/etc.. > As for your example - I hope you realize the example is awkward itself > :) No matter which framework you choose, the solution will always be > complicated and ugly. And yes, you can do this in cgikit :) not really. foo how would you do this in xml? >> - rails is pragmatic. it makes simple things simple, and hard >> things possible (yes! i bet you never heard this sentence >> before ; ) but with rails its totally true. if you believe in >> components >> in the view, its possible to add that.. > > I don't care if it makes simple things simple. In the company I work > for, we use WebObjects for complicated applications and simple Ruby > FastCGI scripts for simple ones. For simple things you don't need a MVC > framework, you can print the HTML code directly. its not like there are only two existing types of app: simple and complicated ones.. there are things in between.. >> basically you really start to appreciate that you dont have to >> write tons of config files for everything. cgikit could also do that. >> it would be so much nicer if there would be some name specifications >> for your component class. like naming methods which return attributes >> in a special way. then you could get rid of the whole binding file. (i >> might be wrong, since i just quickly browsed the docs =) > > Yes, and then you would encounter the situation, when you REALLY can't > follow this convention (the same goes for O/R mapping frameworks and > mapping SQL columns to attributes of the same name - think about "ID" > and what "id" attribute is used for in Ruby :) and you are stuck. I > really like the freedom of cgikit-like frameworks. personally i prefer to be forced to keep such limitations in mind and use something different than 'id', but not being forced tell the lib how to map every column to a attribute.. plus im pretty sure that it wouldnt be hard to add something to activerecord which allows you to declare names for such exceptional attributes specifically..