Forum


HomeHomePremiumPremiumDevelopmentDevelopmentBeginning local development.....Beginning local development.....
Previous
 
Next
New Post
10/14/2014 4:21 PM
 

Hello,

For the past couple of years I have been authoring sites while 'live' at the hosting provider. For these simple sites, up until now I've just made an 'under construction' page with no access until I am ready.

The bug has bitten however and I am now embarking on more intensive projects. So what I have done is set up a local environment (SQL Server 2012/DNN 7.3.3) using dnndev.me per Chris Hammond's videos. So I am now theoretically able begin some work.

I had started a site 'live' on the hosting provider. Let's call it '5Friends.com'. While I quickly determined that I did not want to continue development in that environment, I don't want to delete the portal as I have some good examples there and need to be able to show them.

My first question is this: What should my strategy be for the URL '5Friends.com' while developing locally? I hope to be developing multiple portals on the local install, but would like to be able to move the site to the hosting provider at some point. Thereby replacing the hosted 'production' 5Friends.com portal content. Please note there are other (parent) portals in the same database. 

Second question: Can this be managed intelligently since all portals are in the same database?

A sincere thanks for any help/advice!

Mike


 
New Post
10/15/2014 4:34 AM
 

Hi Mike,

If you will be moving the DNN instance from dev to live, you should NOT be handling multiple dev portals under the same DNN instance. You should have each instance on a separate domain, even if you are running the domain locally. Here is a video on How to trick your computer to run a domain locally, and why

That will create an extra level of complexity for you though because you will have to make the necessary domain changes when using Chris' template, but that should not be much.

If you don't go this route you will have to delete the extra portals whenever you move your site to production. I don't see a way around that.

Cheers,

Aderson

 

 
New Post
10/15/2014 5:14 AM
 

Mike,

I typically develop multiple instances of DNN for different clients at the same time.  If it an existing DNN install and the database isn't too large, I will take a backup of production database and website files and restore it locally.  I will update the web.config for my local database connection.  I will create an IIS site with a binding of  5friends.dnndev.me (for example).  I will add 5friends.dnndev.me to my local hosts file.  Finally I will add "5friends.dnndev.me" to the PortalAlias table.  Now I should have a working copy of the production website.  

To start a new module project, I will use my template (https://dnnmvptemplate.codeplex.com/) which asks for the IIS binding up front.  If you choose to use Chris hammonds, temporarily add the dnndev.me binding to create the module project from the template and then remove it later.

Once you are done developing the new module, you can package and deploy it to production.  The complexity with DNN deployments is when you need to create portals, pages, templates, etc in one environment and then move it to another.  You have to either do a wholesale replace of the DB or manually transfer the items to production.  That is why the company I work for is about to release a true content staging product (http://www.bravo-squared.com/#stagingSection) to handle the complexity of publishing changes from one environment to another.


 
New Post
10/15/2014 5:39 AM
 

Hi Aderson,

The video you linked is perfect with regard to setting up the local version with the name of a 'live' site. So let's say that I do so exactly as you suggest in the video to set up a local version to further develop the site. You experienced developers must come across this all the time where you author a site, deliver to the customer and make it live. Now when new development is needed, how do access both the live and local hosted versions? Is the answer to have to change the host file as in your video?

Do you keep a second machine/PC for this or is there a 'virtual machine' strategy?

Mike

 
New Post
10/15/2014 5:53 AM
 

Hi Mike,

The simple answer is yes, change the host file. Just be mindful of not mixing them up (as it has happened to me in the past:)

Also be aware that when after changing the hosts file, you should refresh your DNS setting my opening the command line and running this command: ipconfig /flushdns

If you are using Chrome, I also recommend to go to Windows Task Manager and make sure you stop all Chrome instances so it can pick up the new DNS settings that you have just refreshed.

The second approach I use sometimes is to run the local version on a different domain like if the live site is www.LIVESITE.com, I run it locally as www.LIVESITE2.com - This way I don't need to keep setting on and off the local domain on the host file. If you go with this option you need to remember to switch the portal alias domain on your local database before you send the new files up as the PortalAlias table will be pointing to www.LIVESITE2.com and you need to have it changed to www.LIVESITE.com

I hope I haven't confused you much here :)

Cheers,

Aderson

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentBeginning local development.....Beginning local development.....



Try FREE
30 days money back guaranteed