[Mailman-Developers] Javascript Client for Mailman

Florian Fuchs f at florianfuchs.com
Wed Mar 25 15:22:56 CET 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Am 25.03.2015 um 07:51 schrieb Ana Badescu:
> Hello,
> 
> While writing my proposal I came across 2 important issues related
> to the Javascript Client for the Mailman project that have yet to
> be raised:
> 
> 1. What I initially had in mind, was to build a Mailman client in 
> Javascript that provides the same API and functionality that the
> current one in Python does. The Python client API can be fully
> mimicked using a number of design patterns even though Javascript
> doesn't offer properties capability for example. However, node.js
> modules tend to take advantage of Javascript's asynchronous nature
> and have adopted sort of a standard practice to achieve it: it's
> called error-first callbacks, and most if not all APIs enforce it.
> You can read about it here 
> http://thenodeway.io/posts/understanding-error-first-callbacks/ and
> here 
> https://docs.nodejitsu.com/articles/errors/what-are-the-error-conventi
ons

Another
> 
*very* nice way to handle asynchronous behaviour in JS (and
one the avoids callback hell) is the Promises paradigm. Promises are a
native ES6 feature per-spec, but not all platforms support it. Node
doesn't, but there's a drop-in polyfill[1] and a number of other
libraries you could use.

> This boils down if we want to provide a client API that adopts the
> node.js conventions and works the same way most modules do or do we
> want to offer something almost similar to the current Python client
> API. There's a lot more to be said on this matter (for eg:
> callbacks being the reason why "callback-hell" exists) but I'd like
> to get your input first.

The JS client should be able to do the things mailman.client can do,
but that doesn't mean its internals need to be anything like
mailman.client's. *Some* similarity to the Python version would be
nice, but not to the extend that we do something in a way you normaly
wouldn't in JS. The intended audience are folks who use JS, so I'd
rather not have a client that runs on node but looks like Python. :-)

> 2. I'd also like to make part of the project, a node.js application
> that uses the Mailman Javascript client and offers all the
> functionality Postorious does. Is that a good idea? This doesn't
> make the scope of the project too large or unattainable.

"All the functionality that Postorious does" sounds like your summer
is *a lot* longer than mine is. :-) I definitely don't see that.

What you could do though is add an *optional* task to your timeline,
building a *very small* and stripped down web ui proof of concept,
with only a small handful of features that you can use to demonstrate
how to integrate the client. But that shouldn't be worked on before
anything else has been finished.


Cheers,
Florian

[1] https://github.com/jakearchibald/es6-promise


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVEsTAAAoJEEceGbPdavl7Vi8H/0+oj9soM2oRDHBYpnPZo4OG
NSwobau3vKrmja/OU0lrXOwlYxfYo+WeQnmf17dlvJOk9zYqPCtSLT5emcV3gQjv
vWgzBFwG2sXY0MM/rvfSS+CUIzpNPI+kdhOXriQxhkylBu4aDl8XCiII1xmry7u6
5aFzMygFuV6ixyZRUwriB+qbqvxYdQ+eFkW+LyBvk4y0fkjTEK0/9fXnghkc8fuq
taYAbCnhpKZtO6hAsIgQoPPtuGDEqPq5VjjIU89JGeaRjxZ/LX/SOHh2thpgXhre
JD+3W5FdziCp3qFijeQCVuK/fErEF1nevC5/wTeeW9fY7/ZOT5GhYCDs4i6EjkM=
=3uJ7
-----END PGP SIGNATURE-----


More information about the Mailman-Developers mailing list