Code and Slides: Building the Account at a Glance ASP.NET MVC, EF Code First, HTML5, and jQuery Application

This presentation was given at the spring 2012 DevConnections conference in Las Vegas and is based on my Pluralsight course. The presentation shows how several different technologies including ASP.NET MVC, EF Code First, HTML5, jQuery, Canvas, SVG, JavaScript patterns, Ajax, and more can be integrated together to build a robust application. An example of the application in action is shown next:



View more of my presentations here.

The complete code (and associated SQL Server database) for the Account at a Glance application can be found here. Check out the full-length course on the topic at Pluralsight.com.

comments powered by Disqus

20 Comments

  • Thanks Dan,

    For me was the best session in DevConnections

    :-)

  • Just about to start the final module of the Pluralsight course. It's great to see how all these technologies come together. Thanks, really enjoying it.

  • Luis: I really appreciate that! I'm glad you enjoyed the session at DevConnections.

    Dan

  • Alexander: Thanks! Really glad to hear you're enjoying the the Pluralsight course. I had a lot of fun making it.

    Dan

  • Hi Dan,

    The pluralsight episode is fantastic. I have learned a lot from that one training than any other training on the entire pluralsight. The Javascript patterns that you have used like revealing pattern etc are new to me and I really enjoyed the last module.

    Thanks for your great course. I become your big fan now. Please bring us these kind of stuff more and more.

    Narendra

  • Can you please tell me whether this app works on any mobile device [iPhone, iPad] without any issue in UI? Great work as usual though.

  • Prasad: The app is only designed for desktop browsers so it's not going to look good on mobile devices at this point.

    Dan

  • Narendra: Thanks! Glad to hear you enjoyed the Pluralsight course. It was a lot of fun to make.

    Dan

  • How come your RepositoryBase doesn't implement an iRepositoryBase?

  • Edward: RepositoryBase is never instantiated directly (only derived from) so there wasn't a direct need for the interface in this application from the standpoint of loose coupling. If the class was going to be used directly then having an interface for it would be nice. I'm just not a fan of interfaces simply for the sake of interfaces though especially if they're not going to be used.

    Dan

  • Hi Dan,

    In one of the videos you mentioned a Logger class that you use for logging errors. Can we get a hold of this please.

    Great course. Thanks

  • Wooble: I don't have anything I can share there unfortunately. Nothing fancy going on though since the class normally just calls out to a library such as ELMAH or Log4Net. If you have Nuget installed you can get those libraries into one of your projects easily. Otherwise, check out the following links for more info:

    http://code.google.com/p/elmah/
    http://logging.apache.org/log4net/


    Dan

  • In DataService you don't need to create a function to call the callback, just pass the callback

    getAccount = function(acctNumber, callback) {
    $.getJSON(serviceBase + 'GetAccount', {acctNumber:acctNumber}, callback);
    },

  • Matthew29: Definitely - no need to create a function at all as you point out. I normally do it though in case I want to have a function in place to handle any type of data manipulation. Although I normally just invoke the callback directly (and with your approach that is simplified), I still like to have a callback function defined just in case I want to tweak anything. Simply a style I like to follow but I'd be fine with doing it the way you suggest as well. Thanks for commenting.

    Dan

  • When I publish the AccountAtAGlance application to my IIS7 Server the page does not load correctly. One of the errors I get is "GET http://localhost/DataService/GetAccount?acct=Z485739881 404 Not Found".

    It works perfectly in VS2010 but not on my servers. Is there something extra I have to do when publishing. I have checked the dependencies and their set for each project. What am I missing?

  • john3verse15: It's hard to say without more details. We've run it successfully with IIS 7.5 Express so it should run great on IIS7. A couple of things to check:

    1. Make sure ASP.NET MVC 3 is installed (I'm assuming it is since you ran it locally...unless your server is on a different box)
    2. Make sure your app pool for the application you created in IIS isn't set to use an older version of the .NET CLR since that could potentially mess it up if you're using .NET 4 to compile
    3. I believe the app pool needs to run in integrated mode rather than classic mode (I'm not an IIS server expert though)
    4. Throw a basic .html page into the same folder as the code and make sure you can hit it first. If you can't then there's likely a security or config issue with the overall setup for the application.

    Aside from that it sounds like a server config issue and I'd have to search more on getting 404 errors with IIS7. Here's one of the first posts I found on it when doing a quick search that may point you in the right direction:

    http://stackoverflow.com/questions/5111091/getting-404-0-error-for-asp-net-mvc-3-app-on-iis-7-0-windows-server-2008

    Dan

  • simply awesome, excellent demo... BTW, the course is pretty cool too...

  • I tried to run the solution from a fresh (unblocked) archive: loaded the database and verified it's there, loaded the solution, built the Model, Repository and Web projects, but when I run it, it comes up with the cloud view and the first time I click the Grid view, I get the equivalent of a null reference exception at line 8 of scene.tile.renderer.js (template = tileDiv.data().templates[size]), i.e., templates is undefined when I break and hover over the various elements in that line. I'm running VS2010 on Win7 and using the VS Dev server. I'm relatively new to JQuery, so need a slight push if anything comes to mind. Thanks.

  • Never mind! It was the connection string in web.config. It was still pointing to . instead of my ./SQLExpress. Great course and code sample!

  • Bob: Glad you got it going.

    Dan

Comments have been disabled for this content.