POSTS TAGGED ON "ASP.NET-MVC4"

How to create a simple blog using ASP.NET MVC - Part III

Our JustBlog is in a pretty good state. Yep! still we got some important things to accomplish before we think about release. One very important thing that's missing is the "commenting system". In this final part, we are going to see about integrating Disqus commenting system to our blog. Also, we will integrate two more services: AddThis and Feedburner, for sharing and subscriptions.

Honestly, the ways we referenced Scripts and CSS in views are not good. We are going to tidy them up by utilizing the bundling and minification feature. We also completely missed exception handling. Luckily, we got ELMAH! which is an error handling/logging library which takes care of that job.

Before we wind up, we will see how to create a contact page and also we'll take necessary steps to make our blog SEO friendly.

JustBlog Part III

JustBlog Part III

Continue Reading

How to create a simple blog using ASP.NET MVC - Part II

In the first part of the series, we have completed the basic functionalities of the blog. We have completed the functionalities to display the latest blog posts, display posts based on categories, tags or search for interested posts. We also created sidebar widgets to display the categories, tags and latest posts.

In this part, we are going to see how we can create an admin console to manage posts, categories and tags. We need a grid control to display the posts, categories and tags. We can't use the ASP.NET grid control because they works based on ViewState. We are going to use a jquery plugin called jQGrid which provides many functionalities required by a typical grid like pagination, sorting, filtering, column resizing and much more. jQGrid is easy to use and most importantly it has a pretty good documentation.

JustBlog Admin Console

JustBlog Admin Console

We'll see how to secure the admin page through Forms Authentication. Not only that, we'll also see how to write unit tests for controller actions using NUnit and Rhino Mocks.

Continue Reading

How to create a simple blog using ASP.NET MVC - Part I

There are different ways we can learn a technology: by reading books, by attending conferences, by doing samples and more. I think one of the best way is by creating something useful out of it. One of the useful thing that you could create easily is a blog. In this multi-part series, we are going to learn ASP.NET MVC step by step by creating a blog from scratch.

JustBlog

JustBlog

To keep things simple we are not going to build the commenting system instead we are going to use Disqus. I encourage you to build the commenting system by yourself and that would be a good exercise for you.

We are going to use ASP.NET MVC 4 to develop the application. I'm not good at Entity Framework and we are going to use Fluent NHibernate/NHibernate combo to build the data-access system. You could use Entity Framework if you like. Finally, we are going to use Ninject for dependency injection because of it's simplicity.

In the first part of the series we are going to build the basic infrastructure of the blog. We are going to create the necessary model classes, data access components, controllers and views. At the end of this part we have a working blog where we can see the latest posts, read a complete post, browse posts based upon a category or tag and even search for interested posts.

In the second part, we are going to build an admin console to manage our posts, tags and categories.

In the final part we are going to integrate Disqus commenting system with our blog. We also see about integrating AddThis, FeedBurner for sharing and subscriptions. Last but not least, we also take necessary measurements for SEO.

Continue Reading