"Zameer Manji" <[EMAIL PROTECTED]> wrote
Also, how do I then begin to approach the whole API ? Do I create a
User
class the inherits from the UserProfile class and other classes for
their Neighbours', Top Artists, etc ?
I don;t know enough about the underlying service to answer that but...
Do a create a separate class for each web service ?
Web services are usually procedural in nature so that you don't
need to create classes at all. So to provbide maximum flexibility
you might be better just creating a module that exposes the
services as functions. The users can then create their own classes
built on the underlying API functions.
If you do want to go with classes, think about how you would
ideally like to use the API to build applications. Try writing
some simple applications as if the classes existed. Calling
the methods you would want to have. Then go back and build
those classes. Design from the outside in for maximum usability.
And of course it might be a good idea to do both things. Write
the basic module that handles all the SOAP and networking
stuff then write the user friendly classses on top of that as a
separate module.
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor