1.

Which Are The Different Types Of Databeans. What Is Commonly Used In Commerce.when Do We Use It?

Answer»

A data bean is a JAVA bean that is used within a JSP page to provide dynamic content. A data bean normally provides a simple representation of a WebSphere Commerce entity bean.

There are two types of data beans: SMART data beans and command data beans.

 A smart data bean uses a lazy fetch method to retrieve its own data. This type of data bean can provide better performance in situations where not all data from the access bean is required, SINCE it retrieves data only as required. Smart data beans that require access to the database should extend from the access bean for the corresponding entity bean and implement thecom.ibm.commerce.SmartDataBean interface. When database access is not required, the smart data bean should extend the SmartDataBeanImpl class.

A command data bean relies on a command to retrieve its data and is a more lightweight data bean. The command retrieves all attributes for the data bean at once, regardless of whether the JSP page requires them. As a result, for JSP pages that use only a selection of attributes from the data bean, a command data bean may be costly in terms of performance time. Command data beans can also extend from their corresponding access beans and implement thecom.ibm.commerce.CommandDataBean interface.

SmartDataBean is commonly used in wcs.We use command databean only when USING Command databean is impractical.

A data bean is a Java bean that is used within a JSP page to provide dynamic content. A data bean normally provides a simple representation of a WebSphere Commerce entity bean.

There are two types of data beans: smart data beans and command data beans.

 A smart data bean uses a lazy fetch method to retrieve its own data. This type of data bean can provide better performance in situations where not all data from the access bean is required, since it retrieves data only as required. Smart data beans that require access to the database should extend from the access bean for the corresponding entity bean and implement thecom.ibm.commerce.SmartDataBean interface. When database access is not required, the smart data bean should extend the SmartDataBeanImpl class.

A command data bean relies on a command to retrieve its data and is a more lightweight data bean. The command retrieves all attributes for the data bean at once, regardless of whether the JSP page requires them. As a result, for JSP pages that use only a selection of attributes from the data bean, a command data bean may be costly in terms of performance time. Command data beans can also extend from their corresponding access beans and implement thecom.ibm.commerce.CommandDataBean interface.

SmartDataBean is commonly used in wcs.We use command databean only when using Command databean is impractical.



Discussion

No Comment Found