Entries Tagged 'Rails' ↓
August 15th, 2007 — .NET, Ajax, Code, JavaScript, PHP, Rails, Ruby
Ever have to argue Ajax versus Socket Connections? Me either. Today, I had the chance to talk about the differences, their advantages and their disadvantages.
Ajax has many advantages. You do not have to parse content/page headers, you can parse XML, you can build objects out of JSON serializations, and above all there are a lot of frameworks that are cross-browser friendly so you do not have to worry about writing the framework yourself.
A Socket Connections’ advantages are much smaller in my opinion. There is no browser limitations, which is a major advantage, keeping it browser independent. It can support any type of response content, JSON serializations, XML, HTML, strings, etc.
So what about the disadvantages? Ajax has the complications of cross-browser friendliness, but that has been removed by frameworks doing all that hard work for us. Ajax’s biggest disadvantage is probably the lack of JavaScript standards being followed by each browser. Though this is removed by using popular frameworks, it matters for the rest of your JavaScript code to setup the Ajax event.
So how about Socket Connections? Socket Connection have the complication of trying to figure out where the response data starts and where the response headers end. Secondly, they are language dependent. Not all languages support sockets and some may make it very complicated to use them though, whereas, Ajax is getting easier and easier to use.
What are your thoughts?
February 24th, 2007 — Code, Rails, Ruby
I have been prolonging this long enough and finally decided to start reading the book I got for Christmas regarding Ruby on Rails. With all of the hype around this language, one has to wonder, why I am not trying this out? What is with all of the big fuss? Could I benefit from this language?
Well, I am here to start answering some of those questions. Ruby on Rails, has shocked me right out of the gate on how well it separates and forces you to separate the Business Logic from your User Interface. This is something you are taught to do in Web Development but many do not put it in practice.
My only nit-pick so far is I haven’t been able to get the MySQL interaction within Ruby to work just yet. I must be missing a package of some sort, but I am sure I will get it worked out shortly. In fact, I did just solve it. I was missing the libmysql-ruby library.
The book I am working with is ‘Ruby on Rails: Up and Running’ by Tate & Hibbs. It is an O’Reilly publication and I must admit, I love their books. They are easy to read and well broken up into chapters that are easy to manage in a few sittings. The book isunder 200 pages and assumes you know a bit of programming (not necessarily in Ruby, but in at least one language). It also assumes you know how to work with MySQL and you are capable of installing Ruby and Rails by yourself.
These assumptions are good, but I wish it would have pointed out I would need the MySQL library as that would have saved me an hour or two of going ‘WTF…’ why is ‘rake migrate’ displaying “rake aborted! Mysql::Error: Lost connection to MySQL server during query: SELECT version FROM schema_info”?
Anyways, I have that part up and running and so now I can continue on with the book. But to sum up my post, get the book, prepare yourself for problems and using Google or something similar to find the answer, as the book isn’t a problem solver, it is pretty much a tutorial.