I just wanted to share my thoughts on how I go about compiling a website and deploying it to a hosting company. I personally use Go Daddy as a hosting provider because their tools are excellent and I like their SQL management interface. One of my favorite tools of theirs is the file manager to set permissions on directories. In addition, their IIS manager is great as well for creating and using virtual directories. Oh yea and they are cheap! Ok enough about Go Daddy…
I will use the word “compiling” over publishing because in a sense that is what is going on anyway. You are compiling your code into multiple dll’s or a single dll. Below are the options I use for compiling a web project:
Option 1) Select Publish Website within Visual Studio and check the boxes “Allow this precompiled site to be updatable” and “Use fixed naming and single page assemblies”
Option 2) Add a Web Deployment Project and mess around with the options in there. I usually use this options if I need to compile into one single assembly. However, this is great for a “commercial” environment as well because it can create an MSI package that will install the website for you. Here is the link to Scott Gu’s blog for Visual Studio 2005
http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx
Here is Scott Gu’s blog regarding the Web Deployment for VS 2008
http://weblogs.asp.net/scottgu/archive/2008/01/28/vs-2008-web-deployment-project-support-released.aspx
Now I’m going to list some reasons why I like option 1 because I don’t have a need most of the time for option 2. Although our product xLite Player is actually compiled with option 2 so I have single dll.
Option 1 benefits
Makes maintaining a website much much easier. Think about it, if you have a website of 30-40 pages, controls, etc… and you only need to make a change to the code behind on a couple of the pages or just one of them….you are only going to need to upload those 2 dll’s again after compiling the website. In return, if by some chance you didn’t code something right you only broke those two pages of the site…instead of taking down the entire thing.
You can edit markup language on the fly. Again, this allows for easier maintenance. If you need to make a change to something on a site for text, formatting, sql data sources, etc… you can do it without recompiling the entire site.
It helps with a “commercial” environment. This is actually how the Club Dynamix product is compiled because when we fix bugs, or make enhancements, again, we only need to worry about providing the dll or the page to the customer, or uploading it ourselves for them.
So those are my biggest benefits to Option 1. You’ll notice it all has to do with maintenance time. I personally don’t like wasting time on maintenance and wondering if the site will go down by making the change.
Keep in mind by using Option 1 the page names or dll names never change and that is what makes it possible to only upload one or the other if needed.
I have found this method to help out the most when dealing with hosting companies as well. I know this is nothing new, but just wanted to share on how I go about compiling, deploying and maintaining a site when it comes to editing code behind or markup language.
Currently rated 5.0 by 1 people
- Currently 5/5 Stars.
- 1
- 2
- 3
- 4
- 5