 |

Introduction
Welcome
to my guide for learning about WebDNA coding. This guide starts
out pretty slow and basic and builds up from there. It is assumed
that you have limited experience with using and/or creating a simple
database in another database program (like Filemaker) in the past.
HTML hand coding knowledge is a prerequisite, and is not covered
here. If you are looking for "I just bought WebCatalog, and
I want to build an entire store with extensive customization in
15 minutes by myself" this may not be the guide for you. If,
on the other hand, you have some time to learn the basics, then
this guide will get you through the tough stuff, and what you create
from there will be limited only by your imagination...
So
what is WebDNA? WebDNA is the programming language of SmithMicro's
WebCatalog. WebCatalog is a piece of software that typically lives
on a web server, that allows the webserver to serve pages created
on the fly, typically from information stored in a database. WebCatalog
is sold as, and is most often used as an e-commerce engine. Many
people (myself included) use WebCatalog extensively for all sorts
of other web uses. We'll cover some of these on this site, to share
with you the power and flexibility that you can tap into with WebCatalog.
So
what is WebCatalog? WebCatalog consists of three parts. First is
a high speed internal RAM based database engine. This means that
the data contained into the database is loaded into memory once,
and thereafter, when the database is searched, data is retrieved
from the RAM, up to 1000 times faster then some disk based databases.
Because of this huge improvement in speed over some competing products,
WebCatalog can serve more pages under heavy load, or with complicated
processing on a single server. Another advantage this has is that
since the database and the scripting language are combined into
the same program, there is no need for many separate programs to
be talking to each other, thus speeding up the serving of dynamic
content.
The
second part of WebCatalog is the WebDNA scripting language. This
is a server side interpreted language. WebDNA coding consists of
a few dozen tags that can be assembled into processes and procedures
to perform complicated tasks. WebDNA tags come in two flavors; the
classic syntax is denoted with square brackets like this [instruction],
while the newer style is similar in appearance to XML, like this
<DNA_instruction>. For the purposes of this guide, we will
be teaching the classic approach to WebDNA tags[]. In some ways,
WebDNA is a beautiful thing. It is a very simple language, with
only a handful of instructions. It is similar to HTML in that for
most tags, there is an opening and closing tag [!] some HTML [/!].
Personally, I like the simplicity. I like to think of WebDNA tags
as lego blocks, individually, they aren't much use, but if you put
enough together, in just the right way, then you can build some
really wonderful things. ( I hear they're opening WebDNAland just
north of SanDiego soon to showcase what you can do with WebDNA blocks
glued together :-)
Finally,
the third part of WebCatalog is the included prebuilt template packages
and the StoreBuilder. The samples (and of course the fully functional
StoreBuilder) can be examined to see how WebCatalog tags can be
assembled into complicated web programs. And hey, they are functional
too, so you can immediately start using them! Some instructions
are provided with WebCatalog for these packages, at this time, we
will not be covering these prebuilt templates in this guide.
Whew,
that was a lot to digest in a short time. Why not take a break for
a few minutes, stand up, stretch, get a glass of water, and then
come back and keep reading.
Back?
Of course you are, you're reading this sentence. Heck, you probably
never left, did ya? Did ya? Yeah I know you didn't. Anyway, it's
your life, let's move on.
The
one other thing I want to share, before we start in is the difference
between a "command" and a "context". You may
not need to know this right now, but if you read the WebCat docs
(and you should!) or if you are examining WebDNA code, this will
be important. When WebCatalog first started, (back in '95 was it?)
you had to make WebCatalog do something to go from one page to another.
For example, you would perform a search even if you didn't show
any results on the next page. This was accomplished by telling WebCatalog
in the link to the next page to execute an instruction (like
nextpage.tpl$search?db=mydata.db on
the Mac, or nextpage.tpl?command=search&db=mydata.db
on the
PC (a UNIX version did not exist at the time)) In subsequent versions,
the fine programmers of WebCatalog added the ability to embed commands
on the web pages themselves, thus reducing (and eliminating) the
need to move from page to page via commands.
OK,
if you've never used WebCatalog before, then the preceding paragraph
was probably gibberish. Here it is in a nut shell - DO NOT USE COMMANDS
IN WEBCATALOG. What does this mean? In some code you look at, you
might see a line like <input
type="hidden" name="command" value="showcart">
. You
will not see this code in our examples, as this is a REALLY BAD
coding technique that causes problems which will be explained later.
We will instead focus on coding on the page that looks like this:
[orderfile cart=[cart]][/orderfile].
This
is known as a context, (think of it as an embedded command) with
a clearly marked beginning and ending. Like I said, this won't mean
a lot now, but we'll talk about it again later.
<--
Previous Index Next
-->
HOME | Basics | Advanced | Training | Rants+Raves | Links | Feedback
This
whole page, and everything on it ©2001 Brian
B. Burton. This page and the text contained herein may not be
reproduced on any other site, or via any other means. Really, how
hard is it just to link to this site, so people get to see the latest
updates? http://www.burtons.com/webdna/ Thank You.
Site design by Clint Davis.
Thank You Clint!
|