Three chapters of the book contain a tutorial where the reader builds a complete ecommerce app, TechieTogs, from start to finish. TechieTogs is a fully-featured ecommerce app built using ASP.NET WebPages and Microsoft WebMatrix. The site features all of the elements you would usually expect to find on a shopping site, such as a catalog, shopping cart, and checkout. The product catalog is managed using a series of pages that are only accessible to site administrators.
The guys at Apress have agreed that I can make the sample app available on GitHub for anyone who wants to have a mess around with it. The repository contains all the files you need to run the app. Simply download the ZIP file, extract it to a suitable place and open in WebMatrix to run.
I guess the title of my blog is a giveaway to the fact that I am primarily an ASP.NET developer; at the moment mostly MVC 3, which is all kinds of awesome, for all kinds of reasons.
So here is a list of the tools that I can’t do without and that I think would be useful for anyone else out there who is wanting to build web apps on the Microsoft stack. This is the stuff that I would automatically install onto a new machine before I started development work on it.
Post any tools you love in the comments and I will check them out. I’ll keep the list updated as I find new cool stuff ™, so keep checking back. So here they are, in the order that my mind blurted them out:
The Microsoft Express products are basically FREE cut-down versions of full applications (in this case Visual Studio 2010). It is not as feature-rich as Visual Studio, but has all the tools necessary to develop ASP.NET applications. Ideal if you are a hobbyist programmer or a student. All projects created in Visual Web Developer Express 2010 are compatible with Visual Studio 2010. And did I mention it’s FREE?
Notepad++ is a free code editor, designed as a replacement for Windows Notepad with code syntax highlighting. Ideal for those times when you just want to edit a bit of source code, some HTML, or some CSS without having to fire up the whole of Visual Studio.
NuGet is a free open-source package manager for Visual Studio and Visual Web Developer Express that just makes it so ridiculously easy to integrate third-party libraries and tools into your projects it is untrue. Truly brilliant, I can’t recommend this enough.
Take a look at this brief introduction to NuGet by Phil Haack (note that this is for an older version)
Firebug and the IE8 Developer Tools both do essentially the same job, although each has it’s own strengths – they both let you inspect the source code, CSS and Scripts of any web page and any element within it. This is a fantastic way to learn how other developers have achieved a certain CSS effect or to inspect your output at runtime to find out what is really going on.
Another tool aimed at helping you to find out what is really going on. Reflector enables you to analyse compiled .NET assemblies in C#, Visual Basic and MSIL and is an invaluable learning and debugging tool.
I love Ninject. It is a Dependency Injection container which makes it possible to achieve real separation of concerns between your applications components. Ninject is very easy to use and does a good job of all the usual dependency chain resolution and object lifetime management stuff that you would expect from a DI container. Also very simple to install, thanks to NuGet!
NUnit is a unit-testing framework for .NET, ported from JUnit – the popular Java based framework. This is a completely standalone product, which is particularly useful if you are using Visual Web Developer 2010 Express which has no built in unit-testing.
Fiddler allows you to inspect all incoming and outgoing HTTP traffic. I find this particularly useful for debugging ASP.NET applications on your local machine by inspecting the HTTP requests and responses to localhost to look at cookies, header information, etc.
ELMAH stands for Error Logging Modules and Handlers and is an open-source error logging facility for ASP.NET. It will log almost any unhandled exceptions and display them back to you via the web. In many cases you can look back to see the original "Yellow Screen of Death", even if you have customErrors turned off. If you have NuGet installed (which you really should), just type “install-package elmah” into the Package Manager Console” and browse to elmah.axd to see the error logs. It really is that easy.
SketchFlow is a prototyping tool released by Microsoft as part of Expression Studio. It gives you the ability to quickly map out workflow and basic functionality to show end users, without having them concentrate on the UI. For once you may get some useful feedback instead of, "Can we try that in green?".
I was never a fan of mind-mapping, but I sat at in a meeting with an avid user of XMind and was very impressed. I have used it a few times since just to blurt out all my "neat ideas" about an application before I start a more formal design.
If you are a real hardcore developer you will run at least two monitors. I run three and I don’t think I could go back to anything less than that now. Windows can handle all this extended desktop goodness for you, but Ultramon just does a far, far better job. Go and download the free trial and you’ll see what I mean.
Microsoft are releasing a patch today for ASP.Net to fix the security vulnerability disclosed last week, which has the potential to allow users to request and download files in the ASP.Net Application (such as Web.Config) and decrypt data sent securely to the client (such as ViewState).
Obviously, this vulnerability is of huge concern and could have massive implications for the security of your site and the data used within it, so I would urge you to download and apply this patch at the earliest opportunity.
A webcast will be hosted today, September 28, 2010, at 1:00 PM Pacific Time (US & Canada) to answer customer questions. Click here to register for the webcast. The security update is fully tested, and is scheduled for release at approximately 10:00 AM PDT.
If you are unable to patch your server immediately a workaround is available, as described on this blog post by ScottGu.
As well as finding the new MSDN UK design this morning I also stumbled across
this great article on Depending Injection (otherwise known as Inversion of Control).
“Dependency injection is a technique used in object-oriented programming languages. It promotes loose coupling of components by passing dependencies to an object, rather than having an object instantiate its own dependencies.”
This is an awesome release, giving developers the ability to use sprites in web pages, without all the hassle which (let’s be honest) puts most people off at the moment.
For those who are unaware of sprites, they are a technique which became popular in the games programming arena in the 80′s where you combine all (or some of) your images into a single file and display just a portion of it at a time, usually using a top-left coordinate starting point, combined with a width and height to specify the part to be displayed. In games programming in the early days this was used extensively (and still is in a vast percentage of 2D games) as multiple cells of an animation could be combined in one sprite and loaded into memory once. This gave much smoother animation as you were simply displaying a different portion of the same image for each cell in an animation, rather that loading a new image in for each frame.
Why is this good for web developers? Well, each image you load into a web browser requires a separate HTTP request. By combining all the images into a single (or couple of) HTTP requests you can significantly reduce page load times. Plus, remember the reason that sprites were invented in the first place…. Just think of all the cool and crazy things you could do with a sprite and a bit of jQuery to make rollovers, animations, etc.
This framework enables the .Net developer to use sprites in a very straightforward way. It literally creates a combined image from the all images in a folder and allows you to use them as sprite images in the page, doing all the combining and css chopping up automatically for you. Plus you can seperate things out into subfolders and set maximum file sizes etc. You get all the benefit with virtually no cost in time or effort.
ASP.NET MVC 3 Preview 1 has been released on CodePlex. This release includes global Action filters, support for the new .Net 4 Data Annotation and Validation attributes and the Razor View Engine which everyone has been blogging about in the last few weeks.
Okay, so your site looks great, you have loads of useful content and your User Interface is life-changing, so why is no-one visiting it? Well, the chances are that your site doesn’t look so great to search engines. This is where Search Engine Optimisation (SEO) comes into effect.
There are many, many companies out there offering to increase your search engine rankings for (sometimes a considerable amount of) money. There are also a plethora of sites offering advice and several tools available which will analyse your site for SEO. However, most of these tools either charge or offer only a small toolset for a free version and we all know that advice from the Internet can mean a lot of trawling for fact/fiction, currency and usefulness.
So, in steps Microsoft with its freeSEO Toolkit. The tool plugs straight in to IIS and can be used to crawl your site and give you really in-depth analysis of exactly what a visiting search engine spider sees when it visits your site.
Now I’ve tried a few existing pieces of SEO software in the past but none of them has given me the ability to access all this information and certainly not in the way that this toolkit does. The SEO Toolkit allows you to build queries on the data and produce totally custom reports on it, along with a bunch of other really great features.
Microsoft have been releasing some really great tools for web developers recently, at a seemingly relentless pace, and this one from the IIS Team is right up there with the best of them. This video by Scott Hanselman will show you what I mean…