Expand my Community achievements bar.

SOLVED

Move to aem as a cloud service - Code smells

Avatar

Level 10

All,

 

We are using the deployment manager and trying to resolve the code smells
While i could resolve most the following are the ones i need kinda second opinion

 

1.Use of legacy components- how could this be resolved without majorly breaking anything?

The component /apps/XXX/components/structure/pages/base (transitively) extends the legacy foundation component wcm/foundation/components/page.

 

2. What is the best approach to resolve this? What would be the best approach for the JS and other site design/component specific files now? knowing that apps and etc cannot reside in the same package ? Should i just move it to under ui.content package?

Inclusion of both /etc/designs and /apps/XXX in the same package violates the separation of immutable and mutable paths in the same package.

 

3. How does one resolve the migration to editable templates, i see modernizer tool as an option , but is that the only option? If yes are there explicit steps?


/apps/XXX/templates/landing-page is a Static Template under /apps. The use of Editable Templates is recommended.

 

4. I understand there are predefined run modes allowed but if one wants to use say "build" as run mode , how does that happen, should they put it within the generic config like config.author config.pub etc?


The OSGi installer path /apps/XXX/config.publish.build uses a runmode build that is not supported on AEM as a Cloud Service.


5. What is the best way to resolve createAsset issue
The method com.day.cq.dam.api.AssetManager#createAsset(Ljava/lang/String;Ljava/io/InputStream;Ljava/lang/String;Z)Lcom/day/cq/dam/api/Asset; has been deprecated and is not recommended to be used on AEM.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

1. It may break functionnality if you are using extended foundation page component. The new foundation page has a different way to create custom tabs in page properties and it is HTL based.

3. you can try checking https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/migration/moving-to-a... for document it is possible this tool can convert static to dynamic template.

4. AEMaaCS does not support custom run mode like build, dev1, dev2 etc. If you want to achieve something based on custom run mode than you can use environment variable in the configuration if that help.

 



Arun Patidar

View solution in original post

5 Replies

Avatar

Community Advisor

1. use wcm/components/page.

2. move /etc/designs to ui.content package

3. Proabiliy you have to create d and use ynamic template 

4. AEMaaCS does not support custom run mode other than dev, stage, prod(/apps/example/config.<author|publish>.<dev|stage|prod>/) , you can use env variable though https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/deploy... 

5. use com.adobe.granite.asset.api



Arun Patidar

Avatar

Level 10

Hi Arun,

 

Thanks for the details .. I was looking for more pointers for some of the below @arunpatidar . 
1. Is this not going to break existing functionality with the switch?
2.aligned
3. Does Modernizer tool help? looks like it is the suggested way over manual.. are there docs or help on how this can be smoothly achieved?
4. Please elaborate. Not sure i follow.. 
5. Will try switching from com.day.cq.dam.api.AssetManager to com.adobe.granite.asset.api and validate

Avatar

Correct answer by
Community Advisor

Hi,

1. It may break functionnality if you are using extended foundation page component. The new foundation page has a different way to create custom tabs in page properties and it is HTL based.

3. you can try checking https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/migration/moving-to-a... for document it is possible this tool can convert static to dynamic template.

4. AEMaaCS does not support custom run mode like build, dev1, dev2 etc. If you want to achieve something based on custom run mode than you can use environment variable in the configuration if that help.

 



Arun Patidar

Avatar

Level 10

@arunpatidar  Is there a way to ease the switch between asset api's that pass inputstream. The day cq asset manager create asset passed input stream . Does not have a createRevision method as well.