Web-based applications run smoother if instead of using the traditional form method, they use JavaScript to post data to the server and to update the user interface after posting data: It also makes it easier to keep POST and GET actions separated. SignalR makes it even slicker; it can even update multiple pages at the same time. Is it time to use JavaScript to post data rather than posting via the browser the traditional way?… Read more
Developers are now spending much more time writing and debugging JavaScript, CSS, HTML templates etc. Microsoft have responded by adding better tools for front-end development into their development environment, Visual Studio. In this article Jon Smith uses a sample application to demonstrate how he converted an existing ASP.NET MVC5 application to use these new tools… Read more
The occasional problems that you can get with POST and GET are typical of the difficulties of separating any command and query operations. This separation is tricky to achieve, at least in ASP.NET MVC. Dino suggests some ways of avoiding errors and minimising the confusing warning messages.… Read more
Is it time to abandon the use of Web Forms in favour of controller methods in ASP.NET MVC? As always, the answer is 'it depends', but it is certainly a good time to make sure that your skills-set includes the use of controller methods and understanding the software design principles behind MVC. Dino Esposito explains why.… Read more
Keeping a customer facing web site up and performing well is a challenge, especially when you are still adding new features. While providing an "always on" experience for users is preferred there are times when it is easier to take the site "down for maintenance" and fix those things that are just too difficult and costly to do with the site up. Jon Smith describes his solution to a controlled "down for maintenance" approach for ASP.NET MVC sites.… Read more
Web pages increasingly suffer from JavaScript-library bloat. Because it is difficult to avoid the awkward wait while these libraries load, there are some techniques for making the loading of these script files less evident to the page-load time. The introduction of HTTP/2 opens up further opportunities to defer script load or do it asynchronously in parallel. Dino explains.… Read more
Scaffolding is a great way of kick-starting model-view-controller (MVC) framework development. Visual Studio's MVC Scaffolding uses templates to generate the routine code that is common to all ASP.Net MVC builds, such as data access and Web API. It allows the developer to concentrate on what is unique to the application.… Read more
Partial views in ASP.NET MVC allow you to reuse and customise components to act like user controls. They consist of both code and markup. They are an idea that is easy to grasp but they have great potential for the more adventurous developer who is prepared to experiment. Dino Esposito explains.… Read more
Even the most experienced programmers can be caught unawares by software they've used for years without trouble. Dino Esposito explains why and how the JSON method in an ASP.NET MVC controller class suddenly started to cause an exception on a production server, and how he fixed the problem.… Read more
Despite the fact that browsers were designed specifically to get information from the server only by requesting or 'pulling' it, developers have always yearned to be able to push data to browsers from the server. Typically, it would be to display, within a web page within the browser, the progress of a long-running task. Now ASP.NET SignalR and Bootstrap make it possible, with care. Dino explains how.… Read more
SignalR is great for all those tasks that one would otherwise need to rely on AJAX. However, it is much more versatile than this: it allows, for example, a server process to update users' browser windows selectively rather than broadcast to all, and can treat groups of users in different ways. Dino explains how this magic works.… Read more
SignalR, from Microsoft, solves many of the problems that come with developing web applications that need a communication channel with the server that is effective on a variety of server and client configurations. Christos Matskas gives an overview of the library and its potential.… Read more
SignalR is all about pushing notifications and data between web server and browser, but you can tap into a by-product of the work it has to do to keep track of the users who are currently online. This will provide a list of the users currently connected to a web community. SignalR has endpoints to push server events of any kind to the client, and thereby provides solutions for a number of common programming tasks.… Read more
Sometimes, the requirements for a web application include a list of users that are currently logged-in. It would seem, at first glance, to be pretty trivial, but because few of us explicitly log out of web applications, the reality can get complicated. Even the best solution is a trade-off. Dino explains the issues and alternatives.… Read more
A website often needs to update a page as the underlying data changes. You can, of course, just poll the server every few seconds on the browser via JavaScript, but to receive live updates from a site it is better to push data to the browser, using server-based SignalR. This uses web sockets to do this rather than browser-based polling where web sockets are supported on the browser. Dino explains how.… Read more
Implementing a single sign-on for a set of a company's business applications isn't hard if they are all new applications, especially if you use WS-Federation and and Identity server such as Thinktecture. If it is a mix of new and existing applications then it helps to sort out any problems if you first understand the technology as a whole, and appreciate how it works. Jarek shares his experiences.… Read more
ASP.NET's identity framework gives you everything you need for using Claims-Based identities. However, claims-based identities can be simulated in plain old ASP.NET by means of a custom principal if you have an internal username/password login provider, and need to be able to display more information about a user.… Read more
When you're designing an application, there is a temptation to build it to a super-scalable future-proof architecture, even when the immediate requirements can be met by a simple single-tier application that can exploit the pure power of IIS and SQL Server. Dino recounts the painful story of what happened when the gurus got their way.… Read more
As developers we always want to produce efficient code, but efficient in what - development time or overall performance? In this article Jon Smith describes how to investigate and understand performance so that you can decide how to balance these two goals. The article starts with high level performance issues and drills down to detailed code tuning using examples taken from real applications.… Read more
ASP.NET MVC provides a way of providing declarative validation of user inputs. It removes a lot of the tedium of this important task. Nick Harrison explains how to do it, and also points out why it is so important to provide input validation… Read more