Over the last few days Scott Guthrie has been blogging about new technologies that we’re delivering to make your life as a professional web developer even easier.
– You saw IIS Developer Express, and how it provides you with a simple and lightweight server that is fully compatible with IIS, allowing you to build and test applications on your developer machine, using a server with the same codebase as its production counterpart.
– You saw SQL Server Compact that gives you a great, lightweight database engine on which you could run Web applications. Not only is it super light, but it is also entirely file-based, so if you use a low-cost hosting provider, you don’t need to have a separate database server, saving you time to deployment, and most likely saving you money too.
– Then you looked at the new inline coding model for ASP.NET, which we’re working on as a new View Engine for ASP.NET MVC. Its syntax is easy to write, simple to learn and works with any text editor.
In addition, we’ve made significant investments over the past year to the Microsoft Web Platform including delivery of the Windows Web App Gallery, the Web Platform Installer (which simplifies acquiring, installing, and configuring the Microsoft Web Platform technologies), URLRewrite, WinCache, FastCGI and many, many more technologies that make Windows the best place to build, deploy and host Web sites. Through these efforts we have seen over 8 million product installations and 2 million community application installations over the last 9 months.
While these technologies in and of themselves are fantastic and will be a great addition to any current Visual Studio user’s toolbox, there is more that is needed to provide a free, simple and end-to-end completed solution. Our goal – a product that is everything you need to get started building websites on Windows, designed for anyone who wants to build or customize a website.
We recognized that we needed a new product to complete our portfolio of offerings for Web developers and better service web agencies, small development teams within SMBs, hobbyists, and students. With WebMatrix, we are simplifying how you build Web sites on Windows and including everything you need to build, run and deploy your Web site for free.
WebMatrix is a free, and easy way to build Web sites for Windows. It includes IIS Developer Express (a development Web server), ASP.NET (a Web framework), and SQL Server Compact (an embedded database) all in less than 50MB. It streamlines Web site development and makes it easy to start Web sites from popular open source apps, many of which are available today in Microsoft’s Web App Gallery. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server. When you are all done you can ensure that you have maximized your audience reach through integrated Search Engine Optimization (SEO) and then find the best offer from a hosting provider in your area and put it on the internet. It is an end-to-end solution and experience for creating Web sites.
Get WebMatrix Now
If you don’t have it already – and why would you because we just announced it – scoot over to http://www.microsoft.com/web and from there you can download and install the new Web Platform Installer. Use this to install WebMatrix using the big, friendly ‘Install WebMatrix’ button on the ‘Getting Started’ tab. Then, start giving us feedback on how we can make this even better for you!
Once you’ve installed WebMatrix, you can run it, and you’ll see this welcome screen:
Building a Site
If you don’t want to start building from scratch, then the thing that might strike you about this is the ‘Site From Web Gallery’ option. If you’ve used the Web Platform Installer, then you might be familiar with the Microsoft Web App Gallery, which provides a very straightforward way to get access to the most common open source applications built on ASP.NET and PHP.
It’s great in that it figures out all the dependencies a particular application needs and installs them, along with the application, in a single shot.
WebMatrix takes this a step further, pulling this into your development environment, so you can simply say something like File->New->WordPress or File->New->DotNetNuke. This should save you lots of time when building sites!
Of course, you aren’t limited to open source applications, you can create new sites or applications yourself, and the ‘Site From Template’ option gives you this. We’re shipping with a few templates to get you started, and we’re working on new templates all the time. Some of these templates include databases built on SQL Server Compact, and code to access them that uses the new Razor syntax.
One example of this is the ‘Bakery’ sample application. Create one of these, and it’ll look something like this:
WebMatrix is divided into four workspaces, accessible via the tabbed dialog on the left of the screen.
Site: This tab gives you everything you need to manage your site, including the ability to monitor the requests coming into your site, in real time, allowing you to debug and trace runtime faults. It also includes an integrated list of Windows-based Web hosts, so you can find the one that suits your needs. It also has the ability to allow you to configure your deployment settings, so you can just publish directly to your Web host.
One really cool thing about the programming syntax is the addition of Web Helpers. These use a single line of code in most cases to encapsulate common programming tasks. So, for example using this:
will give you a styled view of Twitter entries that contain my name and that looks like this:
We’ll be shipping with dozens of helpers, including social networking links, database grids, captcha, rich media using Silverlight, Windows Media or Flash, and building a community create thousands more.
Databases: As you might imagine, this gives you the ability to create, edit and update your databases. You can either use the SQL Server Compact file-based databases, using the .SDF extension, or you can connect to other databases such as SQL Server or MYSQL and edit them here. It also has integrated tools to allow you to migrate your database to SQL Server, so if your site needs to grow to be hugely scalable – there’s a solution for you, and the tools to get to it are built right in.
Reports: The Reports tab allows you to run an SEO audit on your site, which will crawl through your site and find any issues that might affect your ranking on a search engine. Because it’s fully integrated, it not only finds the issues, it tells you where it found them, and gives you advice in how to fix the issue, while also allowing you to link directly to the file that caused the issue. You may have used the SEO Optimization tool that I blogged about before [[link to previous blog post]], but having it integrated into your workflow makes it even easier.
Running a Site
Clicking the Run button in the toolbar will launch IIS Developer Express, and execute your site using it.
You can see what IIS Express is doing using its System Tray icon, which allows you to inspect the URL, including the port on which the site is running, as well as giving you the ability to stop the application from running.
As your site is running, you can click on the Site tab, and select ‘Requests’ and see the requests hitting your site in real-time, potentially helping you track down runtime problems, so for example, here you can see that I don’t have a robots.txt file, and when the browser looks for it I get a HTTP 404 error.
Your projects built with WebMatrix will of course work with Visual Studio, so if you are new to developing with Microsoft, and want to upgrade, you can do so easily, and install the free Visual Web Developer Express directly through WebMatrix, and if you have it already, you can launch it directly from WebMatrix. You can see the Visual Studio launch button here (you can see it when you select the Files tab)
This has been a whistle stop tour of WebMatrix, and barely touches the surface of the possibilities. You can learn a lot more on http://www.microsoft.com/web/webmatrix, or on http://www.asp.net/webmatrix !