Monday, 2 April 2012

ATG Interview Questions 5

1. What is a Nucleus?
Nucleus is the central registry for the JavaBeans that contain your application-level logic. It creates and configures Dynamo components and organizes them into a hierarchical namespace

2. Difference between dsp: include and jsp:include

Dsp imports all objects of type class also, where as jsp imports only primitive types.

Jsp includes are dynamic where as dsp include are for data which is smaller than 64 kb.

ATG created the DSP tag library as a mechanism for accessing all data types, including those that exist in ATG’s Nucleus framework. Other functions provided by these tags manage transactions and determine how data is rendered in a JSP. It’s best to use tags from the DSP tag library only for tasks that involve Dynamo Application Framework (DAF) resources. Dsp tag support for the passing of object parameters between pages. In particular, use dsp:include rather than jsp:include, and use dsp:param rather than jsp:param.

3. How to implement shopping cart?

ShoppingCartFormHandler

4. What is the main formhandler you use for Shopping cart?
ShoppingCartFormHandler & CartModifierFormHandler

5. What are the ATG component scopes(global session and request)?
(see post on scopes)

6. What are the Advantages of DAF?
It is used to maintain huge data
It has repositories which help is data anywhere architecture.
Dependency injection
It can write any object of type 1 call in to the db.
Dynamo messaging using patch bay and jms
“Inversion of Control” design pattern, whereby software components are discrete
Entities coupled together by the Nucleus container, rather than through direct reference.

7. What is a Component?

Java bean and it’s configuration file together known as Component in ATG. A component is used to initialize or set the properties of a bean class.

8. How ATG pricing works?

There are two types of pricing. Static pricing and dynamic pricing.

In static pricing, we will display the listPrice or salePrice of the SKU in the productDetails page without calculating.

In dynamic pricing, the list price or the sale price of the SKU passed the Pricing Engine to calculate the price.

The pricing Engine will execute the pre pricing calculators first and then it looks up for the global and active promotions of the user and applies the promotions on the raw price.

The discounted price will be set in the PriceInfo object and is again passed to the post calculators. Finally, the PriceInfo object holds the price to be displayed to user.

For example ItemPricingEngine calculates the price of a commerce item and set the price to the ItemPriceInfo object. In the page we will get its price by calling the commerceItem.priceInfo.amount which is after discount and commerceItem.priceInfo.rawTotalPrice is before discount.

9. How do create a promotion?

We can create a promotion in the ACC. The promotions will be stored in the Promotions repository. The pricingModels.xml contains different types of promotions such as Amount Off , Percentage Off, Fixed price which can be applied to item or order or shipping levels.

We will create the PMDL rule while creating the promotion which specifies the actual discount rule.

10. How do u apply a promotion to a user ?

There are two types of promotions, global and user level. If we set the global property of the promotion to true, then that promotion will be applied to all users automatically by the pricing engine.

For the user level promotions, we need to apply them through scenarios. The scenario has action called applyPromotion which adds the promotion to the active promotions of the user profile. Then pricing engine picks up the user level promotions from the Profile.activePromotions property.



No comments:

Post a Comment

Thanks for your comment. Please be genuine, do not spam, Comments posted with links will be considered as spam.