Showing posts with label TDS. Show all posts
Showing posts with label TDS. Show all posts

Thursday 4 April 2019

SDL India Tridion DX Summit 2019

Yet another successful, knowledgeable and full of fun SDL Tridion DX DEV Summit 2019,  where people from across the globe participated and shared their thoughts and knowledge.

I would like to thanks to the organizers SDL and all the sponsors and special thanks to all the members of the SDL India community, who made this event possible. People from the different regions joined in this event and shared their knowledge, experiences with others. The event was scheduled for 2 days, where more than 14 speakers participated and 16 sessions.

Highlights of this year SDL Tridion DX India Dev Summit   
Day 1, 29th March 2019

We started with celebrating the 10th anniversary of the MVP program where Sagar Hasamnis (Senior Director, SDL) presented his thoughts about this program and thanked the SDL community.

Jim Saunders (Chief Product Officer, SDL) Keynote speaker presented the vision and future of AI & The digital transformation of content he also demonstrates how this SDL helps us in the entire process from starting form Content Creator to Content Consumers.

After that, Ivo van de Lagemaat (Tridion DX Product Owner), he explained the SDL Tridion DX Roadmap and there was another session on the latest Extensions Management System where he explained the new Unified Extensions and its features, and how it will help in deployment and the best part is it will support the scale out. so if you have 2x CM and 4x Publishers it is a one-stop shop. I will be writing a separate blog on this starting with the Installation process, Features, and benefits.

Next speaker was Venu Ireddy (Solution Architect, SDL), Venu explained the features of DXA 2.1, and Search Module using Elastic Search and he also explained the difference between DXA 2.0 and 2.1.

After the amazing Lunch, it was Pankaj Gaur (Director, Content Bloom India) who started interacting with Audience with MentiMeter Game and then he presented how we can use SDL Tridion sites 9 feature Graphql with 8.5 also, we all loved it. 

The last two sessions were taken by Naveen (Senior Consultant, SDL)  presented the Tridion Docs, DD Module, and GUI using React and DXA  and Rajesh Kumar (Technical Architect, Global Solutions, SDL) presented the new Content API & GraphQL with React based Web application.


Day 2, 30th March 2019

SDL ecosystem from Wilhard Rass (VP Professional Services, SDL) gave us brief information about what is going on in the SDL Tridion world, what cloud service has to offer and about the Partners and their roles.

The Experience Manager DEMO and features this was explained by Venu Ireddy (Solution Architect, SDL). Content Editors are really going to like this new GUI.

After the first session on day 2, we decided to have some fun and we played “dumb-charade”.

Next, Presenter was Manish Mehmood(Technical Consultant, Content Bloom India), Manish showcase how to customize the exiting DXA Form Module.

I also got the opportunity to present and my topic was How to Scale-out Publishing in Tridion sites 9 using Split deployers (Deployers Endpoint, Deployer Workers, Redis, ActiveMQ).[here]

Mark Van der wal (Chief Architect Cloud Operations)  explained SDL cloud offerings, its advantages, and features.

Neetesh and Shalivahan (Technical Consultants, SDL) They explained the TridionDocs API integration this was the last session and we before all say goodbye, Event Closer by Sagar Hasamnis.   








Happy Coding and Keep Sharing!!

Monday 10 September 2018

Published Summary Alchemy Plugin

In my previous blog, we saw how Published Summary plugin was conceptualized, its use cases and how it works and its different functionalities.

In this Plugin, I wrote the C# code that interacts with Core Service and forwards the JSON response to be consumed on FrontEnd.

Based on the use cases and feature of this plugin I wrote the Endpoints on the following scenarios and provided the JSON.
  1. Get All Published Items from Publication, Structure Group, and Folder.
    • Let's say if we select Publication then the response will be all Published  Pages, Components, and Categories in that publication.
    • If we select this plugin from Structure group, then we will have all the published pages in the structure group and same goes for Folder selection all Published ComponentTemplates and Components.
  2. Publish Items that are selected by the user from the Plugin UI.
  3. Unpublish the Items that are select by the user from the Plugin UI.
  4. Summary Panel, where we'll have a Snapshot of how many items are published in a particular publication, basically a GroupBy of itemsType with the count.
  5. And Finally,  Get all Publication and Target Type.
Now, Let's look at the code at High Level

Get All Published Item

The GetAllPublishedItems method is the POST request method and deserialized JSON in C# modal.

JSON format is {'IDs':['tcm:14-65-4']}

 [HttpPost, Route("GetAllPublishedItems")]  
     public object GetAllPublishedItems(TcmIds tcmIDs)  
     {  
       GetPublishedInfo getFinalPublishedInfo = new GetPublishedInfo();  
       var multipleListItems = new List<ListItems>();  
       XmlDocument doc = new XmlDocument();  
       try  
       {  
         foreach (var tcmId in tcmIDs.IDs)  
         {  
           TCM.TcmUri iTcmUri = new TCM.TcmUri(tcmId.ToString());  
           XElement listXml = null;  
           switch (iTcmUri.ItemType.ToString())  
           {  
             case CONSTANTS.PUBLICATION:  
               listXml = Client.GetListXml(tcmId.ToString(), new RepositoryItemsFilterData  
               {  
                 ItemTypes = new[] { ItemType.Component, ItemType.ComponentTemplate, ItemType.Category, ItemType.Page },  
                 Recursive = true,  
                 BaseColumns = ListBaseColumns.Extended  
               });  
               break;  
             case CONSTANTS.FOLDER:  
               listXml = Client.GetListXml(tcmId.ToString(), new OrganizationalItemItemsFilterData  
               {  
                 ItemTypes = new[] { ItemType.Component, ItemType.ComponentTemplate },  
                 Recursive = true,  
                 BaseColumns = ListBaseColumns.Extended  
               });  
               break;  
             case CONSTANTS.STRUCTUREGROUP:  
               listXml = Client.GetListXml(tcmId.ToString(), new OrganizationalItemItemsFilterData()  
               {  
                 ItemTypes = new[] { ItemType.Page },  
                 Recursive = true,  
                 BaseColumns = ListBaseColumns.Extended  
               });  
               break;  
             case CONSTANTS.CATEGORY:  
               listXml = Client.GetListXml(tcmId.ToString(), new RepositoryItemsFilterData  
               {  
                 ItemTypes = new[] { ItemType.Category },  
                 Recursive = true,  
                 BaseColumns = ListBaseColumns.Extended  
               });  
               break;  
             default:  
               throw new ArgumentOutOfRangeException();  
           }  
           if (listXml == null) throw new ArgumentNullException(nameof(listXml));  
           doc.LoadXml(listXml.ToString());  
           multipleListItems.Add(TransformObjectAndXml.Deserialize<ListItems>(doc));  
         }  
         return getFinalPublishedInfo.FilterIsPublishedItem(multipleListItems).SelectMany(publishedItem => publishedItem, (publishedItem, item) => new { publishedItem, item }).Select(@t => new { @t, publishInfo = Client.GetListPublishInfo(@t.item.ID) }).SelectMany(@t => getFinalPublishedInfo.ReturnFinalList(@t.publishInfo, @t.@t.item)).ToList();  
       }  
       catch (Exception ex)  
       {  
         throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));  
       }  
     }  

Publish and UnPublish Items

The Publish and UnPublish method is the POST request method and deserialized JSON  into C# Model.

{"TcmIds":[{Id:"tcm:14-65-4",Target:"staging"},{Id:"tcm:14-77-64",Target:"staging"}]}


  #region Publishe the items  
     /// <summary>  
     /// Publishes the items.  
     /// </summary>  
     /// <param name="IDs">The i ds.</param>  
     /// <returns>System.Int32.</returns>  
     /// <exception cref="ArgumentNullException">result</exception>  
     [HttpPost, Route("PublishItems")]  
     public string PublishItems(PublishUnPublishInfoData IDs)  
     {  
       try  
       {  
         var pubInstruction = new PublishInstructionData()  
         {  
           ResolveInstruction = new ResolveInstructionData() { IncludeChildPublications = false },  
           RenderInstruction = new RenderInstructionData()  
         };  
         PublishTransactionData[] result = null;  
         var tfilter = new TargetTypesFilterData();  
         var allPublicationTargets = Client.GetSystemWideList(tfilter);  
         if (allPublicationTargets == null) throw new ArgumentNullException(nameof(allPublicationTargets));  
         foreach (var pubdata in IDs.IDs)  
         {  
           var target = allPublicationTargets.Where(x => x.Title == pubdata.Target).Select(x => x.Id).ToList();  
           if (target.Any())  
           {  
             result = Client.Publish(new[] { pubdata.Id }, pubInstruction, new[] { target[0] }, PublishPriority.Normal, null);  
             if (result == null) throw new ArgumentNullException(nameof(result));  
           }  
         }  
         return "Item send to Publish";  
       }  
       catch (Exception ex)  
       {  
         throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));  
       }  
     }  
     #endregion  
     #region Unpublish the items  
     /// <summary>  
     /// Uns the publish items.  
     /// </summary>  
     /// <param name="IDs">The i ds.</param>  
     /// <returns>System.Object.</returns>  
     /// <exception cref="ArgumentNullException">result</exception>  
     /// <exception cref="HttpResponseException"></exception>  
     [HttpPost, Route("UnPublishItems")]  
     public string UnPublishItems(PublishUnPublishInfoData IDs)  
     {  
       try  
       {  
         var unPubInstruction = new UnPublishInstructionData()  
         {  
           ResolveInstruction = new ResolveInstructionData()  
           {  
             IncludeChildPublications = false,  
             Purpose = ResolvePurpose.UnPublish,  
           },  
           RollbackOnFailure = true  
         };  
         PublishTransactionData[] result = null;  
         var tfilter = new TargetTypesFilterData();  
         var allPublicationTargets = Client.GetSystemWideList(tfilter);  
         if (allPublicationTargets == null) throw new ArgumentNullException(nameof(allPublicationTargets));  
         foreach (var tcmID in IDs.IDs)  
         {  
           var target = allPublicationTargets.Where(x => x.Title == tcmID.Target).Select(x => x.Id).ToList();  
           if (target.Any())  
           {  
             result = Client.UnPublish(new[] { tcmID.Id }, unPubInstruction, new[] { target[0] }, PublishPriority.Normal, null);  
             if (result == null) throw new ArgumentNullException(nameof(result));  
           }  
         }  
         return "Items send for Unpublish";  
       }  
       catch (Exception ex)  
       {  
         throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));  
       }  
     }  
     #endregion  

Summary Panel

The GetSummaryPanelData method is the POST request method and deserialized JSON in C# modal.

JSON format is {'IDs':['tcm:14-65-4']}


 #region Get GetSummaryPanelData  
     /// <summary>  
     /// Gets the analytic data.  
     /// </summary>  
     /// <returns>System.Object.</returns>  
     [HttpPost, Route("GetSummaryPanelData")]  
     public object GetSummaryPanelData(TcmIds tcmIDs)  
     {  
       try  
       {  
         GetPublishedInfo getFinalPublishedInfo = new GetPublishedInfo();  
         var multipleListItems = new List<ListItems>();  
         XmlDocument doc = new XmlDocument();  
         foreach (var tcmId in tcmIDs.IDs)  
         {  
           var listXml = Client.GetListXml(tcmId.ToString(), new RepositoryItemsFilterData  
           {  
             ItemTypes = new[] { ItemType.Component, ItemType.ComponentTemplate, ItemType.Category, ItemType.Page },  
             Recursive = true,  
             BaseColumns = ListBaseColumns.Extended  
           });  
           if (listXml == null) throw new ArgumentNullException(nameof(listXml));  
           doc.LoadXml(listXml.ToString());  
           multipleListItems.Add(TransformObjectAndXml.Deserialize<ListItems>(doc));  
         }  
         List<Item> finalList = new List<Item>();  
         foreach (var publishedItem in getFinalPublishedInfo.FilterIsPublishedItem(multipleListItems))  
           foreach (var item in publishedItem)  
           {  
             var publishInfo = Client.GetListPublishInfo(item.ID);  
             foreach (var item1 in getFinalPublishedInfo.ReturnFinalList(publishInfo, item)) finalList.Add(item1);  
           }  
         IEnumerable<Analytics> analytics = finalList.GroupBy(x => new { x.PublicationTarget, x.Type }).Select(g => new Analytics { Count = g.Count(), PublicationTarget = g.Key.PublicationTarget, ItemType = g.Key.Type, });  
         var tfilter = new TargetTypesFilterData();  
         List<ItemSummary> itemssummary = getFinalPublishedInfo.SummaryPanelData(analytics, Client.GetSystemWideList(tfilter));  
         return itemssummary;  
       }  
       catch (Exception ex)  
       {  
         throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));  
       }  
     }  
     #endregion  

Get All Publication and Target Type

 #region Get list of all publications  
     /// <summary>  
     /// Gets the publication list.  
     /// </summary>  
     /// <returns>List&lt;Publications&gt;.</returns>  
     [HttpGet, Route("GetPublicationList")]  
     public List<Publications> GetPublicationList()  
     {  
       GetPublishedInfo getPublishedInfo = new GetPublishedInfo();  
       XmlDocument publicationList = new XmlDocument();  
       PublicationsFilterData filter = new PublicationsFilterData();  
       XElement publications = Client.GetSystemWideListXml(filter);  
       if (publications == null) throw new ArgumentNullException(nameof(publications));  
       List<Publications> publicationsList = getPublishedInfo.Publications(publicationList, publications);  
       return publicationsList;  
     }  
     #endregion  
     #region Get List of all publication targets  
     /// <summary>  
     /// Gets the publication target.  
     /// </summary>  
     /// <returns>System.Object.</returns>  
     [HttpGet, Route("GetPublicationTarget")]  
     public object GetPublicationTarget()  
     {  
       var filter = new TargetTypesFilterData();  
       var allPublicationTargets = Client.GetSystemWideList(filter);  
       if (allPublicationTargets == null) throw new ArgumentNullException(nameof(allPublicationTargets));  
       return allPublicationTargets;  
     }  
     #endregion  


You can download the code from the Github.

Happy Coding and Keep Sharing !!!

Friday 30 March 2018

SDL Tridion India Dev Summit 2018

The fourth year in a row, Yes SDL Tridion India community has organized fourth SDL Tridion India Summit on 23rd and 24th March 2018.

People from the different regions joined in this event and shared their knowledge, experiences with others.

I also got the opportunity to participate in this event as a speaker and share my experience and process on MVP selection process. I also took this opportunity to share my knowledge with other and presented How we can use Docker to host DXA application. Learn more

What is SDL Tridion MVP Award

  • Each year SDL Tridion Most Valuable Professional Awards recognize individuals with a passion for sharing their knowledge and expertise.
  • You can share your Knowledge by writing Blog Post create videos or help other community members on Tridion StackExchange.
  • You can become a most valued professional (MVP) by sharing your passion, knowledge.
  • Upload your videos about SDL Tridion.
  • Passion is more important.

Process

  • The nomination is open in December. To nominate you can send your details should include your blog post, videos URL, and TREX profile at  sdl.tridion.mvp@sdl.com
  • The selection panel will evaluate each nominee's voluntary contribution to the community over the past 12 months.
  • In the end, the MVP team is summarizing the results.
  • The MVP Award is usually announced at the Mid of February.

Some useful links related to SDL Tridion MVP Program

Like, As I mentioned I took this opportunity and shared my knowledge about how to run the  SDL DXA  in the Docker container.






Highlights of this year SDL Tridion India Dev Summit 


Welcome

Day 1, The first session was about Tridion 9 Roadmap


Kurt introduced Tridion Docs 


Followed by Alvin (Go To Market), Pankaj (Upgrade Strategies), and Venu (UDP and Content Mashups)




 Day 2, Nuno started the first session of Day 2 and giving insights about SDL Cloud features


Followed By
  • Rajesh Kumar from SDL shared thoughts on pre-sales demo.
  • Kurt started a demo on Tridion Docs
  • Sayantan from SDL explained the connectors
  • Priyank from Content Bloom gave a live demo of how to use Core Service PowerShell module.
  • Raj Kumar from Sapient demonstrated various Tridion caching techniques  
  • Pankaj presented his second session on UDP

It was a great experience meeting all of you at SDL Tridion India Dev Summit, Hope to see you again next year.