Create Net Core Docker App
In this post, we will look at building .NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools for...
In this post, we will look at building .NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools for...
In this post, we will look at creating mandatory updates for ClickOnce Application.
This post documents how to test certain ads from AdSense on mobile devices.
This post documents the different monetization framework investigated to display ads on a blog.
Code Logging Profile Test Review
Synopsis
In this post, we will install Android 7.0 Nougat on a Samsung Galaxy S5 using a Windows machine.
In this post, we will examine a build error that be initially be baffling. In essence, after adding a library to your Xamarin Forms Android project, we end u...
In this short post, we will examine how to open the native App Store on Android and Windows towards a specific app. This is useful when you want to advertise...
In this post, we will examine a minor but important difference in the app signing process between Android and Windows apps.
Today, I ran into a small issue when working on my Xamarin Forms Android application. In essence, my application would run fine in debug mode but it would co...
Using service worker you can hijack connections, fabricate, and filter responses. Powerful stuff. While you would use these powers for good, a man-in-the-...
This post examine a potential issue when porting a native app to PWA.
This post examines porting a Cordova app built with Onsen UI to PWA.
In this post, we will examine the reason why Apple might be relunctant to support Progressive Web Apps (PWA) on iOS devices.
In this blog post, we will highlight the principles and best practices when developing cloud applications. The nature of cloud applications, being a software...
CI/CD is a key element of microservices application. Without it, we will not achieve the agility that microservices promises since there are so many moving p...
A microservices application can be composed of dozens or hundreds of services. Not only that, a single user operation can span multiple of services. Therefor...
In microservices, a transaction can span multiple services. The workflow must be reliable since it cannot leave them uncompleted. Similarly, we need to contr...
In a microservices architecture, there could be a significant amount of data exchange between services in order to fulfill a request. Consequently, APIs must...
Unlike a monolith architecture, a microservice architecture involves a great number of small services interacting with each other’s in order to complete a si...
An underlying principle of microservices is that each service is responsible for its own data. What this means is that if Service A owns Data Store A, Servic...
One of the most popular definition we see of microservices these days is that a microservices does one thing and one thing well. This is probably the most da...
Microservices is a huge buzzword nowadays. Everyone wants to use microservices, everyone thinks they are using microservices. But microservices is much more ...
DISCLAIMER The strategy of removing a node from the IP Table in order to perform the deployment causes connection lost. Therefore, there are no advanta...
This tutorial demontrates how to setup Fluent Validation in ASP.NET Core.
Everyone wants their page to be popular on social networks, but social network scripts tend to be large and can cause sluggish response for the user. Waiting...
In this short post, we will examine a small error in our client library implementation that lead to unexpected bursts of calls to our backend service.
Glimpse is like the FireBug client side debugger, except it’s implemented in JavaScript on the client side with hooks in to ASP.NET on the Server Side.
Caching is not synonymous with performance. Your code should already be efficient. Caching should only be used as a last resort, after you’ve made all possib...
For small sets of data that are infrequently updated, consider making a method for caching them in the memory of your application server rather than constant...
In this post, we will look at why we should avoid large view state when possible.
Traditionally, many performance problems have been rooted in the backend; either the database or application server. However, with the proliferation of advan...
Where possible, you should try and avoid using session state, especially in process session state. While using one web server, performance is usually not a p...
This may sound simple but it is so easy to forget. Do not publish your ASP.NET application in debug mode. We can do as much optimizations in our code as we w...
You get exactly one clustered index on a table. Ensure you have it in the right place. First choice is the most frequently accessed column, which may or may ...
By default each Application Pool runs with a Single Worker Process (W3Wp.exe). We can assign multiple Worker Processes With a Single Application Pool. An App...
Make sure you are not limited by 2 tcp ip connections when you don’t need to The default setting for the maximum amount of connection is two per connection g...
In this post, we will look at building ASP.NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools ...
Use Case
Definition
The following is a simple checklist for code review.
Context
Everyone wants their page to be popular on social networks, but social network scripts tend to be large and can cause sluggish response for the user. Waiting...
Transforming a http website to a https website requires the use of a digital certificate. These certificates are typically issued by a trusting authoring suc...
Windows Communication Foundation (WCF) provides the capability to log incoming and outgoing messages for offline consumption. Message logging enables you to ...
Service Definition For the given service definition below,
Make use of the OutputCache annotation on MVC controllers. If the server can serve from memory, rather than going to disk or database, that’s a good win.
Caching is not synonymous with performance. Your code should already be efficient. Caching should only be used as a last resort, after you’ve made all possib...
When beginning to diagnose performance problems, we often assume the problem is in our business logic. Don’t forget that the areas of our code that provide i...
Simple UI tricks, such as progress bars, redirecting users’ attention using animation, or placing slower loading sections at the bottom of a page or offscree...
For small sets of data that are infrequently updated, consider making a method for caching them in the memory of your application server rather than constant...
This isn’t exactly a performance tip but rather a security tip for when people think that they could improve performance by cutting out server-side validatio...
In this post, we will look at why we should avoid large view state when possible.
Traditionally, many performance problems have been rooted in the backend; either the database or application server. However, with the proliferation of advan...
Where possible, you should try and avoid using session state, especially in process session state. While using one web server, performance is usually not a p...
This may sound simple but it is so easy to forget. Do not publish your ASP.NET application in debug mode. We can do as much optimizations in our code as we w...
You get exactly one clustered index on a table. Ensure you have it in the right place. First choice is the most frequently accessed column, which may or may ...
Create, Read, Update, and Delete (CRUD) queries can all be generated from the ORM tool without the need for intervention. But, the Read queries generated are...
The userAgent string is a poor indicator of whether a particular feature (or bug) is present. To compound the problem, much of the code that interprets userA...
The following is a general guideline on the different steps involved in deploying an application. Each application will have its own deployment procedure.
Summary
This post details the versioning strategy we are using for our products. We are talking about products and not libraries, web services or APIs.
Summary
With the arrival of .NET 4.5, writing async code correctly is easier than ever. Like any tool, it should be only applied where it makes most sense – in web u...
Always set the CacheControlMaxAge attribute in web.config to a high number (a year is good). You don’t want people pulling down the same static content they ...
For is the fastest way of iterating over a collection, foreach is a little slower, and LINQ queries are slowest.
Start with <!DOCTYPE html>. The modern web has no place for Quirks Mode, which was designed so that mid-1990s web pages would be usable in turn-of-the...
If you do need ViewState, understand the page lifecycle and bind your data appropriately. A control loads its ViewState after Page_Init and before Page_Load,...
Unless you’re tracking a Text_Changed event, you don’t need ViewState enabled on TextBoxes and similar controls. Classic ASP.NET automatically repopulates Te...
Make it your habit to turn off ViewState on every control by default, and only turn it on when you need it. If a page doesn’t need ViewState anywhere, turn i...
The same goes for most implementations of Repeaters, ListViews, and so on. These are usually the biggest culprits and they can be ugly. The advantage of View...
You may think it’s impossible to turn off ViewState on a DropDownList, even if you re-bind it on every postback. But with a tiny bit of elbow grease you can ...
If you’re re-binding data anyway, or just toggling one property on postback (asp:Panel anyone?), turn off that ViewState! Please!
To avoid unnecessary round trips to the server, validate form entries on the client using JavaScript before posting them. This provides quick feedback and ma...
Get MiniProfiler and configure it to always run when you hit your site (just don’t enable it for the general public). You’ll get detailed execution times and...
ELMAH supports many formats for storing errors, but I think that SQL Server Compact is a great choice for small to medium size applications.
Yes, if you are in a loop and adding to a string, then a StringBuilder could be most appropriate. However, the overhead of spinning up a StringBuilder instan...
Out of the box, many ASP.NET projects include client script libraries which you may or may not be using. It’s always a good idea to check what you are using,...
Make sure you’ve removed HTTP modules that aren’t being used (Windows authentication, for example), and that you’ve disabled services such as FTP and SMTP, i...
If you’re an ASP.NET MVC developer, you might not know that ASP.NET still loads the View Engines for both Razor and Web Forms by default. This can cause perf...
If a type implements IDisposable, wrap the use of it in a “using” statement, so that it automatically disposes of objects properly when the block exits.
Many people deploy to production without checking how logging is currently configured. It is always advisable to check whether your policy is to have logging...
To accurately debug or profile an external assembly or library (i.e. one you’re not directly compiling), you need the PDB files that accompany each of the DL...
Every time you update your site, IIS must recompile it during the first request, so the initial request takes significantly longer than subsequent ones. An e...
As developers, we often want to fix problems with code, but don’t be afraid to ‘put the compiler down’ and throw some hardware at the problem. Performance pr...
Traditionally, many performance problems have been rooted in either the database or application server. However, with the proliferation of advanced JavaScrip...
If a collection is static, make sure it only contains the objects you need. If the collection is iterated over often, then the performance can be slow if you...
Use a content delivery network (CDN) for hosting images and scripts. They may be cached and it will reduce load on your server.
Use AJAX to retrieve components asynchronously that may not be needed immediately, such as the content of a collapsed panel, content behind a tab, and so on.
Add script references at the bottom of the page, because asynchronous downloads halt when a script reference is reached. Style sheets and images can be downl...
Reducing the amount of data sent across the network can improve application performance significantly. Compressing CSS and JavaScript is possible using bundl...
Make sure HTTP compression is turned on for any uncompressed content. HTML in particular compresses significantly, and in this era of mobile friendliness and...
Use image sprites to retrieve smaller images in one download.
Including height and width in tags will allow your page to render more quickly, because space can be allocated for the image before it is downloaded.
Simple id and class selectors are useful, but using them exclusively means the markup gets messier and less reusable with unnecessary ids and classes. Using ...
As new draft standards progress, browser vendors sometimes get a jump on the standard by adding support via prefixed properties. To ensure that the CSS conti...
CSS parser hacks are unreliable because browsers can be updated causing these hacks to fail. Instead try adding version-specific classes to the html or body ...
Techniques such as jQuery’s $(document).ready() make it easy to run script as soon as the HTML on the page is loaded, which is usually the earliest possible ...
Start AJAX requests as early as possible if they’re critical for user interaction with the page
As with external script references, an inline script requires the browser to stop parsing HTML and can also prevent parallel downloading of other resources o...
Putting CSS files in the body can result in the browser showing a blank page until the CSS has loaded. CSS files should go into the head of the HTML document...
New HTML5 tags like <section>, <header>, and <footer> improve the semantics of markup, but require a special “shiv” script to run in Intern...
A common concern among developers is ensuring that their sites render the same across all browsers, including non-modern ones. That’s not always necessary. A...
If you absolutely need to provide the same experience across all browsers, polyfills and shims offer code and markup that can help mimic standards-based APIs...
A good set of build tools such as HTML validators, CSS validators, Uglify, and JSHint, or GruntJS can find latent problems, enforce project code standards, a...
Many of these tips are already built into a project template like HTML5 Boilerplate to save you some time. Those rules work equally well for projects targete...
Standards are a core part of Internet Explorer 10 and helping developers migrate their code to take advantage of this is incredibly important to the IE engin...
It’s easy to get excited every time a new and cool feature comes out but some of these may still be experimental with the specification still under developme...
Although modern browsers are much closer to a single standard than ever before, differences still exist. An occasional multi-browser sanity checkpoint during...
Ensure your variables and parameters are the same data types as the columns. An implicit or explicit conversion can lead to table scans and slow performance.
SELECT * is not necessarily a bad thing, but it’s a good idea to only move the data you really need to move and only when you really need it, in order to avo...
When creating a field which will contains text, it is important to choose the right string type in order to save space and increase performance.
Implement different database queries in different contexts. In the API and on a webpage, you’ll inevitably require different entity properties, so don’t load...
Always profile your ORM database hits with SQL Profiler during development. ORMs get away from you very quickly. Before you know it, you’ve run a query 2000 ...
Since the code generated from the ORM can frequently be ad hoc, ensure that the SQL Server instance has ‘Optimize for Ad Hoc’ enabled. This will store a plan...
Watch out for lazy loading in ORMs. You shouldn’t lazy load any entities that could be retrieved with a single database hit.
When using grid UI controls (framework based, or 3rd party owned), you should carefully consider how paging is implemented. Many controls implement paging in...
Be sure your code is generating a parameter size equivalent to the data type defined within table in the database. Some ORM tools size the parameter to the s...
Avoid following the ‘Hello World’ examples provided with your ORM tool that turns it into an Object to Object Mapping. Database storage is not the same as ob...
Parameterized queries are exactly the same as stored procedures in terms of performance and memory management. Since most ORM tools can use either stored pro...
Performance is enhanced when indexes are placed on columns used in WHERE, JOIN, ORDER BY, GROUP, and TOP. Always test to ensure that the index does help perf...
By default each Application Pool runs with a Single Worker Process (W3Wp.exe). We can assign multiple Worker Processes With a Single Application Pool. An App...
Similarly to external JavaScript, inline script requires the browser to stop parsing the HTML and can also prevent the parallel downloading of other resource...
Make sure you are not limited by 2 tcp ip connections when you don’t need to The default setting for the maximum amount of connection is two per connection g...
An example would be
This post documents how to test certain ads from AdSense on mobile devices.
This post documents the different monetization framework investigated to display ads on a blog.
In this post, we will examine a build error that be initially be baffling. In essence, after adding a library to your Xamarin Forms Android project, we end u...
Today, I ran into a small issue when working on my Xamarin Forms Android application. In essence, my application would run fine in debug mode but it would co...
Context
The following is a simple checklist for code review.
Scaling Dedicated Game Servers with Kubernetes
Kubernetes Best Practices
Kubernetes Basics
The following articles provides a basic introduction to containers technologies. It would allow the reader to gain an understanding of what are containers an...
This is a re-post of an article that I wrote for the App Innovation Contest run by Code Project.
This post documents the different technologies investigated for cross-platform mobile development.
This post documents the different technologies investigated for cross-platform mobile development.
Overview
There are 3 recovery models we can choose from when creating a database: Simple, Full and Bulk Logged
Create, Read, Update, and Delete (CRUD) queries can all be generated from the ORM tool without the need for intervention. But, the Read queries generated are...
The purpose of this proof of concept is to investigate and determine a strategy to load balance web server geographically via DNS entries. In essence, given ...
Overview
NTP Service
The following provides a description of the workflow use during the design of the OWMM service. It focuses mainly on the design docs that will be the foundat...
In this blog post, we will highlight the principles and best practices when developing cloud applications. The nature of cloud applications, being a software...
CI/CD is a key element of microservices application. Without it, we will not achieve the agility that microservices promises since there are so many moving p...
This is a very early draft without any structure or the like. I did it mostly for storage purposes.
A microservices application can be composed of dozens or hundreds of services. Not only that, a single user operation can span multiple of services. Therefor...
In microservices, a transaction can span multiple services. The workflow must be reliable since it cannot leave them uncompleted. Similarly, we need to contr...
In a microservices architecture, there could be a significant amount of data exchange between services in order to fulfill a request. Consequently, APIs must...
Unlike a monolith architecture, a microservice architecture involves a great number of small services interacting with each other’s in order to complete a si...
An underlying principle of microservices is that each service is responsible for its own data. What this means is that if Service A owns Data Store A, Servic...
One of the most popular definition we see of microservices these days is that a microservices does one thing and one thing well. This is probably the most da...
Microservices is a huge buzzword nowadays. Everyone wants to use microservices, everyone thinks they are using microservices. But microservices is much more ...
Use Case
This post is simply about maintaining a visual glossary of container technology.
In this post, we will look at building ASP.NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools ...
In this post, we will look at building .NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools for...
The following articles provides a basic introduction to containers technologies. It would allow the reader to gain an understanding of what are containers an...
This post examines the different strategies at including sample code in a blog post.
In this post, we will add stencils for software and database diagrams to Visio 2010 Standard.
In this post, we will examine a build error that be initially be baffling. In essence, after adding a library to your Xamarin Forms Android project, we end u...
Today, I ran into a small issue when working on my Xamarin Forms Android application. In essence, my application would run fine in debug mode but it would co...
In this short post, we will examine how to open the native App Store on Android and Windows towards a specific app. This is useful when you want to advertise...
This post is simply about maintaining a visual glossary of container technology.
The images in my app were initially embedded in the assembly of my PCL. They would be retrieved as follow:
In this post, we will examine the reason why Apple might be relunctant to support Progressive Web Apps (PWA) on iOS devices.
This post is simply about maintaining a visual glossary of container technology.
Scaling Dedicated Game Servers with Kubernetes
Kubernetes Best Practices
Kubernetes Basics
Introduction
Introduction
NTP Service
In this blog post, we will highlight the principles and best practices when developing cloud applications. The nature of cloud applications, being a software...
CI/CD is a key element of microservices application. Without it, we will not achieve the agility that microservices promises since there are so many moving p...
A microservices application can be composed of dozens or hundreds of services. Not only that, a single user operation can span multiple of services. Therefor...
In microservices, a transaction can span multiple services. The workflow must be reliable since it cannot leave them uncompleted. Similarly, we need to contr...
In a microservices architecture, there could be a significant amount of data exchange between services in order to fulfill a request. Consequently, APIs must...
Unlike a monolith architecture, a microservice architecture involves a great number of small services interacting with each other’s in order to complete a si...
An underlying principle of microservices is that each service is responsible for its own data. What this means is that if Service A owns Data Store A, Servic...
One of the most popular definition we see of microservices these days is that a microservices does one thing and one thing well. This is probably the most da...
Microservices is a huge buzzword nowadays. Everyone wants to use microservices, everyone thinks they are using microservices. But microservices is much more ...
Using service worker you can hijack connections, fabricate, and filter responses. Powerful stuff. While you would use these powers for good, a man-in-the-...
This post examine a potential issue when porting a native app to PWA.
This post examines porting a Cordova app built with Onsen UI to PWA.
This post documents how to test certain ads from AdSense on mobile devices.
This post documents the different monetization framework investigated to display ads on a blog.
In this post, we will examine our endeavor in the creation of a private NuGet repository.
DISCLAIMER The strategy of removing a node from the IP Table in order to perform the deployment causes connection lost. Therefore, there are no advanta...
Overview
DISCLAIMER The strategy of removing a node from the IP Table in order to perform the deployment causes connection lost. Therefore, there are no advanta...
The purpose of this proof of concept is to investigate and determine a strategy to load balance web server geographically via DNS entries. In essence, given ...
Introduction
Synopsis
Introduction
The following provides a description of the workflow use during the development of the OWMM service. We are assuming that the development is divided into epi...
The following provides a description of the workflow use during the design of the OWMM service. It focuses mainly on the design docs that will be the foundat...
This is a very early draft without any structure or the like. I did it mostly for storage purposes.
In this post, we will examine our endeavor in the creation of a private NuGet repository.
The following provides a description of the workflow use during the development of the OWMM service. We are assuming that the development is divided into epi...
Everyone wants their page to be popular on social networks, but social network scripts tend to be large and can cause sluggish response for the user. Waiting...
In this short post, we will examine a small error in our client library implementation that lead to unexpected bursts of calls to our backend service.
Transforming a http website to a https website requires the use of a digital certificate. These certificates are typically issued by a trusting authoring suc...
Glimpse is like the FireBug client side debugger, except it’s implemented in JavaScript on the client side with hooks in to ASP.NET on the Server Side.
Service Definition For the given service definition below,
Make use of the OutputCache annotation on MVC controllers. If the server can serve from memory, rather than going to disk or database, that’s a good win.
Caching is not synonymous with performance. Your code should already be efficient. Caching should only be used as a last resort, after you’ve made all possib...
When beginning to diagnose performance problems, we often assume the problem is in our business logic. Don’t forget that the areas of our code that provide i...
Simple UI tricks, such as progress bars, redirecting users’ attention using animation, or placing slower loading sections at the bottom of a page or offscree...
For small sets of data that are infrequently updated, consider making a method for caching them in the memory of your application server rather than constant...
In this post, we will look at why we should avoid large view state when possible.
Traditionally, many performance problems have been rooted in the backend; either the database or application server. However, with the proliferation of advan...
Where possible, you should try and avoid using session state, especially in process session state. While using one web server, performance is usually not a p...
This may sound simple but it is so easy to forget. Do not publish your ASP.NET application in debug mode. We can do as much optimizations in our code as we w...
You get exactly one clustered index on a table. Ensure you have it in the right place. First choice is the most frequently accessed column, which may or may ...
Create, Read, Update, and Delete (CRUD) queries can all be generated from the ORM tool without the need for intervention. But, the Read queries generated are...
Simple id and class selectors are useful, but using them exclusively means the markup gets messier and less reusable with unnecessary ids and classes. Using ...
As new draft standards progress, browser vendors sometimes get a jump on the standard by adding support via prefixed properties. To ensure that the CSS conti...
CSS parser hacks are unreliable because browsers can be updated causing these hacks to fail. Instead try adding version-specific classes to the html or body ...
Techniques such as jQuery’s $(document).ready() make it easy to run script as soon as the HTML on the page is loaded, which is usually the earliest possible ...
As with external script references, an inline script requires the browser to stop parsing HTML and can also prevent parallel downloading of other resources o...
Ensure your variables and parameters are the same data types as the columns. An implicit or explicit conversion can lead to table scans and slow performance.
SELECT * is not necessarily a bad thing, but it’s a good idea to only move the data you really need to move and only when you really need it, in order to avo...
When creating a field which will contains text, it is important to choose the right string type in order to save space and increase performance.
Implement different database queries in different contexts. In the API and on a webpage, you’ll inevitably require different entity properties, so don’t load...
Always profile your ORM database hits with SQL Profiler during development. ORMs get away from you very quickly. Before you know it, you’ve run a query 2000 ...
Since the code generated from the ORM can frequently be ad hoc, ensure that the SQL Server instance has ‘Optimize for Ad Hoc’ enabled. This will store a plan...
Watch out for lazy loading in ORMs. You shouldn’t lazy load any entities that could be retrieved with a single database hit.
When using grid UI controls (framework based, or 3rd party owned), you should carefully consider how paging is implemented. Many controls implement paging in...
Be sure your code is generating a parameter size equivalent to the data type defined within table in the database. Some ORM tools size the parameter to the s...
Avoid following the ‘Hello World’ examples provided with your ORM tool that turns it into an Object to Object Mapping. Database storage is not the same as ob...
Parameterized queries are exactly the same as stored procedures in terms of performance and memory management. Since most ORM tools can use either stored pro...
Performance is enhanced when indexes are placed on columns used in WHERE, JOIN, ORDER BY, GROUP, and TOP. Always test to ensure that the index does help perf...
By default each Application Pool runs with a Single Worker Process (W3Wp.exe). We can assign multiple Worker Processes With a Single Application Pool. An App...
Similarly to external JavaScript, inline script requires the browser to stop parsing the HTML and can also prevent the parallel downloading of other resource...
Make sure you are not limited by 2 tcp ip connections when you don’t need to The default setting for the maximum amount of connection is two per connection g...
An example would be
The following represents the very high level design of the next generation file transfer system codenamed Fedex.
Use Case
In this post, we will examine our endeavor in the creation of a private NuGet repository.
The purpose of this proof of concept is to investigate and determine a strategy to load balance web server geographically via DNS entries. In essence, given ...
This is a very early draft without any structure or the like. I did it mostly for storage purposes.
In this post, we will examine a minor but important difference in the app signing process between Android and Windows apps.
Using service worker you can hijack connections, fabricate, and filter responses. Powerful stuff. While you would use these powers for good, a man-in-the-...
This post examine a potential issue when porting a native app to PWA.
This post examines porting a Cordova app built with Onsen UI to PWA.
This post documents the different technologies investigated for cross-platform mobile development.
In this post, we will examine the reason why Apple might be relunctant to support Progressive Web Apps (PWA) on iOS devices.
This post examines one nagging issue with respect to how Xamarin Forms render native controls.
The images in my app were initially embedded in the assembly of my PCL. They would be retrieved as follow:
This isn’t exactly a performance tip but rather a security tip for when people think that they could improve performance by cutting out server-side validatio...
NTP Service
Introduction
Synopsis
Introduction
Definition
Overview
The final goal of this set of meetings is to establish a clear vision of our solutions in order to present a homogeneous image of our direction towards ourse...
Definition
This post documents how to use a README.md appear as the welcome page when loading a solution in Visual Studio.
The following is a simple checklist for code review.
Context
Everyone wants their page to be popular on social networks, but social network scripts tend to be large and can cause sluggish response for the user. Waiting...
Transforming a http website to a https website requires the use of a digital certificate. These certificates are typically issued by a trusting authoring suc...
Windows Communication Foundation (WCF) provides the capability to log incoming and outgoing messages for offline consumption. Message logging enables you to ...
Service Definition For the given service definition below,
Make use of the OutputCache annotation on MVC controllers. If the server can serve from memory, rather than going to disk or database, that’s a good win.
Caching is not synonymous with performance. Your code should already be efficient. Caching should only be used as a last resort, after you’ve made all possib...
When beginning to diagnose performance problems, we often assume the problem is in our business logic. Don’t forget that the areas of our code that provide i...
Simple UI tricks, such as progress bars, redirecting users’ attention using animation, or placing slower loading sections at the bottom of a page or offscree...
For small sets of data that are infrequently updated, consider making a method for caching them in the memory of your application server rather than constant...
This isn’t exactly a performance tip but rather a security tip for when people think that they could improve performance by cutting out server-side validatio...
In this post, we will look at why we should avoid large view state when possible.
Traditionally, many performance problems have been rooted in the backend; either the database or application server. However, with the proliferation of advan...
Where possible, you should try and avoid using session state, especially in process session state. While using one web server, performance is usually not a p...
This may sound simple but it is so easy to forget. Do not publish your ASP.NET application in debug mode. We can do as much optimizations in our code as we w...
You get exactly one clustered index on a table. Ensure you have it in the right place. First choice is the most frequently accessed column, which may or may ...
Create, Read, Update, and Delete (CRUD) queries can all be generated from the ORM tool without the need for intervention. But, the Read queries generated are...
The userAgent string is a poor indicator of whether a particular feature (or bug) is present. To compound the problem, much of the code that interprets userA...
With the arrival of .NET 4.5, writing async code correctly is easier than ever. Like any tool, it should be only applied where it makes most sense – in web u...
Always set the CacheControlMaxAge attribute in web.config to a high number (a year is good). You don’t want people pulling down the same static content they ...
For is the fastest way of iterating over a collection, foreach is a little slower, and LINQ queries are slowest.
Start with <!DOCTYPE html>. The modern web has no place for Quirks Mode, which was designed so that mid-1990s web pages would be usable in turn-of-the...
If you do need ViewState, understand the page lifecycle and bind your data appropriately. A control loads its ViewState after Page_Init and before Page_Load,...
Unless you’re tracking a Text_Changed event, you don’t need ViewState enabled on TextBoxes and similar controls. Classic ASP.NET automatically repopulates Te...
Make it your habit to turn off ViewState on every control by default, and only turn it on when you need it. If a page doesn’t need ViewState anywhere, turn i...
The same goes for most implementations of Repeaters, ListViews, and so on. These are usually the biggest culprits and they can be ugly. The advantage of View...
You may think it’s impossible to turn off ViewState on a DropDownList, even if you re-bind it on every postback. But with a tiny bit of elbow grease you can ...
If you’re re-binding data anyway, or just toggling one property on postback (asp:Panel anyone?), turn off that ViewState! Please!
To avoid unnecessary round trips to the server, validate form entries on the client using JavaScript before posting them. This provides quick feedback and ma...
Get MiniProfiler and configure it to always run when you hit your site (just don’t enable it for the general public). You’ll get detailed execution times and...
ELMAH supports many formats for storing errors, but I think that SQL Server Compact is a great choice for small to medium size applications.
Yes, if you are in a loop and adding to a string, then a StringBuilder could be most appropriate. However, the overhead of spinning up a StringBuilder instan...
Out of the box, many ASP.NET projects include client script libraries which you may or may not be using. It’s always a good idea to check what you are using,...
Make sure you’ve removed HTTP modules that aren’t being used (Windows authentication, for example), and that you’ve disabled services such as FTP and SMTP, i...
If you’re an ASP.NET MVC developer, you might not know that ASP.NET still loads the View Engines for both Razor and Web Forms by default. This can cause perf...
If a type implements IDisposable, wrap the use of it in a “using” statement, so that it automatically disposes of objects properly when the block exits.
Many people deploy to production without checking how logging is currently configured. It is always advisable to check whether your policy is to have logging...
To accurately debug or profile an external assembly or library (i.e. one you’re not directly compiling), you need the PDB files that accompany each of the DL...
Every time you update your site, IIS must recompile it during the first request, so the initial request takes significantly longer than subsequent ones. An e...
As developers, we often want to fix problems with code, but don’t be afraid to ‘put the compiler down’ and throw some hardware at the problem. Performance pr...
Traditionally, many performance problems have been rooted in either the database or application server. However, with the proliferation of advanced JavaScrip...
If a collection is static, make sure it only contains the objects you need. If the collection is iterated over often, then the performance can be slow if you...
Use a content delivery network (CDN) for hosting images and scripts. They may be cached and it will reduce load on your server.
Use AJAX to retrieve components asynchronously that may not be needed immediately, such as the content of a collapsed panel, content behind a tab, and so on.
Add script references at the bottom of the page, because asynchronous downloads halt when a script reference is reached. Style sheets and images can be downl...
Reducing the amount of data sent across the network can improve application performance significantly. Compressing CSS and JavaScript is possible using bundl...
Make sure HTTP compression is turned on for any uncompressed content. HTML in particular compresses significantly, and in this era of mobile friendliness and...
Use image sprites to retrieve smaller images in one download.
Including height and width in tags will allow your page to render more quickly, because space can be allocated for the image before it is downloaded.
Simple id and class selectors are useful, but using them exclusively means the markup gets messier and less reusable with unnecessary ids and classes. Using ...
As new draft standards progress, browser vendors sometimes get a jump on the standard by adding support via prefixed properties. To ensure that the CSS conti...
CSS parser hacks are unreliable because browsers can be updated causing these hacks to fail. Instead try adding version-specific classes to the html or body ...
Techniques such as jQuery’s $(document).ready() make it easy to run script as soon as the HTML on the page is loaded, which is usually the earliest possible ...
As with external script references, an inline script requires the browser to stop parsing HTML and can also prevent parallel downloading of other resources o...
Putting CSS files in the body can result in the browser showing a blank page until the CSS has loaded. CSS files should go into the head of the HTML document...
New HTML5 tags like <section>, <header>, and <footer> improve the semantics of markup, but require a special “shiv” script to run in Intern...
A common concern among developers is ensuring that their sites render the same across all browsers, including non-modern ones. That’s not always necessary. A...
If you absolutely need to provide the same experience across all browsers, polyfills and shims offer code and markup that can help mimic standards-based APIs...
A good set of build tools such as HTML validators, CSS validators, Uglify, and JSHint, or GruntJS can find latent problems, enforce project code standards, a...
Many of these tips are already built into a project template like HTML5 Boilerplate to save you some time. Those rules work equally well for projects targete...
Standards are a core part of Internet Explorer 10 and helping developers migrate their code to take advantage of this is incredibly important to the IE engin...
It’s easy to get excited every time a new and cool feature comes out but some of these may still be experimental with the specification still under developme...
Although modern browsers are much closer to a single standard than ever before, differences still exist. An occasional multi-browser sanity checkpoint during...
Ensure your variables and parameters are the same data types as the columns. An implicit or explicit conversion can lead to table scans and slow performance.
SELECT * is not necessarily a bad thing, but it’s a good idea to only move the data you really need to move and only when you really need it, in order to avo...
When creating a field which will contains text, it is important to choose the right string type in order to save space and increase performance.
Implement different database queries in different contexts. In the API and on a webpage, you’ll inevitably require different entity properties, so don’t load...
Always profile your ORM database hits with SQL Profiler during development. ORMs get away from you very quickly. Before you know it, you’ve run a query 2000 ...
Since the code generated from the ORM can frequently be ad hoc, ensure that the SQL Server instance has ‘Optimize for Ad Hoc’ enabled. This will store a plan...
Watch out for lazy loading in ORMs. You shouldn’t lazy load any entities that could be retrieved with a single database hit.
When using grid UI controls (framework based, or 3rd party owned), you should carefully consider how paging is implemented. Many controls implement paging in...
Be sure your code is generating a parameter size equivalent to the data type defined within table in the database. Some ORM tools size the parameter to the s...
Avoid following the ‘Hello World’ examples provided with your ORM tool that turns it into an Object to Object Mapping. Database storage is not the same as ob...
Parameterized queries are exactly the same as stored procedures in terms of performance and memory management. Since most ORM tools can use either stored pro...
Performance is enhanced when indexes are placed on columns used in WHERE, JOIN, ORDER BY, GROUP, and TOP. Always test to ensure that the index does help perf...
By default each Application Pool runs with a Single Worker Process (W3Wp.exe). We can assign multiple Worker Processes With a Single Application Pool. An App...
Similarly to external JavaScript, inline script requires the browser to stop parsing the HTML and can also prevent the parallel downloading of other resource...
Make sure you are not limited by 2 tcp ip connections when you don’t need to The default setting for the maximum amount of connection is two per connection g...
An example would be
Use Case
Scaling Dedicated Game Servers with Kubernetes
Kubernetes Best Practices
Kubernetes Basics
In this post, we will look at building ASP.NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools ...
In this post, we will look at building .NET Core Docker App. We will first examine how to do this without Visual Studio and then with Visual Studio Tools for...
The following articles provides a basic introduction to containers technologies. It would allow the reader to gain an understanding of what are containers an...
In this short post, we will examine how to open the native App Store on Android and Windows towards a specific app. This is useful when you want to advertise...
Overview
The final goal of this set of meetings is to establish a clear vision of our solutions in order to present a homogeneous image of our direction towards ourse...
This post documents how to use a README.md appear as the welcome page when loading a solution in Visual Studio.
Windows Communication Foundation (WCF) provides the capability to log incoming and outgoing messages for offline consumption. Message logging enables you to ...
Service Definition For the given service definition below,
Glimpse is like the FireBug client side debugger, except it’s implemented in JavaScript on the client side with hooks in to ASP.NET on the Server Side.
The userAgent string is a poor indicator of whether a particular feature (or bug) is present. To compound the problem, much of the code that interprets userA...
With the arrival of .NET 4.5, writing async code correctly is easier than ever. Like any tool, it should be only applied where it makes most sense – in web u...
Always set the CacheControlMaxAge attribute in web.config to a high number (a year is good). You don’t want people pulling down the same static content they ...
Start with <!DOCTYPE html>. The modern web has no place for Quirks Mode, which was designed so that mid-1990s web pages would be usable in turn-of-the...
In this short post, we will examine a small error in our client library implementation that lead to unexpected bursts of calls to our backend service.
The following represents the very high level design of the next generation file transfer system codenamed Fedex.
The following is a simple checklist for code review.
Context
Code Logging Profile Test Review
The following provides a description of the workflow use during the development of the OWMM service. We are assuming that the development is divided into epi...
The following provides a description of the workflow use during the design of the OWMM service. It focuses mainly on the design docs that will be the foundat...
This post documents the different technologies investigated for cross-platform mobile development.
In this post, we will look at an issue regarding Xamarin WebView and its ability to bind directly to HTML source.
The images in my app were initially embedded in the assembly of my PCL. They would be retrieved as follow:
In this post, we will examine a build error that be initially be baffling. In essence, after adding a library to your Xamarin Forms Android project, we end u...
In this short post, we will examine how to open the native App Store on Android and Windows towards a specific app. This is useful when you want to advertise...
In this post, we will examine a minor but important difference in the app signing process between Android and Windows apps.
How to use Custom Renders to display ads from Google AdMob on Xamarin.Forms. This tutorial outlines the necessary steps for Android and Windows Phone but can...
Today, I ran into a small issue when working on my Xamarin Forms Android application. In essence, my application would run fine in debug mode but it would co...
This post examines one nagging issue with respect to how Xamarin Forms render native controls.
This post documents the different technologies investigated for cross-platform mobile development.