473,508 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Still Trying to Find the Best Way to Serve Documents

Greetings!

I am still trying to determine the best way to implement a Web site that
contains many documents that visitors can read. Most of the suggestions I've
been given indicate that I should store the documents in a database but then
cache them to pages.

Unfortunately, while an experienced programmer, I've very new to ASP.NET and
the very brief descriptions I've been given how to do this, I just don't
understand.

I would think this is a common task yet I've done a lot of searching the Web
and came up empty. Is there anyone who can provide me with some more
specific information on the best way to implement this?

Thanks!

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Apr 8 '06 #1
7 1443
> I would think this is a common task yet I've done a lot of searching the
Web and came up empty. Is there anyone who can provide me with some more
specific information on the best way to implement this?


There is no 'best' way. Just different camps of thought.

Many claim that storing the files in the database is the way to go. It's
easier to maintain, easier to backup, easier to control access.

Others claim that the filesystem was designed specifically for
this...storing and organizing files. So that the way to go is store the
files in the system, and then just reference them in the DB.

I prefer the latter, mainly because it is less abstract. I can SEE the files
right there in the folder. But that's not necessarily a reason that it's a
better method. ;o)

-Darrel
Apr 8 '06 #2
Hi Darrel,
There is no 'best' way. Just different camps of thought.


I understand, but I'm really new to ASP.NET. I'd just like to see an
approach by someone who understands the technology.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm
Apr 8 '06 #3
As Darrel said, people who understand the technology either store the
document in the DB or in the file system.

The *best* way is what works for you.

I'm in the filesystem camp, myself.

Bob Lehmann

"Jonathan Wood" <jw***@softcircuits.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi Darrel,
There is no 'best' way. Just different camps of thought.


I understand, but I'm really new to ASP.NET. I'd just like to see an
approach by someone who understands the technology.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

Apr 9 '06 #4
Jonathan,
As was mentioned, both approaches work -
if you are an experienced programmer and .NET is new to you, the best thing
to do is simply make a decision, and go with it. You can always change it
later, but at this point your objective should be to "get to first base". If
you have issues with the actual code for the implementation, you can always
post here again and get some help.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jonathan Wood" wrote:
Greetings!

I am still trying to determine the best way to implement a Web site that
contains many documents that visitors can read. Most of the suggestions I've
been given indicate that I should store the documents in a database but then
cache them to pages.

Unfortunately, while an experienced programmer, I've very new to ASP.NET and
the very brief descriptions I've been given how to do this, I just don't
understand.

I would think this is a common task yet I've done a lot of searching the Web
and came up empty. Is there anyone who can provide me with some more
specific information on the best way to implement this?

Thanks!

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com

Apr 9 '06 #5
> I understand, but I'm really new to ASP.NET. I'd just like to see an
approach by someone who understands the technology.


The approach I take is to accept the document, save it to a particular
folder, then put the filename in a DB table.

I often device a categorization system of some sort so all files aren't in
one directory. I then store this categorization in the DB table along with
the file.

So my file table record might look like:

UID: 1111
FileName: my_document.doc
Category: Resumes

Then, to grab the file, I just write out the URL from the data:

/documents/Resumes/my_document.doc

The drawback? Well, deleting or moving a file requires not only updating the
DB, but also the filesystem. Of course, that's not much more then just
adding a couple of functions to handle it, so not a big deal.

-Darrel
Apr 9 '06 #6
Thanks, I've printed out your comments.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

"Darrel" <no*****@nospam.com> wrote in message
news:uv**************@TK2MSFTNGP02.phx.gbl...
I understand, but I'm really new to ASP.NET. I'd just like to see an
approach by someone who understands the technology.


The approach I take is to accept the document, save it to a particular
folder, then put the filename in a DB table.

I often device a categorization system of some sort so all files aren't in
one directory. I then store this categorization in the DB table along with
the file.

So my file table record might look like:

UID: 1111
FileName: my_document.doc
Category: Resumes

Then, to grab the file, I just write out the URL from the data:

/documents/Resumes/my_document.doc

The drawback? Well, deleting or moving a file requires not only updating
the DB, but also the filesystem. Of course, that's not much more then just
adding a couple of functions to handle it, so not a big deal.

-Darrel

Apr 9 '06 #7
Yes, that's probably what I'll end up doing. I do have some very brief
comments from one of the people who suggested that it be stored in both
places (BTW, I was able to confirm this is how it's done at
codeproject.com). I'm just trying to get as much info as I can before diving
in.

Thanks.

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com
Available for consulting: http://www.softcircuits.com/jwood/resume.htm

"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:AC**********************************@microsof t.com...
Jonathan,
As was mentioned, both approaches work -
if you are an experienced programmer and .NET is new to you, the best
thing
to do is simply make a decision, and go with it. You can always change it
later, but at this point your objective should be to "get to first base".
If
you have issues with the actual code for the implementation, you can
always
post here again and get some help.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Jonathan Wood" wrote:
Greetings!

I am still trying to determine the best way to implement a Web site that
contains many documents that visitors can read. Most of the suggestions
I've
been given indicate that I should store the documents in a database but
then
cache them to pages.

Unfortunately, while an experienced programmer, I've very new to ASP.NET
and
the very brief descriptions I've been given how to do this, I just don't
understand.

I would think this is a common task yet I've done a lot of searching the
Web
and came up empty. Is there anyone who can provide me with some more
specific information on the best way to implement this?

Thanks!

--
Jonathan Wood
SoftCircuits
http://www.softcircuits.com

Apr 9 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1514
by: trek | last post by:
Good evening, I am trying to locate a standard (commonly accepted) XML schema for managing documents. What want to know is if someone has already created an XML schema for describing the...
16
2198
by: Jonas Smithson | last post by:
I'm going to say something now that may seem to completely contradict a previous post of mine, in which I basically said that taking a "who cares" attitude about certain browsers (because of their...
136
9201
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
3
5364
by: Richard Fritzler | last post by:
I was given the task of designing a complete web based document prep system. In simplest terms (using a msword explanation) create a database of merge fields, and a library of templates. Allow the...
687
22818
by: cody | last post by:
no this is no trollposting and please don't get it wrong but iam very curious why people still use C instead of other languages especially C++. i heard people say C++ is slower than C but i can't...
9
1361
by: Thomas Scheiderich | last post by:
I am getting ready to look at putting our users manual and employee handbook on our intranet and was curious how others do it? We have it already set up as Word documents and am looking at...
0
901
by: Benjamin Cabé | last post by:
Hi, I have to serve TIFF images (scanned documents) stored on an unique server, clients are likely to edit these images and send them back to the server.. Ideally, the client would ask something...
0
873
by: jonefer | last post by:
I followed the walkthrough in the help and developed my application in this physical location: C:\Inetpub\wwwroot\Membership When I try to build the Setup file I get the following error (Did...
8
3190
by: CptDondo | last post by:
I have a small, embedded app that uses a webserver to serve up pages showing status, etc. Right now all the pages are hard-coded in English. We need to provide multi-lingual support. All of...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.