Monday, March 1, 2010

Going from IIS to Apache and Other Things...

Even though it seems that everybody and their grandma uses Apache, I've always used IIS. So after reading a recent post by Matt Woodward called Moving From IIS To Apache: It's Easier Than You Think, I figured I'd give Apache a shot and see how easy it really is to get set up.

And you know what? It was actually much easier than I thought it would be. After about 15 minutes, I had my local workspace up and running on Apache. To top it off, I also added a little URL re-writing to get rid of that pesky index.cfm reference in my ColdMVC sample blogging application. I won't take full credit for figuring out how to do it (I found the solution in a comment on a forum after a little Googling), but here's what worked for me:


<VirtualHost *:80>
ServerName blog.local
DocumentRoot "c:/workspace/coldmvc/samples/blog/public"
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^.*?\.[^/]{2,5}$
RewriteRule (.*) /index.cfm$1 [PT]
<Directory "c:/workspace/coldmvc/samples/blog/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


And in the spirit of learning new things, I also just finished reading Programming Ruby 1.9: The Pragmatic Programmers' Guide. I played around with Ruby on Rails a couple years ago, but at the time I didn't know anything about Ruby, so I wasn't able to fully grasp what was going on. After reading up on the language, I have to admit there are a lot of really nice features that ColdFusion could borrow from Ruby - blocks, closures, and variable naming rules to name a few. I'm also really jealous of how includes are implemented in Ruby, where they're treated almost like superclasses, so you don't have to worry about conflicts between method names.

Now I'm not saying I'm going to give up on ColdFusion, but there's definitely room for improvement in the language. Is there a technical limitation as to why ColdFusion variables can't start with @ or :? Is there a reason why method names can't end in ? or =? Do we really need to have parenthesis and semi-colons all over the place? I know much of ColdFusion is based on Java conventions and rules, but there's a reason why I'd rather code in CF than Java - it's easier. Why not embrace that, stray away from the Java roots, and make ColdFusion that much more enjoyable to work with.

Ok that's enough ranting for now. Next on my to-do list is to figure out Git and GitHub so I can get my framework out there for people to try out.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.