Ugh, ASP.NET != Fun (like Rails is)

Posted by kheon Mon, 18 Jul 2005 18:18:00 GMT

This past weekend I was able to really spend some quality time exploring Rails, something I’ve been having a tough time finding the time to do. Not the case this weekend.

In order to learn Ruby and Rails I’ve been taking some of the applications we offer at work (ASP) and porting them to the Rails framework. I have been working much slower then I probably could simply because I want to understand what and why things are the way they are. Even still, I’ve managed to port two of the tools over in relatively short order (except the file upload functionality, which I will tackle last).

I didn’t realize how much fun and how quick Rails developing was till I got back into some ASP.NET development that I’m doing at work. It’s been tiring mostly because we are porting some really sloppy third-party CFMX code over. The biggest annoyance I had to deal with all day though was in coding, compiling (wait), and refresh (wait for IIS to rebuild the application) process.

The good news is I’m home now and I can get back into some more Rails fun. Hoping someday we’ll be able to offer Rails applications where I work but for the time being we are primarily an MS shop with some PHP mixed in (but not hosted, we don’t have any Linux servers available for site hosting, only development).

Posted in  | Tags , , ,  | no comments | no trackbacks

Accessing Image Properties in ASP

Posted by kheon Wed, 25 May 2005 09:07:00 GMT

I just wrapped up changes to a client application that required me to get image dimensions out of an image dynamically in ASP.

Not wanting to have to use a component (ie: ASPImage) to do this I was able to find some code snippets online that would do what I wanted.

In an effort to save me the time later and hopefully to help someone else, here is the function:

  
  Function GetImageSize ( ByVal psImage )
      Dim asImage(1)
      Dim oFso
      Set oFso = CreateObject("Scripting.FileSystemObject")
      If ( oFso.FileExists(psImage) ) Then
          Set oImage = LoadPicture(psImage)
          asImage(0) = Round(oImage.Width / 26.4883)
          asImage(1) = Round(oImage.Height / 26.4883)
          Set oImage = Nothing
      End If
      Set oFso = Nothing
      GetImageSize = asImage
  End Function
  
  

Posted in  | Tags  | no comments | no trackbacks