Archive for September, 2009

Who Cares About ASP.NET MVC?

Sep 26 2009 Published by under Programming

who-cares-about-me

More and more people are beginning to ask me this question: Why should I care about ASP.NET MVC?

Joe Six Pack and ASP.NET Web Forms

As much as the .NET elite like to complain about ASP.NET Web Forms, the bottom line is that many Joe Six-pack corporate developers are very happy with it. Most of their job consists of building data entry forms as quickly as possible.

Web Forms easily, though maybe not elegantly, achieves this goal:

  • Need a list of data? Just drop a gridview.
  • Want paging? Fine, just turn it on.
  • You want validations? Just drop a validator.

So many features are provided for “free”, and if there’s something that it cannot do there’s a thriving third-party ecosystem. But with all these benefits, ASP.NET Web Forms are not perfect.

Are Web Forms Evil?

While Web Forms are not evil, they do have some issues:

  • ViewState: ViewState is a wonderful abstraction when it works properly, but sometimes ViewState can grow into a monster. It can become bloated and seriously compromise the performance of your application. While it can be turned off, most developers are not aware of how to do that without breaking other parts of the application.
  • Mangled HTML and URLs: Because the HTML in Web Forms is spit out from controls, you do not have control over the end-product. If you want a div-driven layout, for example, you better hope that your control supports that option. And if you want to access your control IDs via JavaScript, you will have to jump through hoops. As for URLs, they will often be rendered as JavaScript post-backs rather than true URLs.
  • Event System Complexity: The idea of building the web around an event-based system probably seemed very natural to Microsoft given that Visual Basic and the Windows API are so event-driven. And it did make the transition simpler for existing Microsoft developers. But the sheer number of events that be fired along with keeping track of which events fire when is often confusing and overwhelming to most developers.

So, if Web Forms has these problems, let’s see how ASP.NET MVC solves them.

Does ASP.NET MVC Solve the World’s Problems?

ASP.NET MVC does not solve every problem, but it does give the developer much finer control of their application. I like how Scott Hanselman described ASP.NET MVC as “Web Forms Unplugged”:

This is a not just a different tune, but a whole different band playing all new music. Not everyone will like the music, and that’s why the world has more than one band. This is a Good Thing.

I like to think of ASP.NET MVC as the raw, acoustic version of the more heavily produced and multi-layered ASP.NET WebForms we use today.

In other words, you do a lot more yourself. And what does MVC give you for all this extra work?:

  • Testability: Because ASP.NET MVC enforces a true separation of concerns with the MVC pattern, you can easily test by calling methods on your controller just like the real application will do in production.
  • Clean URLs: URL routing is baked into ASP.NET MVC so it’s trivial to make URLs look like www.mysite.com/blog/post/2 rather than www.mysite.com/blogpost.aspx?id=1. Cleaner URLs result in users being able to browse the site more intuitively and allows google to better index the site.
  • Clean HTML: In ASP.NET MVC your HTML is not spit out from various controls, instead you roll your own. This is more work, but provides lots of benefits like manageable Client IDs for use in JavaScript functions and leaner HTML for client downloading and Google indexing.

All of these benefits are great, but with the finer grained control, you do lose some of the rapid app development, or RAD,  that comes with ASP.NET Web Forms.

Conclusions

At the end of the day, ASP.NET MVC is an excellent new tool for the tool belt. There are situations where I would use it, and others where I would still use Web Forms. At the end of the day, it’s nice to have options.

If you are considering one or the other, I would summarize with the following:

  • If RAD is important to you, and you do not need fine control of HTML or URLS then choose Web Forms. This will typically be the case for internal corporate apps.
  • If you need fine control of URLs or HTML and testability is important to you, then choose ASP.NET MVC. This will more-likely be the case for public websites.

View Comments

Google Analytics vs WebTrends: Tracker Smackdown!

Sep 22 2009 Published by under Programming

smackdown

In the Beginning

About 5 years ago (eons ago in internet time), I worked on a project where we wrote our own sophisticated website analytics tracking code. It logged browser visits and page-views via a combination of client site and server-side code.

On the back-end, we filtered out bots based on hit frequency. Then every month we loaded it all into a data warehouse for drill down reporting. This was a large project that probably took six months to implement.

Back then, the products were immature and really didn’t give you a lot of options when it came to sophisticated web analytics. If you wanted something fancy, you really had to write it yourself.

Enter the Marketers

Fast forward to today, and I would rarely recommend that a client write their own analytics. Everything that I described above is built into off-the-shelf products which probably do a better job than you could even write on your own without a very large budget.

So what changed in those five years? Advertisers came to the web in a big way.

Remember there was actually a time when Google did not believe in advertising?Nowadays, of course, that has changed and Google makes the majority of their money from advertising. 

Here’s a recent sample of the continued growth of the online advertising steamroller:

This week, DMNews revealed a very encouraging report from Forrester Research that predicts that total spending on online marketing per year in the U.S. will surpass $55 billion by 2014.  This online spending is projected to represent twenty-one (21%) of domestic marketing dollars, and is yet another indication that more and more companies are shifting more and more advertising dollars away from traditional channels and into search marketing, display advertising, and social media.

….Forester Research discovered that “marketers faced with budget cuts and the need for immediate sales in recessionary times turn towards interactive tools that are less expensive, more measurable, and better for direct response than traditional media.

The key phrase is “more measurable” and that’s where the web analytics tools come in. There is a huge market for those tools because they allow advertisers to determine the effectiveness of their campaigns and where to target their dollars.

Into this highly contested market, steps our two competitors — Google Analytics and WebTrends. I recently worked on a project for a client where I had the opportunity to look at both of these analytic solutions up close.

Web Trends

Let’s just get this out of the way first. Web Trends is the 800 lbs gorilla of the web analytics market. Pretty much any feature you could want, they have.

Here are some of the more interesting ones:

  • Client AND Server-side tracking: Most other people support one or the other. WebTrends does both in an effort to capture the highest quality data.
  • Large number of sophisticated built-in reports: After it processes your dataset, you have access to hundreds of reports covering all areas of your site from technical to marketing to sales.

screenshot_webtrends

  • Full control of your data: Assuming you go with their software version (rather than their hosted version), all of your data is easily accessible and stored on your own servers.

So with all these great features….what’s the con? It really boils down to cost of ownership.

Just to get out of the gate, a software license for WebTrends will cost you upwards of 5K. Not to mention they recommend dedicated hardware for your WebTrends installation. And for good reason, in my tests, it nearly pegged the processor of a moderate server while parsing the IIS log file.

I also had much more difficulty installing and configuring WebTrends than Google Analytics. You would definitely want an expert on staff to set-up and maintain WebTrends. That said, once WebTrends was running it produced some gorgeous reports.

Google Analytics

While Google is not a small player on the web by any measure, analytics is not their core business. In fact, they give their analytics product away for free. So, it’s obvious they are targeting a different market than WebTrends.

But don’t write off Google Analytics just because it’s free. It still includes many great features like:

  • Easy Set-Up: They make it incredibly simple to create a new account and then give you the exact JavaScript to insert into your pages. Depending on the complexity of your site, you can be up and running in under an hour.
  • Polished Graphs for Basic Stats: Google Analytics may not have every graph that WebTrends has, but they have all of the important ones. And they are polished with tooltips and drill-downs.

image

  • Custom Reporting and Export: If you don’t like the graphs that Google supplies, you can create custom reports using their drag-drop designer. They also recently released a Data Export API that you can use to pull the data locally and build your own UI.

Google analytics gives you a LOT for free. The real con is that you don’t have access to your data. It’s all living in the cloud and that makes a lot of people nervous. Even the data export API that Google provides does not let you export your data down to the visit level so you are pretty much at the mercy of Google. This may or may not be a bad thing.

Conclusion

It really depends on your needs and budget. I would view WebTrends as the “enterprise” solution and Google Analytics better suited for individuals and small businesses.

My recommendation is that if you are willing to commit the money and resources, WebTrends is a more fully featured product. But, if you are on a limited budget or cost sensitive, Google Analytics will give you many of the key analytic reports for (almost) free.

View Comments

What is Your Corporate Website Saying?

Sep 05 2009 Published by under Programming

If your Corporate website has a picture like this, you’ve failed:

people-computer

If your Corporate website has language like this, you’ve failed:

Our award-winning software provides an enterprise level best-in-breed solution that has been implemented worldwide by Fortune 500 companies.

Why? Because you look like everyone else and you’ve failed to communicate anything real. What has a potential customer learned by visiting your website?

Coding Horror has an excellent new post entitled If It Looks Corporate, Change It:

Happy talk is the kudzu of the internet; the place is lousy with the stuff…

And then there’s the visual equivalent of happy talk. Those cloying, meaningless stock photos of happy users doing … something … with a computer…

It’s a shame that this misguided sense of professionalism is sometimes used as an excuse to put up weird, Orwellian communication barriers between yourself and the world. At best it is a facade to hide behind; at worst it encourages us to emulate so much of what is wrong with large companies.

I couldn’t agree more!

When I created my first corporate site, I made all the same mistakes. I used the stock photos; I used the corporate double-speak; I tried to appear overly professional and offend no one. In the end, I said nothing.

Finally, I realized that we needed to do something different to stand out and say who we really were.

As I would browse the internet, the company sites that stuck with were not the bland corporate ones, but the ones that opened the curtain a bit and said what they stood for and what they’re passionate about in no uncertain terms.

In short, the best sites did some of the following:

  • Easy Trials: If you’re selling a software product, make it EASY for a user to try it out. Give them an obvious, simple, free 30-day trial. Whatever, you do DON’T make them call a salesperson. Most people don’t like talking to salespeople and won’t even bother.
  • Blog Posts: Blog posts are a great way to speak in a more human voice and to provide current, meaningful communication rather than marketing double-speak. Now, blog posts can be ruined as well by having to much involvement from marketing and legal so it’s important to keep them genuine.
  • Employee Profiles: Include some fun bios about your employees. What do they like to do in their free time? What really makes them tick and what are they passionate about?
  • DIY Photos: This isn’t for everyone, but one place that I worked at, actually created their own group photos for use on their site. They were pictures of the actual people that worked there. It gave a much more personal touch to their entire site.

Don’t let your site fall victim to corporate non-communication!

View Comments