ATG Interview Questions & Answers

Download ATG Interview Questions & Answers

Post on 27-Dec-2015

18 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

ATG Interview Questions & Answers

TRANSCRIPT

  • ATGInterviewQuestions11.WhatarethetwomethodsinacomponentAns:getters&setters2.HaveyouworkedwithrepositoriesAns:ifyouansweryesbereadytoanswerquestionsoncache,implementingarepositoryfromscratch,andothers.(pleaseseemypostonrepositories)3.Name2typesoftablesAns:primaryandauxillary3.Name2typesoftablesAns:primaryandauxillary4.HaveyouworkedonshoppingcartsAns:CartModifierFormHandler,ShoppingCartFormHandler5.Name2typesofcheckoutAns:ExpressCheckout,GuestCheckout6.DifferencebetweenExpressCheckoutandCheckoutAns:Express-LoggedinuserinformationhasstoredGuest-willenterallinformation(shipping,billing,reviewsteps)andinformationisnotsaved7.WhatisBCCAns:BusinessControlCenter-UIforBusinessUsers(touploadcontenttoCatalogs,createpromotionsetc)8.WhatarecustomdsptagsAns:Customtagsiswrittenbythedeveloper.Dspisallreadytouse.youcanusetorendercontentdynamicallybylinkingNucleuscomponentsdirectlytoyourJSPs.Essentially,theDSPtaglibrariesletyouconnectyourJSPcontenttotheJavacodeatworkbehindthescenessoyoucanseparateyourapplicationlogicfromyourpresentationlayer.ATG7providesyouwiththreetaglibraries:JSTL,DSP/DSPEL,andCore.Youcanfindthesetaglibrariesin/DAS/taglib.9.Differencebetweendroplet,FormHandlerandservlet:Ans:Servletisajavaclass.DropletisfromATGDropletisusedtorenderorputdatainthedbServletisusedtosubmitdata,itactsasacontroller.Itisnotusedtoputdata.ServletalsorenderstheportionofJSPpage.FormHandlersareusedwhenthereareforms.Theyhelptoperformvalidationfortheforms.10.DifferencebetweendspanddspeltagsAns:TheDSPtaglibrarytagssupportruntimeexpressions,suchasreferencestoscriptingvariables.Thesetagsuseaidattributetonamethescriptingvariablestheycreate.TheDSPELtaglibrarytagssupportJSTLExpressionLanguage(EL)elementsthatarealsoevaluatedatruntime.Thesetagsoftenproducearesultobjectnamedbythevarattribute.Forcustomtagsweneedtowritethepropertiesfileandaclassfiletodefinethefunctions.Weneedtoincludeatagfilewithextension.tld.(taglibrarydefinition)andinthedropletincludethepathofthetaguriForexamplewecanwriteacustomtagtocalculatetheshippingratewithpromotionandsaveitandthenextendwhereverrequired.1.WhatisATGDynamo?WhatisATGFramework?Ans.ATGDynamoorDynamoApplicationServer(DAS)isaJ2EEapplicationserverfromArtTechnologyGroup.AtgframeworkisaWebApplicationframeworkforbuildingwebapplications.ATGdynamoimplementstheATGframework.TheapplicationframeworkcanalsoberunonallmajorJ2EEapplicationservers(JBoss,WebLogic,WebSphereetc...).2.WhatisthescopeofDynamoComponents?Ans.TherearethreedifferenttypesofscopesforATGcomponentsnamely1.request2.session3.Global

  • Globalisthedefaultscope3.WhatisNucleus?Ans.NucleusisATG`sopenObjectApplicationFramework.ATG7issaidtobeacomponent-centricdevelopmentplatform.TheATG7WebapplicationsarenothingbutindividualJavaBeancomponentsassembledtogether.TheseJavaBeancomponentsareconfiguredandlinkedtogetherby.propertiesfileswithinNucleus.InNucleus,eachserviceispackagedasaJavaBeanorsetofJavaBeans.TheseJavaBeansareconfiguredindividuallyandmountedintoanamespace.Thebeanstheninterconnectwiththebeansrepresentingotherservices.Nucleusisresponsibleforinterpretingthecomponentconfigurationsandthemanagementofthecomponentnamespace.DynamousestheNucleusframeworktoorganizecomponentsintoahierarchicalstructure(similartoadirectorystructure).EachNucleusservicehasauniqueNucleusname.Forexample,thedefaultjavax.sql.DataSourcecomponentislocatedat/atg/dynamo/service/jdbc/JTDataSourceNucleusisthecoreoftheentireATGsystem.ItcreatesandconfiguresNucleuscomponents(alsocalledbeansandJavaBeans)andorganizesthemintoahierarchicalnamespace,essentiallygivingthemaplacetolivesotheycanbereferencedbyothercomponents.Byreadingthe.propertiesfilesassociatedwitheachcomponent,ItsNucleuswhichfiguresoutthatwhichcomponentsaretobeusedinanapplication,initializesthemtotheirdefaultvaluesandhowdecidesabouthowtheyconnecttoeachother.ThismodelmakesiteasierforthedeveloperstobuildATGapplicationsbyconfiguringandusingthepre-builtcomponentsinsteadofwritingalotofJavacodefromscratch.4.WhatisATGRepository?Ans.ATGRepositoryreferstotheATG`swayofaccessingtheDatabasethroughprograms.ItissomewhatsimilartowhatHibernateoffers,SeperatingtheApplicationLogicfromthatofDatabase.SoAtgrepositoryprovidesafinegrainedabstractionbetweentheapplicationlogicandDatabase.ThusitsupportstheATG`sDataAnywhereparadigm,theapplicationlogiccreatedbydeveloperstointeractwithdataneednotchangeforanychangeinthesourceofthatdata.ATGrepositoryarchitectureensuresthatthesourceofthedataishiddenbehindtheDynamoRepositoryabstraction.ItwouldbeeasytochangefromarelationaldatasourcetoanotherortoanLDAPdirectorysincenoneoftheapplicationlogicwouldneedtochange.Oncedataisretrievedfromadatasourceitistransformedintoanobject-orientedrepresentation.ManipulationofthedatacanthenbedoneusingsimplegetPropertyValueandsetPropertyValuemethods.TheRepositoryAPItiesincloselywithATGstargetingAPIs,soyoucanretrieveitemsfromtherepositorybasedonavarietyoftargetingrules,aswellasretrievingspecificidentifieditems.5.WhatisAtgPipeline?AnsAtgPipelineisavariantofServletPipeline,InanATGpipelinethesequenceofProgramsareexecutedinaqueue.BelowistheATGservletpipeline/atg/dynamo/servlet/pipeline/DynamoHandler/atg/dynamo/servlet/pipeline/TransactionServlet/atg/dynamo/servlet/pipeline/PathAuthenticationServlet/atg/dynamo/servlet/pipeline/URLArgumentServlet/atg/dynamo/servlet/pipeline/CookieServlet/atg/dynamo/servlet/pipeline/ContextPathServlet/atg/dynamo/servlet/pipeline/ServletPathServlet/atg/dynamo/servlet/pipeline/SessionServlet/atg/dynamo/servlet/pipeline/DynamoServlet/atg/dynamo/servlet/pipeline/SessionSaverServlet/atg/dynamo/servlet/pipeline/FormLoginServlet/atg/dynamo/servlet/pipeline/WebApplicationDispatcherServlet/atg/dynamo/servlet/pipeline/CgiServlet/atg/dynamo/servlet/pipeline/ServletPathDispatcher/atg/dynamo/servlet/pipeline/FileFinderServlet/atg/dynamo/servlet/pipeline/MimeTyperServlet/atg/dynamo/servlet/pipeline/MimeTypeDispatcher/atg/dynamo/servlet/pipeline/FileServlet

  • ItstartswiththeDynamoHandlerwhichaddstheDynamospecificrequestandresponseobjectstotherequest'scontext.Actuallythelistofservletsyouwillseedependsonwhichmodulesyouhaverunning.ThisistheDASconfigurationDPSandothermodulescananddoaddmoreservletstothepipeline.6.WhatisATGtaglibrary?Ans.Atgtaglibraryisavariantofjspstandardtaglibrary.Howeveratgprovidesitsownsetoftaglibrariese.g.dsp,dspel,core7.WhatisATGDPS?Whatareitselements?Ans7.ATGDPSreferstotheATGDynamopersonalizationsystem.ItisdrivenbyUserProfileDataandbusinessrulesdesignedtodelivertherightcontenttotherightuser.TherearethreekeyelementsoftheATGDPSpersonalizationSystem.1.UserProfileManagement2.ContentTargetting3.TargetedE-mailUserProfileManagementWhenapersonvisitsawebsitedrivenbyATGDynamoPersonalizationServer(ATGDPS)websiteforthefirsttime,ThepersonisallowedtocreateitsownUserProfile.Oncecreated,DPSstoresthatUser`sProfileinitsdatabaserepository.Thisprofilecontainsalistofpropertiesthatdescribetheperson`scharacteristics,suchasthenametheyenteredinaregistrationformorthedateoftheirlastlogin.ATGDPSusesthisprofileinformationstoredinitsdatabaserepositorytoprovidedtargetedcontenttoeachother.ContentTargetingTargetingistheprocessofdisplaying1.Contentitems2.Toaparticularuser3.Ataparticulartime4.Inaparticularcontextand5.Onaparticularruleset.IntheDPSrulebasedsystem,businessmanagerscreaterulesetscalledcontenttargetersthatcontrolhowcontentisdisplayedonthewebsite.TargetingEmailDPSincludesaTargetedEmailserviceforcomposinganddeliveringpersonalizedemailusingthesameprofilegroupsandtargetingrulesyouusetodelivercontentonyourwebsite.AlsoifyouhaveDynamoScenarioServerinstalled,youcanusescenariostodelivertargetedemail.Youcanusetargetedemailtoperformbelowactivities.1.Sendaconfirmationmessagetoanewuserwhoregistersatyoursite.2.Notifyfrequentcustomersofspecialsales.3.Notifyallusersthathavenotloggedintoyoursiteinseveralmonthsthattheiraccountswillbeclosedsoon.4.Sendoutamassmailingwitheachmessagetailoredtoitsreciepient.8.WhichclasstoextendwhilecreatingATGDroplets?Ans8.DynamoServlet.java9.WhatareATGFormHandlers?Ans9.ATGFormhandleristheintermediateclassthatcomesinbetweenajspformvalueanditsbeanclass.Theyaretheretoevaluatethevalidityofformdatabeforeitissubmitted,writedatatoandreaddatafromadatabaseorrepository,anddirecttheusertodifferentpages,dependingontheresultsoftheformsubmission10.WhatisBaseclassforallATGFormhandlers?Ans10.GenericFormHandler.java1.WhatisclassHeirarchyforATGFormhandlers?HowtocreateaFormHandler?AtthetopofATGformhandlerclassheirarchythereexiststheDropletFormHandlerinterface.Thencome,threedifferentclassesprovidedbyDynamowhichextendthisinterface.Theyareasbelowatg.droplet.EmptyFormHandleratg.droplet.GenericFormHandler

  • atg.droplet.TransactionalFormHandlerTheEmptyFormHandleristhemostsimplesttoimplement.ItimplementstheDropletFormHandlerinterfaceanddefinesblankbodyimplementationsofthemethodsinthisinterface.GenericFormHandlerextendsEmptyFormHandler.ItdefinesthesimpleimplementationsoftheDropletFormHandlerinterfacesmethodsandthebasicerrorhandlinglogic.IferrorsoccurinprocessingaformthatusesGenericFormHandler,theerrorsaresavedandexposedaspropertiesoftheformhandlercomponent.TransactionalFormHandlerextendsGenericFormHandler,Ittreatstheformprocessingoperationasatransaction.Thoughthemethodsinvokedbythisformhandlerareprocesseddiscretely,buttheirresultsaresavedsimultaneously.ThebeforeGetandafterGetmethodsdothetransactionmanagement.Thisestablishesthetransactionbeforeanyofyourpropertiesaresetorhandlermethodsarecalled.Commerce2.WhatisanOrder?Ans:Anorderisacontainerforcommerceitems,shippinggroups,paymentgroupsandrelationshipobjects.3.WhatistheShoppingCart?Itisasessionscopedcomponentforholdingcurrentandsavedorders.TheclassofShoppingCartcomponentisOderHolder.Shopping.currentcontainsthecurrentorder.ShoppingCart.savedcontainssavedorders.4.Whatisacommerceitem?AcommerceitemisorderitemwhichholdsthecatalogRefId,quantityandproductId.5.WhatisaSKU?SKUisaStockKeepingUnitwhichistheactualitemdeliverable.6.WhatistheCataloghierarchy?StandardCatalogCategoryProductSKUCustomCatalogCatalogCategoryProductSKU7.HowdoyoudisplayaCatalog?StandardCatalogFirst,wecanuseOOTBRootCategoriestargeterusingTargetingForEachdropletwhichwillgetalltherootcategoriesofthecatalogwhichrootpropertyissettotrue.CustomCatalogWewillgettheuserscatalogfromtheProfile.catalog.allRootCategoriespropertyandpasstotheForEachdroplet.Aftergettingtherootcategoriesinanyoftheabovecase,useCategoryLookupdroplettolookupcategories,ProductLookupdroplettolookupproducts,andSKULookupdroplettolookupskus.Wewillgettheitemidsandpassbetweenthepagestodisplayitsdetails.Forexample,wewillpassthecategoryIdintheanchortaginhomepage.Whentheuserclicksonthelink,theuserwillberedirectedtothecategorydetailsPagewhereweuseCategoryLookupdropletbytakingtherequestparametercatoryId.Herewillgetallthechildproducts.SimilarlywewillsettheproductIdintheanchortagandpassittotheproductdetailspagewhereweuseProdyctLookupdroplettodisplaytheselectedproductdetails.8.WhatisthedifferencebetweenStandardCatalog&CustomCatalog?Thestandardcatalogisthesinglecatalogshowntoallusers.Eachuserseesthesamesetofcategoriesandproducts.Thecustomcatalogallowsustocreatemultiplecatalogswhichareintendedtoshowdifferentlytodifferentusers.Wecantargetacatalogtoaspecificusero

  • ranorganizationdependinguponthebusinessrules.Forexample,wecancreateaseparatecatalogforeachcountrybasedonlocale.Eachlocalewillbehavingaseparatecatalog.9.Whatarethestepstocreateanewcommerceitemtypeintheorderrepositorydefinition?FirstintheorderReposiry.xml,createanitemdescriptorbyextendingthedefaultcommerceitemusinginheritanceconceptsuchspecifyingsuper-typeandsub-type.Andaddingthenewpropertieswithnewtableunderthisitemdescriptor.NextwewillcreateanewjavabeanbyextendingtheCommerceItemImplandaddingsettersandgettersforthepropertiescreatedinthenewcommerceitemitemdescriptor.NextwewillspecifythenewcommerceitemdetailsintheOrderTools.properies.WewillspecifycommerceItemTypeClassMapandbeanNameToItemDescriptorMap10.Howdoucreatethenewlycreatedcommerceitemtypeintotheorder?WewillsetupamapofskuitemtypestothecommerceitemtypesintheCommerceItemManager.properties.ThenwewilloverridetheCommerceItemManagerscreateCommerceItemmethod.WewilltaketheskuId(catalogRefId)andfinditsSKUitemtypeandthenfromthisnamewewilllookupthemapvaluesintheCommerceItemManager.propertiestosearchforitsrelatedcommerceItemtypetocreate.1.Howdoyouaddanitemtocart?UsingaddItemToOrdermethodofCartModifierFormHandlerbypassingcatalogRefId,quantityandproductIdintheproductdetailspage.2.Howdoyoudisplayitemsinthecartpage?WewillgetthecurrentorderfromtheShoppingCartcomponent.WewillpasstheShoppingCart.current.commerceItemstotheForEachdroplet.3.Howdoyouupdatethequantityofacommerceiteminthecartpage?FirstwewillsetCheckForChangedQuantityoftheCartModifierFormHandlertotrueintheJSPpage.AndforthequantityfieldwewillgivethenameascatalogRefId.Finally,wewillcallhandleSetOrdermethodofCartModifierFormHandlertoupdatethequantity.4.Howdouremoveitemsfromcart?WewillsettheremovalCommerceIdspropertyofCartModifierFormHandlertotheitemsandcallhandleSetOrdermethodofCartModifierFormHandler.Thisisusedtoremoveoneormoreitemsatthesametime.ToremovesingleitemhandleRemoveItemFromOrdermethodofCartModifierFormHandler.5.Howdousavetheorderorcart?WecanuseSaveOrderFormHandlertosavetheorder.WhenwecallhandleSaveOrdermethodofSaveOrderFormHandler,thecurrentorderwillbesavedtotheShoppingCart.savedpropertyanditwillcreateaneworderwillbesettoShoppingCart.current.6.Howdouretrievethesavedorderbacktothecurrentorder?WecanuseShoppingCart.switchmethodbypassinghandleOrderIdwhichwilllookuptheorderfromtheorderrepositoryandsettothecurrentorderofShoppingCart.7.Howdouproceedtocheckoutpage?WewillcalltomoveToPurchaseInfomethodoftheCartModifierFormHandlerwhichwillexecutethemoveToPurchaseInfopipelinechainandchecktheorderandcommerceitemsandvalidatesthem.Then,checkoutloginpagewillbedisplayediftheuserhasnotloggedyet.Otherwiseuserwillbedirectedtotheshippingpage.8.Howdoyousettheshippingaddresstotheorderorshippinggroup?WeusetheShippingGroupdroplettodisplayalltheavailableshippingaddresses.TheShiipingGroupDropletwillgettheavailableaddressesfromtheProfilesshipingAddressandsecondaryAddressesproperties.ThentheuserwillselecttheshippingAddressfromthelist.ThentheselectedaddresswillbesetthecurrentshippinggroupbycallingthehandleApplyShippingGroupsmethodofShippingGroupFormHandler.WecancreateashippinggroupmanuallybyusingtheShippingGroupManager.createShippingGroupbypassingtheaddress.AfterthatwecallShippingGroupManager.addShippingGroupToOrdermethod.

  • TheuserwillalsoselecttheshippingmethodandsettotheshippinggroupsuchasNextDay,TwoDayorGround.WewilluseAvailableShippingMethodsdropletwhichfetchesalltheshippingmethosnamesfromtheShippingcalculators.EachShippingCalculatorhasapropertycalledshiipingMethod.9.Whatarethedifferentrelationshipobjectsintheorder?ShiipingGroupCommerceItemRelationShip,PaymentGroupCommerceItemRelationShip,PaymentGroupShipingGroupRelationShip,PaymentGroupOrderRelationShip10.Howdoyousplititemstomultipleshippingaddresses?WecallthehandleSpliShippingInfosmethodofShippingGroupFormHandlertosplittheitemquantitytodifferentshippinggroup.ThenwecallhandleApplyShipping...

Recommended

View more >