Posted on 8/17/2010 11:50:08 PM by Justin Etheredge
I'm gonna go ahead and say it... I don't think WCF is all that bad. In fact, I think it can be pretty easy! I hear lots of complaints about it, and many of them valid, but by far the biggest complaint I hear is that it is just so darn difficult. Especially cause of all that xml configuration. Holy crap I hate XML configuration! (If you want to complain some more, I'm on Twitter) And because it is perceived as difficult, it is often overlooked in favor of ASMX web services because they "just work".
While normally I would be the first in line to use a tool that "just works", in this case I think that WCF is carrying around baggage of its earlier incarnations. I want to show you that as of .NET 3.5, WCF can be just as easy for setting up web services as ASMX, and that you no longer need to fear it. Or fear the day that Microsoft deprecates ASMX web services.
Continue reading the rest of this post...
Posted on 6/22/2010 12:08:43 AM by Justin Etheredge
Thanks to all of the functional goodness that was put into C# 3.0 we have a ton of power at our disposal. Unfortunately with a lot of this power also comes increased complexity. Programmers usually exacerbate the complexity problem, because unfortunately we often like to sound like we are smarter than we actually are.
We often like to use big words and lots of acronyms to scare away the neophytes. Oh crap, there I go again…
Anyways, one of these topics that is blindingly simple is closures. But I continue to see definitions that are as clear as mud to the average developer. Let’s go ahead and look at the Wikipedia definition of a closure:
“In computer science, a closure is a first-class function with free variables that are bound in the lexical environment.”
All clear, right? Well, if it is for you, then super… you can stop reading. But if not, and the next time this topic comes up you want to sound like Super Duper Computer Science Guy™ ... then keep reading.
Continue reading the rest of this post...
Posted on 5/26/2010 11:57:48 AM by Justin Etheredge
I’ve received more feedback via e-mail on SquishIt than on pretty much any other post or project I’ve ever worked on in the past. I appreciate it! Most all of the feedback has been extremely positive, with people thanking me for creating such a great tool. Well, I don’t know how great it is, but people seem to like it!
Anyways, the one complain that I keep hearing over and over again is that I need to create a better guide to using it. And I agree, even though SquishIt is a breeze to use, I still need to provide a better "getting started" document.
But before I start rambling, let’s get on with the tutorial….
Continue reading the rest of this post...
Posted on 4/26/2010 8:54:22 AM by Justin Etheredge
Just the other day I put a tweet out on Twitter where I exclaimed that I am not a fan of XML based build systems. Yes, I understand their purpose, and yes they were great in their time, and yes I still use them on almost a daily basis, but I really think that we have better ways that we could be doing this. The most common response from my tweet was “but was is the alternative?” And I thought, yeah, one of the most important things that I have learned in my lifetime is that you never complain about something unless you have a solution. And so I am here today to propose to you a solution…
The Problem With XML Based Build Systems
Before we get into this entire discussion, let me ask you a question… what is it that developers do better than anything else? Got your answer? Well, I know what mine is, and that answer is “write code”. And if that is the case, then why are we so intent on shoving things into giant xml files? Why can’t we write code? The usual argument is that XML based applications allow us to more easily make changes without recompiling, they allow for more flexibility, and they make it easier to write tooling since they are based on a format that everyone can parse. But personally, I don’t think that they offer much value, and instead are the project of the XML hysteria that swept through the programming world a few years ago. In fact, those of us who have been working with these XML based build tools for years probably forget just how ridiculous and obtuse they looked when we first saw them.
So while many people are quick to extol the virtues of XML, they often people forget to point out all of the things we lose when we start writing code in XML. For example, how about all of the tools that our industry has spent so many years crafting and refining. We lose our editors, debuggers, libraries, and all of the other tools that we use in order to get a few minor advantages that XML provides us. Those XML files limit us to the degree where we often find ourselves falling back to writing custom tasks in order to get around those limitations. Custom tasks which are not written in XML, but instead have to be written in code, since after all, the XML in these files is really just a hideously complex configuration system for the code which is actually running underneath.
Continue reading the rest of this post...
Posted on 3/21/2010 9:40:15 PM by Justin Etheredge
I just pushed up a few minor changes to Bundler, my framework for combining and compressing JavaScript and Css, I also fixed a few bugs and cleaned things up a bit. The big thing I added was named bundles. I personally don't have a huge need for this feature currently, but I have worked on sites in the past where this sort of thing would come in handy. Let's take a quick look at how it works...
Continue reading the rest of this post...