1

I should include nusoap library in my module, there is two way:

1- Download and extract it in my module directory and simply include it.

2- Writing another module to provide nusoap wrapper for other modules need it including mine.

I searched for existing module but I didn't find any. so which way is better?

1 Answer 1

1

It depends what you need really.

If you only need nusoap once, for a single project, then just download the library and include it using include (or even better, module_load_include(), that way it's still a 'Drupal' method!) There's no point writing a whole new module just to include a few files.

If you think you can provide useful wrappers for nusoap functionality though (as in ones not intrinsically provided by the library itself), or if you're likely to want to use nusoap again in a future project, it will probably save you some time later on to write a new module.

If you did this then you also have the added benefit of being able to contribute the module back to the community; a lightweight Drupal-capable soap library would probably be useful to a lot of people.

If I could offer any advice it would be to plan out what functionality you'd want your new module to have (what entities it could interface with, view/rules integration etc) before you dive in and write it. It's a lot more difficult to make a module generic halfway through writing it than it is at the beginning :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.