3 Replies Latest reply on Nov 21, 2012 1:48 PM by RMishra

    component and it's use?


      what's the use of component?

        • 1. Re: component and it's use?
          Nitin Khare
          A component is just like a Java bean. In ATG, Nucleus provides the model for building applications from those components. You can configure your components through simple configuration (properties) files that specify its class, scope, initialization values for various properties, dependency to other components etc. Refer this thread for a similar discussion:

          Does there any significance being a component centric?
          1 person found this helpful
          • 2. Re: component and it's use?

            Components in ATG are a public java class with appropriate properties with set/get methods. Additionally a component comes with .properties file that specify the class name and the scope and also any default values. The properties file also contains any dependency injections of other components. This .properties file must be placed under CONFIGPATH of the ATG.
            The name of the component is the full path name of the .properties file under the configpath starting with a “/”. For example, /com/vam/firstbean. CONFIGPATH variable is computed dynamically during startup based on the modules started, their order of startup and based on the entry in the MANIFEST.MF file of every module started.
            Use of components gives following advantages.
            • Code reusability
            • Reduced development time
            • Container independent
            • Entire application behavior can be changed by modifying one/some of the components.
            Note: In ATG, a component have one of the 3 scopes i.e. Global, Session, Request.

            • 3. Re: component and it's use?
              In ATG we can instantiate any class by component rather than directly by class.
              Component=.class file(java bean) + .properties file.
              1 person found this helpful