So I have been playing a little with Ruby on Rails. I have it up and running and it works in a way but I'm totally unconvinced that it's the answer to the ultimate question - or even the answer to writing database apps for the web.
Here's one little bit of code from a *very simple* tutorial example:-
<html> <head> <title>My todo list</title> </head>
<body> Not done:<br /> <%= display_items(@not_done) %>
<p> <hr size=3> <p>
Done:<br /> <%= display_items(@done) %>
<hr size=3> <form method="post" action="add_item"> New item: <%= text_field("new_item", "description") %> <input type="submit" value="Add item"> </form>
</body> </html>
If that's either structured or object oriented then I'm a purple hippopotamus! :-)
I think the fundamental problem is that HTML is a mess, until such time as that can be hidden somehow then I think we're stuck with rubbish like the above.
I was hoping that Ruby on Rails helped hide some of the above junk but apparently not.
Sorry - just felt like a bit of a rant! :-)
On Sun, Dec 31, 2006 at 05:11:23PM +0000, cl@isbd.net wrote: <snippity stuff="ror-template-example" />
Looked more or less like any other template I've seen, that's not where the code should go, that's where the layout goes.
I think the fundamental problem is that HTML is a mess, until such time as that can be hidden somehow then I think we're stuck with rubbish like the above.
If you get *really* bored, you could go the way of making things generate XML and then just convert the XML with XSLT to get the HTML, it'll still look ugly though.
I was hoping that Ruby on Rails helped hide some of the above junk but apparently not.
It's not going to magically get rid of the need to know basic html - that's the job of a CMS, not a webapp development platform. If you want that style thing, take a look at Zope or Plone (which runs atop of Zope), they may make more sense to you. (Or, hell, HippoCMS: http://www.hippocms.org...).
Cheers,
cl@isbd.net wrote:
So I have been playing a little with Ruby on Rails. I have it up and running and it works in a way but I'm totally unconvinced that it's the answer to the ultimate question - or even the answer to writing database apps for the web.
The 'assumption' the object oriented' is 'always right' gets right up my nose.
Ian
On Sun, Dec 31, 2006 at 07:09:11PM +0000, Ian bell wrote:
cl@isbd.net wrote:
So I have been playing a little with Ruby on Rails. I have it up and running and it works in a way but I'm totally unconvinced that it's the answer to the ultimate question - or even the answer to writing database apps for the web.
The 'assumption' the object oriented' is 'always right' gets right up my nose.
I'm all for functional programming *when* it makes sense, if it's reusable, though, then OO is generally nicer - you can do some "interesting" things in C when thinking in an OO way - you don't have "objects" per say, but an implementable interface and dynamic loading of libraries - makes life much easier if you start thinking of them as objects.
OO may not be the best aproach all the time, but a lot of the time at least thinking that way can assist in development and save a *lot* of time in the long run.
Just my 2p.
Brett Parker wrote:
I'm all for functional programming *when* it makes sense,
<rant> I'm all for whatever programming paradigm makes most sense for the application. There is no panacea. You assume functional programming is the only alternative to object oriented programming. Another reason why OO gets up my nose.
if it's reusable,
Reusablity is a function of design intent, not a property of any programming paradigm.
though, then OO is generally nicer
Nicer??? is that a new technical term?
- you can do some
"interesting" things in C when thinking in an OO way
What has C or any language got to do with it. OO is a paradigm not a language.
OO may not be the best aproach all the time, but a lot of the time at least thinking that way can assist in development and save a *lot* of time in the long run.
Now THAT I agree with.
</rant>
Ian ;-)
On Sun, Dec 31, 2006 at 07:09:11PM +0000, Ian bell wrote:
cl@isbd.net wrote:
So I have been playing a little with Ruby on Rails. I have it up and running and it works in a way but I'm totally unconvinced that it's the answer to the ultimate question - or even the answer to writing database apps for the web.
The 'assumption' the object oriented' is 'always right' gets right up my nose.
I quite agree, but some sort of logical structure does make things easier.
Some problems/applications are much more suited to a 'sequence of actions' type approach and then, to my mind anyway, an Object Oriented language doesn't fit the problem well.
On Sun, 31 Dec 2006 17:11:23 +0000 cl@isbd.net wrote:
So I have been playing a little with Ruby on Rails.
Excuse the off-list reply. If you'd be happy with Python, look at webpy (http://webpy.org/). It's simple, it OO, it works (for us, anyway).
HTH
On Tue, Jan 02, 2007 at 06:09:25PM +0000, Keith Edmunds wrote:
On Sun, 31 Dec 2006 17:11:23 +0000 cl@isbd.net wrote:
So I have been playing a little with Ruby on Rails.
Excuse the off-list reply. If you'd be happy with Python, look at webpy (http://webpy.org/). It's simple, it OO, it works (for us, anyway).
It doesn't look off list to me! :-)
Thanks anyway, another thing to look into.