Can there be true separation of concerns with MVC? Not entirely, especially when Angular's templates allow you so much flexibility; but there is a great deal to be gained from following guidelines to ensure that all business logic is performed in the code-behind as directed by the controller or its delegate, and that all operations on the model are done in the controller: Michael Sorens explains the four essential guidelines for an easily-maintained system.… Read more
It is a common problem with a web page that a form is too complex to fit easily on the page. You can, of course, rely on the scrollbar, but it soon becomes a daunting and erratic process for the poor user. Wizards, that allow you to guide the user through a process, are great but take time to set up. Is there a simple solution for those occasions where there is too much data-entry for a form but a full wizard seems like overkill?… Read more
For some time now, C# programmers have gazed enviously at the interactive capabilities of F#, Python and PowerShell. For rapid prototyping work and interactive debugging, dynamic languages are hard to beat. C# Interactive slipped into view quietly, without razzmatazz, in Visual Studio 2015 Update 1. It's good, it's worth knowing about; and Tom Fischer is intent on convincing you of that.… Read more
If all your application testing is done by test experts, who know how to record images, do screen-capture, write issue-reports to TFS more appropriate and consistent format and so on, you probably don't need the 'Exploratory Testing' chrome plug-in. Otherwise, it is worth checking out Ambily KK's walkthrough.… Read more
Applications must perform well. The problem is that performance can't easily be added later as an afterthought but must be part of the culture and values of the development team. This isn't easy, particularly if measurement is difficult to achieve and it is tricky to determine exactly what is running too slowly. As well as making performance a clear objective, you need an efficient integrated approach and the right tools. If you get this right, it can save a lot of expense, and time spent refactoring code. … Read more
It is just the first stage to make your C# Cmdlet do what it is supposed to do. Even though cmdlets are used at the commandline, they need a whole range of features to make life easier for the end user. These include such refinements as providing documentation, validating inputs, providing a manifest, and implementing the common parameters.… Read more
React is a front-end user interface library developed by Facebook, originally to help them improve their own site. Since then it has grown into somewhat of a phenomenon, with many active users. In this article, Jon Smith provides multiple examples of how to use React with recently released ASP.NET Core MVC, and the existing ASP.NET MVC5 framework.… Read more
The requirements for the management of passwords have become far more complex over the past few years in response to the increasing sophistication of security breaches. Nowadays, you need to provide a range of features such as hashing, routine change of passwords, preventiion of repeat passwords, email confirmation, auto-generation of random passwords and password quality checks. Dino Esposito explains.… Read more
Although SQL Server's Full-Text search is good for searching text that is within a database, there are better ways of implementing search if the text is less-well structured, or comes from a wide variety of sources or formats. Ryszard takes ElasticSearch, and seven million questions from StackOverflow, in order to show you how to get started with one of the most popular search engines around.… Read more
ASP.NET Core is a fascinating platform with many good ideas, but in its present form (RC1)there is a culture shock for experienced ASP.NET developers to experience the effort involved in porting a realistic application. There is an obvious advantage in being able to host an application on any web server, but is this enough to compensate for losing the convenience of an integrated pipeline?… Read more
When you are reviewing your colleagues’ code, it is a good idea to look closely at the unit tests to check that they match the requirements, test just one thing, and cover every branch in the main code. Do their names tell you what they test? Are they at the right level of complexity? Code … Read more
A code review is a serious business; an essential part of development. Whoever signs off on a code review agrees, essentially, that they would be able to support it in the future, should the original author of the code be unavailable to do it. Review code with the energy you'd use if you owned the code. Michael Sorens runs through the principles of reviewing C# code.… 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
Although PowerShell Cmdlets are usually written in PowerShell, there are occasions when the level of integration with existing C# or VB libraries is awkward to achieve with PowerShell. Yes, you can write Cmdlets in C# perfectly easily, but until now it has been tiresome to discover how. Now Michael Sorens shows you the simple route to writing effective C# Cmdlets.… 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
Although SQL is an obvious choice for retrieving the data for analysis, it strays outside its comfort zone when dealing with pivots and matrix manipulations. R includes a number of packages that can do these simply. By combining the two, you can prepare your data for analysis or visualisation in R more efficiently.… 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
Without a doubt, Entity Framework is a quick and satisfactory way of producing a database-driven web application. As performance becomes more important, it does, however, require some knowledge of the traps that you need to avoid, and of the wrinkles that impact performance. Ben Emmett gives a practical guide.… Read more