Tallan Blog

Tallan’s Experts Share Their Knowledge on Technology, Trends and Solutions to Business Challenges

Posts Tagged "ASP.NET MVC"

JavascriptHelper–Managing JS files for ASP.NET MVC

After working several years with the Castle Monorail MVC framework, I decided to try ASP.NET MVC to see if it had caught up to Monorail. The transition seemed to go rather smoothly, but one area where I was surprised to find how clumsily it was handled, was the management of JavaScript files. Basically, if some part of a page, say a helper or partial page, needed a particular JS file, you had one of two choices.
The first option is to have the part itself would write the script tag. This allows the part to operate as a “black box” – just drop it in and it works – But it means that there will be script tags loading file scattered throughout the page, and that the part needs to know your folder structure where you keep your JavaScript files. And…

MIX11 in review

I know this post is overdue, but I’m happy to say that in the time since MIX has elapsed, my wife and I have sold our condo and moved to a new home. I’ve also transition to a new contract, and I am excited to get my feet wet my new project. Despite the delay, it was a wonderful experience. This was my first year at MIX. The content, announcements, and the networking were all memorable. I only wish I could’ve attended all the sessions.
This year was filled with a number of announcements at the two keynotes I did my best to update my twitter feed with some of the cool ones.
The first keynote was focused around recent release of IE9, the next generation of web, ASP.NET MVC3, and HTML5, and the new release of IE 10 Platform Preview 1…

What’s New in ASP.NET MVC 3

I did a tech talk (an internal presentation for Tallan) on 11/30 with the intent to do a quick demonstration of the new features of ASP.NET MVC3.  Unfortunately (or fortunately, depending on how you look at it), there’s are just too many new features to cover in a 45 minute presentation.
I’m writing a series of blog posts to get a bit more in-depth on the new features of MVC 3.  I’m going to divide this topic into a number of posts to allow you to pick and choose what to learn about, and to attempt to keep your attention.  All of this in one blog post would be very lengthy and could get boring rather quickly.
In this post, I’ll keep it to a quick summary of the new features and a quick description of each.  We’ll get into more depth…

Multi Tenant Architecture via Dependency Injection: Part 3

Using Ninject and Dependency Injection to enhance your ASP.Net MVC application’s Multi-Tenant Application.

Multi Tenant Architecture via Dependency Injection: Part 2

Using Ninject and Dependency Injection to enhance your ASP.Net MVC application’s Multi-Tenant Application.

Multi Tenant Architecture via Dependency Injection: Part 1

Discover how to use Inversion of Control and Dependency Injection to enhance your web application’s Multi-Tenant Application.

Handle asp.net MVC session expiration

Here is a really simple way to handle a session expiration in asp.net MVC using a base controller.  Having all controller inherit from a basecontoller and overriding the OnActionExecuting event allows for checking the session before all actions are executed.
Here is the code
public class BaseController : Controller


protected override void OnActionExecuting

(ActionExecutingContext filterContext)


// If session exists

if (filterContext.HttpContext.Session != null)


//if new session

if (filterContext.HttpContext.Session.IsNewSession)


ASP.NET MVC Primer – Presentation Materials

Here are the links to the material from the ASP.NET MVC 2 Primer presentation given at the 3rd Annual Hartford Code Camp on Saturday, June 19, 2010:
Powerpoint Slides: Primer.pptx
Source Code: PrimerDemoSource.zip
I have done some Very Bad Things™ in this code in order to speed up the presentation that are always considered bad practice.   The most egregious violation of best practices is the inclusion of the data access code in the controller’s action methods.  Please do not use this code as a basis for your application design, especially when it comes to best practices.  My next post will include the information covered in the advanced section along with a lot of material we never got to.  This will be a much better demonstration of proper design.
Also, look for upcoming screencasts on ASP.NET MVC2 and other development topics posted here and/or on…

S#arp Architecture

I have been doing some work and research with ASP.NET MVC 2.0.  My first interest was to try to figure out how to get Dependency Injection working with ASP.NET.  I started doing investigating how to link in Springframework.net.  This direction led me down a track that required some manual configuration.  This is when i found S#arp Architecture [dead link], which I found very interesting since it gave you the benefits without the configuration up front.
S#arp Architecture is a project template for Visual Studio that will set you up with a ASP.NET MVC application that is already wired up for Dependency Injection and using nHibernate for data access.  more information can be found on the S#arp Architecture website and wiki.
My findings so far have been very positive.  Within about 45 minutes I had a web application with some basic CRUD functionality. …

ASP.NET MVC presentation materials from Code Camp 10

Hi all,
Acouple of weekends ago at Code Camp 10, I presented on the ASP.NET Model View Controller (MVC) Framework. As promised, I have attached the presentation for all to see.
I would like to thank my co-worker Stan Kennedy for his assistance with the slide deck (actually, he deserves most, if not all of the credit for it) and everyone that showed up to the presentation. I hope everyone learned something – I certainly did as well.
I would like to direct everyone over to the ASP.NET MVC site, which is an excellent resource for anyone wanting to know more about it – and would recommend anyone who wants to start out with it to view Stephen Walther’s How-to videos on the subject (also on the ASP.NET MVC site) as well.
Additionally, I know there were some questions around REST and what it…