Tuesday, October 30, 2012

A Simple Data Grid for ASP.NET MVC 3 and 4 - Part 1

One of the most useful and often overlooked features of ASP.NET MVC 3 and 4 is the ability to create and use Simple Data Grids. Unlike prior versions of ASP.NET MVC which did not have built in support for Data Grids, the latter allows you to fairly quickly create a Grid wich includes Sorting of Columns as Well as Paging.

Here is a short example of how to do that. Create an MVC 3 or 4 Web Application Project. First let's create a Model called "Person" for our Data, which will hold the data for us:



 In the Home Controller (HomeController.cs) of it under the Index Action Method, enter the following to generate some fake data for us and pass it to the view (of course one could query the database to do the same here):




Last but not least, on the Home View (Index.cshtml), add the following code:



Once you put it all together, you will get a simple Grid that looks like the following:



































Of course there is a lot more you can do with the Grid, but this is definitely a great start! Feel free to download the Source Code of the above Test Project below (Visual Studio 2012 Solution):

Download: GridTest1.zip

Want to see the whole thing in a video? Take a look at this clip:



Pete Soheil
DigiOz Multimedia, Inc.
www.digioz.com


Tuesday, October 16, 2012

ASP.NET MVC Forum Software

With the ASP.NET MVC Platform becoming more and more popular, there has been an increase in the need for Developers to find Forum Software that are also in MVC and are open source or free, in order to integrate it with their Web Applications. Let's however keep in mind that one can also install and use non MVC Forums and even PHP based Forums such as PHPBB or vBulletin (assuming that you have PHP installed on your Web Server) and they work fine, even though a full integration may not be possible in those cases.

While searching for a good list of ASP.NET MVC Forums online I noticed there isn't one, so I figured I start a list here and keep adding to it as time goes by both for myself and others looking for the same thing.

Here is a list of functional and production worth ASP.NET MVC Forums:


  • Open Forum - This one is a very basic Forum that is a plugable module for ASP.NET MVC Applications. It assumes that you have started your Web Application with the default Authentication that comes with the Internet Template, so there are some limitations to it. 
  • MesoBoard - Open Source ASP.NET MVC 3 C# and Entity Framework based Forum that is currently in Beta that is designed as a stand alone application which can be modified into your application using the standard MVC pattern. This one is a lot more complete and has most of the features a decent Bulletin Board software should have. 
  • AzureBrite - The Azurebrite system is a CMS system written in ASP.NET MVC 4, CSS 3, HTML 5 and JavaScript, which among other things has a Forum Module. The forum module is currently extremely basic, but it would be interesting to see how it evolves over time. Other modules provided on this system include Blog, HelpDesk, Comments, Gallery, Ecommerce, Maps, Contact, Booking and Video. 
  • CoolForum - A Forum built on ASP.NET MVC which promises to provide Web 2.0 features, Unit Testing and ORM Framework such as NHibernet and LINQ to SQL. The project hasn't seen a whole lot of activity as of late but it is Open Source so the Source Code can be downloaded and modified to fit your need. 
  • MVC Forum - This one is a simple yet complete Forum built using a provider model, which let's you easily exchange any parts of it you don't like. It includes PHPBB styled themes which you can further extend by creating new themes for it yourself. The project is currently in Beta, and the source code can be viewed on CodePlex HERE
  • MVC Forum (2) - Another MVC Forum, which is different then the previously listed MVC Forum.  It has an easy to customize code base with a full theme engine, pluggable architecture and a Management Dashboard.
  • NearForums - An Open Source SEO friendly ASP.NET MVC Forum Engine, which runs on both IIS and Apache Servers interestingly enough! This one is again a very simple forum with not a whole lot of features, but looks promising. It is currently in a Stable release, and the source code is on CodePlex HERE.
  • POPForums - An ASP.NET MVC Forum which is a very Simple Open Source Forum currently a single man effort by the author of it Jeff Jones (who apparently prefers to be the only one working on it). It is certainly a good start but I wouldn't expect rapid updates to the project any time soon because it is short staffed. 
  • JitBit Forum - An ASP.NET MVC Forum Software built with the Developer in mind, which easily integrates into your existing project. Again this is an extremely basic Forum which requires a lot of custom configuration and manual creation of the database, so you do have to be a programmer to use this one. The source code can be downloaded HERE.
  • SubForum - This Forum is an ASP.NET MVC and AJAX based Forum which is combined with a Q&A Site, Blog, Wiki and ScreenCast, and is essentially a ready to launch website. 
And here are a few more that are mostly in Alpha most of which seem to be abandoned at this point:
  • mvcBB - An ASP.NET MVC Port of a popular Bulletin Board (BB) Forum Engine. This project is currently in Alpha development stage and is not yet usable by anyone, but I sure like what the creator of it Kevin Ortman promised back in 2010 (still no progress though 2 years later).
  • Infancy - A Forum Application developed in ASP.NET MVC. This project is in Beta and does not yet have a release, but the source code is available for general use. 
  • ForumMVC - Another ASP.NET MVC Forum, again very simple and basic features. It is currently in Stable development stage and available for download. 
  • GNSystem - A simple yet not so elegant Web Application which includes a Forum System as well as a CMS and Blog System. It uses MVC 4 and C#. There is currently no official release but the source code is available for download. 
  • NetXForum - An ASP.NET MVC AJAX Forum, which comes with a Theme Changer with jQuery UI Theme, AJAX page loading, Drag and Drop Widgets and AJAX Search. The project is currently in Alpha, but available for download and use.
  • NexForum - A lightweight and customizable ASP.NET MVC 3 Forum, which is currently in Alpha. There are no downloads available for this Forum but the source code can be downloaded and used. 
  • MyForums - A multi forum software package developed in ASP.NET MVC. It is currently in Alpha but the source code is available for download and use. 
  • mForum - A full featured ASP.NET MVC 2 Forum coded in C# and targetting .NET 4.0 (at least it will be at some point). The project is again in Alpha, but the source code is available for download and use. 
If I missed any of them please post a comment below and let me know, and I will be happy to add it to the list. 

Going through the list above, it becomes very obvious just how far behind PHP technology Microsoft ASP.NET Technology in general when it comes to Forum Software (both Free/Open Source and for Pay). It would make a lot more sense for the authors of the various forum software above to put their resources together and come up with 1 full featured, production worth Forum software that comes even close to the same level of functionality as vBulletin or PHPBB. Until then, the above list is the best we can do I suppose!

Thanks,
Pete Soheil