This article is the third in a series of working with KnockoutJS and ASP.NET MVC.
This article will demonstrate how to load a KnockoutJS view model from a C# controller using ajax in an ASP.NET MVC project and will build on the code from the previous articles in the series:
This article is the second in a series of working with KnockoutJS and ASP.NET MVC.
This article will demonstrate how to dynamically create a KnockoutJS view model from a C# model in an ASP.NET MVC project and will build on the code from the previous article Getting Started With ASP.NET MVC and KnockoutJS.
This is the first article in what will hopefully be a series on using KnockoutJS with ASP.NET MVC and is intended to demonstrate techniques for combining the two technologies in your work.
This article starts off the series by looking at a simple method of populating a KnockoutJS view model with content from a C# model in a MVC project. The example in this article is not intended to encourage using KnockoutJS simply as a data binding mechanism (for which it would be overkill).
Burstabubble is a puzzle game for Windows 8 in which you must clear all the bubbles by matching groups of two or more of the same color. I began developing it to give myself a reason to experiment with MonoGame which is pretty great and was just like using XNA again so a big thumbs up to those guys on the work they have done. The game also makes use of my MonoGame particle effects library which is available on GitHub and NuGet.
Burstabubble on Windows Store: http://apps.microsoft.com/windows/en-gb/app/burstabubble/86a5cdea-da21-43b4-b38b-381fec687cc2
I used to use the Repository pattern all the time in my code to abstract away the details of my data access implementation. I almost always used something similar to the ORM and generic repository approach I wrote about in a previous article and it was something I always felt was the “right” thing to do. The more I used it, the more I got frustrated with the patterns limitations.
Sometimes when you first start working on an existing project you come across some code that’s a bit quirky or weird. This is normally due to personal preferences or misunderstandings but whatever the reason, you can live with it – it’s not that bad. Other times you just come across code that makes you quietly weep as you resign yourself to spending the next few months in this hell; a .NET project which uses the “Static Everything” (anti-) pattern is one of those times (is this actually a pattern? I don’t know but I’ll be calling it a pattern throughout this post). The Static Everything pattern is when core operations and business logic in a code base is mostly made up of static classes with static utility methods scattered everywhere; some of which may even have static “state” (!!). This is typically accompanied by simple domain/model classes that simply define properties for an entity.
The topic of Visual Studio regions feature is one that seems to create divided opinions from developers who work with the IDE on a regular basis. If you can’t guess my opinion from the title of this article, I personally totally and utterly hate seeing regions in code.
Stringly is a dynamic query building library written in C#. It provides an interface for dynamically creating queries from string based inputs which is useful for scenarios where the structure of queries is determined at run time based on an external input. Stringly works by building a collection of metadata which it can then use to build a query.
Find out more at https://github.com/jasonmitchell/stringly
Version 1.0 of Supernova Particle System for MonoGame now available! Supernova makes it easy to setup particle effects in your games developed using MonoGame. It was ported to run on MonoGame from my original XNA particle system on CodePlex.
This build initially targets Windows 8 and 2D game development only. Further support for other platforms and 3D particle effects to come.
Now available on NuGet: https://nuget.org/packages/Supernova-Particle-System/
Source code available at: https://github.com/jasonmitchell/supernova
See http://jason-mitchell.com/game-development/2d-particle-system-for-xna/ for a description of the original XNA project on CodePlex. Some parts have changed but not drastically.
First off, there’s nothing wrong with using SPContext.Current; this article is about using it correctly and structuring your code to work with it in a flexible way.
I worked on a fairly long running SharePoint project which liberally used SPContext.Current to access the SPWeb instance everywhere; it popped up not only in WebPart code but also business logic classes. It’s perfectly acceptable to use SPContext.Current in your WebPart code-behind files because the context will be available in these places, however problems arise when your business logic classes make use of this singleton under the assumption that they will only ever be used in WebParts. The moment you want to use these business logic classes anywhere else (think event receivers) things fall apart and you get exceptions when the code is called.