Hi Martin,

I am not sure I understand the first issue. I was planning to render the
chart and its model using JS from the component renderer. So if the JS name
includes the clientId (for e.g. trinidadChartid4) I was assuming that it
would be unique enough on the page.

I was suggesting that org_apache_myfaces_ is not a good prefix for
JavaScript className since in Oracle for JavaScript we mostly follow the
same coding conventions as Java.

Regards,
Venkata

On 7/17/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:

Hi Venkata,

a unique component id and a unique method-name or variable name are
two entirely different things.

Imagine a chart component outside of any naming container, which gets
the id "chart" set by the user. Whatever global variable you use will
then be named according to your unique id, but that doesn't really
mean the variable name is unique. If you use another chart component
on the same page (yes, it's possible, there are several charting comps
for JSF out there) the likelihood is great to run into name conflicts.

Prepending everything with ADF is a better namespacing decision - the
probability that something has the 3-letter combination ADF in its
name is rather low. So if you properly define classnames which contain
ADF, you should be all set. I still think that using the unique prefix
you have in your domain (also used in your Java-package structure) is
a much better prefix. You don't type a classname very often, and
there's even code complete for this in some IDEs.

Once more - method's shouldn't be global, and therefore don't need to
be namespaced!

There is really not much need for the use of global names except for
classes and a very few variables.

What is your reason for saying that org_apache_myfaces_ does not seem
like a good prefix for class names?

regards,

Martin

On 7/17/06, venkata guddanti <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> Thanks for suggesting the namespace for JavaScript variables on the
page. I
> was thinking that javascript variables rendered from the components are
> automatically unique if we suffix them with the clientId.
>
> I believe org_apache_myfaces_ does not seem like a good prefix for
> JavaScript class names. Is there a better prefix notation in myfaces for
> JavaScript class names? For e.g. In our RichClient framework built on
top of
> trinidad all our javascript classes are prefixed with ADF
>
> Regards,
> Venkata
>
>
> On 7/17/06, Martin Marinschek <[EMAIL PROTECTED] > wrote:
> >
> > Hi Venkata,
> >
> > the general rule in MyFaces is to prefix with:
> >
> > org_apache_myfaces_....
> >
> > regards,
> >
> > Martin
> >
> > On 7/17/06, venkata guddanti <[EMAIL PROTECTED]> wrote:
> > > Hi Martin,
> > >
> > > The global variable is only in the test page. The rendering logic is
in
> > > Chart.js. I plan to make this logic namespace compliant. Currently
it is
> > > using chart as a namespace. For e.g. chartAssert etc., Chart is the
base
> > > class for all the other chart types. I believe I will change the
> > namespace
> > > to something like: trinidadChart.  I would appreciate any other
comments
> > > regarding the prototype. Please also keep in mind that this code is
> > still
> > > rough. I have to make a pass through it to clean it up. For e.g. I
have
> > > private variables in the base class that I am using in the derived
> > classes.
> > >
> > > I still have few weeks of work before I can start integrate with the

> > > trinidad and PPR framework as I have a day job with Oracle :). Here
are
> > some
> > > of the important things that I have left regarding the charting:
> > >
> > >
> > >    - Animation support.
> > >    - Better Labeling support
> > >    - Tooltips
> > >
> > >
> > > I will ask Matthias to put another version on the server as I am
just
> > about
> > > ready to integrate.
> > >
> > > Regards,
> > > Venkata
> > >
> > > On 7/16/06, Martin Marinschek < [EMAIL PROTECTED]> wrote:
> > > >
> > > > Ok, from a short look, I think you'll have to make your javascript
> > > > comply better with object oriented principles.
> > > >
> > > > e.g. global variable:
> > > >
> > > > var chart
> > > >
> > > > (name is not namespaced, global is not too good anyways, etc.)
> > > >
> > > > regards,
> > > >
> > > > Martin
> > > >
> > > > On 7/17/06, Matthias Wessendorf < [EMAIL PROTECTED]> wrote:
> > > > > Martin,
> > > > >
> > > > > check http://people.apache.org/~matzew/venkata/
> > > > > There I deployed the prototype from Venkata.
> > > > >
> > > > > -Matthias
> > > > >
> > > > > On 7/16/06, Martin Marinschek < [EMAIL PROTECTED]>
wrote:
> > > > > > May I ask about the underlying JavaScript? Do you use global
> > method
> > > > > > names, or object oriented javascript? How about namespacing?
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > > On 7/17/06, Matthias Wessendorf < [EMAIL PROTECTED]> wrote:
> > > > > > > On 7/13/06, venkata guddanti <[EMAIL PROTECTED]>
wrote:
> > > > > > > > Hi Matthias,
> > > > > > > >
> > > > > > > > I would prefer to develop it as a trinidad component. I am
> > more
> > > > familiar
> > > > > > > > with this environment and I have never looked at MyFaces
> > codebase.
> > > > I am also
> > > > > > > > not sure if MyFaces sandbox supports AJAX.
> > > > > > > Hi venkata,
> > > > > > >
> > > > > > > ok; stay with Trinidad, but make sure the renderer is "Faces
> > Major".
> > > > > > > I'll make it *compatible* with Tomahawk / MyFaces Shared.
> > > > > > >
> > > > > > > And yes, the sandbox supports AJAX.
> > > > > > >
> > > > > > > -Matthias
> > > > > > >
> > > > > > > > Plus Oracle pays by bills :)
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Venkata
> > > > > > > >
> > > > > > > >
> > > > > > > > On 7/13/06, Matthias Wessendorf < [EMAIL PROTECTED]>
wrote:
> > > > > > > > >
> > > > > > > > > In that case we have *no* IP issue.
> > > > > > > > >
> > > > > > > > > I think this component should be developed under the
MyFaces
> > > > sandbox.
> > > > > > > > > That can also be a play ground for a more *common* base
of
> > > > > > > > > MyFaces/Trinidad.
> > > > > > > > >
> > > > > > > > > -Matthias
> > > > > > > > >
> > > > > > > > > On 7/13/06, venkata guddanti <[EMAIL PROTECTED]
>
> > wrote:
> > > > > > > > > > I wrote all the JavaScript myself.
> > > > > > > > > >
> > > > > > > > > > On 7/13/06, Mike Kienenberger < [EMAIL PROTECTED]>
wrote:
> > > > > > > > > > >
> > > > > > > > > > > On 7/13/06, venkata guddanti <[EMAIL PROTECTED]
> > >
> > > > wrote:
> > > > > > > > > > > > I wrote this from scratch and only have a
dependency
> > on
> > > > browser
> > > > > > > > > > > javascript
> > > > > > > > > > > > and SVG. I learnt that apache.org does not accept
> > images.
> > > > So here
> > > > > > > > > are
> > > > > > > > > > > links
> > > > > > > > > > > > to my charting images:
> > > > > > > > > > > >
http://picasaweb.google.com/venkata.guddanti/Charting/
> > > > > > > > > > >
> > > > > > > > > > > When you say that it has a dependency on browser
> > javascript,
> > > > do you
> > > > > > > > > > > mean that it uses javascript that you wrote, or do
you
> > mean
> > > > that it
> > > > > > > > > > > depends on javascript that someone else wrote?   If
the
> > > > second, we'll
> > > > > > > > > > > need to consider the license for that javascript.
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Matthias Wessendorf
> > > > > > > > >
> > > > > > > > > further stuff:
> > > > > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Matthias Wessendorf
> > > > > > >
> > > > > > > further stuff:
> > > > > > > blog: http://jroller.com/page/mwessendorf
> > > > > > > mail: mwessendorf-at-gmail-dot-com
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > http://www.irian.at
> > > > > >
> > > > > > Your JSF powerhouse -
> > > > > > JSF Consulting, Development and
> > > > > > Courses in English and German
> > > > > >
> > > > > > Professional Support for Apache MyFaces
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Matthias Wessendorf
> > > > >
> > > > > further stuff:
> > > > > blog: http://jroller.com/page/mwessendorf
> > > > > mail: mwessendorf-at-gmail-dot-com
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > http://www.irian.at
> > > >
> > > > Your JSF powerhouse -
> > > > JSF Consulting, Development and
> > > > Courses in English and German
> > > >
> > > > Professional Support for Apache MyFaces
> > > >
> > >
> > >
> >
> >
> > --
> >
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to