Web Programming
I have been lax in updating posts on the blog. Mostly this is because I have been transitioning from web development to my Ph.D. research work in Aerospace Engineering over the last two or so years. The topic of the blog thus far has been mostly web development related, with less significant posts on the topic recently. I’ve decided to transition the blog into my current focus, research, as my personal focus has also shifted (it is a personal blog after all). As part of this I have updated the blog engine itself (subtext). Many thanks to those at...
I was getting the following error after installing IIS and starting a new Web Site in Windows 7
---------------------------
Internet Information Services (IIS) Manager
---------------------------
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
---------------------------
OK
---------------------------
And in the System Event Log:
The World Wide Web Publishing Service (WWW Service) did not register the URL prefix http://something.local:80/ for site 1. The site has been disabled. The data field contains the error number.
It turns out Skype automatically listens to port 80 and 443. Change this is the advanced settings of Skype to fix the issue.
Today I was working on some code, nothing particularly different than any other day. I did something I have done thousands of times before, made some changes, and then needed to get previous code back. This was quickly done with undo several times, copy to clip board, redo several more and then paste. Then it hit me, why don't we have an undo within selected text? We have a search and replace within selection. Undo within selection complements the search and replace really well, and further, allows for quicker retrieval of code several edits ago....
Version 1 of ASP.NET MVC has been released, presumably for MIX in Vegas. It's been a year following the project, and it's exciting to see MVC released after three years of development since March 16th 2007.
http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en
Overview
ASP.NET MVC 1.0 provides a new Model-View-Controller (MVC) framework on top of the existing ASP.NET 3.5 runtime. This means that developers can take advantage of the MVC design patterns to create their Web Applications which includes the ability to achieve and maintain a clear separation of concerns (the UI or view from the business and application logic and backend data), as well as facilitate...
This is rather exciting to me; I just ran a few load tests on Unifico with and without remoting the services with WCF bindings. I knew the application could remote. The concern was how efficient. I created a quick web test that simply goes through the admin, lists the admin lists, performs a filter, edits and saves an item, then logs out. Roughly every action was hit (eh, it's a spike :)). I then setup the bindings and ran a load test remotely and locally (remotely being hosted on 127.0.0.1).
I like to call the...
I find recursive expression to be really useful. They are particularly handy when dealing with parent child relationships. As a demonstration, see a potential method for generating a site map below:
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5
6 namespace SiteMapDemo
7 {
8 class MenuItem
9 {
10 public Guid ID { get; set; }
11 public Guid? ParentID { get; set; }
12 public string Name { get; set; }
13 public string Path { get; set; }
14 public int Rank { get; set; }
15 }
16 class Program
17 {
18 static void Main(string[] args)
19 {
20 List<MenuItem> menu = new List<MenuItem>(new[]{
21 ...
Two new additions were added to Unifico: filtering on fields and sorting on fields with the help of Html Extension methods.
A PagingSet class was defined to contain configuration options for the paging. In this way a View can still page on more than one list and maintain complete control over the Html rendered. Every string used in the Html Helpers is pulled from the configuration (A default is made available).
Several extension methods were added to the Html Helper to make rendering the controls easier.
The filtering html form can be rendered with <%= Html.FilterInput(Paging, "Go")...
The Account Component in the Unifico Framework which is serving as a sample component now has an admin. Two supporting developments for the admin are also up: the paging HtmlHelper and overridable embedded views. Allowing for the embedded views to be overridden by placing new views in App.Web greatly eases development and should help in Component maintenance and versioning (new views can be made without rebuilding the component). I am also rather happy with the eas to which views are made overridable.
The paging turned out quite well, a few changes to the PageResponse<T> to implement IPageable made...
A while back I found an interesting post on embedding resources in MVC at "The Glass is Too Big" (http://www.wynia.org/wordpress/2008/12/05/aspnet-mvc-plugins/). Following the method was straightforward and allowed views to be embedded within a Component Class Library. Well, two extra items would be nice. It would be nice to not have to write that large plug-in path, and if a view was defined in the views folder it would be returned in lieu of the embedded view.
Adding this support required two modifications. First the AssemblyResourceProvider was modified to check for the view's existence by adding...
Unifico has a few paging helpers to make service methods easily paged from a client. Essentially the framework makes consuming a page request object as simple as calling .ToList() on an IQueryable source. The object, the PageRequest, has two collections, Filters and Sorts with several constructors to make instantiation easy. The collections are rather straight forward, providing filtering and sorting ability on a paging source. The uniqueness comes from the ability to request multiple filters and sorts together, along with a paging request. This request is then execute on the IQueryable source, so if DLINQ...
Full Web Programming Archive