Subscribe to this list via RSS Blog posts tagged in Web

Posted by on in Blogs
Would You Buy a Used Framework from This Tool? I think the Web Platform Installer is a great tool, but I have to question the wisdom of its home page: If you click on these, you see... nothing. A description would be nice. ("Application Request Routing? What's that? EC-CUBE?") But that's not really the problem. The bigger problem is this: A "spotlighted installers" feature probably sounded great on the drawing board, but this tool is intended for public-facing web servers. It isn't the App Store; public-facing web frameworks should...

Posted by on in Blogs
Would You Buy a Used Framework from This Tool? I think the Web Platform Installer is a great tool, but I have to question the wisdom of its home page: If you click on these, you see... nothing. A description would be nice. ("Application Request Routing? What's that? EC-CUBE?") But that's not really the problem. The bigger problem is this: A "spotlighted installers" feature probably sounded great on the drawing board, but this tool is intended for public-facing web servers. It isn't the App Store; public-facing web frameworks should...
An Excuse Not to Roll Your Own Authentication Scheme The Rails 3.1 Release Candidate announcement contained news of many new and useful features, plus these regretful words: has_secure_password: Dead-simple BCrypt-based passwords. Now there’s no excuse not to roll your own authentication scheme. I will briefly provide an excuse. "Simple BCrypt-based passwords" is a reasonable feature, but shouldn't be mistaken for end-to-end authentication, or even a substantial subset of that problem. Web site authentication in the real world is a far harder...
An Excuse Not to Roll Your Own Authentication Scheme The Rails 3.1 Release Candidate announcement contained news of many new and useful features, plus these regretful words: has_secure_password: Dead-simple BCrypt-based passwords. Now there’s no excuse not to roll your own authentication scheme. I will briefly provide an excuse. "Simple BCrypt-based passwords" is a reasonable feature, but shouldn't be mistaken for end-to-end authentication, or even a substantial subset of that problem. Web site authentication in the real world is a far harder...

Posted by on in Blogs
A Better View API for Grids in ASP.NET MVC I'm writing a grid-independent interface for displaying data in ASP.NET MVC applications, and I would like your feedback on the API design. In my last post, I discussed some of the problems with existing grid components for ASP.NET MVC. Actually, there are a couple more design issues which I forgot to mention in that post. I'll discuss them briefly before talking about View design. Many grids require two requests in order to display the first page of data: One for the page itself, then a ...

Posted by on in Blogs
A Better View API for Grids in ASP.NET MVC I'm writing a grid-independent interface for displaying data in ASP.NET MVC applications, and I would like your feedback on the API design. In my last post, I discussed some of the problems with existing grid components for ASP.NET MVC. Actually, there are a couple more design issues which I forgot to mention in that post. I'll discuss them briefly before talking about View design. Many grids require two requests in order to display the first page of data: One for the page itself, then a ...

Posted by on in Blogs
One (MVC) Grid to Rule Them All Imagine you're starting a new project using ASP.NET MVC. Let's say it's a project which frequently requires displaying a list of records, like Google or Stack Overflow or an enterprise database application. Which grid should you use? The obvious answer is, "I don't know. I'm just getting started. Does it really matter, right now?" Don't you wish! There are many grids available for ASP.NET MVC. If you're prepared to dedicate your project to a single grid at the outset of your project, and n...
How to Avoid Cut and Paste Code with ASP.NET MVC 2 Model Validation In this post, I will demonstrate how to make your own model validation attributes in order to share common validations throughout an ASP.NET MVC application, and which support MVC 2's client-side validation feature. Validating a ZIP Code As an example, consider a model for an address. public class EditModel { public Guid Id { get; set; } public string Address1 { get; set; } public string Address2 { get; set; } public string City { get; set; } public string State { ...
How to Avoid Cut and Paste Code with ASP.NET MVC 2 Model Validation In this post, I will demonstrate how to make your own model validation attributes in order to share common validations throughout an ASP.NET MVC application, and which support MVC 2's client-side validation feature. Validating a ZIP Code As an example, consider a model for an address. public class EditModel { public Guid Id { get; set; } public string Address1 { get; set; } public string Address2 { get; set; } public string City { get; set; } public string State { ...

Posted by on in Blogs
Unit Testing Html Helpers for ASP.NET MVC Html helpers for ASP.NET MVC are static extension methods, which frequently reference the ViewContext and  HttpContext. Combined, this can make unit testing a bit tricky. Let's write a new Html helper using a test-first methodology. Let's start with a prototype function:         public static MvcHtmlString MyTable(this HtmlHelper helper, MyModel model, IDictionary<string, object> htmlAttributes)         {             return MvcHtmlString.Empty;         } I've added just enough cod...

Check out more tips and tricks in this development video: