I would recommend the following document: Assembler Application Developer's Guide
I would also recommend to attend an Endeca training class. all your questions show that you are just a beginner with Endeca and I would really recommend a training.
The following training classes should be the best for you:
1) Implementing Endeca Commerce Core Technologies Rel 3.1
2) Developing Endeca Commerce Experience Manager Apps Rel 3.1