Using Git subtrees to split a repository

We are in a position where we needed to create a new back-end server for an application. The current application is on a MEAN stack (Mongodb, Expressjs, Angularjs, Node.js), but a new client wants the backend to be deployed onto … Continue reading 

Posted in Uncategorized | 3 Comments

Using AutoMapper to prevent SELECT N+1 problems

Back in my post about efficient querying with AutoMapper, LINQ and future queries, one piece I glossed over was how View Models and LINQ projection can prevent SELECT N+1 problems. In the original controller action, I had code like this: … Continue reading 

Posted in AutoMapper, Entity Framework, NHibernate | 13 Comments

Leaving LosTechies

You may (or may not) have noticed that I haven’t posted here in a few weeks. There’s a reason for that… an era is coming to an end. It’s time for me to move on from LosTechies – a community … Continue reading 

Posted in Uncategorized | 7 Comments

Frontend & Backend: Gotta Keep’em Separated

I used to start my web applications by throwing all of my code into one big project.  So I’d have html, css, javascript and all the backend code together in one monolithic directory. Now, I take a different, smarter approach. … Continue reading 

Posted in backend, frontend, web applications | Tagged , | 10 Comments

Successful IoC container usage

Every now and again I here the meme of IoC containers being bad, they lead to bad developer practices, they’re too complicated and on and on. IoC containers – like any sharp tool – can be easily abused. Dependency injection, … Continue reading 

Posted in Dependency Injection, OO | 25 Comments

Reassign JavaScript Function Parameters In Reverse Order, Or Lose Your Params

Every now and then I need to have a method support 2 or 3 arguments, providing a default value for one of them if only 2 are specified. My typical solution is to check the number of arguments passed to … Continue reading 

Posted in Javascript, NodeJS | 12 Comments

What I learned by coding with kids on my summer vacation at That Conference, an essay by Sharon

It was a perfect moment. I’m at last year’s That Conference, sitting in the big dining hall, while people step up to a microphone at the other end of the room and announce the Open Spaces session they will convene … Continue reading 

Posted in Uncategorized | 4 Comments

Build A (local) Webcam With WebRTC In Less Than 20 Lines!

WebRTC is all kinds of super ninja epic awesomesauce stuff. If you haven’t looked in to it yet, you’re going to want to get on that soon. I’d suggest starting with the HTML5 Rocks post on getUserMedia. Build Your Own … Continue reading 

Posted in HTML5, Javascript, WebRTC | 9 Comments

Avoid many-to-many mappings in ORMs

Going through and reviewing the Contoso University codebase, really to get caught up on EF 6 features, I found a relationship between two tables that resulted in a many-to-many mapping. We have these tables: A Course can have many Instructors, … Continue reading 

Posted in Entity Framework, NHibernate | 13 Comments

Efficient querying with LINQ, AutoMapper and Future queries

Even after all these years, I’m still a big fan of ORMs. One common complaint over the years is people using ORMs use the tool identically for both reads and writes. With writes, I want tracked entities, managed relationships, cascades … Continue reading 

Posted in AutoMapper, Entity Framework, LINQ | 29 Comments