Creating Markdown Blog with ASP.NET and C# - Part 1
Introduction - In my previous post, I've discussed why Markdown is used widely by developers. If you haven't read it, you can find it here. In this post, I will show you how you can create a really simple blog with Markdown using ASP.NET and C#.
Let's get started
- Visual Studio 2015 (see here)
- ASP.NET MVC
- Some Markdown files/contents - Knowing Markdown syntax is a plus.
- Resharper Ultimate (Optional, see here) - It is offered free for Student, but you'd have to renew every year. This is only used to ensure that your code is pretty.
Let's get started
- Open up Visual Studio 2015 Community Edition. In the Start Page that shows up, select New Project... If Visual C# is not the selected item on the left pane, open up Installed -> Templates -> Other Languages -> Visual C#.
- Under Visual C#, you can select different kinds of projects that you want to develop, i.e. WPF Application, Console Application, Blank App (Universal Windows), Class Library (Portable), etc. For this post, we will pick ASP.NET Web Application. And pick a good name for your web project.
- After choosing your new C# project, now Visual Studio will ask you to pick what type of ASP.NET project you are developing. In here, you want to choose the most recent, stable version, in this case ASP.NET 4.5.2 Templates -> Empty. Make sure that the option for MVC is checked so that you don't have to worry about adding the right packages later on. If this is the first time you're creating a new ASP.NET project, turn off the option to Host in the Cloud, under Microsoft Azure, unless you know what you are doing.
- Once Visual Studio is done creating your project, take a look at the project structure under Solution Explorer. It should look something like this
- If you are familiar with ASP.NET, you will probably recognize this project structure. This is a ASP.NET MVC project. MVC is a design pattern that is mostly used in web application and application development. It is a model-view-controller pattern that helps in organizing and separating between internal models and user interaction. The reason behind this is because UI changes more often than the internal model. Thus, view is separated from the model and the controller will intercept between user and model. The controller will also update the view to reflect data changes accordingly. More information can be found on this Wikipedia article.
- Congratulation!! You have just created your very first ASP.NET project.
|Creating New ASP.NET Application Project|
|Selecting ASP.NET Templates|
|ASP.NET Empty MVC Project Structure|
That's it for now. In the next part, we will begin to start building on top of this post. Stay tuned.