Solved

Best practices in project design

Posted on 2008-10-07
7
209 Views
Last Modified: 2013-11-26
I have a project called CS that I am considering, for simplicity and maintenance purposes, rearranging all the images, .js files, includes etc. I am considering placing them all in the root directory under the project. Other pages with these items in folders underneath this project folder would then point to the root for images, includes etc.
Is this a good way of doing things or should I create image, include folders in these folders underneath the root? I can refer to the root folder by http://localhost/CS/images or by using "/images for example but when I publish the project, CS will be the URL and in my development environment, I can see the images so how do I set up my project to not display the CS and just have http://localhost/images be displayed in my development environment. This should then transfer once in production right? Thanks for any guidance.
0
Comment
Question by:wilcor14
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22661218
should I create image, include folders in these folders underneath the root?
absolutely
instead of using "http://localhost/images" you could use "~/images" for server control...
also take a look at this
http://www.asp101.com/resources/paths.asp 
 
0
 

Author Comment

by:wilcor14
ID: 22662503
davrob60, thanks. That article was helpful. My project is set up a bit differently. Someone else set it up for me. The physcal location of the files are under C:\Source2005.Net\CS How would you suggest I proceed?
0
 
LVL 18

Expert Comment

by:David Robitaille
ID: 22662753
thats the magic of the ~ . You dont have to bother with the  "http://localhost/CS/" part, it will aways be Corrected according to the "root" of your virtual directory.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 18

Expert Comment

by:David Robitaille
ID: 22662774
0
 

Author Comment

by:wilcor14
ID: 22662890
Thanks again. It works great within the image tag but does it work within the Body tag for Background? I tried it but not having success with that one.
0
 
LVL 18

Accepted Solution

by:
David Robitaille earned 500 total points
ID: 22662925
0
 

Author Closing Comment

by:wilcor14
ID: 31503868
Thanks for the help. Some good info.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now