SlideShare a Scribd company logo
1 of 34
By Kate Soglaeva
»FormHandlers do’s
»Droplets do’s
»Repositories do’s
2
ATG Hints by Kate Soglaeva
ATG Hints by Kate Soglaeva
3
4
ATG Hints by Kate Soglaeva
5
ATG Hints by Kate Soglaeva
HTML
JSP
Droplets
ServicesManagers
viewpresentermodel
Form
Handlers
Tags
Xml,json
Repositories
Web Services
6
ATG Hints by Kate Soglaeva
Manager
Form Handler
Form
Form Value
Object
Business
Object
Repositories
Field
Validator
1 : 1 Request
Business
logic
validation
logic
7
ATG Hints by Kate Soglaeva
Form
Manager
Form
Handler
Form
Handler
Form
Field
Validator
Business
Object
Repositories
Droplet
8
ATG Hints by Kate Soglaeva
JSP
Form Handler
<dsp:input bean=“MyFormHandler.save"
“
type=“hidden“/>
MyFormHandler.properties
successURL=/…
errorURL=/…
MyFormHandler.java
checkFormRedirect(suc
cessURL, errorURL);
sendLocalRedirect();
9
ATG Hints by Kate Soglaeva
10
ATG Hints by Kate Soglaeva
HTML
JSP
Droplets
ServicesManagers
viewpresentermodel
Html code
» ParameterName instead of the strings.
public class GiftlistDroplet extends DynamoServlet {
static final ParameterName PROFILE =
ParameterName.getParameterName("profile");
...
public void service(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pResp)
throws ServletException, IOException {
...
Object profileObject =
pReq.getObjectParameter(PROFILE);
...
}
}
11
ATG Hints by Kate Soglaeva
<dsp:droplet name="/atg/dynamo/droplet/Cache">
<dsp:param name="key"
param="childCategory.repositoryId"/>
<dsp:oparam name="output">
<dsp:valueof param="childCategory.longDescript
ion"> No description.</dsp:valueof>
</dsp:oparam>
</dsp:droplet>
12
ATG Hints by Kate Soglaeva
13
ATG Hints by Kate Soglaeva
1. Go to jsp
2. Go to Cache droplet
3. Go to product
4. Refresh cache droplet page
14
ATG Hints by Kate Soglaeva
<dsp:droplet name="/atg/dynamo/droplet/RQLQueryForEach">
<dsp:droplet name="/atg/targeting/RepositoryLookup">
<dsp:param bean="/atg/demo/QuincyFunds" name="repository"/>
<dsp:param name="itemDescriptor" value="user"/>
<dsp:param name="queryRQL" value="id=elementId"/>
<dsp:param name="id" param="elementId"/>
<dsp:oparam name="output">
<<dsp:valueof param="element.fundName"/>
</dsp:oparam>
</dsp:droplet>
15
ATG Hints by Kate Soglaeva
RQLQueryRange
<dsp:droplet name="SQLQueryRange">
<dsp:param name="dataSource"
bean="/atg/dynamo/service/jdbc/JTDataSource"/>
<dsp:param name="querySQL" value="select * from
SKIER order by name"/>
<dsp:oparam name="output">
<dsp:valueof param="element.name"/>
</dsp:oparam>
</dsp:droplet>
16
ATG Hints by Kate Soglaeva
» Use in droplets:
˃ *Range
˃ *ForEach
˃ Targeting*
» Use servlet bean
˃ Avoid retrieving large arrays of data
17
ATG Hints by Kate Soglaeva
1. Go to stores page
2. Check code
3. Add sort properties
4. Add Range droplet
18
ATG Hints by Kate Soglaeva
19
ATG Hints by Kate Soglaeva
<item-descriptor name=“myHoliday"
display-property="name" >
<table name="tc_holiday" id-column-name="id">
<property name="id"></property>
<property name="name"></property>
</table>
</item-descriptor>
20
ATG Hints by Kate Soglaeva
Noun
Camel case
lowercase , ‘_’
<property name="favouriteColours"
data-type="array“
column-name="favourite_colours”
component-data-type="string" />
21
ATG Hints by Kate Soglaeva
Noun
Camel case
lowercase , ‘_’
public class King extends GenericService {
private RqlStatement weaponQuery;
}
22
ATG Hints by Kate Soglaeva
# /com/kings/Arthur
$class=com.kingdom.King
$scope=global
weaponQuery=name = ?0
23
ATG Hints by Kate Soglaeva
public class King extends GenericService {
protected static RqlStatement weaponQuery;
static {
try {
weaponQuery =
RqlStatement.parseRqlStatement("name = ?0");
} catch (RepositoryException re) {
re.printStackTrace();
}
}
}
24
ATG Hints by Kate Soglaeva
public String getLogin(String repositoryId, String profileType) {
RepositoryItem profileItem =
getProfileRepository().
getItem(getRepositoryId(), getProfileType());
String loginPropertyName =
getPropertyManager().getLoginPropertyName();
String login = (String) profileItem.
getPropertyValue(loginPropertyName);
return login;
}
25
ATG Hints by Kate Soglaeva
<item-descriptor name=“authur”>
<property name=“address"
item-type=“address“
cascade="update,delete" />
</item-descriptor>
26
ATG Hints by Kate Soglaeva
» Property in the same group is retrieve in the
same select statement
» Be default: property in the same group are in
the same table
27
ATG Hints by Kate Soglaeva
Never user one primary table in more
than one item descriptor
Avoid derived properties
Don’t use derived and transient in RQL
28
ATG Hints by Kate Soglaeva
ATG Hints by Kate Soglaeva
29
30
ATG Hints by Kate Soglaeva
» ATG Order object must follow a specific
transactional pattern to avoid
˃ exceptions and deadlocks,
˃ ConcurrentUpdateExceptions,
˃ InvalidVersionExceptions
31
ATG Hints by Kate Soglaeva
TransactionLockService service =
configuration.getTransactionLockFactory().getServiceInstance(
profileId, <logger component> );
service.acquireTransactionLock( profileId );
try {
TransactionDemarcation td = new TransactionDemarcation();
td.begin( transactionManager );
boolean shouldRollback = false;
try {
synchronized( order ) {
// do order updates
orderManager.updateOrder( order );
}
} catch ( ... e ) {
shouldRollback = true;
throw e;
} finally {
td.end( shouldRollback );
}
} finally {
service.releaseTransactionLock( profileId );
}
32
ATG Hints by Kate Soglaeva
1) Obtain local-lock on profile ID
2) Begin Transaction
3) Synchronize on Order
4) Modify Order
5) Call OrderManager.updateOrder
6) End Synchronization
7) End Transaction
8) Release local-lock on profile ID
Verify that the PageFilter in web.xml
Pre-Compiling JSPs
Recheck components scope
Disable Performance Monitor
Check loggingDebug
34
ATG Hints by Kate Soglaeva

More Related Content

What's hot

Introduction to Swagger
Introduction to SwaggerIntroduction to Swagger
Introduction to SwaggerKnoldus Inc.
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentationVibhor Grover
 
Python Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsPython Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsFagun Priyadarshi
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsVMware Tanzu
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationAngular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationWebStackAcademy
 
Introduction To Hystrix
Introduction To HystrixIntroduction To Hystrix
Introduction To HystrixKnoldus Inc.
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing DroolsMario Fusco
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQLSquareboat
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Rafael Wilber Kerr
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4jMax De Marzi
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineAnil Allewar
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir Kaufman
 
Implementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakImplementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakYuichi Nakamura
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/ServletSunil OS
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions WebStackAcademy
 

What's hot (20)

OAuth
OAuthOAuth
OAuth
 
Introduction to Swagger
Introduction to SwaggerIntroduction to Swagger
Introduction to Swagger
 
Logback
LogbackLogback
Logback
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 
Python Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + JenkinsPython Automation With Gauge + Selenium + API + Jenkins
Python Automation With Gauge + Selenium + API + Jenkins
 
The Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native ApplicationsThe Path Towards Spring Boot Native Applications
The Path Towards Spring Boot Native Applications
 
Angular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and AuthorizationAngular - Chapter 9 - Authentication and Authorization
Angular - Chapter 9 - Authentication and Authorization
 
Introduction To Hystrix
Introduction To HystrixIntroduction To Hystrix
Introduction To Hystrix
 
Introducing Drools
Introducing DroolsIntroducing Drools
Introducing Drools
 
REST vs GraphQL
REST vs GraphQLREST vs GraphQL
REST vs GraphQL
 
Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)Graphql Intro (Tutorial and Example)
Graphql Intro (Tutorial and Example)
 
Rich domain model
Rich domain modelRich domain model
Rich domain model
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
Detecion de Fraude con Neo4j
Detecion de Fraude con Neo4jDetecion de Fraude con Neo4j
Detecion de Fraude con Neo4j
 
React/Redux
React/ReduxReact/Redux
React/Redux
 
JBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule EngineJBoss Drools - Pure Java Rule Engine
JBoss Drools - Pure Java Rule Engine
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Implementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on KeycloakImplementing WebAuthn & FAPI supports on Keycloak
Implementing WebAuthn & FAPI supports on Keycloak
 
Jsp/Servlet
Jsp/ServletJsp/Servlet
Jsp/Servlet
 
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 JavaScript - Chapter 9 - TypeConversion and Regular Expressions  JavaScript - Chapter 9 - TypeConversion and Regular Expressions
JavaScript - Chapter 9 - TypeConversion and Regular Expressions
 

Viewers also liked

Oracle Commerce Using ATG & Endeca - Do It Yourself Series
Oracle Commerce Using ATG & Endeca - Do It Yourself SeriesOracle Commerce Using ATG & Endeca - Do It Yourself Series
Oracle Commerce Using ATG & Endeca - Do It Yourself SeriesKeyur Shah
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile ManagementKate Semizhon
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceKate Semizhon
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices Kate Semizhon
 
ATG Commerce: Full Capabilities Overview
ATG Commerce: Full Capabilities OverviewATG Commerce: Full Capabilities Overview
ATG Commerce: Full Capabilities Overviewsobrien15
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Kate Semizhon
 
Oracle endeca information discovery architecture
Oracle endeca information discovery architectureOracle endeca information discovery architecture
Oracle endeca information discovery architectureAorta business intelligence
 
ATG - Web Commerce @ Your Figertips
ATG - Web Commerce @ Your FigertipsATG - Web Commerce @ Your Figertips
ATG - Web Commerce @ Your FigertipsKeyur Shah
 
ATG Tutorials - Promotion.
ATG Tutorials - Promotion.ATG Tutorials - Promotion.
ATG Tutorials - Promotion.Sanju Thomas
 

Viewers also liked (10)

Oracle Commerce Using ATG & Endeca - Do It Yourself Series
Oracle Commerce Using ATG & Endeca - Do It Yourself SeriesOracle Commerce Using ATG & Endeca - Do It Yourself Series
Oracle Commerce Using ATG & Endeca - Do It Yourself Series
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile Management
 
Endeca
EndecaEndeca
Endeca
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performance
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices
 
ATG Commerce: Full Capabilities Overview
ATG Commerce: Full Capabilities OverviewATG Commerce: Full Capabilities Overview
ATG Commerce: Full Capabilities Overview
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers
 
Oracle endeca information discovery architecture
Oracle endeca information discovery architectureOracle endeca information discovery architecture
Oracle endeca information discovery architecture
 
ATG - Web Commerce @ Your Figertips
ATG - Web Commerce @ Your FigertipsATG - Web Commerce @ Your Figertips
ATG - Web Commerce @ Your Figertips
 
ATG Tutorials - Promotion.
ATG Tutorials - Promotion.ATG Tutorials - Promotion.
ATG Tutorials - Promotion.
 

Similar to ATG Best Practices

Tk2323 lecture 9 api json
Tk2323 lecture 9   api jsonTk2323 lecture 9   api json
Tk2323 lecture 9 api jsonMengChun Lam
 
Static Analysis in IDEA
Static Analysis in IDEAStatic Analysis in IDEA
Static Analysis in IDEAHamletDRC
 
droidQuery: The Android port of jQuery
droidQuery: The Android port of jQuerydroidQuery: The Android port of jQuery
droidQuery: The Android port of jQueryPhDBrown
 
Wroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in JavaWroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in JavaMarcinStachniuk
 
Grails Custom Tag lib
Grails Custom Tag libGrails Custom Tag lib
Grails Custom Tag libAli Tanwir
 
Introduction to Grails Framework
Introduction to Grails FrameworkIntroduction to Grails Framework
Introduction to Grails FrameworkPT.JUG
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scalarostislav
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)Carles Farré
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long jaxconf
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2borkweb
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 

Similar to ATG Best Practices (20)

Tk2323 lecture 9 api json
Tk2323 lecture 9   api jsonTk2323 lecture 9   api json
Tk2323 lecture 9 api json
 
Static Analysis in IDEA
Static Analysis in IDEAStatic Analysis in IDEA
Static Analysis in IDEA
 
An intro to cqrs
An intro to cqrsAn intro to cqrs
An intro to cqrs
 
servlets
servletsservlets
servlets
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
droidQuery: The Android port of jQuery
droidQuery: The Android port of jQuerydroidQuery: The Android port of jQuery
droidQuery: The Android port of jQuery
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
RicoLiveGrid
RicoLiveGridRicoLiveGrid
RicoLiveGrid
 
Jstl 8
Jstl 8Jstl 8
Jstl 8
 
Wroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in JavaWroclaw GraphQL - GraphQL in Java
Wroclaw GraphQL - GraphQL in Java
 
Grails Custom Tag lib
Grails Custom Tag libGrails Custom Tag lib
Grails Custom Tag lib
 
Grails custom tag lib
Grails custom tag libGrails custom tag lib
Grails custom tag lib
 
All things that are not code
All things that are not codeAll things that are not code
All things that are not code
 
Introduction to Grails Framework
Introduction to Grails FrameworkIntroduction to Grails Framework
Introduction to Grails Framework
 
Struts2 - 101
Struts2 - 101Struts2 - 101
Struts2 - 101
 
Summer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and ScalaSummer - The HTML5 Library for Java and Scala
Summer - The HTML5 Library for Java and Scala
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long Multi Client Development with Spring - Josh Long
Multi Client Development with Spring - Josh Long
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 

More from Kate Semizhon

Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about BelarusKate Semizhon
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?Kate Semizhon
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change ManagementKate Semizhon
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase Kate Semizhon
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool EvaluationKate Semizhon
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATGKate Semizhon
 

More from Kate Semizhon (12)

Cracking 1-on-1s
Cracking 1-on-1sCracking 1-on-1s
Cracking 1-on-1s
 
Serverless Pitfalls
Serverless PitfallsServerless Pitfalls
Serverless Pitfalls
 
Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about Belarus
 
Git 101
Git 101Git 101
Git 101
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change Management
 
Ecommerce in 2018
Ecommerce in 2018Ecommerce in 2018
Ecommerce in 2018
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Sonar Review
Sonar ReviewSonar Review
Sonar Review
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATG
 

Recently uploaded

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 

Recently uploaded (20)

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 

ATG Best Practices

Editor's Notes

  1. MVC architecture is one of the oldest patterns available for achieving the separation of concerns. MVC consists of three layers, viz, Model, View, and Controller. MVC View May retrieve data from Model directly Controller Changes view when nessesary MVP summarized: Navigation is handled on a per page basis using page controller pattern approach. Classic MVC existed at a time when every control/gadget that existed in the screen was considered dumb and each control is paired with its own controller to manage the user interactions happening on them. So if 10 gadgets exist, then 10 controllers have to exist. In this scenario, every gadget is counted as a view. The advent of Windows GUI systems changed this picture. The Control-Controller relationship became obsolete. Controls gained the intelligence to respond to the actions initiated by the user. In the Windows world, view is a surface on which all the controls/gadgets exist, hence there is a need for only one controller. View can receive events and reach for controllers help to do further processing. Model – Model receives input from the controller and decides what data it needed to fulfill the request raised by the controller. Model is also capable of doing transactions with databases or other persistent storage as needed. Once it gathers the required information, it informs the view (via controller) about the new data by raising appropriate events. View – View hosts all the UI controls needed by the end-user to interact with the application. Its job is to monitor end-user gestures and pass it to the controller for further handling. View handles the event notification received from the Model and may request for any new data required to render it on the screen. However, in some variations, Controller can be designated to retrieve dataset from the Model, format it and send it to the View. Here the view’s job is to render the data received from the view without any other processing. Controller – Controller can be imagined as an extension or a personal assistant to the view, all the events originated from the view is handled by the controller. Controller will also inform the Model on behalf of view that some event happened on the view and some new data might be required.
  2. Form handlers provide an instance of a Presenter element of the MVP pattern. They supply values for control widgets exposed by JSP’s and manage the exchange of form data. Ideally, they are the only means of acquiring data from the web site user and supplying it to business components (droplets and tags being outwardly oriented only). Form handlers have no knowledge of business logic, but they do have enough knowledge of where that logic “lives” so as to direct actions to it. In the diagram you will note that although Ajax can be used to exchange information with web services directly, that is not considered best practice for web applications serving users on the open Internet. The issue with calling web services directly, rather than obtaining their services through corresponding form handlers, is that it exposes the site to various forms of cross site scripting attacks. ATG has added an increasing amount of scripting attack mitigation support into the form handlers. Calling web services (or any nucleus component) directly from the JSP bypasses this support.
  3. The Form Handler Pattern Form handlers may be either request or session scoped, with strong preference given to request scope. In general, if the form is used very frequently it may be session scoped so as to avoid instantiating new copies. However, when session scoping is used then tighter maintenance of instance variables must accompany that (and session scoping form handlers is the exception).
  4. A series of related forms
  5. Cache can help reduce repetitive time-consuming tasks by keeping content in temporary memory. When you use Cache, you specify the content to cache and how frequently to clear the cache. Cached URLs do not retain session or request IDs. Avoid Cache in these circumstances: When the content to cache is static. When it takes more time to cache the content than to render the content. When the cached content is not applicable for many users.
  6. The Cache.purgeCacheSeconds property determines how often content cached by any Cache servlet bean is flushed. The default is 21600 seconds (6 hours). Cache purging also occurs when a JSP is removed or recompiled.
  7. c:\AE10\ATG10.0.3\MyStore\Storefront\j2ee-apps\Storefront\store.war\browse\gadgets\cacheProductDisplay.jsp
  8. Avoid SQLQueryForEach, SQLQueryRange and other non-cached database querying
  9. The sortProperties parameter of *Range, *ForEach, and Targeting* servlet beans The Range, TargetingRange, TableRange, ForEach, TargetingForeach, TableForEach, TargetingArray and TargetingFirst servlet beans accept a sortProperties parameter which provides an easy way to sort items in an array.  However, sorting large arrays is expensive performance-wise. When the number of items to be sorted is potentially large, try to have the data source (e.g. the database server) handle the sorting instead
  10. 3) <dsp:param name="sortProperties" value="+storeName"/> 4) Rage parameters <dsp:param name="howMany" value="2"/> <dsp:param name="start" value="2"/>
  11. All RqlStatement properties have to be suffixed with word 'Query'.
  12. RqlStatement in Global component: RqlStatement has to be used as property type of a class member variable 
  13. RqlStatement could be used as property type (see previous slide) or as a static variable RqlStatement  in Request component should be used as a static variable
  14. Repository have to use the property managers to access repository properties. See below example based on the profile property manager To check the item descriptor of the element it's better to use DynamicBeans API
  15. The SQL repository uses the cascade attribute in a <property> tag to better handle hierarchical properties, which is to say properties with either the item-type or component-item-type attributes. The cascade attribute can have one or more of the values insert, update, or delete When item property refers to another item, both items can be deleted, inserted or updated at the same time Insert: an item of the type declared by item-type attribute is also created Update: any modified referenced items are automatically updated, Any referenced items that are new items are added (Update incapsulates insert?) Delete: when an item is deleted, the referenced item is deleted as well
  16. Never user one primary table in more than one item descriptor,this can create problem in Item caching.If table get updated by one Item, other Item will not get invalidate. Try to avoid derived properties, it can adversely affect system performance Don’t use derived and transient property as part of RQL and ATG Query Use Lazy loading in repository item to improve performance.
  17. Verify that the PageFilter in web.xml is bound to the right extension. Typically it's *.jsp, not /*. Pre-Compiling JSPs Recheck components scope Disable Performance Monitor Ensure that loggingDebug is disabled for all components Disabling Document and Component Indexing /atg/devtools/DocumentIndex.enabled=false and /atg/devtools/ComponentIndex.enabled=false