<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Jonathan Channon Blog - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-30b97397" type="application/json"/><link>http://jonathanchannonblog.disqus.com/</link><description></description><atom:link href="http://jonathanchannonblog.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 17 May 2013 14:42:46 -0000</lastBuildDate><item><title>Re: The many approaches to Entity Framework</title><link>http://blog.jonathanchannon.com/2013/03/04/the-many-approaches-to-entity-framework/#comment-900588022</link><description>&lt;p&gt;How about removing the type param from your interface but keep it in the methods signtures?&lt;/p&gt;

&lt;p&gt;public interface IGenericRepository&lt;/p&gt;

&lt;p&gt;{    &lt;br&gt;    IQueryable&amp;lt;t&amp;gt; GetAll();&lt;br&gt;    IQueryable&amp;lt;t&amp;gt; FindBy(Expression&amp;lt;func&amp;lt;t, bool=""&amp;gt;&amp;gt; predicate);&lt;br&gt;    void Add(T entity);&lt;br&gt;    void Delete(T entity);&lt;br&gt;    void Edit(T entity);&lt;br&gt;    void Save();&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;Then you only need one repository implementation for your entire data context and your implementation would effectively be entity agnostic, e.g.: &lt;/p&gt;

&lt;p&gt;var products = Rep.GetAll&amp;lt;product&amp;gt;();&lt;/p&gt;

&lt;p&gt;var customer = Rep.FindBy&amp;lt;customer&amp;gt;(c=&amp;gt;c.Id = 123);&amp;lt;/customer&amp;gt;&amp;lt;/product&amp;gt;&amp;lt;/func&amp;lt;t,&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Binjie Zhao</dc:creator><pubDate>Fri, 17 May 2013 14:42:46 -0000</pubDate></item><item><title>Re: The many approaches to Entity Framework</title><link>http://blog.jonathanchannon.com/2013/03/04/the-many-approaches-to-entity-framework/#comment-892542905</link><description>&lt;p&gt;I don't agree on when using EF you don't need a repository. &lt;/p&gt;

&lt;p&gt;Indeed we need a repository to encapsulate our dataaccess otherwise we would be dragging our DbSet around in our code and polute it with EF-specific things... and we don't want that, do we?&lt;/p&gt;

&lt;p&gt;A repository is a nice abstraction of the data access, easy to test and easy to use without any repetitive code (someone mentioned that, and I don't get it). Quite often you would use a generic repository and avoid code redundancy.&lt;/p&gt;

&lt;p&gt;Another great thing about repositories is that data can come from many different sources and still be handled the same way.&lt;/p&gt;

&lt;p&gt;I agree that in most scenarios people seems to code, it's acceptable not to use the repository pattern, but only when dealing with small non-enterprise coding.&lt;/p&gt;

&lt;p&gt;I really hate EF5, it's too big and complex, too many weird flaws in the designer etc etc. and the performance isn't the best.&lt;/p&gt;

&lt;p&gt;I would never choose EF5 again, been there, done that... and guess what... it was extremely easy to switch out to another ORM, because we used a repository ;-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Janus Knudsen</dc:creator><pubDate>Fri, 10 May 2013 16:06:21 -0000</pubDate></item><item><title>Re: Up &amp;#038; Running with TypeScript and WebStorm</title><link>http://blog.jonathanchannon.com/2013/04/17/up-running-with-typescript-and-webstorm/#comment-881573537</link><description>&lt;p&gt;Hi Jonathan,&lt;/p&gt;

&lt;p&gt;A couple notes:&lt;br&gt;1. TypeScript is still in *alpha* (0.8), so our support in WebStorm is still very much a "work in progress* since the language is still a "work in progress"&lt;br&gt;2. I opened a feature request that I think would help new users get started with TS projects: &lt;a href="http://youtrack.jetbrains.com/issue/WEB-7702" rel="nofollow"&gt;http://youtrack.jetbrains.com/...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I totally understand the expectation for "things to just work without having to RTFM", but please give all of this stuff some time to mature. As the languages and libraries mature, the tooling will mature to support them.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br&gt;John Lindquist (from the JetBrains dev advocate team)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">johnlindquist</dc:creator><pubDate>Wed, 01 May 2013 16:12:27 -0000</pubDate></item><item><title>Re: Up &amp;#038; Running with TypeScript and WebStorm</title><link>http://blog.jonathanchannon.com/2013/04/17/up-running-with-typescript-and-webstorm/#comment-880450692</link><description>&lt;p&gt;I just started checking out WebStorm a few days ago. I'm a Visual Studio and ReSharper devotee, but the live edit drew me to WebStorm. I dunno, though. I haven't done much live editing. Does anyone know if Visual Studio has anything like that?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Iffland</dc:creator><pubDate>Tue, 30 Apr 2013 10:42:46 -0000</pubDate></item><item><title>Re: Easily publish a NuGet package</title><link>http://blog.jonathanchannon.com/2012/12/07/easily-publish-a-nuget-package/#comment-873321146</link><description>&lt;p&gt;&lt;a href="https://github.com/jchannon/WebAPI.Testing/blob/master/src/WebAPI.Testing/WebAPI.Testing.csproj#L30" rel="nofollow"&gt;https://github.com/jchannon/We...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Tue, 23 Apr 2013 11:37:12 -0000</pubDate></item><item><title>Re: Easily publish a NuGet package</title><link>http://blog.jonathanchannon.com/2012/12/07/easily-publish-a-nuget-package/#comment-873283097</link><description>&lt;p&gt;Yes but where in the `.csproj` file?  Nobody tells you this.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jeremy Schwartz</dc:creator><pubDate>Tue, 23 Apr 2013 10:52:45 -0000</pubDate></item><item><title>Re: Up &amp;#038; Running with TypeScript and WebStorm</title><link>http://blog.jonathanchannon.com/2013/04/17/up-running-with-typescript-and-webstorm/#comment-865883720</link><description>&lt;p&gt;I know what you mean about working on PC feels like work :D&lt;/p&gt;

&lt;p&gt;Also don't feel alone in the frustrations with WebStorm. It was a pain in the arse for me to get going as well. So much so that I've ditched it and stick with sublime.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mjmcloug</dc:creator><pubDate>Wed, 17 Apr 2013 07:12:39 -0000</pubDate></item><item><title>Re: Evaluating KnockoutJS and AngularJS &amp;#8211; Part 1</title><link>http://blog.jonathanchannon.com/2013/02/05/evaluating-knockoutjs-and-angularjs-part-1/#comment-861218753</link><description>&lt;p&gt;Definitely check out those &lt;a href="http://egghead.io" rel="nofollow"&gt;egghead.io&lt;/a&gt; videos. Very helpful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Evan Zamir</dc:creator><pubDate>Fri, 12 Apr 2013 15:49:38 -0000</pubDate></item><item><title>Re: Evaluating KnockoutJS and AngularJS &amp;#8211; Part 1</title><link>http://blog.jonathanchannon.com/2013/02/05/evaluating-knockoutjs-and-angularjs-part-1/#comment-860907132</link><description>&lt;p&gt;Its here - &lt;a href="https://github.com/jchannon/AngularShopping" rel="nofollow"&gt;https://github.com/jchannon/An...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Fri, 12 Apr 2013 09:25:50 -0000</pubDate></item><item><title>Re: Evaluating KnockoutJS and AngularJS &amp;#8211; Part 1</title><link>http://blog.jonathanchannon.com/2013/02/05/evaluating-knockoutjs-and-angularjs-part-1/#comment-860787727</link><description>&lt;p&gt;great post, i'm finding it very hard to get my head around the directives concept. Is the code for this demo available somewhere ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Samuel Berthelot</dc:creator><pubDate>Fri, 12 Apr 2013 07:20:26 -0000</pubDate></item><item><title>Re: Using a Markdown ViewEngine with Nancy</title><link>http://blog.jonathanchannon.com/2013/04/08/using-a-markdown-viewengine-with-nancy/#comment-857272179</link><description>&lt;p&gt;Yup that's the plan.  I didn't think I had anything to say and still do but still manage to churn out blog posts :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Tue, 09 Apr 2013 03:36:28 -0000</pubDate></item><item><title>Re: Using a Markdown ViewEngine with Nancy</title><link>http://blog.jonathanchannon.com/2013/04/08/using-a-markdown-viewengine-with-nancy/#comment-856732195</link><description>&lt;p&gt;Nice stuff. This + Nancy.Testing and you could have a nice static blog generator. If I had something worthwhile to say I'd use this for my blog:)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matthew Murphy</dc:creator><pubDate>Mon, 08 Apr 2013 17:25:34 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856614903</link><description>&lt;p&gt;The impression I'm getting from reading about this is to convert any DateTimes client side to UTC and post them and then display any dates from the server to local time on the client.  I know DateTimes are a PITA but I can't understand why there's no best practice in how to do this or why its so complicated. Even using .Net ToLocalTime() is frowned upon in some articles and they say only use JavaScript to do DateTime stuff. Maybe I've been lucky to not worry too much about this in the past&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Mon, 08 Apr 2013 14:51:00 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856582884</link><description>&lt;p&gt;Here's an SO about this &lt;a href="http://stackoverflow.com/questions/1572905/get-client-machine-timezone-in-asp-net-mvc" rel="nofollow"&gt;http://stackoverflow.com/quest...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan</dc:creator><pubDate>Mon, 08 Apr 2013 14:11:53 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856493567</link><description>&lt;p&gt;How do you reliably find the user's current timezone though?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Mon, 08 Apr 2013 12:21:37 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856492070</link><description>&lt;p&gt;to make life easier always store dated in UTC and know what timezone the user is in and this can then allow you to do the correct conversion for each date/time both going in and coming out&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan</dc:creator><pubDate>Mon, 08 Apr 2013 12:19:40 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856488889</link><description>&lt;p&gt;That would be fine but on internal uses but if its user input it would need converting&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Mon, 08 Apr 2013 12:15:31 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856485295</link><description>&lt;p&gt;I believe the .NET framework supports DateTime.UtcNow, doesn't it? Still something to remember each time, though.&lt;/p&gt;

&lt;p&gt;Overall, a good note -- this is often overlooked. Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sean Killeen</dc:creator><pubDate>Mon, 08 Apr 2013 12:11:04 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856471715</link><description>&lt;p&gt;I assume that's only in the view layer?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Channon</dc:creator><pubDate>Mon, 08 Apr 2013 11:54:08 -0000</pubDate></item><item><title>Re: Using DateTime in C# and SQL</title><link>http://blog.jonathanchannon.com/2013/04/08/using-datetime-in-c-and-sql/#comment-856446747</link><description>&lt;p&gt;Unfortunately this doesn't work.&lt;/p&gt;

&lt;p&gt;You need to work with an instant of time since 1:30 o'clock before DST isn't 1:30am after DST since in theory since the time moved forward at 1am then 1:30am didn't actually happen!&lt;/p&gt;

&lt;p&gt;Read this &lt;a href="http://noda-time.blogspot.co.uk/2011/08/what-wrong-with-datetime-anyway.html" rel="nofollow"&gt;http://noda-time.blogspot.co.u...&lt;/a&gt; and this &lt;a href="http://msmvps.com/blogs/jon_skeet/archive/2012/05/02/more-fun-with-datetime.aspx" rel="nofollow"&gt;http://msmvps.com/blogs/jon_sk...&lt;/a&gt; for more info.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan</dc:creator><pubDate>Mon, 08 Apr 2013 11:23:31 -0000</pubDate></item><item><title>Re: Using AngularJS/BackboneJS in Windows 8 JavaScript app</title><link>http://blog.jonathanchannon.com/2013/01/24/using-angularjsbackbonejs-in-windows-8-javascript-app/#comment-852236394</link><description>&lt;p&gt;aaaaaaaaaaaa :-) just started with this :-) thanks for sharing&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">kamiseq</dc:creator><pubDate>Thu, 04 Apr 2013 16:40:56 -0000</pubDate></item><item><title>Re: The Old Development Language Switcheroo</title><link>http://blog.jonathanchannon.com/2013/04/02/the-old-development-language-switcheroo/#comment-851105482</link><description>&lt;p&gt;Im  a c# Dev but have been trying to get better at Js and learn some python. I've also been learning Lua just for kicks... I'm never going to get a job using it but learning a lang just for the sake of it makes you think about your primary Langs in new ways (Lua has made me understand some Js fundamentals Better for example). Learn dart or go if that interests you, don't worry if there are jobs at the end. You will learn something new and be a better Dev at the end.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matthew Murphy</dc:creator><pubDate>Wed, 03 Apr 2013 16:08:05 -0000</pubDate></item><item><title>Re: The Old Development Language Switcheroo</title><link>http://blog.jonathanchannon.com/2013/04/02/the-old-development-language-switcheroo/#comment-849579360</link><description>&lt;p&gt;I have a pretty rigid rule about new programming languages. I will learn a new programming language if one of the two following conditions hold:&lt;/p&gt;

&lt;p&gt;1. It embodies a new and useful programming paradigm, or&lt;br&gt;2. I am getting paid to maintain an existing code base or write new code in it.&lt;/p&gt;

&lt;p&gt;Thus, I went from assembler to FORTRAN to shell/Awk/sed/vi to Perl to R (meeting both criteria) to Ruby (first criterion), but I skipped C/C++/Java/C#/Objective C, PHP, JavaScript and Python. &lt;/p&gt;

&lt;p&gt;So sorry, Go, CoffeeScript and Dart are low on my list of languages to learn. Go is essentially yet another attempt to improve on C++ and CoffeeScript / Dart are attempts to improve on JavaScript. &lt;/p&gt;

&lt;p&gt;I consider the creation of new languages mostly programmers' ways of showing off how smart they are and how good they are at sales, not advancements of the art of programming or the discipline of software engineering. In many cases it's simply a dominance strategy. There's nothing wrong with Go, CoffeeScript or Dart, but there's nothing wrong with Pascal, Ada, FORTRAN, Lisp/Scheme/Clojure, APL, Scala, Erlang or SmallTalk either. ;-)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">M. Edward (Ed) Borasky</dc:creator><pubDate>Tue, 02 Apr 2013 11:08:30 -0000</pubDate></item><item><title>Re: The Old Development Language Switcheroo</title><link>http://blog.jonathanchannon.com/2013/04/02/the-old-development-language-switcheroo/#comment-849329794</link><description>&lt;p&gt;I like C# and Typescript a lot, but one thing I don't like is that I currently develop half of my app in one and half in the other. I feel that makes me a bit improductive. So I'm considering options to use the same language for both server and client side code.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonas Eriksson</dc:creator><pubDate>Tue, 02 Apr 2013 05:41:27 -0000</pubDate></item><item><title>Re: The Old Development Language Switcheroo</title><link>http://blog.jonathanchannon.com/2013/04/02/the-old-development-language-switcheroo/#comment-849325344</link><description>&lt;p&gt;While I do love C# I try to use the right tool for the right job. I like to know a lot about different languages and programming styles and I think that if I had to change the language that I primarily work with; I'd work with Python.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Filip Ekberg</dc:creator><pubDate>Tue, 02 Apr 2013 05:35:24 -0000</pubDate></item></channel></rss>