Update to Previous Article (Toolsets)

Posted January 15, 2007 by Keith
Categories: Tressel

Just a short update: In the previous post I was talking about tools those of you on Windows could use for editing. I mentioned InType as being the closest thing to TextMate.

I ran across another editor  – simply called ‘e‘ – that is even better.  It’s very close to TextMate in functionality and is more mature than InType (e.g. support for opening directories as projects, collaboration,  multiple tabs, and more).

Check it out right here.

The Rails IDE and .NET Developers (aka Where is the Build icon?)

Posted January 12, 2007 by Keith
Categories: Tressel

If you’re like me and you are a .NET developer crossing the tracks, one of the first questions you might ask is “What’s a good setup? Do I need to throw away Windows and use Linux or OS X? Do I need to throw away Visual Studio that I’ve grown to love to hate? How will I live without Intellisense?”.

Well this post is the skinny on those questions.

First off, let’s attack it from the top down. At the very top is your operating system. The OS you use will limit your toolset. Which do you need?

That’s an easy one because, well, Rails can run on Windows XP, Linux, and OS X. I’m going to focus primarily on Windows XP and OS X because that’s what I have experience with. Personally I bought a 20 inch iMac and use OS X for my RoR development and Parallels / Boot camp for .NET development and gaming.

Windows XP versus OS X

Just kidding, I’m not even going there. What I will say is that most screencasts / books you’ll find on RoR will be using OS X. Why? I don’t know. I think it’s just a mentality / cultural thing. I’ve used both XP and OS X and the only difference is the toolsets you can use. So if it doesn’t really matter, OS wise, whether you use XP or OS X, then we can get down to toolsets.

Which IDE do I use?

None. That’s which one you use. Okay, perhaps that is a little harsh. The fact is RoR development isn’t like .NET development. Oh you can do .NET development in notepad or some other text editor, but doing so will invoke irreversible insanity. You really *need* to use an IDE with .NET. And you should because Visual Studio is a decent IDE when it comes to WinForm development and what’s more, you can get slimmed down versions of VS for free now.

However, Visual Studio won’t help you with RoR development. There are some IDEs out there though – such as RadRails that will help you to some degree, but nothing will compare to what you’re used to in VS. There is a commercial product out there that integrates with VS called SapphireSteel and it is not bad. It’s not very good either right now; it has some maturing to do. It certainly has promise but right now it is expensive (there is a free, watered down version) and to me, just gets in the way.

As a matter of fact, I’ve found using IDEs like RadRails hinders my ability to really learn what is going on in the background with Rails. Perhaps when I get a little better I’ll revisit RadRails and see how useful it is for me. I think in the beginning it is important to see how you generate the models and controllers (not that it’s hard, but sometimes my novice brain forgets which to do first, or what the syntax is if I want to create a scaffold skeleton). So really, the console (or terminal) is your friend in the beginning. The idea isn’t to hide everything from the programmer, but to let the programmer have the control to gain an understanding of the Rails framework.

I’ll be honest – it is hard at first. We .NET folks live in Visual Studio. We come to depend on it, love it, hate it, curse it, applaud it. You have to believe me though that once you get used to not using that big bloated IDE, you will feel liberated.

So if we aren’t going to use Visual Studio, what do we write our code in? For Windows, I recommend InType as it is very similar to TextMate for OS X. You might be thinking “with all the hundreds of text editors out there, why on earth would I recommend InType being that it’s still only alpha?”. Pay attention! I’ve answered that one already – it’s very similar to TextMate. TextMate is the Ferrari of text editors and it is, hands down, the best non-IDE editor out there for Ruby coding. It doesn’t get in your way but stands at attention when you need a helping hand.

Pimp My Web Server

Forget about IIS as your web server, okay? Trash it and be happy about it. I’ve always hated IIS. There are others out there that work nicely (or even specifically) with Rails. Depending on the version of Rails you use, you will be using Mongrel or WEBrick for development. There are no application directories to fool with – I like that. Oh and you could also use Apache…you know, that ultra stable, scalable web server software those open source geeks use. One thing I was worried about in the beginning though is how the hell do I set up these “other” web server apps. I’ve tinkered with Apache in Linux and you have to go in and play around with all these blasted config settings and whatnot. I’m happy to report that for development, there are some really nice folks out there that have made this ultra, ultra easy.

For Windows there is InstantRails. This little beauty is a self contained box of goodness giving you MySQL, Apache, and Rails all in one package. All you have to do is drop it in a directory and boom, you’re ready to Rail.

If you want to use OS X you aren’t left out. There’s a very similar kind of sexy software called Locomotive. Like InstantRails you just drop it in a directory and fire it up! Beautiful.

So you have your editor for coding, you have a database, you have a web server. What’s missing? Oh, your application. That’s right pal, you have no more excuses for not heading right on over to RubyOnRails.org and getting started!

Hey, are you still here? Get moving!

ebook goodness

Posted January 5, 2007 by Keith
Categories: Tressel

Those of us coming from a C# / VB.NET background who’ve decided to cross the tracks not only have a framework to learn, but a brand new language and syntax. Ruby certainly is a lot different than C# or VB, so I thought I’d slap up a link to a brand new, shiny Ruby eBook I saw over on lifehacker: “Mr. Neighborly’s Humble Little Ruby Book”.

You can check it out right here.  He makes available an HTML version, PDF version, and a hardcopy.

Speaking of ebooks, I’ve just about finished “Getting Real” by 37signals. Coming from the large, big business culture you often find in the Microsoft world, this book is absolutely refreshing. It’s a totally new perspective on building web apps. All the way from dealing with the clients (and my favorite – saying No to them for a change) to hiring staff. This book is a must read and I highly recommend it. Check it out here.

Happy New Year!

Posted January 1, 2007 by Keith
Categories: Tressel

Happy New Year to everyone. May 2007 bring prosperity to you all.

Top 7 Reasons an ASP.NET Developer should Consider Rails

Posted December 31, 2006 by Keith
Categories: Tressel

It seems Top x lists these days are all the rage. I’d like to be cool too and present you with 7 reasons why, as I learn more and more about Ruby on Rails (aka RoR), an ASP.NET developer should seriously consider checking into Rails. This isn’t meant to say ASP.NET is bad per se. I still use ASP.NET on a daily basis, all of my projects are still being developed using .NET. It’s solid and proven. Yet I’m frustrated with it, and I’ve started learning Ruby on Rails.

This is in no particular order, certainly not in order of importance. Again, this is from a long time ASP.NET developer’s point of view.

Reason #1 – Simplicity.

I’ve found the Rails framework to be pretty simplistic without sacrificing robustness and flexibility. That’s a hard one to achieve, and Rails does it nicely. Not just Rails though, Ruby is not a difficult language to pick up and run with.

Reason #2 – A built in, solid Pattern

You’re not using a pattern based approach in your projects?? Sure you are, you probably just don’t know it. Just about every project uses some sort of pattern, and you call it an ‘architecture’. You keep building on this architecture project after project, trying to evolve it into something you have to touch less and less with each iteration of development. Rails gives you something the .NET framework doesn’t give you: support for a proven, solid pattern called MVC (model, viewer, controller). We used it (MVC) all the time back when thin client applications were all the rage but the web browser wasn’t. It just so happens to work fantastically with web development. Now, one can argue that .NET gives you the “freedom” to invent your own patterns / architecture, but let’s talk about freedom in the next reason.

Reason #3 – Vendor / Platform Freedom

I can’t begin to tell you how many potential clients I’ve had to pass up because they didn’t want to invest in Windows based hosting (and by that, I mean SQL Server, Windows 2003, Visual Studio, etc). Those of us who live in the Microsoft world day in and day out tend to develop a skewed perception that everyone hosts their web apps on Windows 2003 and everyone has a license for SQL Server. The world is a little bigger than that my friends. Many people don’t have the money to host their web apps with these kinds of setups. I’ve found in my experience though, particularly with startups, they just want to minimize their initial investment. Going with an Apache/MySQL/*nix based approach makes sense for them – it simply cuts down on up front investment costs.

Aside from the upfront costs, there’s this issue with being stuck with Visual Studio once you start using it. Web designers are good at design, web developers are good at, you guessed it, coding. Visual Studio assumes both roles will be perfectly happy using Visual Studio. I’m sure I’m not the first to say that VS sucks for designing web page layouts and interfaces. Dreamweaver is great for that. Try getting an aspx page to work with both toolsets without sacrificing their strengths and you’ll find you’d be happier plummeting off the rooftop of a 12 story building. It is painful. It is nasty business.

Rails doesn’t tie you down to a single web server software or operating system. Ruby doesn’t tie you down to a single IDE. Neither tie you down to a single database platform. Getting to use whatever you’re comfortable with is nice. Telling your clients they can leverage their existing investments is nicer.

Reason # 4 – Ruby on Rails is Modern

The more I work with RoR, I see just how un-modern ASP.NET feels. It’s the same feeling I got when I made the jump from classic ASP to ASP.NET over 5 years ago. Five years…wow, that’s a long time in our industry. ASP.NET hasn’t changed terribly much in 5 years. Sure, we don’t have to compile our web apps any more. And sure, ASP.NET has AJAX extensions. Yet it still feels like the problems we had with ASP.NET 1.0 are still there in 2.0. The same old workarounds are still necessary to make my javascript work correctly when I use master pages. Why is it, after 5 years, I still have to work around the issue of only being able to use ONE server side form per page? Do you know how much that sucks when you’re using master pages? Why is it that after 5 years I still have to write a ton of back end code to replace the 50% of ASP.NET controls that are worthless unless I use a two tiered databinding approach (which no developer worth his salt would use)? I’m getting off on a tangent here. The point is, Microsoft isn’t modernizing ASP.NET to keep up with the modern trends. Oh, trends, let’s talk about that for a moment in……

Reason #5 – RoR is Trendy

If you’re an IT consultant this should be an important one for you. The key to our success is to stay fresh, a step ahead of the game, and on top of things. RoR is the next big thing, and now is the time to hop on board. Just look at some job boards lately – the .NET market has become insanely saturated. It’s the never ending cycle that drives our industry to innovate. It’s also the cycle that makes our industry fun. Yet it’s also the cycle that we need to constantly be aware of and not become complacent with any single technology / platform.

Dare I use the term web 2.0? Yes, I do dare, because that’s the term we use when we want to describe a set of ideas and technologies that make up modern web apps. What does ASP.NET provide for us dedicated developers to web 2.0-ize our apps? AJAX extensions? I’ve been using those extensions since the very first beta of ATLAS, and they still suck. That’s right, they suck. The performance is crap. AJAX is built right into Rails. Built right smack dab into the framework because that is what we should expect from a modern toolset.

Reason #6 – Rails is easier to Test than Not Test

Here’s what some of us do in the ASP.NET world. I’m not saying I do it, or you do it, I’m just saying a lot of people do do it.

We write some code, develop some web pages, fiddle with our middle tier, compile it, slap it on a test server, and tell our client to go check it out. They check it out, and send you an email saying “When I clicked this button I got an error”. We look at the error, look at the page, realize the client was stupid and put the date in backwards before hitting submit (silly UK client). We throw in a date validation and publish the page again. Send our client an e-mail explaining the issue, and wait for more feedback. The client replies to the email saying “Okay, thanks, but when I clicked submit this time I got this error”. We look at it, and realize the stupid client didn’t actually select an item in the drop down. And thus continues the cycle until the client has lost all confidence in your application.

Now, I’m not saying Rails prevents developers from developing in such a shoddy manner, but what I can say is that Rails makes it dead simple to test these scenarios and find these sorts of problems before your client does. That’s a great thing.

Reason #7 – Ruby on Rails is Fun

Fun? FUN? What does that have to do with anything? Well, we’re programmers because programming at one point was fun and exciting. We cherish that first time we wrote a silly little BASIC program with all those horrible gosubs and it worked. We showed it to someone who pretended to be impressed that you wrote yet another calculator, and it added fuel to the fire. Somewhere down the line programming ceased to be fun and became more like work. It became more like a chore of redundant donkey work that paid the bills. It still had some sparks of that initial excitement from project to project, but overall it became…well, boring. But wait, why am I using past tense here?

Simple – I discovered Ruby on Rails and it’s a lot of fun.

More to come soon.

The problem with ASP.NET

Posted December 31, 2006 by Keith
Categories: Tressel

So during the last week (uh oh, I started a sentence with ‘So’, I’ve been in the Microsoft world too long) I’ve been hard at studying Ruby and the Rails framework (aka RoR). I’m an IT consultant, so I must have a client that just has to have their project done using RoR, right? Nope, not exactly. Matter of fact, I don’t know anyone which I work with using RoR.

Background check: I’ve been working with the .NET platform since 2001. I was one of the lucky few that got to cut my teeth on some of the private alpha builds of Visual Studio .NET before most folks. Since then, I’ve used .NET on every single project. Everything from thick WinForm apps to Web Services, Remoting based architectures, ASP.NET, everything. There’s little of the framework that I haven’t worked with in some capacity.

Why then, with so much expertise with a growing, popular platform with a major vendor backing it, would I look at something like Ruby on Rails? Isn’t RoR the antithesis of the Enterprise culture you find in the .NET world?

Well, to answer that, it’s important to realize that comparing RoR to .NET side by side isn’t fair to either framework. Ruby, the language used for development, is nothing like C# or VB.NET. Rails, the framework used for web development, is really nothing like ASP.NET. However different, the desired end result is the same. As a developer I use either RoR or ASP.NET to create web applications. I want to do it rapidly, cleanly, and with a respectable architecture backing it up. So in this regard I feel I can take out a license to compare these two beasts.

Indeed, I have invested a considerable amount of time in my career becoming (disposing of all false modesty) an expert in ASP.NET. However that doesn’t mean I should to stay married to a particular platform/language/framework. Nay, as an IT consultant one must stay fresh, one must never stagnate lest one becomes a government employee. Woe to he who becomes merely satisfied with a single technology!

Besides, I am down right frustrated with ASP.NET! Frankly, I find myself with the same damn laundry list of items on each and every project. Of course I have my own architecture that’s matured on every project. Of course it’s a good architecture, conforming to Microsoft’s best practices and guidelines. Of course I have utility classes that are generic enough to knock off a couple of these routine laundry items. This isn’t good enough for me though. One could argue that ASP.NET gives you the “freedom” to create your own architecture and framework. Sure it does, but it also gives you a ton of donkey work along with it.

And another thing! I have found that once you begin using ASP.NET, you’re tied to Visual Studio for design work. Now, Visual Studio is great. There’s no IDE that can top it or even comes close. It has downsides though. I’ve had more fun smashing my finger in my car door than trying to work with an ASPX page in both Dreamweaver and Visual Studio. They don’t like one another, and in order to use Dreamweaver for what it’s good for (page design) and Visual Studio for what it is good for (coding & solution management) you end up sacrificing a ton of features in both tool-sets. They become so watered down neither tool-set really shines at what it does.

And…and..another thing! As I learn more and more with Rails, I see just how dated ASP.NET seems. Okay, I have to use a term I absolutely despise, but Rails is web 2.0 oriented. There, I said it. Truth of the matter is that this whole web 2.0 thing is here to stay and grow. It’s the mindset, or the ideas, of web 2.0 that is/are important. The simplicity. The whole “it just works” thing. Rails is conducive to this mindset, and that’s great.

I’m not giving up entirely on ASP.NET. Certainly not .NET as a whole. There just isn’t a better way to create Windows based applications than .NET. I’ve discovered Ruby on Rails though, and so far I am loving what I see. The purpose of this weblog is to jot down why I think every ASP.NET developer should check out RoR. It’s to journal what is good about RoR, what’s bad about it, and how ASP.NET compares (again, for the end result, not side by side).

So if you’re interested in this endeavor, please continue checking out this little corner of the blogosphere (man, I hate that word too!). Don’t be scared to leave feedback, either.


Follow

Get every new post delivered to your Inbox.