Hi serge,
More generaly how dynamic web page content works ?
A web page is basically an HTML document. HTML is a pure text markup
language that enables data to be displayed in a formatted manner. ASP.Net is
a technology that, at the most basic level, delivers HTML to a web browser.
Originally, HTML documents were simply files on a server. When a Request
came to the server for "somePage.htm," the server opened "somePage.htm" from
its file system, and streamed it back to the browser, which then parsed and
formatted the document. What ASP.Net does, again at base level, is to bypass
the "open a file" part, and simply stream HTML to the browser. It controls
the HTML that is streamed to the browser as an HTML document. It is
therefore, "dynamic content."
Now, of course, browsers can deal with many other forms of documents,
images, files, and so on. An HTML page can "contain," for example, an image.
However, it doesn't actually contain the image. It is pure text. It contains
an image markup tag that tells the browser where to download the image from,
where to place it in the page, how to resize it, etc. A browser can also
display a non-HTML file directly, assuming that the browser supports that
file format. Internet Explorer, for example, can display Word documents,
Excel Files, RTF files, GIF images, JPG images, and several other file
formats straight out of the box. Adobe makes browser add-ons for PDF files,
as well as do any number of other vendors. And ASP.Net can also deliver any
file format to a browser in its native state.
In fact, ASP.Net can work with anything that a browser can work with, and
other web technologies as well, including XML Web Services, Remoting, and so
on.
The idea is that I need to build a web site for a customer who will be
able
to easily change its content (talking about an article or news). I have to
consider that people who will be able to update document knows nothing
about
htm, xml or whatever stuff.
Now you're thinking like a User. If you want to program, you have to think
like a programmer. Humans don't see data the same way that computers do. We
see "an article" (some form of written language and/or media communication)
in a newspaper, on a web page, in a newsgroup, on television, what-have-you,
and our brain automatically extracts the information from it, converts it
into abstract thought, and we don't consciously think of one medium as being
different from another. In fact, we don't consciously think of the delivery
mechanism at all; we think of the thought information we extract from it.
To write a program, however, you don't think of data as "an article."
"Aritcle" is a generic and broad abstraction that is useful to humans,
because humans are sophisticated enough to get a general idea of what is
being discussed, and often glean more information (only the information that
is pertinent to the listener) from the context in which it is used. But to a
computer, and in reality, it is data. It is in some format. It is stored in
some location. It requires parsing, munging, and all of that other stuff
which our brains do automatically, to be done by a computer program. The
program knows nothing but what we tell it. It is not capable of
interpretation, abstraction, or intelligent thought. It cannot do anything
the programmer does not tell it explicitly to do. In short, humans are very
very smart. Computers are actually very very stupid.
To us, a "document" is something we read, from any number of sources, and
what the format is is not of any importance. To a computer, a "document" is
a one-dimensional stream of bits (1s and 0s). How it is handled depends
entirely on what format those bits are arranged in.
What I was wondering also is that if we condider that document can be any
file format, does a database can store those file object or they could be
only path in tables ?
The first thing you need to do is to start thinking like a programmer. You
need to define the terms "article" and "document" very specifically, or you
will not be able to tell the program how to deal with them. What are the
specific definitions of those sets of data that will be defined as
"articles?" Are they multi-page TIFF files, Word documents, pure text
documents, multi-media presentations, PDF files, etc.?
When you talk about "updating" you're opening up another can of worms. A
text file is relatively easy to edit, but not in a browser. And as the
browser is only looking at a downloaded copy of a file, how does the end
user save the changes back to the server? A PDF document, on the other hand,
requires some specific Adobe software to be installed on the client machine
to be edited. And the same kinds of problems with regards to getting it back
to the web server exist for PDF and any other document format as well.
And of course, we have not yet discussed how the "articles" will be stored.
That also depends on the answers to the questions I posed above.
Just a simply way to update document or introduce new one
Again, you're thinking like a User. Computer programs look simple to users
because programmers go to a great deal of difficulty to make them seem that
way. The more user-friendly an interface is, the more programmer-UNfriendly
the program actually is. An example of a "simple" ASP.Net application might
be to create a page that dynamically writes "hello world" to the browser. It
takes no user input from the user. it contains no logic. It simply outputs a
string. THAT is simple. Almost everything else is complex in one way or
another, and to a greater or lesser degree.
I hope this gives you an idea of where you need to start. Perhaps a "hello
world" ASP.Net web page would be a good place to start. You can work your
way up from there, one piece at a time. If you take small steps, you're much
less likely to fall.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.