Advice on dev environment set-up

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
Si Burgess
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 35
Joined: Mon Jul 20, 2009 8:52 am

Advice on dev environment set-up

Post by Si Burgess » Tue Aug 18, 2009 3:52 pm

Hi all,

Before I go and do something stupid thought I best ask those in the know...

I have a LIVE deployment working great and would like to do new development and testing on my PC. I would like the local install to point at the LIVE database so I can work with real data. My development work is new pages and controls that will only do data reads so I'm confortable working pointed at LIVE data as no data writes are involved. What I don't want to be doing is uploading and testing new code that doesn't work correctly and ends up bringing LIVE down. I'd be using VS2008 for my IDE and my localhost IIS for hosting.

I'm fearing that if I install locally and point the database connection to the LIVE database server the installation process will trash my LIVE db and the hours of plugging products into the system and the UI changes I've already made. I can't remember if there is the option to install and use the existing database without recreating it...

So, any ideas of how I can install locally and connect to my LIVE db without trashing existing the LIVE db? Or should I be looking at doing a db dump from LIVE to my local machine instead? I only have SQL Express 2005 on my PC.

Out of curiosity, where is the license key stored, on the file system or in the db?

Many thanks,
Si

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Advice on dev environment set-up

Post by AbleMods » Tue Aug 18, 2009 5:21 pm

Si,

Having a separate code base pointing to your live db only gives you half the protection you need. Anything in your test code base that runs amuck can now toast your live db. At that point, you've only changed WHERE your problem will occur and not IF it will occur.

I always use SQL backups from the live db to restore to my local dev install of SQL 2005 Express. Then anything I test, I can test fully and not affect my live storefront. That way my data in the dev install is within 24 hours of the live one - completely sufficient for testing purposes.

The easiest trick is to unencrypt your database connection string in the dev admin. Then edit the ~/App_Data/database.config file to point to your live db. But you're going to need a local SSL cert installed in your dev environment because your live store settings table is going to enforce the live SSL settings. See why this is such a bad idea?

The license is stored in the ~/App_Data/CommerceBuilder.Lic file and is coded to your live domain. You wont' be able to use it in your local install. But if your local dev install is already functional, then licensing won't be an concern for your situation.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

afm
Captain (CAPT)
Captain (CAPT)
Posts: 339
Joined: Thu Nov 03, 2005 11:52 pm
Location: Portland, OR
Contact:

Re: Advice on dev environment set-up

Post by afm » Tue Aug 18, 2009 7:18 pm

Si,

Don't do it. Follow Joe's advice and use a local copy of your data.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing

ZLA
Commodore (COMO)
Commodore (COMO)
Posts: 496
Joined: Fri Mar 13, 2009 2:55 pm

Re: Advice on dev environment set-up

Post by ZLA » Tue Aug 18, 2009 7:49 pm

Si, I agree with both of them. However, to save yourself time in supporting two sets of code and data, I recommend investing in ApexSQL's products (Data Diff and Diff) and Beyond Compare. Beyond Compare is about $50 for a single user while Data Diff and Diff seem to be about $300 each currently. I thought the ApexSQL products were less but I think they just release a brand new version in the last month and the prices are higher than when I purchase my bundle. You may want to look for older versions. These products make it much easier to synchronize changes.

Si Burgess
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 35
Joined: Mon Jul 20, 2009 8:52 am

Re: Advice on dev environment set-up

Post by Si Burgess » Tue Aug 18, 2009 11:59 pm

Thanks all for the advice, I'll go down the db backup and restore route. :) Any pointers as to which SSL cert would be sufficent for a localhost install in IIS?

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Advice on dev environment set-up

Post by AbleMods » Wed Aug 19, 2009 4:35 am

You don't need an SSL for a local dev install. Just open the ac_StoreSettings table after you restore the db and change the SSLEnabled flag from True to False.

There's plenty of documentation on Microsoft's site about setting up a local self-cert SSL. That way you don't have to buy an actual cert.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Advice on dev environment set-up

Post by jmestep » Wed Aug 19, 2009 6:19 am

Ditto on the don't use the live database. Be sure to get your dev license issued for "localhost" if your ip address changes because of your ISP. That way you don't have to run your test site in demo mode where all the orders have DEMO for name and address.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

Si Burgess
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 35
Joined: Mon Jul 20, 2009 8:52 am

Re: Advice on dev environment set-up

Post by Si Burgess » Wed Aug 19, 2009 8:16 am

Sounds good to me, thanks all, much appreciated. :)

Post Reply