PDA

View Full Version : What is the correct process for maintaining a website's files?


MrSnrub
06-29-2011, 02:41 PM
I'm a total novice to web development, and I don't fully understand the recommended process for maintaining a website's files. I load up my brand new copy of Dreamweaver for the first time, go to Site --> New Site, create a new site with a name of, say, Web Site and a local location of C:\website\. Then I go to Servers and click the plus sign and add a remote server and a testing server. After that, the Files panel appears with the contents of my website, and I click on the down arrow ("Get files from 'Web Site'"), it prompts me "Are you sure you wish to get the entire site?", which I do because this is my initial setup. So this takes about a day or so and then I'm finally ready to start with the day-to-day tasks of maintaining my website, which I assume can go six possible ways:

1. External users can add new files to the website, causing new files to appear in the remote site that are not in my local c:\website folder.
2. External users can delete files on the website, causing files that are on my local c:\website folder that have no match on my remote site.
3. External users can modify existing content on the website, causing the files in c:\website to become outdated.
4. I can add new files to c:\website, causing files that are on my local c:\website folder that have no match on my remote site.
5. I can modify existing files in c:\website, causing the files on the website to be outdated.
6. I can modify a file in c:\website and an external user can modify the live version of the same file, causing a conflict.

What is the recommended way to take care of all these scenarios without causing either my local files or the website files to be overwritten with incorrect data? How do I prevent files from getting re-created that should have been deleted? Should I just highlight all the files in my site and press the "Synchronize" button and rely on Dreamweaver's intelligence to take care of everything for me?

Corrosive
06-29-2011, 02:50 PM
Why would external users be able to edit your website?

domedia
06-29-2011, 02:56 PM
The correct way of developing is that you work on your local files in a local test environment. Then when you're done, you upload your changes to your server.

I'm with Corrosive though, I have no idea what the 'external user' is about.

MrSnrub
06-29-2011, 05:21 PM
Well perhaps "edit" is overthinking it, since scenarios 3 and 6 will probably never happen, but we do have several scripts that our internal users can use to upload PDF files to their homepages on our site. How do I accomodate that? Every time I want to do a sync and ensure the website and my local folder are up-to-date should I just have Dreamweaver "get" the entire site? Will that take a day to do just like my initial import did?

Corrosive
06-29-2011, 05:41 PM
Sounds like synchronise would work for you. Open the site, synchronise with get and put and then process the files that have changed.

Sounds a lot to me like you should look at a decent CMS though. 'Static' sites have limitations.

MrSnrub
06-29-2011, 07:00 PM
Well now that you mention it we have been looking into adopting some kind of CMS, maybe Drupal, to make this whole process a little easier. But that's definitely at least a year away.

Corrosive
06-29-2011, 07:21 PM
You'd certainly notice the benefits :) No more uploading and downloading for a start!

EagerNewby
06-30-2011, 11:39 AM
One other thing that I would like to remind you of. Don't forget that you can 'Cloak' a file or folder so that it is not uploaded to your remote server when you synchronize your local site with the server. I find this usefull for testing different versions of the same page on the server, by cloaking and uncloaking as necessary.

To cloak, right click, a file or folder in the files panel, and pull down to cloak.

MrSnrub
07-04-2011, 04:03 PM
OK since these remote files are going to be a bit of a problem, is there a way to completely eliminate the local folder? In other words, I want to create a website and then develop on that website directly. I know that this is extremely dangerous, but I really think it's still the best option; otherwise I run the risk of deleting files uploaded by my internal users on their subsites.

domedia
07-04-2011, 06:41 PM
That is in any scenario the worst thing to do.

Why do your 'internal' users need access to all the web site files?

MrSnrub
07-04-2011, 07:58 PM
My internal users (about twenty of them), who all have their own home pages, paste their own PDF files to their own personal windows folders on our network, then a special script copies those folders to mirrored website folders, and then a .asp file reads the contents of those folders to dynamically create webpages of content for all the end (external) users.

1. Internal user (let's call him Tom) pastes a PDF into a special networked windows folder on his networked u: drive
2. Once every 15 minutes, a windows scheduled task copies the contents of the special folder on Tom's u: drive (including the newly uploaded PDF) and pastes into the respective live website folder (~tom\PDFs).
3. Now when Tom opens up a web browser and navigates to mywebsite.com/~tom/ShowTomsFiles.asp, it looks into the live website folder and displays hyperlinks to all files, including the newly-pasted PDF.

Now, let's change the scenario to include a local copied folder using Dreamweaver: If Tom adds a PDF to his home directory... I guess instead of having the scheduled task copy files to the website folder I need them to be copied to the local c:\website folder instead; then I have to perform the upload ("put" or "sync") manually until those new files are displayed.

1. Tom the internal user pastes PDF into special networked windows folder on their networked u: drive
2. Once every 15 minutes, a windows scheduled task copies the contents of the special folder on their u: drive (including the newly uploaded PDF) and pastes into my c:\website\~tom\PDFs local folder.
3. The user navigates to ShowTomsFiles.asp, but nothing changes because I haven't gotten around to performing a "sync" yet.

Tom shouldn't have to wait for me in order to display his own new content on his own homepage.

domedia
07-04-2011, 11:06 PM
I'm not going to comment on that set up.

Why do you need to download all their files in order to do web site changes?