Subscribe to this list via RSS Blog posts tagged in Web

Posted by on in Blogs
The Web Is Just Text In the beginning (around 1990 or so), the World Wide Web was composed of three parts: HTML, a markup language for displaying rich documents HTTP, a stateless protocol for communicating with a web server The URI, a short, standardized reference to a network resource Almost 20 years later, very little has changed, especially from the point of view of the server. To the list above, we have added client-side stuff like JavaScript and CSS, and HTML is now at version 4. But HTTP and the URI...

Posted by on in Blogs
jQuery and ASP.NET MVC Model Binding to a List In ASP.NET MVC, when you want to submit a page with many instances of a certain type (e.g., a form with a list of phone numbers), the framework will recognize the form elements as a list if you use a specific format for the name attribute of the inputs. This allows you to have an action like this: public ActionResult UpdateInts(IList<int> ints) { The MVC framework, in this case, will look at all the inputs on your form, figure out which inputs correspond to which records on the for...

Posted by on in Blogs
jQuery and ASP.NET MVC Model Binding to a List In ASP.NET MVC, when you want to submit a page with many instances of a certain type (e.g., a form with a list of phone numbers), the framework will recognize the form elements as a list if you use a specific format for the name attribute of the inputs. This allows you to have an action like this: public ActionResult UpdateInts(IList<int> ints) { The MVC framework, in this case, will look at all the inputs on your form, figure out which inputs correspond to which records on the for...

Posted by on in Blogs
ASP.NET MVC TempData Is Really RedirectData Update: This post was written for MVC 1. TempData behaves completely differently in MVC 2 Beta and higher. In these versions, TempData is cleared only when it is read (or when the session expires). Many people seem to be confused about the TempData feature in ASP.NET MVC. TempData behaves like the ViewData dictionary, except that it persists until the next request from the same browser. Because of this, TempData should only be used when you know exactly what the next request is going to be...

Posted by on in Blogs
ASP.NET MVC TempData Is Really RedirectData Update: This post was written for MVC 1. TempData behaves completely differently in MVC 2 Beta and higher. In these versions, TempData is cleared only when it is read (or when the session expires). Many people seem to be confused about the TempData feature in ASP.NET MVC. TempData behaves like the ViewData dictionary, except that it persists until the next request from the same browser. Because of this, TempData should only be used when you know exactly what the next request is going to be...

Posted by on in Blogs
Customizing jQuery Validation While doing some bug fixing and cleanup in a web application, I had the chance to go a little deeper into the jQuery user input validation framework. There are many tutorials available about implementing custom validations. But what I wanted to do was to extend the default validations with my own code, while preserving the existing functionality, and to do it site-wide. So let's pretend that I'd like to extend the default "required" validation in such a way that you are not allowed to enter "...

Posted by on in Blogs
Lightweight Frameworks, Again A couple weeks ago, I wrote a post noting that I liked the lightweight nature of the Ruby web framework Merb. Today comes the news that Merb and Rails will be merging in Rails 3. People who see Merb as the "anti-Rails" seem to find this surprising. But people who see Merb as "Rails done right/better" are enthusiastic about it. It's hard to blame the developers for being more interested in pleasing the latter group. When you read through the list of "What Does That Mean, Exactly?" at this link, I...

Posted by on in Blogs
Lightweight Frameworks I came across this interview with Yehuda Katz about Merb, an interesting web framework for Ruby.  Although I have less actual experience with Merb than with Rails, I've always liked the general design philosophy of Merb. Whereas Rails appears to be designed as a complete MVC framework (and a nice one, too; I'm not writing this post to critique Rails), Merb allows you to build your own framework by combining existing tools. It doesn't try and reinvent a new ORM or package manager, for example. Li...

Posted by on in Blogs
Lightweight Frameworks I came across this interview with Yehuda Katz about Merb, an interesting web framework for Ruby.  Although I have less actual experience with Merb than with Rails, I've always liked the general design philosophy of Merb. Whereas Rails appears to be designed as a complete MVC framework (and a nice one, too; I'm not writing this post to critique Rails), Merb allows you to build your own framework by combining existing tools. It doesn't try and reinvent a new ORM or package manager, for example. Li...

Posted by on in Blogs
Transforming Models In my last post, "'Model' Is an Overloaded Word," I discussed several types of models which might be present in an MVC application. But I limited the discussion to models which are actually in the executable.  There may of course be additional models, such as ERDs, UML models, etc., which exist in the development environment, but are not actually part of the executable. It is often the case that we use software tools to transform these conceptual models into executable code of one form or ano...

Check out more tips and tricks in this development video: