2 Replies Latest reply on Jan 11, 2013 8:25 AM by 967909

    Handlers in enceca

      HI Guys

      what is the main use of handlers in endeca and why we have to write handlers in endeca

      give me an example with clear picture
        • 1. Re: Handlers in enceca
          Heiko Mock

          When working with cartridges you have four parts.

          1) Cartridge Templates
          2) Cartridge Handler
          3) Cartridge Renderer
          4) Cartridge Configuration (optional)

          The assembler in Endeca uses cartridge handlers to connect to external resources and to create a response object. This object will be given to a web application. This application is responsible to render the content items, it received in the response.

          Note: Not all cartridges require a cartridge handler.

          External resources as mentioned above can be: a MDEX Engine, a database, an ATG instance, an inventory system,...

          So, you have to write a cartridge handler in the cases, where you need to perform some processing on the cartridge instance configuration before you send the response to the client application.
          You can do all the processing in the client application, but if you encapsulate the business logic in an extension to the assembler you will have several advantages:
          • The rendering code will be cleaner and easier to maintain
          • The processing will be centralized in one place and the results can be used by multiple client applications and across multiple channels (i.e. desktop and mobile)
          • You can coordinate processing across multiple cartridges, before you return the response to the client application.

          I think this should help to have a common understanding about handlers.

          Best regards,
          • 2. Re: Handlers in enceca
            in which way how can i handle that response

            give me simple example

            and also what is difference between template and cartrige in endeca
            how to create cartridge instance ?
            when cartridge instance is created in endeca??