Archive for the 'Ruby on Rails' Category

export XML from SQL

August 12, 2006

This is the next thing I need to do for an application I am working on, won’t get to try it until next week but it looks like exactly what I am after, and quite simple! Fingers crossed.


The Mozilla Active X control worked perfectly as can be seen in the screenshot above, the only problem is that it doesn’t seem to support xml? I opened my wordpress feed in the control and it outputted plain text, not the nested elements as it would if you opened it in firefox for example. This is what I wanted to use it for (xml with a stylesheet) so I think I’ll look for a control that supports this, most likely a Java/Swing combo. Python/ Ruby were close but I have more experience in Java and like using Java Swing GUI components. And having to worry about how the TK or QT frameworks work with each language is proberly not the best way to learn a new language :).

I have been having a play with Ruby and I realling love the language and the pure OO implementation. It is very similar to JADE however I think it has already got more market interest! Especially with the Ruby on Rails framework.

XML logging

August 9, 2006

I was thinking lastnight of projects I’d like to do and one of them was to make an XML parser that will take logs of common files such as from messenging applications, parse the file and write it to a database. I like the idea of all my logs being searchable and more secure and it also means only a very recent copy of a log needs to be stored (the old log can be removed once it’s added to the database).

I found an application on called IM Sniffer that seems to do something similar, but I havn’t tired it. This application is written in Visual Basic and I’m after something more configurable, for example not just messenger logs.

I’d like to start with a (ruby? python?) script that takes a log from its default directory, parses the file and populates a database. The program I will start with is GAIM. This brought me to my next idea, what about adding XML logging to GAIM itself? This would be a very large learning curve but would give a lot of experience, what did I find?

GAIM already have a google summer of code project for this! as well as for storing logs in a database! The projects have been taken up which is fine as I don’t think I’m quite ready to take on such a project.

Will stick to the text file parsing for now 🙂 Though my instant messenging isn’t really worth logging! Maby Apache?

Ruby On Rails

July 4, 2006

I’ve spent the last few days reading up on Ruby and the Ruby on Rails framework. I must say I was surprised to see what it actually is and I can see why PHP/Java web developers are loving it. This post isn’t intended to be any sort of explanation on ruby or how it works as there are plenty of well written posts on this subject. One thing that is different with ruby is how it interacts with databases, convention over configuration is one of rubys biggest time savers. Provided your database tables are named in a certain way this is all ruby needs to know to establish links and relationships to a database, great for small databases but less appealing to more complex databases or connecting to legacy databases.

Ruby on rails also simplifies CRUD (Create, Read, Update, Delete) operations on the database by generating the webpages and allowing them to be fully customised. This is a huge time saver and is especially good for those simple applications that are based on these simple database operations.

On top of that the Ruby language is incredibly powerful and has a lot of potential.

Ruby supports database transactions (rollback/commit style) which is a feature I liked about JADE.

I’m going to spend a little more time getting familiar with the language and framework and start builidng a bug tracking system with an RSS feed to learn how everything fits together.

I hope to have something in development soon 🙂