↓ Skip to main content

Articles

Bing Maps in an MVC Application

Bing Maps in an MVC Application

·1 min
Here is a simple example of how to use Bing Maps in an MVC application. I am using Bing Maps V8 which is the current version of Microsoft. Also, nothing that document.ready will fire long before the map script loads as it loads asynchronously. Sometimes document.ready will fire before the page is loaded which means the map div might not even be available. To overcome this, we are using the callback parameter of the map script UR: for example:
Caching to improve the user experience

Caching to improve the user experience

·4 mins
(Added LazyCache in to the Testing) One of the essential factors in building high-performance, scalable Web applications is the ability to store items, whether data objects, pages, or even parts of a page in memory the initial time they are requested. You can save these items on the Web server or other software in the request stream, such as a proxy server or at the browser. This allows you to avoid recreating information that satisfied a previous request. Known as caching, it will enable you to use many techniques to store page output or application data across HTTP requests and reuse it. When the server does not have to recreate information you save time and resources, and throughput and scalability increase.
SignalR – the right way

SignalR – the right way

·5 mins
It has been quite sometime that SignalR has been around, 2014, so why are not more people using it? First what is SignalR? ASP.NET SignalR is a library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorisation.
Async Unit Tests

Async Unit Tests

·1 min
In theory, Async unit testing seems easy, run the Async, wait until it is finished and look at the results. But as you will find out it is not that easy. Here is the official approach to Async unit testing
Generate C# Classes from JSON Responses

Generate C# Classes from JSON Responses

·3 mins
Well, as web developers, we are always dealing with JSON data which are coming from different sources. Either we are serialising our entities, or it’s coming from the external sources like third-party services and so on.

Repository Pattern – for the REST API

·7 mins
The Repository Pattern used to be the next big thing when it was used, but over time it got replaced by frameworks such as the Entity Framework and LINQ, which provided much more functionality and flexibility.
Create a subset of Unit Tests with a Playlist

Create a subset of Unit Tests with a Playlist

·1 min
Visual Studio Unit Test Tools comes with another excellent feature to manage unit test as a group /subset, called as “Playlist”. A Playlist is a subset of unit test methods grouped under some category. The Playlist could be a logical subset based on modules, features, layers etc. A Playlist is useful when we want to test a particular set of test cases among all the test methods. In that case, we just create a group of those test cases which may get impacted by our current changes in the actual code, and execute them only to ensure nothing breaks.
Timeout Process

Timeout Process

·2 mins
When you are dealing with large amounts of data or processes that are very time hungry you sometimes need the ability to timeout that task and continue. Here is a snippet of code that loops around that takes 1 second, and you can set a timeout to any time you like, but if it is less than 1 second, it will cancel the task and free up resources.
Search every column in a SQL Server Database

Search every column in a SQL Server Database

·1 min
Following on from the Search every table and field in a SQL Server Database article I posted last week, I thought it would be useful also to be able to search every column for some text and return where it was found.
Search every column in a SQL Server Database

Search every column in a SQL Server Database

·1 min
Following on from the Search every table and field in a SQL Server Database article I posted last week, I thought it would be useful also to be able to search every column for some text and return where it was found.
Versioning

Versioning

·5 mins
In the article we are going to look at the importance of a good version control system, and why it is crucial when it comes to API versioning. It is essential that we deploy a Web API version control from an early stage in our project. Versioning will ensure that the project is built on a solid base and that a standard is maintained. A good version control system will enable us to collaborate and scale in a managed way, and as such will provide our customers with a more straightforward progression through our upgrades.
Search every table and field in a SQL Server Database

Search every table and field in a SQL Server Database

·2 mins
One thing I do like about MySQL is when using phpMyAdmin is the ability to search the whole database for any string, this should only be available for developers who are searching for data in an extensive database. It does take some time to run, but remember it has a lot to do.
DataSets with Entity framework

DataSets with Entity framework

·2 mins
Why, why, why I hear you say would you want to use Datasets with the Entity Framework? I’m not here to debate the whys and wherefores for doing this, just finding a simple solution to the problem.
Choosing the Boring Solution

Choosing the Boring Solution

·1 min
When solving a complex problem, it’s sometimes very tempting to choose an excellent solution. Not only will this solve the problem – but it will also impress your teammates and bring you everlasting glory. An even better solution, however, would probably be a boring one. One that is easy to understand, even for your junior colleagues. One that is well-known for your platform and language. One that is entirely not extraordinary.
Aiming for Simplicity

Aiming for Simplicity

·1 min
Acronyms FTW! Car enthusiasts might now think of BMW, but software developers should think of KISS and YAGNI. “Keep it simple, stupid” should remind us that the simple solution will always beat the overengineered solution. The reasons why this is true are almost endless. And they might be easier to understand when looking at the opposite: complex code.
Stack-Overflow-Driven Development

Stack-Overflow-Driven Development

·2 mins
Thank God for StackOverflow.com. I seriously can’t imagine my (programming) life without it. And with it being one of the most visited sites on the web, I guess I’m not alone. There’s a long friendship between Stack Overflow and me. It helped me countless times when I was stuck on a problem. It gave me an idea of how other people had approached the same problem. Sometimes these other people helped me solve my problem. Sometimes they gave me a hint for a possible solution. And sometimes reading their issues at least let me know that I wasn’t alone with a miserable bug…
Design Patterns

Design Patterns

·1 min
Sometimes, a solution is so beautiful, and you wish you had the right problem to apply it to. But unfortunately, issues come first. As impressive as your new screwdriver may be (imagine a handle made of gold, with your initials engraved, of course, if the problem at hand is to knock in a nail, it makes for only a less than perfect solution.
Creating Good APIs

Creating Good APIs

·2 mins
I’m sure you’ve used a third-party API at some point in your dev career – for example, to create new contacts in your CRM, to send emails through a newsletter service, or to do anything else with a third-party service virtually.