I just got hit by DROA’s domain slamming

by Tobias Hertkorn on July 31st, 2006

Wow, that’s what I call sleezy! What a fraud and what a missleading letter. I just got some snail-mail claiming that one of my domains is about to expire. Which is so not true. But seriously, even me got a bit edgy, but I just wonder what it does to people that are not too familiar with domain registration and/or are in a hurry reading through this letter. But be aware that I believe any notice from Domain Registry of America (DROA) (and of Europe, Canada, etc.) and/or namejuice is a fraud and a ripoff. As far as I am concerned they are intentionally being misleading. By using fear, uncertainty and doubt they persuade the recipient that they must pay DROA, or lose their domain registration.

Read about it here:

July 31st, 2006 10:49 am | Comments Off

Refactoring Cons

by Tobias Hertkorn on July 30th, 2006

I rarly look into the statistics ShortStats generates. But out of curiosity I klicked on it – and it promptly inspired a post. Because it showed me a very interesting search string somebody used:

“Refactoring AND Pros and cons”

Hmm, and it got me thinking. What ARE the disadvantages of refactoring. Or when is refactoring not the right way to go. Well, the pros are widly know and discussed. It helps make your code more readable and therefore helps keeping the knowledge about the code alive. Going back to your code and/or looking at unfamiliar code gets a lot easier. So this should actually speed up overall development since there won’t be to many “what is this routine doing” questions, which can take up many, many hours.

But are there situations where refactoring backfires? I really don’t know! I guess it (as always) depends. Coming from the CEO as a requirement “You have to refactor x hours a week, or loss of pay!” – well, I can see how that could backfire. Or even a “We have to refactor the next 2 weeks, because the code is FUBAR. Our code has to be 50% neater by then!” coming from the project manager or lead developer. But I don’t think that careful and small scale refactoring can hurt, ever. Just refactoring for the refactoring’s sake, that could be a problem.

I think it is even a problem of defining the term “refactoring”. What is refactoring, what is rewriting. Where do you draw the line? Hmm, I just wonder. Any comments? Who has a story, where refactoring has wreaked havoc?

July 30th, 2006 1:31 am | Comments Off

Another multiple WAPs Howto

by Tobias Hertkorn on July 28th, 2006

Scott just sent me a pointer to another great WAPs Howto. Omar over at webdevtools did a great job on making my little post about multiple WAPs look a bit … well, you be the judge: Part 1

July 28th, 2006 10:35 am | Comments Off

Using multiple Web Application Projects (WAP) in one Solution

by Tobias Hertkorn on July 27th, 2006

If you don’t want to read about why I tried to use the Web Application Project model, please “fast forward” to How to set up multiple WAPs in one solution.


What is the Web Application Project? Plus there are some good pointers in Scott Guthrie’s blog.

For a client of mine, I am currently working out a major best-practice guideline for developing reusable .NET 2.0 programs. Their situation calls for a program design that makes it as easy as possible to reuse modules on multiple websites and on multiple rich clients. So I chose an approach that is a mixture between MVP and software cells to make it easier to reuse a lot of code between a Web App and a Windows Forms App. Unfortunatelly that still calls for duplicated code between multiple web apps, since the Views (Custom Controls) will reside inside the Web Site Project. Therefore it will get increasingly cumbersum to share modules between different web solutions. I thought back to when I used VS 2003 and thought it was really unfortunate that Microsoft changed the web project’s look and feel. Why couldn’t I create multiple web projects, each representing all of one module’s views. I remembered having blogged about WAP a while back – even though for a different reason. It is an optional project style released by Microsoft that provides the same project, build and compilation semantics as the web project model known from VS 2003. Using WAP it is possible to use multiple projects each containing custom controls. Using WAP, it should be possible to use a (simplified) project tree like this:

  • Com.Hertkorn.Infrastructure.Cells.Forum (Class Library)
    containing Presenter, BLL and DAL, the M and P part of MVP
  • Com.Hertkorn.Website.Views.Forum (Web Application Project)
    containing Custom Controls, the V part of MVP for websites
  • Com.Hertkorn.Forms.Views.Forum (Windows Control Library)
    containing the V part of MVP for windows forms

Yeah, I know this a very crude representation of the actual assembly structure needed for real world MVP and Cells, but I made it simple enough to stress the main point: Now the multiple web solutions only need to reference Com.Hertkorn.Infrastructure.Cells.Forum and Com.Hertkorn.Website.Views.Forum in order to use the forum module. And Windows Applications use Com.Hertkorn.Infrastructure.Cells.Forum and Com.Hertkorn.Forms.Views.Forum. Therefore the duplicate code is reduced to a minimum.

But I had some trouble setting it up using VS 2005. I contacted Scott and he helped me through the process and I got it to work. For anybody else who is interested in the process, I decided to write it down. Even though right now I will not be able to use it. Unfortunatelly the May release of WAP does not render Custom Controls inside the designer that are contained in a different project. This issue will be fixed in the SP1 of VS 2005. That means there will still be no way around WSP and duplicated code til then.

How to set up multiple WAPs in one solution 

Now let’s get to the good stuff. This is mostly from an email Scott was kind enough to forward me. And even better – he allowed me to blog about it using his stuff. Thanks again for that, Scott!

As I said before – but I’ll repeat it here for all of you who skipped the preface. Setting up multiple WAPs can be done with the current version (WAP May 2006 + VS 2005 no SP), but there are some limitations:

  • It only works for IIS webs.
  • Design view does not render controls outside the WAP project (to be fixed in SP1)

If you’d like to setup this up to see how it works here are the steps:

  1. Create a new Web Application Project e.g. C:\MyProjects\MainWeb
  2. Create a virtual directory pointing to this location.
    Project Properties/Web Tab/Server Section
    Check “Use IIS Web server”
    Edit Project URL to http://localhost/MainWeb
    Push the “Create Virtual Directory” button
    (these steps will create the VDIR for http://localhost/MainWeb and map it to C:\MyProjects\MainWeb)
  3. Add a new Web Application Project to the solution
    (note this will not be a true IIS sub-web, it’s just a folder in the MainWeb)
  4. Change the build output path to be the bin folder of the MainWeb
    Project Properties/Build Tab/Output section.
    Multiple WAPs Output Path
  5. Change the subweb to be a folder under the same VDIR as the MainWeb
    Project Properties/Web Tab/Server Section
    Check “Use IIS Web server”
    Edit Project URL to http://localhost/MainWeb/SubWeb1
    Multiple WAPs Project Url
  6. Save All, close and re-open the project properties
    You should see application root URL set to http://localhost/MainWeb
    This tells you that WAP is correctly detecting the subweb relationship.

There is only one IIS Web application in this model. http://localhost/MainWeb mapped to c:\MyProjects\MainWeb. However with this configuration the site is factored into several WAP projects that build into a common bin in the MainWeb.

To build and run a SubWeb project you must have the latest assemblies from the other projects in the MainWeb bin. Building the solution will take care of this for you.

The main advantage of this configuration is that it allows you to build the SubWeb folders independently into separate assemblies. This works great until you start creating dependencies by consuming controls from other SubWebs. Some sites I’ve seen have created a separate project with all the Controls to avoid this issue.

Depending on your scenario this maybe a good model. The alternative is to create this as a single project, which also works quite well.

The major disadvantage of using this approach is that the designer will not render controls outside it’s immediate project so the Control Project design above won’t render in design view. Unfortunately the WAP developers won’t be able to fix this scenario until Visual Studio SP1 later in the fall.

July 27th, 2006 9:48 am | Comments (4)

It is way too hot to blog

by Tobias Hertkorn on July 20th, 2006

… and yet here I am blogging about it. Kind of an oxymoron. :) But today is shirtless Thursday at work. Good thing I’ve got my own office. ;)

For all of you needing a little recreation – check out Fingerskilz. Coooooool. Hang in there!

July 20th, 2006 2:46 pm | Comments Off

Excellent Tutorials on DataAccess

by Tobias Hertkorn on July 16th, 2006

I just stumbled across this excellent Tutorial:

Handling BLL- and DAL-Level Exceptions in an ASP.NET Page

It is part of a whole series by Microsoft Building and using a 3-tiered data architecture with ASP.NET 2.0

July 16th, 2006 5:28 pm | Comments Off

Upgrading to screen size 1024×768

by Tobias Hertkorn on July 8th, 2006

Nonono, not me personally did upgrade from 800×600 to 1024×768 – but my blog did. I guess it was time, since about 2000 the new standard resolution is 1024×768, but I guess by now even those rotation their TFTs to a vertical position have upgraded to 1024×1280 so it was really time to get rid of the 800x design. Especially since posting code in this design is really quite cumbersome. But here is the neat trick: the new design is still 800×600 compatible – if you loose the left navigation while reading: Voila, the content box fits exactly into your browser. ;) Hope you like the improvement.

July 8th, 2006 2:03 am | Comments (3)
Tobi + C# = T# - Blogged blogoscoop