Programming for the Web with Ruby - Part 1

Ruby 2 Comments »

As part of my own personal development I have decided to delve into learning yet another language...Ruby.  This time though I'm going to document my progress and thoughts on my blog.

Being a developer I think it's only natural that we experiment with, not only coding in the languages we are proficient in, but also branch out to learn about what other languages have to offer and also how to go about solving the same or similar problems in those other languages.  Partly inspired by the Pragmatic Programmers "Seven Languages in Seven Weeks" I have decided to take things further with Ruby.

In order to learn the language I sought out a structured approach and came across a basic course "Programming for the Web with Ruby" on http://rubylearning.org.

The reason I chose this course and am happy to share the details is due to the fact that it not only focuses on the Ruby language itself but also on the basics of Web Application development such as using GitHib for version control, HTML5/CSS3 and other basic HTTP / Web related topics.  Obviously us more advanced web developers can skip these sections but I thought it was a nice that the author(s) of the course decided to include this material.

Anyway I'll be posting my progess as I go!

Happy coding...

Niall

 

Bookmark and Share

Definition of a Function vs Method

ColdFusion , Javascript , Misc No Comments »

After a recent discussion as to the correct terminology to use when referring to code written in CFCs I've decided to share my opinion so people have a general idea as to what is meant when someone is referring a function or a method in its simplest sense. 

  • A function is a piece of reuseable code that is called by name.  It can be passed data to operate on (arguments / parameters) and can optionally return a result.
  • A method (also known as a property method) is a piece of code that is called by name that is associated with an object.  A method is almost identical to a function but it's purpose is generally to operate on the data contained within the component (class).

For example, in JavaScript, methods are defined as object properties that contain a function() whose intent is to operate on the data within that object.  Whereas an example of JavaScript functions would be built in global functions such as isNaN(), alert() or user defined functions function debugLog( content ){ console.log( content ) }.

Likewise, in ColdFusion, you could probably say that UDFs (User defined functions) and the standard built in functions provided by ColdFusion are "functions" and the functions within CFCs are methods.

I'm sure people have their own opions on this but in general that's how I like to refer to functions or methods.

 

Bookmark and Share

IE 8, Excel 2010 not opening content on Windows 7

ColdFusion , Gotchas , MS Office , Tips and Tricks No Comments »

Thought I'd dust the cobwebs off my blog by sharing something I came across today...

I came across an issue where a user reported that a web application was not opening Excel content they were requesting.

Basically the application was sending csv formatted text to the browser and the browser (Internet Explorer) was supposed to open this with Microsoft Excel 2010.

The template sending the content had the correct headers configured to instruct the browser to open this in Microsoft Excel and the content was valid but for some reason the new window was failing silently without promting the user to open \ save the file.  The only clue was that this was a new PC with Windows 7 and Internet Explorer 8 installed and their previous PC worked fine.

I decided to check with Firefox and voila - I was prompted to Open / Save the file.

So after diagnosing different scenarios through the code I then started looking into the settings on the PC for Internet Explorer.

Read more...

ColdFusion 9 - CFZIP Example

ColdFusion 1 Comment »

I was recently asked to provide a quick link for allowing administrators to download _all_ user uploaded assets for a particular form.
The obvious choice for this was to use <CFZIP /> to create an archive, compress the download file size and also provide one download link.

It didn't take very long to do, but I thought I'd share a quick example of this for others who might need the same.

Read more...

Contact Form Issue

Misc 1 Comment »

All, sincere apologies, but I have just realised that my Contact form hasn't been working.

If you have used this to contact me please and I have not yet replied please resend to [niall] [@] [niallodoherty.com] or contact me using the details on my About page.

Once again, sorry about that and I am working with my hosting provider to get this resolved.

Regards,

Niall.

Bookmark and Share
Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds