The thing with the other libraries is that jQuery mainly promotes
writing a simple functional plugin, beacause in many cases object-
oriented code is really not necessary. Of course in other cases it is,
like when building a widget: http://docs.jquery.com/UI/Developer_Guide

So I think if you want to write your application that doesn't need to
be a jquery plugin, just use a general design pattern if that's more
suitable. And most likely it will be convenient to write some custom
jQuery plugins too, but that is really simple: 
http://docs.jquery.com/Plugins/Authoring

Using jQuery should be very easy, and you don't have to understand it
in depth first, just play with the examples and see what happens.
Understanding how to construct a javascript application is quite a
different thing. Of course they meet some time in the future, e.g. if
you're building a complex jQuery plugin, but this shouldn't be the
point to start I think, just start learning these separately!

Cheers,
Balazs

On Nov 10, 7:24 pm, George <[EMAIL PROTECTED]> wrote:
> I see your point...
> I had discovered recently the lack of JavaScript knowledge. And since
> I mostly doing web development I realized that I am missing out a lot.
>
> Unfortunately the object oriented approach JavaScript using is
> different from  other object oriented languages I know (C++, C#, Java)
> So I am trying to get up to speed with JavaScript and making up my own
> problems/tasks. Like I am learning how 'this' works with JavaScript...
>
> So the code I wrote is not promoted by another library :) It's
> promoted by my background in C++ and C# mostly :)
> So I chose JQuery as a library to use but before I can freely start
> using it I want to understand how things work.
> Cause as of right now if you tell me to write JQuery from scratch I
> will not be ably even to start :)
> And even having full source available does not help much since I often
> do not understand what is going on
>
> Thanks
> George.
>
> On Nov 10, 12:50 pm, "Olivier Percebois-Garve" <[EMAIL PROTECTED]>
> wrote:
>
> > Well, using the pattern for plugin creation will make your life easier, and
> > "this" will make more sense.
> > Reading your code, it feels like you are using the structuration promoted by
> > another library
>
> > On Mon, Nov 10, 2008 at 6:29 PM, George <[EMAIL PROTECTED]> wrote:
>
> > > I had looked there probably 10 times :)
> > > Are you implying that I need to convert my code to being Plug-In?
> > > Other than that I do not see how this page
> > >http://docs.jquery.com/Plugins/Authoring
> > > answers my question...
> > > Sorry, but please spell it out for me.
>
> > > The Plug-In would be the next step for me.. But as of now I am trying
> > > to nail down the use of 'this' in JavaScript as it's a bit different
> > > from what I am used to.
>
> > > George.
>
> > > On Nov 10, 11:43 am, "Olivier Percebois-Garve" <[EMAIL PROTECTED]>
> > > wrote:
> > > > you may want to have a look herehttp://docs.jquery.com/Plugins/Authoring
>
> > > > On Mon, Nov 10, 2008 at 5:20 PM, George <[EMAIL PROTECTED]> wrote:
>
> > > > > Being newbie in JavaScript I am trying to code my own helper object
> > > > > that does pagination.
> > > > > So here is a snippet of my code.
>
> > > > > MyData.prototype = {
> > > > >  ....blablabla...
> > > > >   PageUp: function() {
> > > > >        this.iFrom += this.pageSize;
> > > > >        this.CheckPageIndex();
> > > > >    },
>
> > > > >    CheckPageIndex: function() {
> > > > >        if( this.iFrom >= this.data.length )
> > > > >            this.iFrom = Math.floor((this.data.length - 1)/
> > > > > this.pageSize) * this.pageSize;
>
> > > > >        if( this.iFrom < 0 )
> > > > >            this.iFrom = 0;
> > > > >    }
>
> > > > > }
>
> > > > > Why do I need to call CheckPageIndex using this.CheckPageIndex when
> > > > > called from PageUp? It's in the same object...
>
> > > > > Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
> > > > > from object oriented languages like C++ I have a trouble
> > > > > understanding
> > > > > it.
> > > > > Or am I doing it wrong and there is a way not to specify 'this' to
> > > > > many times?
>
> > > > > Thanks
> > > > > George- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

Reply via email to