If you are more inclined towards Web development without all the bells and whistles of Visual Studio 2012 and Microsoft platform integration, you might want to check out the recently released WebMatrix 2. Microsoft promotes it as a development tool for building open source Web applications, and we will examine that claim later in this post. For now, let’s take a quick tour of the latest version of WebMatrix.
Did I mention Web Matrix 2 is available as a free download? It utilizes the Web Platform Installer, so you may need to install it along the way. Once installed, the interface is simple to use.
The screen in Figure A is presented once you launch WebMatrix 2. (Well, the checkbox in the lower left allows you to avoid it, but it will open the first time you use the tool.) It allows you to open an existing site that you previously created, create a site from a template, or create a solution from Web Gallery.
The initial screen presented when WebMatrix 2 is launched. (Click the image to enlarge.)
Figure B shows the options presented when you select the Templates option. Notice that on the left, it allows you to view site templates for ASP.NET, PHP, Node.js, and HTML. While these may be good for future projects, they are also good for taking a quick tour of the WebMatrix 2 tool.
The screen presented when the Templates option is selected in Figure A. (Click the image to enlarge.)
I select the Starter Site template, and the system sets it up as shown in Figure C.
WebMatrix 2 creates a new site using Starter Site template. (Click the image to enlarge.)
Figure D shows the new site opened with the Default.cshtml opened in the files workspace. The lower right of Figure D shows the different ways to maneuver a site — view the Site and settings, Files (displayed), Databases (if used or create one), and Reports. The Reports option allows you to analyze a site for errors like broken links or warnings like missing HTML attributes.
Site based on Starter Site template opened in WebMatrix 2. (Click the image to enlarge.)
One of the more useful features of WebMatrix2 is the Web Gallery, which allows you to build a site using an open source framework or application. Figure E shows you the page displayed when App Gallery is selected in Figure A. As you can see, popular options like WordPress, DotNetNuke, and Drupal are available, as well as my favorite Umbraco CMS. Considering this is a Microsoft product, it is odd to see such open source stalwarts readily available and embraced by the Microsoft monolith. Once you select an option from the Web Gallery, you are prompted for necessary data (depending on the product) like database backend, and the system churns and creates the site — this can be a lengthy process, so sit back and relax. As an example, MySQL, PHP, and WordPress are installed if/when you choose WordPress.
Web Gallery options available in WebMatrix 2. (Click the image to enlarge.)
Using WebMatrix 2
I have a friend who likes to call WebMatrix 2 a glorified code editor. He is a big fan of Visual Studio, so WebMatrix does pale in comparison. However, WebMatrix 2 offers a simple interface with plenty of site options via the templates and gallery. In addition, it fully supports code development via IntelliSense to help you get syntax right. When creating an HTML/CSS mockup, this was a great asset to get things right. Given these features, WebMatrix 2 is a good option for those new to Web development.
Testing your site via WebMatrix 2 is as simple as selecting the Run button in the top left of Figure D. It allows you to select the target browser or device to use to open the application. (My installation includes Google Chrome, Internet Explorer 8, and Windows Phone.) You can install additional add-ons to build or test applications on an iPhone, iPad, and so forth.
The final step in the development process with WebMatrix 2 is publishing the site to production. Since this is Microsoft, Azure is the preferred target, but you can enter your own host to push the site to that target.
Gets the job done
In the end, I will stick to Visual Studio, but the choice is yours unless your organization pushes toolset standardization. Regardless, give WebMatrix 2 a test drive to determine if it fits your needs.
Keep your engineering skills up to date by signing up for TechRepublic’s free Software Engineer newsletter, delivered each Tuesday.