Modern software development practices value quick and continuous updates, following processes that minimize the impact of software failures. As important as identifying bugs early, finding out if changes are improving business value are equally important. These practices can only work when a monitoring solution is in place. This article explores options for adding observability to .NET Core apps. They have been collected based on interactions with customers using .NET Core in different environments. We will be looking into OpenTelemetry and Application Insights SDKs to add observability to a sample distributed application.
شرکت در نظرسنجی رسمی NuGet
آموزش QUnit #2
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Refactored date examples</title> <link rel="stylesheet" href="../qunit.css"> <script src="../qunit.js"></script> <script src="prettydate.js"></script> <script> test("prettydate basics", function() { var now = "2013/01/28 22:25:00"; equal(prettyDate(now, "2013/01/28 22:24:30"), "just now"); equal(prettyDate(now, "201308/01/28 22:23:30"), "1 minute ago"); equal(prettyDate(now, "2013/01/28 21:23:30"), "1 hour ago"); equal(prettyDate(now, "2013/01/27 22:23:30"), "Yesterday"); equal(prettyDate(now, "2013/01/26 22:23:30"), "2 days ago"); equal(prettyDate(now, "2012/01/26 22:23:30"), undefined); }); </script> </head> <body> <div id="qunit"></div> </body> </html>
test("prettydate basics", function() { function date(then, expected) { equal(prettyDate("2013/01/28 22:25:00", then), expected); } date("2013/01/28 22:24:30", "just now"); date("2013/01/28 22:23:30", "1 minute ago"); date("2013/01/28 21:23:30", "1 hour ago"); date("2013/01/27 22:23:30", "Yesterday"); date("2013/01/26 22:23:30", "2 days ago"); date("2012/01/26 22:23:30", undefined); });
var prettyDate = { format: function(now, time){ var date = new Date(time || ""), diff = (((new Date(now)).getTime() - date.getTime()) / 1000), day_diff = Math.floor(diff / 86400); if ( isNaN(day_diff) || day_diff < 0 || day_diff >= 31 ) return; return day_diff === 0 && ( diff < 60 && "just now" || diff < 120 && "1 minute ago" || diff < 3600 && Math.floor( diff / 60 ) + " minutes ago" || diff < 7200 && "1 hour ago" || diff < 86400 && Math.floor( diff / 3600 ) + " hours ago") || day_diff === 1 && "Yesterday" || day_diff < 7 && day_diff + " days ago" || day_diff < 31 && Math.ceil( day_diff / 7 ) + " weeks ago"; }, update: function(now) { var links = document.getElementsByTagName("a"); for ( var i = 0; i < links.length; i++ ) { if ( links[i].title ) { var date = prettyDate.format(now, links[i].title); if ( date ) { links[i].innerHTML = date; } } } } };
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Refactored date examples</title> <link rel="stylesheet" href="../qunit.css"> <script src="../qunit.js"></script> <script src="prettydate2.js"></script> <script> test("prettydate.format", function() { function date(then, expected) { equal(prettyDate.format("2013/01/28 22:25:00", then), expected); } date("2013/01/28 22:24:30", "just now"); date("2013/01/28 22:23:30", "1 minute ago"); date("2013/01/28 21:23:30", "1 hour ago"); date("2013/01/27 22:23:30", "Yesterday"); date("2013/01/26 22:23:30", "2 days ago"); date("2012/01/26 22:23:30", undefined); }); function domtest(name, now, first, second) { test(name, function() { var links = document.getElementById("qunit-fixture") .getElementsByTagName("a"); equal(links[0].innerHTML, "January 28th, 2013"); equal(links[2].innerHTML, "January 27th, 2013"); prettyDate.update(now); equal(links[0].innerHTML, first); equal(links[2].innerHTML, second); }); } domtest("prettyDate.update", "2013-01-28T22:25:00Z", "2 hours ago", "Yesterday"); domtest("prettyDate.update, one day later", "2013/01/29 22:25:00", "Yesterday", "2 days ago"); </script> </head> <body> <div id="qunit"></div> <div id="qunit-fixture"> <ul> <li id="post57"> <p>blah blah blah...</p> <small> Posted <span> <a href="/2013/01/blah/57/" title="2013-01-28T20:24:17Z" >January 28th, 2013</a> </span> by <span><a href=""></a></span> </small> </li> <li id="post57"> <p>blah blah blah...</p> <small> Posted <span> <a href="/2013/01/blah/57/" title="2013-01-27T22:24:17Z" >January 27th, 2013</a> </span> by <span><a href=""></a></span> </small> </li> </ul> </div> </body> </html>
In Defense of Lazy Loading
I don’t know how this happened but for the last couple years (at least), whenever I read an author who writes about ORMs, I often see a sentiment like this: “ORMs are fine, just make sure you disable this pesky feature called Lazy Loading”.
It’s like this feature is not even needed and only brings confusion and performance issues to everyone who chooses to use it. Well, as you may guess from the title of this article, I disagree with this point of view completely.
نگاهی به کارآیی HTTP/2
Today, we are releasing updates to the .NET Core SDK, included in Visual Studio 2017 RC. You can also install the .NET Core SDK for use with Visual Studio Code or at the command line, on Windows, Mac and Linux. Check out the Visual Studio blog to learn more about this Visual Studio 2017 update.
نگاهی به کار با Blazor در NET 8.
کتاب Blazor- A Beginners Guide
The book covers these all-important topics:
- What Blazor is
- The problems it solves and how it solves them
- Strategies for moving to Blazor from previous ASP.NET generations and JavaScript
- Ways to get more out of Blazor by enhancing it with Telerik UI for Blazor to shorten development cycles and benefit your entire team