buddycloud.js (or lib buddycloud) roadmap and tests

16 views
Skip to first unread message

Rodrigo Duarte

unread,
May 21, 2013, 4:26:03 AM5/21/13
to buddycl...@googlegroups.com
Hey guys,

buddycloud.js will be a lib to help developers build stuff on top of buddycloud's stack. The main idea is that will do the HTTP API requests, so devs won't have to do XHR requests or use ajax manually.

The roadpmap that we are thinking looks like:
1 - Define functions signatures
2 - Write unit tests for it
3 - Implement
4 - Refactoring
5 - Repeat 1, 2, 3, 4 cycle until the tests are passing
6 - Acceptance tests (test the whole buddycloud stack) and documentation

An example of use of the lib, would be to retrieve all subscriptions from a node, like:

buddycloud.subscriptions({node: '/user/rodr...@buddycloud.org/posts'}, callback)

Any suggestion of projects that we could base ourselves on? Criticisms?

--
Rodrigo Duarte Sousa
MSc candidate in Computer Science
Distributed Systems Laboratory
Federal University of Campina Grande
Campina Grande, PB - Brazil

http://lsd.ufcg.edu.br/~rodrigods

Denis Washington

unread,
May 21, 2013, 4:53:34 AM5/21/13
to buddycl...@googlegroups.com, Rodrigo Duarte
Am 21.05.2013 10:26, schrieb Rodrigo Duarte:
> Any suggestion of projects that we could base ourselves on? Criticisms?

You shoud use promises rather than callbacks:

http://blog.parse.com/2013/01/29/whats-so-great-about-javascript-promises/

jQuery's ajax() method returns a promise, so there might not be much to
implement:

http://api.jquery.com/category/deferred-object/

Regards,
Denis


Rodrigo Duarte

unread,
May 21, 2013, 6:32:28 AM5/21/13
to Denis Washington, buddycl...@googlegroups.com

Simon Tennant

unread,
May 21, 2013, 7:25:37 AM5/21/13
to buddycl...@googlegroups.com, Denis Washington
Nice one Rodrigo. This will be a huge win for writing quick and dirty apps and even quick and clean apps :)

S.


--
You received this message because you are subscribed to the Google Groups "buddycloud-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to buddycloud-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Simon Tennant | buddycloud.com | +49 17 8545 0880 | office hours: goo.gl/tQgxP

Justin Karneges

unread,
May 21, 2013, 12:06:46 PM5/21/13
to buddycl...@googlegroups.com, Rodrigo Duarte, Denis Washington
For the /notifications/posts endpoint, I suggest having a kickoff method
that takes care of the long-polling behind the scenes and only triggers
a callback/promise when something interesting happens.

On 05/21/2013 03:32 AM, Rodrigo Duarte wrote:
> Functions signatures:
> https://docs.google.com/spreadsheet/ccc?key=0AhBUNODu6Dh2dDduQjFUaWhfb1RtZDV3V05Zd1NoekE#gid=0
>
> (work in progress)
>
>
> On Tue, May 21, 2013 at 5:53 AM, Denis Washington <den...@online.de
> <mailto:den...@online.de>> wrote:
>
> Am 21.05.2013 10:26, schrieb Rodrigo Duarte:
>
> Any suggestion of projects that we could base ourselves on?
> Criticisms?
>
>
> You shoud use promises rather than callbacks:
>
> http://blog.parse.com/2013/01/__29/whats-so-great-about-__javascript-promises/
> <http://blog.parse.com/2013/01/29/whats-so-great-about-javascript-promises/>
>
> jQuery's ajax() method returns a promise, so there might not be much
> to implement:
>
> http://api.jquery.com/__category/deferred-object/
> <http://api.jquery.com/category/deferred-object/>
>
> Regards,
> Denis
>
>
>
>
>
> --
> Rodrigo Duarte Sousa
> MSccandidate in Computer Science
> Distributed Systems Laboratory
> Federal University of Campina Grande
> Campina Grande, PB - Brazil
> http://lsd.ufcg.edu.br/~rodrigod <http://lsd.ufcg.edu.br/%7Erodrigods>s
Reply all
Reply to author
Forward
0 new messages