Wednesday, March 20, 2019

Disable Dispatcher Cache for specific Pages

In order to disable caching in the dispatcher, add the header "Dispatcher: no-cache", i.e. in your JSP:

<%
  response.setHeader("Dispatcher", "no-cache");
%>

Note: This feature is only available in Dispatcher release 4.0.0 (and higher)


References:


Tuesday, March 19, 2019

Sling Models vs WCMUsePojo


WCMUsePojo
Sling Models
Pure POJO’s(Plain Old Java Objects)
Annotation driven POJO’s. The class uses @Model annotation & fields use the @Inject annotation

No default resource mapping
Sling Models are mapped automatically with Sling Objects (resource, request objects..) and allow us to access jcr node property values directly into java classes.

For Example:
@Inject @Named("sling:resourceType")
protected String resourceType;

Always extends from WCMUsePojo class
Can be standalone class with @Model annotation
Supports only Classes
Support both classes and interfaces.
Overrides activate() method
init() method is invoked in @PostConstruct annotation
@Reference to reference an OSGi service
@Inject or @OSGiService annotation used
No Exporter available by default
@Exporter annotation can serialize the model and export it as a JSON file with Jackson exporter

References:

Thursday, February 21, 2019

Single Page Application support in AEM 6.4

AEM now natively supports Angular and REACT for single page application development. The AEM 6.4 release notes mentions the following:

Preview and edit single-page applications built on your favorite framework. This allows marketing and developer authors to collaborate and edit content seamlessly, regardless of the authoring framework used for creating SPAs.”

References:

  1. SPA introduction & Walkthrough - https://helpx.adobe.com/experience-manager/6-4/sites/developing/using/spa-walkthrough.html
  2. Hello World tutorial - https://helpx.adobe.com/experience-manager/kt/sites/using/spa-editor-helloworld-tutorial-use.html
  3. Getting started with SPA in AEM - https://helpx.adobe.com/in/experience-manager/6-4/sites/developing/using/spa-getting-started.html
  4. Maven Archetype - https://github.com/adobe/aem-spa-project-archetype

Friday, February 15, 2019

Adobe AEM 6 Architect Certification (9A0-385) Preparation


Adobe Partner Learner JourneyThis Learner Journey guide is for Adobe Partners. It provides a recommended learning path to certification which includes on-demand digital classroom options as well as instructor sessions which can be virtual or live, onsite or offsite. Most learning paths include Challenges which are scenario-based exercises designed to allow demonstration of a skill and hands-on practice. The learning paths provide guidance for on-the-job experience to ensure success and prepare for Adobe Certified Expert (ACE) Certification. 


Prep Up for AEM 6 Architect ExamThis post has a high-level overview of topics that will be covered in the exam with references to other resources and videos for detailed insights



Solution Partner Portal: "AEM: Foundations for Architect" is a really useful course for Adobe Solution Partners who want to take up the AEM Architect exam



Flash Cards (Thanks to whoever created them):
https://www.brainscape.com/flashcards/aem-60-architect-4537251/packs/5686313

Good knowledge of Source control, CI & CD tools:

Jenkins: https://jenkins.io/
Git: https://github.com/

Integration with Adobe Marketing Cloud, AEM Forms & Scene7:

Integrating with Adobe Target: https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/target.html
Scene7: https://helpx.adobe.com/experience-manager/6-3/sites/administering/using/scene7.html

AEM Deployment & Microkernels:
https://helpx.adobe.com/in/experience-manager/6-4/sites/deploying/using/recommended-deploys.html

AEM with MongoMK – How to configure replication

Generic eCommerce integration:
https://helpx.adobe.com/in/experience-manager/6-3/sites/developing/using/generic.html
https://docs.adobe.com/docs/en/aem/6-3/administer/ecommerce/concepts.html

Camera Raw images in AEM:
https://docs.adobe.com/docs/en/aem/6-1/administer/content/assets/camera-raw.html

Custom Styles for Rich Text Editor Component
https://docs.adobe.com/docs/en/aem/6-2/administer/operations/page-authoring/rich-text-editor.html

Blogs by users who have cleared the AEM 6 Architect exam:
http://suryakand-shinde.blogspot.com/2015/11/aem-architect-certification.html

Disclaimer: This article reflects my own preparation journey in taking up the exam.

Update(22/02): Cleared the AEM Architect certification

Friday, April 29, 2016

Setting up a SharePoint Farm in Azure - Gotchas

I recently set up a SharePoint 2013 Trial development farm on MS Azure. I just wanted to not down a few things to remember while setting this up. My Farm consisted of 3 virtual machines:

  1. DNS Server running ADDS
  2. Database Server with SQL Server 2012 Express
  3. Web Server with SharePoint 2013 Trail edition
I found a few steps which might be useful to share:


Setting up a Virtual Network and Register DNS Server:


Before proceeding to creating the VM's, we would need to create a Virtual Network and register a DNS network. This can be done from the Azure management console by clicking on Networks > New and selecting the Register DNS Server Option as shown below:

2

Provide a Name and an IP of the DNS Server here (Note: This can be changes at a later point of time)

Once done, you can proceed to create a Virtual Network through Networks > New and selecting the Quick Create option. Provide a name of the Virtual network For Example: SPNET01

Here select the DNS server created during the previous step from the Connect to Existing DNS dropdown.



Once the Virtual Network is setup, all the other Virtual Machines you create in the farm should use this created Virtual Network. This can be achieved, by selecting the created VN, i.e. SPNET01 from the Region/Affinity Group/Virtual Network drop down as shown below. This allows all the created VM's in the farm to be part of the same Virtual Network.



Restart VM's before adding them to the Domain

The next steps would be to create a Windows Server 2012 VM, enabling the Active Directory Domain Services Role on the VM and promoting the VM as a Domain Controller.

One this is done, please ensure that you restart all the VM's in the Virtual network before attempting to join them to the Domain. This is done to ensure they recognize the promoted domain controller. 

The servers would prompt for a restart after they are added to the domain as well.

Enable the TCP/IP protocol on the SQL Server


Once SharePoint 2013 is installed and you run the configuration wizard, please ensure that the TCP/IP protocol is enable on the SQL Server.

This can be done through the SQL Server Configuration Manager. The steps are details here:
https://technet.microsoft.com/en-us/library/hh231672(v=sql.110).aspx

Add rules to allow SQL Server Connection through the Firewall

To ensure connection from the Web Server i.e. SharePoint to the SQL Server, add an Incoming Rule on the SQL Server to allow connection on port 1433 or 1434.

The detailed instruction on how to go about this are described here:
https://msdn.microsoft.com/en-us/library/cc646023.aspx

Enable ping between the virtual machines on the Virtual Network

The windows firewall does not allow ping between the virtual machines on the network. This can be achieved by adding an incoming rule to allow ICMPv4 and ICMPv6 protocols through the firewall on the virtual machines. 

The instruction to achieve this are given below:
https://technet.microsoft.com/en-us/library/cc749323(WS.10).aspx




Monday, December 21, 2015

Identity models for Office365

There are three identity models available for tenants using Office 365 (O365). Choosing one of the models will impact the way user accounts are managed and how users would log in to their Office 365 subscriptions.

The models available are:
  1. Cloud identity model : All user accounts are store on the cloud in Azure Active Directory(AD). The Azure AD is the active directory used by O365 The tenant administrators could manage users through the O365 admin center.
  2. Synchronized identity model: In this model the user identity is managed in an on-premises server and the accounts and password hashes are synchronized to the cloud. The user enters the same password on-premises as they do in the cloud, and at sign-in the password is verified by Azure AD. This model uses the Microsoft Azure Active Directory Sync Tool (DirSync). Link: http://go.microsoft.com/fwlink/p/?LinkID=510956
  3. Federated identity model: This model also requires a synchronized identity, however the on-premise AD would validate the user credentials. This model uses ADFS or any other third party Identity provided supported by Microsoft. The identity providers supported are given here 

Upgrading Content Types in SharePoint 2010/2013

Most developers who used SharePoint 2007 faced issues with adding fields to content types post deployment. The fields were usually not propagated to the lists and libraries when deployed through the solution package.

SharePoint 2010 introduced new elements in the CAML schema to offer a solution for this problem.

The solution was providing an  element within the element to indicate that a feature has to be upgraded. The UpgradeActions element can have a child element  to add a new field to the already provisioned content type. 

Using this technique allows for propagation of changes to the content type to the child lists and content types.

Please find the usage below:

xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
  <UpgradeActions>
    <VersionRange BeginVersion="1.0.0.0" EndVersion="2.0.0.0">
      <AddContentTypeField
              ContentTypeId="0x010XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
              FieldId="{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}"
              PushDown="TRUE"/>   
    </VersionRange>
  </UpgradeActions>

</Feature>