Posts Tagged 'frameworks'

beginning ruby by peter cooper

A couple of months ago I rather rashly announced that I wanted to learn Ruby in the New Year. For those of you who don’t know, Ruby is a free programming language, and it is used for all kinds of things, but most notably these days in the web framework, Ruby on Rails (ROR).  It was a stupid resolution, because although I have knowledge of other programming languages, such as VB and Python, I am not a natural programmer. I work in IT, and have for many years, and have coded a lot of stuff, but I’m an artist at heart and find programming hard work. But I wanted to find out more about ROR, and to do that I needed to learn Ruby first.

Well, here we are nearly three months later. How did I get on? Well, I’ve got to say it, after learning Python a few years back I was convinced that it would be the language of choice for me, the mother language that I would always reach for when I had a problem that I couldn’t solve any other way. Now, after reading Peter Cooper’s book Beginning Ruby, I wont go back to Python again.

What made me change my mind? It has got to do as much with the effectiveness and good design of the Ruby language itself as the brilliant way the Beginning Ruby book is written. I have read several "how to" and introduction to programming books over the years. My problem with them is this, they start out easy. Great. Then they get a little harder as they progress. Fine. Then BAM! They hit you with a barrage of unintelligible stuff, and you think, "How did we get to here?"

Well Beginning Ruby isn’t like that. Yes it starts out gentle, although it does introduce object oriented stuff very early, which it has to considering Ruby’s got it built in everywhere. But it doesn’t then dump you floundering about in a mire of complexity. It slowly ramps up, explaining and showing as we progress. I think it is the best "beginning" programming book out there. The examples are fresh and completely usable. And it doesn’t feel "dated" like some programming books I have read in the past. This book is a breath of fresh air in programming languages.

Now as I’ve said, that might be the outcome of having a modern, well designed language to work with, but I have started books and been to several web sites that have tried to explain Ruby to me before, but they didnt succeed. So I have to assume that it is down to the writing and explaining skills of Peter Cooper that I have to thank for my new excitement with Ruby. I haven’t quite finished the book yet, but I’m getting there. A recommended read.

Disclamier: I am not an avid fan of Ruby JUST because I live in a street called Ruby Street. But that is a cool coincidence.

learning ruby

Ruby - A Programmer's Best Friend

I have wanted to play with Ruby on Rails for a while, but always shyed away because of my lack of Ruby skills. I am determined to set this right, so I am going to spend some time learning Ruby. I have given myself until the 1st of January 2008 to get up to speed and feel comfortable with hacking around in it. I don’t intend to be an expert, just learn enough so that when I look at RoR I wont be totally lost. I have some basic programming skills. I created two versions UWE’s PC build system, mostly using VBScript and VB. I have also some Python experience and some basic PHP. I wouldn’t, however, describe myself as a programming diva. It’s all basic hacking and sticking code together. I have seen several online tutorials that look good, http://rubylearning.com/ by Satish Talim is one that I am looking at right now. There is also the Pragmatic Programmers Guide. And my Twitter friend Peter Cooper says that he has a book that he can recommend ;)

Taxonomy Access Control | drupal.org

Taxonomy Access Control | drupal.org
This module is very useful if you run a Drupal site and you want to restrict access to certain terms and nodes. You have to create categories for them but, if you’re using Drupal, you are probably doing that anyway.

which web framework is best?

I’ve been thinking for some time about creating a web application, like an online art gallery sort of thing. Well, to do that I need a web framework of some kind to create it in and so have been looking at all of the options. Of course I could sit down and write it all from scratch but I’m no real expert coder so I think that’s a no-no. What have I been looking at? Well, I looked at Seaside, Django and Ruby on Rails (ROR).

First up, Seaside. Well it deserves an honourable mention, first of all because it’s so different from the others. It runs from within Squeak, which is an open-source version of Smalltalk. The Squeak virtual machine runs and publishes its website using its own built-in webserver. Seaside is very powerful, and it allows you to build highly interactive web applications quickly. It generates a lot of the boilerplate html for you. Code can be changed while the application is running and you dont need to recompile it or stop and start the web server. So am I going to use it? No.

Although I found it remarkably easy to install and get up and running, the very thing that makes Seaside unique is also its downfall, it’s too different. It would be hard for me to tackle the steep learning curve of Smalltalk as well as learning a web application framework. I just dont have the knowledge of Smalltalk that I feel would be essential for me to use Seaside. And the documentation is a bit patchy to say the least. No, we have to keep looking.

On to Django then. Django is written in Python, and it’s tagline is “The web framework for perfectionists with deadlines”. The design ethos of Django is that if you need to develop web apps quickly under pressure then you can. The Python code is abstracted away somewhat by the template language, which in theory should make it easy to use even for non-programmers. And it is bullet-proof, in that it can handle very high loads (given the right infrasrtucture and design). It has survived a slashdotting on more than one occasion! Am I going to use Django? Dont know.

The problem is that although I managed to install it, getting anything up and running was difficult. And I know Python better than any of the programming languages involved here. It night be easy to develop in once you get going, but getting going has proven to be more difficult than I first imagined. Documentation was much better than Seaside, but still needs to be organised and presented better. And most of the sites developed using Django seem to have that, well, Web 1.0 feel to them. Can’t put my finger on it, something didn’t quite work for me.

rails logo

On then, to Ruby on Rails. This was a delight to install, as I used the InstantRails package. Wow. That was so easy anybody could do it. Now I know its just a development environment but hey, I need that to get going and learn about the product. On then to the documentation, which was good, even including videos of people creating web applications. I followed one, and despite the typo’s on the demo (how DID he get it to work?) I managed to follow it and create my own blog application (well, it was HIS blog app but I typed it in…) in under two hours. TWO HOURS! Incredible really, and I’m new to Ruby. It took me longer as they used the amazing text editor thats only available on the Mac and I had to use Scite and they had all kinds of autocomplete and autosave which I didn’t have. But – TWO HOURS – I still cant believe it.

So, am I going to use Ruby on Rails? Quite possibly. I’m going to look at it again today and hopefully make a decision soon. But I would heartily recommend Ruby on Rails for anybody creating a web application.


About Me

Pete Gilbert is an artist, blogger and SharePoint farmer living in Bristol, UK

Archives

Twitter Updates

Pages

 

November 2009
M T W T F S S
« Oct    
 1
2345678
9101112131415
16171819202122
23242526272829
30