Hey shindig-dev: "The eagle has landed"

As I talked about a few times before, I've been hard at work at cleaning up
and basically rewriting most of php-shindig's social code. Due to various
speaking engagements and switching jobs progress has been a lot slower then
I wish it would've been, but the good news is that 1) It's committed! and 2)
Things are picking up a bit development wise, so I expect to make better
speed in the future.

The list of changes is almost to big to completely document since most of
the guts of how the social api worked has been ripped out, it was turning
into less-then-elegant code with the 0.7, then 0.8 and then the old 0.8
multi-part batching protocols being implemented on the same structure.
Bolting json-rpc on top of that would've just lead to having to live with an
less-then-optimal code base for a long time after release.

Questions I expect some people to have:

Q) You have patches waiting in JIRA and chris has been lazy about applying
them!
A) With so many changes being implemented all my available time has been
going to finishing that, now that the commit is done I expect to spend some
time on reducing the test suite issue count even more (4 more to go with the
0.7 test suite, and a couple more for the newly released 0.8 test suite).
After that my first order of buisness is to go through JIRA and apply all
contributed patches... their not forgotten and you have my apologies it took
so long to get around to them!
   Oh ps, if you have some spare cycles, you could check if your patch still
applies and if not rework it so that it applies again, that would mean i can
commit it that much quicker! But otherwise I'll get around to it eventually
too :)

Q) What improvements does this large change give us?
A) test suite errors going down from 26 to 8, 0.8.1 including json-rpc being
completely implemented, much cleaner code base that we can live with for
some time to come.

Q) I have php-shindig running on my container, what do I need to do to make
the latest version work?
A) The high level overview is that:
   1) All SPI errors are now exceptions (SocialSpiException specifically),
the right way to use them is:
       new SocialSpiException("Message explaining the error",
ResponseError::$NOT_IMPLEMENTED);
   2) All return values are now plain vars and not ResponseItems
   3) Param order and sometimes type of the SPI functions has been changed
too to allow for a clean rest+json-rpc combination, so you'll have to check
all of those too

Q) So how do I update my code base to work with this latest version of
php-shindig?
A) I've done all my dev work using php-shindig + partuza, since it allowed
for complete end-to-end testing, as such the best reference for what logic
to use implementing your data adapters is:
http://code.google.com/p/partuza/source/browse/trunk/Shindig/PartuzaService.php
   My advice would be to walk through each of the functions, and check your
function param order, error handling (response item -> exception), return
type (response item -> var), and in which way the user and group id's are
now parsed to the functions.
  Oh ps the good news is that with the new consistent interfaces, it's now a
lot easier to make one user+group id set to user id's array function ,see
the getIdSet() function in PartuzaService.php for a practical example (saves
a lot of duplicate code).

Q) What can I do to help?
A) I'm so glad you asked that! There's still a few errors in the 0.7 and 0.8
test suites that could really use someone looking at them, also just
generally validating and testing the new code would be, like, super duper
useful, code without testing does have an inherent risk so just by doing and
svn update and kicking the tires you would already be helping us a lot!

Reply via email to