Tag: c#

  • Entity Framework Beginner’s Guide Done Right

    Entity framework is a great ORM provided by Microsoft.  There are a ton of examples of how to get up and running with it really quickly.  The only problem with all of them, is the get you off on the wrong foot.

    In all of the EF example guides, the DbContext class is typically deeply embedded into the core of your code.  This of course is great for Entity framework because the effort to change will be next to impossible – speaking from experience of course here.

    Instead, by making some subtle changes we can integrate Entity framework in a separate layer in case at some later date you wish to replace it.  Of course, you might never need to replace it, but following these simple techniques will allow better segregation of code and even provide simpler unit testing.

    (more…)

  • Why Java Makes Me Tremble In My Boots

    Let me begin by saying that I have not spent a lot of time in Java.  I learned it in college (some 12 years ago) and I’ve used it sparingly throughout my development career.  To date I’ve never done a full project using only Java.  And ironically, one of the main reasons I haven’t is I don’t know where to start…

    (more…)

  • My First Experiences with Kinect for Windows – @KinectWindows

    I recently had the pleasure of some free time recently – with three kids this does not come often – so I decided to finally plug my Kinect into my PC.  I find it kind of funny how long it actually took for this to happen.  Over a year ago I finally joined the real world and made the decision to finally make a new console gaming purchase.

    Like everyone, I had to choose between the PS3 and Xbox 360.  Each of course has their pros and cons.  But when it came down to it, I could develop for the Xbox and Kinect for free and this became the deciding decision factor.

    So finally over a year later I finally plugged my Kinect into my PC’s USB port!

    (more…)

  • Javascript, the Back Button, and Windows Phone 8 Development

    I recently had the opportunity to begin exploring and toying around with Windows Phone 8 development.

    Why you ask?  Why not really, but mostly because I was giving a free phone and it’s an untapped market when it comes to apps.  At this stage it’s not over diluted like the Android and iPhone stores are.  That and of course there is an option to create apps using HTML, Javascript, and CSS – technologies I’ve used and mastered for years!

    I actually submitted my first app last weekend – and sadly – it got rejected 🙁  I was given two reasons; firstly I did set a default application icon, whoops my bad.  Secondly, I didn’t properly handle the back button since there are “multiple pages” in my application.

    It took me several hours to finally found the answer so I thought I would share it.  Please note, this feels like a bit of a hack, but I wasn’t able to get the “suggested” solutions working…

    (more…)

  • The Best Way to Prevent SQL Injection

    If you use a framework of some sort, you probably haven’t thought about SQL injection for some time – in fact it almost seems dated to even discuss it.  However, security should never be overlooked and it’s important to not trust third party applications and people by default!  So what is the best way to prevent SQL injection?

    Have you noticed how I haven’t specified a specific language?  This is done purposely, because at the end of the day – all languages – should be able to follow this paradigm…

    (more…)