Forum OpenACS Q&A: Response to namespaces: to use or not to use?

Collapse
Posted by Jun Yamog on
I don't know if it should count as a thought.  But I use them.  Will there be standardization on this?

Use namespace... or never user namespace.

Also according to Rob Locke he read some issues regarding namespace that was brought up by Rob Mayoff.  <- did I spell his name correct, sorry if not.  Rob L. wrote a small hello world adp to show me how namespace behave in aolserver.  I am sorry I forgot about the issue.  Maybe if someone else can remeber this please post it.

Is someone already starting a doc on simple standards for OACS?  I know Don will say... would you like to volunteer for that.  Sure thing just give me access to file storage.

I can't contribute much but I think here are for starters for that small text file "Simple OACS dos and donts"

1. Use namespace

2. User "return_url" as a var name for blah blah.

3. Avoid putting in tcl logic on adp pages if possible.  Use foo.tcl and foo.adp.  The same way is true for tcl... avoid putting in html on tcl.

4. Use foo_p for boolean vars

5. Use package_key__foo/package_key.foo for db api.  Use package_key::foo for tcl api.

6. Use ad_form

The above is not meant to be a do list but more of atleast in the future the code will be uniform and standard.  Old code can be change as time goes by.  Also the above are just examples from me so not all maybe correct.