There are not a lot of comments. Use the API browser to browse the
structure of the code instead. If you are not sure about something then
ask me either by email or via skype (my id is red.mullet).
> I'm sure this makes complete sense to you, Dean, but if I am to
> document this properly I need to understand what's going on in your
> head when you write this stuff.
When I write this stuff? :) The code is well structured. There is one
file per class. And all classes for a package reside in single
directory. In fact, the file structure perfectly mirrors the base2
namespace.
> Can you define jsb chrome for me?
It's not released yet. It's a JSB package to provide cross-browser UI
components; sliders, spinners, date pickers etc. It won't need much
documenting as it will just mean attaching classes to elements.
e.g.
<input class="jsb-spinner" value="50">
That will turn the <input> element into a spinner control. There is no
API to learn in order to use it so it won't need documenting.
jsb.chrome is extendible and to do this some documentation will be
required. But most people will just use it "out of the box".
> Is there some mechanism to keep people from recreating duplicate
> stylesheets in the DOM?
No. You can't stop people from doing stupid things so it's best not to
try. :)
> What is the difference between base2 and legacy?
The legacy file plugs some gaps in really ancient browsers. It was
mostly used to provide support for MSIE5.0 but I am no longer supporting
that browser in version 2 of base2.
> Why does legacy even exist any more?
It's still handy for supporting FF1. But really it is pretty redundant now.
> If Object.prototype is forbidden
> <http://dean.edwards.name/weblog/2007/03/rules/#rule2>, why is is in base2?
What do you mean? base2 does not extend any native prototypes.
> Is "base2.DOM.bind(document);" really necessary? Why can't base2 or DOM
> do that on it's own?
You may not want to bind the document. The base2.dom APIs are useful on
their own. JSB uses the base2.dom APIs without binding the document.
http://dean.edwards.name/weblog/2007/03/yet-another/
http://dean.edwards.name/weblog/2007/03/other-way/
> Can you write a little example, using base2, dom and jsb to do the
> following?
>
> * Wire up input text, password and button elements to accept login
> registration information (first name, last name, email, password)
> * The name fields should be validated so the user properly enters
> correct capitalization
> * The email field should validate for proper email syntax
> * The password field should have the following restrictions
> o Must be 5 characters minimum
> o Must start with a letter
> o Must contain at least one digit and special character
> * Demonstrate how the registration button can be wired to send the
> registration information via XHR to the server
> * Also demonstrate how the validation works when the user enters
> data incorrectly on the form
>
> If you can do this, I think it will help me start to wrap my head around
> base2 and friends.
> This might be a great way for you to create examples for me too.
OK. I'll try to knock something together this week. base2 does not have
any Ajax components though. :)
I think you should concentrate on writing test suites at first. That way
you will get to know the API slowly but surely. I'm updating the API
reference at the moment and as I pointed out before there is already
good documentation for JSB:
-dean
How can one write a test suite for code that is not commented properly
and the docs that have been created are sorely lacking? I'm trying to
help here, but telling me to go and use the API browser is laughable.
That's why I've asked for a real world example of using base2 on a
registration form. Maybe then I can make sense of why you wrote the
scripts the way to did.
If I get a clear picture in my head about the structure and meaning of
the scripting I can begin to show you an easy way to document all of
your scripting. With the exception of JSB, all of the documentation,
for what has been scripted, do not help. jQuery, MooTools and many
others have documentation that can be followed and used without much
effort. This needs to be true for base2 as well. Anyone that writes
good code or scripts in this case, knows that.
And yes this is stuff, if one cannot completely understand how the
script flows and there is virtually no documentation. If the general
public try to use the base2 scripts they will make mistakes, like
creating multiple stylesheets that you called stupid. Writing code
for masses means commenting your code properly, structuring the code
so that is flows and is compartmentalized so you could have a MooTools
kind of customized builds if requested. All three of these are either
lacking or are very confusing.
Dean, you've written some excellent code, but as an advocate for
general users trying to use base2 in a real world example, base2 does
not get a passing grade.
I'm eagerly waiting to see how you create the registration page I
suggested.
:)
> -dean- Hide quoted text -
>
> - Show quoted text -
What is: var _Object_prototype = Object.prototype?
Please explain.
On Mar 28, 1:22 pm, Dean Edwards <dean.edwa...@gmail.com> wrote:
-dean
> --
> You received this message because you are subscribed to the Google Groups "base2-js" group.
> To post to this group, send an email to base...@googlegroups.com.
> To unsubscribe from this group, send email to base2-js+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/base2-js?hl=en-GB.
>
>
OK. Using your logic, I go to the API browser for base2 and I want to
add an event listener to my page. What I find in the API are five
addEventListeners. One is under DOM.Element, one is under
DOM.HTMLDocument, one is under DOM.HTMLElement, one is under
DOM.Document, and one is under DOM.EventTarget. Which one am I
supposed to use? Why are there five? The API browser is not
helpful. This is just one example, there are tons of examples.
How can one write a test suite for code that is not commented properly
and the docs that have been created are sorely lacking? I'm trying to
help here, but telling me to go and use the API browser is laughable.
That's why I've asked for a real world example of using base2 on a
registration form. Maybe then I can make sense of why you wrote the
scripts the way to did.
If I get a clear picture in my head about the structure and meaning of
the scripting I can begin to show you an easy way to document all of
your scripting. With the exception of JSB, all of the documentation,
for what has been scripted, do not help. jQuery, MooTools and many
others have documentation that can be followed and used without much
effort. This needs to be true for base2 as well. Anyone that writes
good code or scripts in this case, knows that.
And yes this is stuff, if one cannot completely understand how the
script flows and there is virtually no documentation. If the general
public try to use the base2 scripts they will make mistakes, like
creating multiple stylesheets that you called stupid. Writing code
for masses means commenting your code properly, structuring the code
so that is flows and is compartmentalized so you could have a MooTools
kind of customized builds if requested. All three of these are either
lacking or are very confusing.
Dean, you've written some excellent code, but as an advocate for
general users trying to use base2 in a real world example, base2 does
not get a passing grade.
I completely understand the purpose of base2 and also recognize the
fact that base2 and related scripting files have been released to the
public. Any code or script that is released to be used by the general
public should be tested and documented thoroughly. Base2 is the only
framework that does not have either proper documentation or proper
testing.
Dean asked me directly to post the conversation I was having with him
to this website for the entire group to see and now he doesn't want to
have this difficult conversation. Well, releasing code for the
general public and yet not wanting to explain it, document it or test
it properly is not responsible. I don't care how well you can write
code.
I have learned a lot from Deans work and wished to help him with this
project, but he doesn't want to have a frank conversation about the
very code he has released to be used by everyone.
Do not continue to release code or script to the general public unless
you are prepared to explain it, test it and yes, you have to defend
it.
On Mar 29, 4:45 am, Michael Hodgson <michael.hodg...@gmail.com> wrote:
I will continue to watch this project and your work (in general) to
see if the documentation, testing and support for your product
improve.
Good luck.
On Mar 29, 4:12 am, Dean Edwards <dean.edwa...@gmail.com> wrote:
> I don't want to have a public debate like this. Thanks for your offer
> to help but I will continue to write the documentation and test suite
> myself.
>
> -dean
>
> >>http://dean.edwards.name/weblog/2007/03/yet-another/http://dean.edwar...
> > For more options, visit this group athttp://groups.google.com/group/base2-js?hl=en-GB.- Hide quoted text -
I don't mind difficult conversations about base2. It was the tone of
your emails that I didn't like. It's possible that I am too touchy
though. :)
-dean
--
You received this message because you are subscribed to the Google Groups "base2-js" group.
To post to this group, send an email to base...@googlegroups.com.
To unsubscribe from this group, send email to base2-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/base2-js?hl=en-GB.