It is natural for the user to want to browse through data within an application. Until recently, the interfaces with data sources have been ill-equipped to support this. OData, at last, takes the legwork away with some well-considered support for the paging of data, without imposing any particular conventions on the application. Dino explains how to use it.… Read more
Razor is now the dominant markup language for ASP.NET MVC applications, since it is terse and produces more readable markup than the ASPX syntax. Now with conditional nuggets and URL auto-completion, it is the obvious choice, as Dino explains.… Read more
There are some aspects to application programming, such as logging, tracing, profiling, authentication and authorization that cut across the business objects. These are difficult to deal with in an object-oriented paradigm without resorting to code-injection, code-duplication or interdependencies. In ASP.NET MVC, you can use attributes in the form of action filters to provide a neater way of implementing these cross-cutting concerns.… Read more
When you're instrumenting an ASP.NET MVC or Web API application to monitor its performance while it is running, it makes sense to use custom performance counters.There are plenty of tools available that read performance counter data, report on it and create alerts based on it. You can then plot application metrics against all sorts of server and workstation metrics.This way, there will always be the right data to guide your tuning efforts.… Read more
By introducing R libraries into an ASP.NET MVC application, it is possible to broaden its analytical and visualization power immensely. To illustrate this, Sergei shows an example of how to use the R libraries Lattice and GoogleVis to detect poorly-performing product categories, the quantity sold and the profit from them, and estimate their demand over time.… Read more
Attribute routing solves a lot of the problems of classic ASP.NET routing, which can get ungainly when there are many route handlers, or you have several REST services. Dino shows how to enable and use attribute routing in ASP.NET MVC… Read more
Continuing the project to build a Business Intelligence (BI) application using R, Visual Studio 2012 and Twitter Bootstrap, Sergei introduces drill-down via jQuery and jQuery UI, simplifies the R coding with the PLYR and GGPLOT2 libraries, and shows how to generate reports simultaneously with a batch f… Read more
It is only a matter of time in developing most websites that you'll need to implement a way of restricting access to parts of the site. In MVC, the 'Authorize' attribute handles both authentication and authorization. In general, it works well, with the help of extension to handle AJAX calls elegantly, and to distinguish between unauthorized users and those who are not logged in.… Read more
It is possible to use the R statistical package to extract Business Intelligence from the data in a SQL Server database, and render graphs and tables in HTML to give you a BI Dashboard in an ASP.NET MVC website. Sergei gives you a step-by-step guide. … Read more
Forms in websites have, for a long time, languished in their classic clunky pattern of browser-led 'submit' of content, using the FORM tag. As websites grow nearer to applications in their user-experience, so better is required. Dino show how to get a more sophisticated modal input form based on Twitter Bootstrap, jQuery Validate, and XmlHttpRequest (XHR). … Read more
With an ASP.NET MVC application of any size, there comes a time when you are faced with creating utility forms where you don't need a special form layout. One of the best ways of doing this is by using data annotations. Despite a quirk or two, it can save a lot of time. … Read more
The creation of a public API for data presents something of a dilemma for the developer. Web API, with its content negotiation, seems somehow cleverer than classic ASP.NET MVC, but there are complications, such as the XML schema, that suggest that there are merits in using MVC controllers for all public HTTP APIs… Read more
The Designers of CSS never envisaged the demands that we make of styles. However, preprocessors such as SASS can provide the obvious missing features such as constants, selector inheritence and nesting. Compass can in turn use SASS to provide a simple browser-independent way of expressing complex layout.… Read more
Display modes in ASP.NET MVC 4 provide a neat way of separating page content from the way it is rendered on different devices. All you need to do is to define a display mode for each device, or class of devices, that you're interested in.… Read more
Even ASP.NET MVC can be improved. Dino explains the value of templates, and makes a case for the productivity gains that could come if there was a way of making more interactive custom templates that are honed for your own particular requirements.… Read more
The ASP.NET MVC controller is a good friend of web developers. There are a host of features in it that can be used to reduce the amount of coding you have to do, and to make the logic simpler. … Read more
ASP.NET MVC is built on top of ASP.NET's HTTP handlers and ad hoc URLs. The process of routing a URL to the correct controller/action pair makes it far easier to create any website that plays a more versatile role than merely serving file-based pages.… Read more
Switching from developing ASP.NET WebForms to MVC might seem awkward at first, but Ed demonstrates why the change needn't be painful, and how best to build a set of tools for rapid MVC development. This article is hosted on Github, so feel free to contribute suggestions, improvements or translations.… Read more
To be scalable, web applications have always had to be asynchronous, even if the programmer did not need to be particularly aware of the fact. However ASP.NET Webforms and ASP.NET MVC now to make it simpler for developers to implement HTTP handlers asynchronously. You can also start implementing asynchronous operations for potentially lengthy tasks in ASP.NET MVC. Dino explains how. … Read more
Why is it that ASP.NET MVC has such strongly-enforced naming conventions? Can conventions for the default behaviour of code actually help to reduce the complexity of applications, and at what point is it wise to break conventions in application architecture. Dino investigates the issues.… Read more