Re: [Freeipa-devel] QUnit and unit testing

2010-09-13 Thread Adam Young
On 09/13/2010 12:51 PM, Endi Sukma Dewata wrote: - Adam Youngayo...@redhat.com wrote: I've started playing around with QUnit. I think it is the right too for Unit testing in q JQuery based application. One thing that has become clear pretty quickly is that most of our code is

Re: [Freeipa-devel] QUnit and unit testing

2010-09-13 Thread Endi Sukma Dewata
- Adam Young ayo...@redhat.com wrote: IPA class: - IPA(path, type): Construct IPA object given a path to server's JSON-RPC or static files. - success(): Default success handler. - error(): Default error handler. - failure(): Default failure handler. -

Re: [Freeipa-devel] QUnit and unit testing

2010-09-13 Thread Endi Sukma Dewata
- Endi Sukma Dewata edew...@redhat.com wrote: var addCmd = ipa.createCommand(user-add); The createCommand() could be implemented like this: ipa.createCommand = function(method) { return new IPACommand(this, method); } The QUnit test could be implemented like this: test(test01,

Re: [Freeipa-devel] Proposed Javascript coding standards

2010-09-13 Thread Endi Sukma Dewata
Hi Adam, - Adam Young ayo...@redhat.com wrote: https://fedorahosted.org/freeipa/wiki/Javascript_Coding_Standards Whitespace: Do we put a space in function definition between the () and {}? function(){...} vs. function() {...} Or does it matter? Compound statement: This is probably

Re: [Freeipa-devel] QUnit and unit testing

2010-09-13 Thread Adam Young
On 09/13/2010 02:44 PM, Endi Sukma Dewata wrote: - Adam Youngayo...@redhat.com wrote: IPA class: - IPA(path, type): Construct IPA object given a path to server's JSON-RPC or static files. - success(): Default success handler. - error(): Default error handler. -

Re: [Freeipa-devel] Proposed Javascript coding standards

2010-09-13 Thread Adam Young
On 09/13/2010 03:33 PM, Endi Sukma Dewata wrote: Hi Adam, - Adam Youngayo...@redhat.com wrote: https://fedorahosted.org/freeipa/wiki/Javascript_Coding_Standards Whitespace: Do we put a space in function definition between the () and {}? function(){...} vs. function()

Re: [Freeipa-devel] Proposed Javascript coding standards

2010-09-13 Thread Simo Sorce
On Mon, 13 Sep 2010 11:44:53 -0400 Adam Young ayo...@redhat.com wrote: I've updated the page. Bascially, I took the python coding standards and aaplied them to our code. THis seems to be the path of least resistance. People used to Camel case will have to get used to underscores

Re: [Freeipa-devel] Proposed Javascript coding standards

2010-09-13 Thread Adam Young
On 09/13/2010 04:49 PM, Simo Sorce wrote: On Mon, 13 Sep 2010 11:44:53 -0400 Adam Youngayo...@redhat.com wrote: I've updated the page. Bascially, I took the python coding standards and aaplied them to our code. THis seems to be the path of least resistance. People used to Camel case

Re: [Freeipa-devel] Proposed Javascript coding standards

2010-09-13 Thread Simo Sorce
On Mon, 13 Sep 2010 17:02:19 -0400 Adam Young ayo...@redhat.com wrote: The is a really nasty bug that the same line policy avoids. Javascript often attempts to guess where you meant to put semicolons, and puts the in for you, without telling you. return { status: true; };

Re: [Freeipa-devel] [PATCH] Big webUI patch.

2010-09-13 Thread Adam Young
On 09/13/2010 04:24 PM, Adam Young wrote: On 09/13/2010 03:48 PM, Pavel Zůna wrote: very simplified summary: - introduce jQuery UI and jQuery BBQ libraries to the project - code restructuring There are so many changes, there's no place to list them here. See freeipa-devel list: webUI code

Re: [Freeipa-devel] [PATCH] Big webUI patch.

2010-09-13 Thread Adam Young
Feedback: First of all, let me say that this is a tremendous effort. I'm impressed. Lots of good work here. Don't include the full state of the application, just the current tab. The URL gets too long, and the application becomes confused. When transitioning betwen tabs, if you want to