another update to the f.a.q.  I added the CVS topic (using Robert's posting)
and a few other topics (like Mac support).

Still planning on adding "code" questions, but seeing that most questions in
the mailinglist are about widgets that are still evolving it will be hard
task (and I've typed enough for today :)


If someone could add "Using CVS on Linux"  and maybe "Using CVS on Mac"  in
there, we will have that topic covered.

cya,

Pascal Bestebroer
[EMAIL PROTECTED]
http://www.dynamic-core.net
Title: The official DynAPI2 F.A.Q.

The official DynAPI2 F.A.Q.

last update: 2000.12.10

1. What's the DynAPI2

DynAPI2 is the follow up to the original DynAPI available from the DynDuo site at http://www.dansteinman.com. The DynAPI is a cross-browser DHTML library giving you full controll over dynamic layers, documents and events.

The DynAPI2 is an opensourced project and is available under the GNU license. If you want to develop good working DHTML websites or webapplications, there's probably no other library that gives you so much power with only a few lines of Javascript code. Here's a short example of how you could create a dynamic layer and manipulate it's appearance:

myLayer = new DynLayer()
myLayer.setSize(100,100)
myLayer.moveTo(200,200)
myLayer.setBgColor('#c0c0c0')
myLayer.setHTML('A dynamic layer')

DynAPI.document.addChild(myLayer)

There are even shorter ways of creating dynamic layers, but this example should prove the great object oriented programming you can do with the DynAPI2.

1.1. Who created the DynAPI

The DynAPI2 was initiated by Dan Steinman (who also developed the original DynAPI and DynDuo tutorial at http://www.dansteinman.com/dynduo). The project was started somewhere around January 2000 (I think that was the beginning) and a small group of developers has been developing it since then.

I won't go into making a list of all the developers that have helped, but here's the short list that is also supplied with the DynAPI2 library:

The DynAPI is created by Dan Steinman

Thanks to:

  • Micah Goulart
  • Chris Bodar
  • Pascal Bestebroer
  • Bill Tammen
  • Scott Andrew
  • Robert Rainwater
  • Ryan Grenz
  • Clack Pacheco
  • IlMaestro
  • Brandon Myers

1.1.2. Who maintains the f.a.q.

Ehm, the name would be Pascal Bestebroer? I'm not planning on being the only f.a.q. maintainer, but since I started this f.a.q. I'll be taking atleast some responsibility for it :) I'm one of the developers and have been getting a lot of mail from people asking the same questions over and over, so this is basically the reason I started this f.a.q. I'm hoping the other developers will help by adding questions and answers to this f.a.q. I'll make this f.a.q. available at the sourceforge site and my own website (http://www.dynamic-core.net) and it will also be available at the semi official DynAPI2 website at http://www.cantir.com/dynapi.

1.1.3. Where to get the f.a.q.

The latest f.a.q. can be found on my own website, because it's uploaded there first (www.dynamic-core.net). But it's also available at the urls mentioned in 2.3 Other resources

1.2. Why upgrade

This is probably a question I can't answer but if you like to use a better code base to create your websites on I highly recommend using the DynAPI2 library. Although the DynAPI contains some great code it's a bit "ugly" to use. If you want to have the option of creating layers at any time (after document.onload for example) you'll have to upgrade. If you want a supported DynAPI, you'll also have to upgrade because basically the old code is not supported,enhanced or fixed anymore.

1.3. Differences between DynAPI and DynAPI2

The DynAPI code, although very good, is outdated and in some cases hard to work with. The new DynAPI2 code uses a much better object oriented approach. If you'r used to developing with the original DynAPI you'll have to learn some new things for the DynAPI2.. but please note that it's worth it.

I'm probably skipping a few things, but here's a short list of the main differences:

  • Layer generation
  • DynAPI couldn't generate layers after the document had finished loading, this is changed in DynAPI2. No more need to write the DIV or CSS tags, just create a new DynLayer object.
  • Events
  • DynAPI2 features a great eventlistener object based on Java style programming (also used in DOM2 events), it's possible to make any layer catch any event at any time.
  • Browser compatibility
  • DynAPI was compatible with IE4 (IE5?) and NS4, but since it's not getting enhancements and bugfixes it won't work with newer browsers and features. The DynAPI2 is compatible with IE4,IE5,IE5.5, NS4 and Mozilla (NS6) It's also being made compatible for Mac versions of the above mentioned browsers, and should be compatible for Linux users.

1.4. Differences between DynAPI and Dynacore

The DynAPI2 (as found at http://dynapi.sourceforge.net is the official release as started by Dan Steinman and is being continued by a group of developers (including little me). The Dynacore is my personall distribution of the DynAPI2, it's based on DynAPI2 code and ideas but differs in certain areas from the official one. These are usually ideas that I wanted to include but others didn't, and ideas that others wanted to include and I didn't will be left out of the Dynacore.

It all depends on your own taste, if you like the Dynacore version better then use that one, if you like to stick with the official version just use that one.. it shouldn't be a problem. The only problem might be when you want to mix them up, there will be NO SUPPORT from either side for this, just make a choice!

1.5. Compatibility between DynAPI1 and DynAPI2

The DynAPI2 uses a complete new code-base and is not build on the DynAPI1 code. It was build from scratch. Ofcourse there was some compatibility planned between the two versions but I think that the differences are growing more and more between the two versions (mainly because DynAPI1 is discontinued).

For one, this means that all DynAPI1 widgets are not always present in DynAPI2. This should eventually change and for more information see 5.3. It also means that if your working on a project using DynAPI1 it's probably wise to finish it using the old DynAPI1 and not try to convert it because that will most likely take more time then you planned.

2. Where can I find the latest version

There have been some problems with version controll, but at this point you should get the latest version from http://www.sourceforge.net/projects/dynapi. It's the DynAPI2 developers site, and contains the latest "official" release.

2.1. Where can I find support

For support you should join the DynAPI2 mailinglists, the lists are very active and many people there will be able to answer your questions. To join the mailing list visit the DynAPI2 website and read for more information http://dynapi.sourceforge.net. There are no more forums available, the official forum at Dan Steinman was closed, and the forums at sourceforge have been replaced with the mailing lists.
Please make sure to read the archives, because there's a big chance that your question has already been asked and answered before.

2.2. Where can I find the documentation

If your used to Dan Steinman's dynduo tutorial your in for a shock because that's not available for this version of the API. Some basic documentation has been written and a step-by-step tutorial is available and that's it. The documentation and tutorials are still being modified and updated to make it easier for new users to get into using the API and together with the examples included in the library it should be possible to create some things in a short time. For more information on the available documentation visit the DynAPI2 website (see 2.3)

2.3. Other resources

Here's a list of different resources for DynAPI2 code, examples and news:

3. Which browsers are supported

The current version of the API is mainly worked on by windows users, so logically the windows browsers will be supported better then other platforms. Here's the list of browsers:

Internet Explorer 4(windows)
Internet Explorer 5(windows)
Internet Explorer 5.5(windows)
Netscape Communicator 4.7(windows, linux and 95% Mac)
Netscape Communicator 6(windows, linux?)
Mozilla (milestone 16 and higher)(windows, linux?)

3.1. When will browser X be supported

Good question, the most important thing to remember is the simple fact that Internet Explorer and Netscape are the most used browsers (IE alone is 85% of the users). So even if you don't like Microsoft or Netscape you'll have to face reality. If you need support for another "exotic" browser you'r best bet would be to do it yourself, the browsers mentioned above are the only ones that have full support at this time.

I think there's only one "real" browser left and that's Opera. I've been playing with it personally and it's a good browser, but I had a lot of problems getting javascript to run in it.. another bad thing about it is that it's not free so not many people will own it (why buy if you can it for free?). - Update: Since Opera 5 the browser IS free.

3.2. I tested on browser X/platform Y

Mailing or posting results of your tests are not very usefull. Javascript is a hard language to debug and knowing that something isn't working does not automatically lead us to the errors in the code. Testing in Javascript requires alot of code changing, inserting and removing alert messages, and checking different parts of functions.

The DynAPI (and mainly the dynlayer object) is so big that finding the exact position of the error is just not so simple. It's great that you can test the code for us but we can't really use your feedback on it because of no debugging capabilities.

3.3. What about the Mac?

This is probably the MOST asked question out there, the problem is that the main developers are all working on either Win32 or Linux machines. Seeing that the DynAPI2 user base is growing rapidly there should still be hope that someday all the DynAPI2 code will work correctly on Mac IE and Mac NS, sadly for now this is not the case.

We need some good javascript developers with Mac's (or other systems/browsers combinations) that can do the debugging them selves.. it's the only way that will work.

4. How can I contribute

"I like the project alot, I have been using it for a while and want to help how can I contribute?"

This is a question I've been getting alot, so here's the answer: http://dynapi.sourceforge.net. This is the URL for the developers site, join the mailing lists and you can post bug fixes and patches and help others out.. that's all you need to know! The DynAPI2 is opensourced so basically everybody can contribute.

Things like documentation is something that could really use some talented people so if you understand the code or atleast know what every function of the API does go and write some great docs.

Note, if you can not program in Javascript (or not good enough, or don't understand any of the code used in the API) you should first get your self familiar with it, because with out the knowledge you won't be able to really contribute anything. Writing documentation, helping with this f.a.q require you to know the code.. it's hard but also the reality.

4.1. "Why don't you guys do this, or add that?"

The people that are developing the API are doing it for different reasons, but most of us do it just for the fun we're having with it. The things we add or fix are (probably) only done because we need to use it ourselves somewhere, if you have good ideas to add to the API why not give it a shot yourself?

Posting or mailing these questions is not a bad thing and very apreciated, but please don't depend on us to actually do anything with it. If you really need a feature and it's not in yet I guess you'll have two choices, do it yourself, or wait until one of the developers needs it.

4.2. This thing isn't working at all

I've been reading a few posts here and there from people saying that the thing isn't working at all, or not working correctly. One thing to keep in mind is the fact that there are already alot of people working with this library and that they are having no problem at all. In most cases there's a "user" error or another system problem. The API code is at this time working almost bug-free and should be considered a complete library. Ofcourse there are still some bugs in there somewhere, or missing features but that's the case with 99% of all software available.

If you get error messages with your own code, please check the examples supplied with the library. If they also fail to work you might be using either an unsupported browser/platform, a bad installation of your browser, or have installed the DynAPI2 incorrectly on your system. In any case the supplied examples should work under the correct browser/platform.

If the examples work but your own code seems to fail the problem becomes harder. In alot of cases the linking of the DynAPI files is not correct and you should check that first. If you use external widgets, it's wise to check the supplied examples/documentation of the widget to see that you'r using it correctly. If this still hasn't fixed your problems, please join the mailinglists at sourceforge (see 2.1) and post a detailed description of your problem and code.

4.3. How can I become a developer

Currently there's only a short list of developers for the DynAPI2, this doesn't mean those developers are the only ones doing the coding. Thru the mailing lists more people are helping out on this project. There are no special rules on who can or can not join the developers list, but I think it all depends on how much you can and are contributing to the project. There's a large difference between someone giving feedback, and someone fixing a multiple bugs and adding extra functionality.. so I guess only people doing alot of development, and showing a "long-term" commitment are added to the developers list and given full access to patches/bugs, etc..

4.4. Using CVS.

If you want to contribute, make sure to use the latest code. The DynAPI2 project uses CVS (Version controll) for development. There are daily-snapshots created of the complete CVS tree, this is one way of getting the latest version. The full snapshot can be downloaded from http://dynapi.sourceforge.net/snapshot/dynapi.zip please note that this daily-snapshot is for developers, if you just want to use the DynAPI2 you should download the latest official release from the DynAPI2 website (see 2.a). This snapshot could include bugs and errors that still need to be fixed before a new release is made.

4.4.1. Who should use CVS.

CVS should only be used by DynAPI2 developers. It's not an official distribution version, but development code that can still be buggy, and should not be used by end-users. If you want to join the development of the DynAPI2 please visit the dynapi2 website and read there for more instructions.

4.4.2. Using CVS on Windows.

Here are some quick and dirty instructions for setting up CVS on windows. (Thanks to Robert Rainwater)

Files
WinCVS: ftp://sunsite.cnlab-switch.ch/mirror/cvsgui/WinCvs11b17.zip

SSH: ftp://ftp.dei.uc.pt/.disk2/Crypto/SSH/contrib/ssh-1.2.14-win32bin.zip

Installation

Install WinCVS as per the instructions provided.

  • Unzip ssh-1.2.14-win32bin.zip to a directory (ex. c:\ssh).
  • Add c:\ssh to the PATH variable.
  • Create a HOME directory (ex. c:\home).
  • Create environment variable HOME with value c:\home
  • Restart
  • Start WinCVS.
  • It should prompt to enter your CVS Root (if not, choose Admin|Preferences).
  • Enter the cvs root as: ":ext:@cvs.dynapi.sourceforge.net:/cvsroot/dynapi" Below CVSRoot, choose SSH Server for authentication. Then click the Ports tab and click "Check for alternate rsh name" to enable it. Then choose OK and your set.

Also, you can choose View|Browse Location|Change to change to a working directory, so you will not see your whole hard drive in the view. Choose c:\home for example.

Now your set.

To checkout a module, Right click Home and choose checkout and then you would enter the name of the module. A DOS box will pop up that will require your sourceforge password.

You can then checkout "dynapi" to get the latest version.

For more detailed info visit:
https://sourceforge.net/docman/display_doc.php?docid=766&group_id=1

5. What are widgets

Having cross-browser code is great, but what can you do with it? One of the cooler things you can do with the DynAPI2 is creating widgets. Widgets are small components that can be used on your webpage or in your webapplication, things like buttons,toolbars,checkboxes are all widgets and can be created using the DynAPI2 code (or DHTML in general, but the DynAPI2 makes it easier to code them cross-browser).

5.1. What widgets are there

This is hard to say, basically everybody can make widgets so there might be a widget for everything you can think of. The DynAPI2 comes with a library of default widgets. At this point it's not defined yet which widgets should be in the default widget set. In any case the old DynAPI1 widgets should be converted to DynAPI2 versions (most have already)

5.2. Where should I upload my widgets

Good question.. your website? There's no location availabe yet that contains a widget archive. If there's enough people offering widgets I might open one on my own site somewhere but for now just use your own website and post a message on one of the sourceforge forums (see 2.1). If you don't own a website you could get a free one at one of the many free web space providers (geocities, xoom,etc).

5.3. Where is widget X

Most of the original DynAPI1 widgets have (or will be) ported to the DynAPI2. If it's not available at the sourceforge site, or on any of the developers personal websites (see 2.3) it's probably not created yet. You might want to try and post a message on one of the forums (see 2.2) asking for a certain widget or ofcourse the all time favourite, create the widget your self.

back
H4 {
  text-align: left;
  font-family: sans-serif;
  font-weight: normal;
  color: #0050B2; 
}
.idl-code { 
  font-family: monospace;
  border: 1px solid black;
  white-space: pre; 
  color: black;
  background-color: #dfdfdf; 
}


.attribute-name {  
  color: black;
  background-color: #FFFFD2;
}

.method-name {  
  color: black;
  background-color: #D9E6F8;
}

.parameter-name {
  color: black;
  background-color: #FEE6F8; 
}

UL.toc, OL.toc {list-style: none}
DIV.toc UL UL, DIV.toc OL OL {margin-left: 0}
DIV.toc UL UL UL, DIV.toc OL OL OL {margin-left: 1em}
DIV.toc UL UL UL UL, DIV.toc OL OL OL OL {margin-left: 0}
LI.tocline1 {font-weight: bold}
LI.tocline2 {font-weight: normal}
LI.tocline4 {font-style: italic}

code { font-family: monospace }

div.paramtable { margin-left: 1em }
div.returntable { margin-left: 1em }
div.exceptiontable { margin-left: 1em }


body {
  margin: 2em 1em 2em 70px;
  font-family: sans-serif;
  color: black;
  background: white;
  background-position: top left;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

th, td {
  font-family: sans-serif;
}

h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }

.hide { display: none }

div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
div.head img { color: white; border: none }

p.copyright { font-size: small }
p.copyright small { font-size: small }

@media screen {
a:hover { background: #ffa } 
}

pre { margin-left: 2em }
dt, dd { margin-top: 0; margin-bottom: 0 }
dt { font-weight: bold }

pre, code { font-family: monospace }

ul.toc {
  list-style: disc;
  list-style: none;
}

Reply via email to