1) What are the various aspects we need to focus while designing the plugin?
Only you know your specific requirements and it depends on the plugin technology/framework you are going with - handling all possibilities would make a book, not a post.
2) What is the best platforms/framework available out of QtBrowserPlugin/NPAPI/XUL/firebreath and why?
As usual there is no single best technology:
- XUL - This is no plugin technology.
- Plain NPAPI & ActiveX - These are the basic underlying techniques that the other solutions save you from. I wouldn't do it unless you already have experience in developing with those or very specific needs. If other options fit for you i wouldn't waste my time here, especially if you need to go cross-platform.
- QtBrowserPlugin - If you already use Qt it should be a good fit, otherwise consider that Qt is quite a heavy dependency. Qts license might not be suitable (LGPL or commercial).
- FireBreath - Rather lightweight, liberal license (dual new BSD/LPGL). The build-system doesn't suit every development team. As its co-owner i might be biased though.
3) What are the common/generic issues that might crop up during plugin lifecyle?
Much confusion seems to come from the life-cycle - your plugin lives in a host-process and has to comply with its behaviour. Plugin-instances, their windows and their scriptable objects can have completely different life-spans:
Plugin instances might be re-used, their windows are not re-used, scriptable objects coming from a plugin instance might survive it, etc. ...
4) Please pass on any cookbook/pointers in this regard
Not for all possible technology choices - pick one, then ask more specific questions. If you decide to implement your plugin fully by yourself using plain NPAPI & ActiveX then at least FireBreath' source should help you clarify some things.