Surendra Sharma

Surendra Sharma

Search This Blog

Showing posts with label Tech News. Show all posts
Showing posts with label Tech News. Show all posts

Friday, August 26, 2016

How to get media library extension and mime type programmatically in Sitecore



One of my colleague asked me that how to get extension of uploaded file in Sitecore media library programmatically?

Here are different pointers which may be useful for you while working with media library 

·         You can get media library item in LinkField type from Sitecore.Data.Fields namespace.

·         LinkField.TargetItem -> gives reference of media library item.

·         Sitecore.Resources.Media.MediaManager.GetMediaUrl(linkField.TargetItem) -> Return media links

·         By default, link extension is “.ashx

·         Get the extension and mime type of media library item by using below code

//Return extension like gif
string mediaItemExtension = linkField.TargetItem.Fields["Extension"].Value;

//Return mime type like image/gif
string mediaItemMimeType = linkField.TargetItem.Fields["Mime Type"].Value;

·         You can also view both of these fields in Sitecore content tree as


Media Item
Media item
  
·         Let me cover one important entry in web.config file for media library item extension.
<!--  MEDIA - USE FILE EXTENSION IN ITEM NAMES
      Indicating whether to include a file extension when generating an item name from a file name.
      Default value: "false"
-->
<setting name="Media.IncludeExtensionsInItemNames" value="false"/>

·         As comments above explain that if you want to include extension in media item name then set this property as true and when you upload any file in media library for example “1.JPG” then after uploading, Sitecore give its name as “1 jpg” as shown in below image. By default this value is false and for uploading “1.JPG”, Sitecore name it as “1” as shown in first image.

Media Item with extension
Media item with extension

Please leave your comments or share these tip if it’s useful for you.

Sunday, March 13, 2016

The mobile mind shift

Here is an analysis of session “The mobile mind shift” presented by Ted Schadler who is VP , Principal Analysts and Coauthor of The mobile mind shift. 

·         Most important point of this presentation is - Only content in context can deliver great mobile moments
·         The face of the world is changed by mobile. More particularly it was changed by – iPhone. Where developers like you and me developed Apps.
Mobile device is tiny, touch based, it’s always in your pocket, connected to internet and its knows your location.
By using these characteristics of mobile how a company can serve their customer better?
·         Main Agenda of this presentations is focus on
o    What is mobile mind shift?
o    What’s the critical role of context in mobile moments?
o    How can you find mobile moments and their context?
o    What technology will you need?

What is mobile mind shift?

·         Smartphone reached to almost everybody. According to Forrector Research World mobile and smartphone adoption forecast, up to 2016(First quarter), there are more than 230 million unique smartphone subscribers. The number is increasing day by day.
·         People using their mobile and tablets in home, office, even in their bedroom and bathroom. So mobile devices means a mobile life.
·         The demand for mobile apps and websites is generations based. What it means? A different age group people want companies must have a website which they can visit. Similarly they expect companies to have a mobile apps as well. These people want their experience to change based on their need and location which play an important role to provide better experience.
·         In general people browsing websites on an average for 3 minutes where a websites have lots of stuff, images etc. Out of these 3 minutes, some seconds are required to load the page. On mobile, information takes some milliseconds to load and on an average people focus on that information page for 30 seconds. While on smart watches, people look for on an average 3 seconds as it provide more precious information.
This all experience called mobile mind shift – The expectation that I can get what I want in my immediate context and moments of need.
·         What kind of experience changing here for customer. A customer expect 3 things - immediacy, simplicity and context. Overall a consumer wants convenience.
·         Immediacy + Simplicity + Context = Convenience
·         How a convenience can be achieved? For this innovators target mobile moments
o    A mobile moment is a point in time and space when someone pulls out a mobile device to get something they want in their immediate context. For example searching for nearby hotel, restaurant etc.
·         Mobile moments are pervasive i.e. they are applicable for all the customers whether they are at home, business, travel etc. At the same time these moments are powerful ways to focus on customer requirement. For example think about journey map in the context of mobile moment.
o    You are booking your flight tickets before few days of your journey.
o    Before few hours, you are check-in, access lounge, find a gate etc
o    In flight, you are ordering food, order movies, check ETA etc.
o    Once you reached at destination, you have to book a taxi etc.
o    After few days, you filled a customer service survey etc.
          In all these moments, applications have to handle three things
o    Who are we serving?
o    What is their context?
o    What is the motivation?

What’s the critical role of context in mobile moments?

·         In general there 1.5 million apps on mobile but there are 1000 million websites are web. So there is a large gap for websites where we don’t have equivalent apps.
·         On an average people don’t want more than 26 apps in their mobile however on an average they visit 52 websites monthly.
Responsive websites don’t deliver much information on mobile. These small mobile websites does not deliver great mobile moments.
So Personalization and contextual specific content delivery is the key here to serve your customer in better way and to improve mobile user experience.
·         We can achieve this by what customer want and what we deliver through contextual experiences.
·         What is context here?
o    The sum total of everything we know about customer based on her behavior, history, the environment and what she shared.
·         Context in action
o    Personalize web and mobile experiences
o    Target mobile moments based on locations
o    Send notifications based on time or location
o    Build profiles on the fly for segmentation
o    Even connected cars can embrace context

How can you find mobile moments and their context?
·         Use the IDEA cycle for agility. This cycle helps to build platform for agility
o    Identify the mobile moments and context
§  Who is seeking help
§  What kind of device
§  What is het context
§  What can you do to server her in that moment

§  Technics for finding moments
·         Survey research
·         Ethnographic research
·         Journey mapping
·         Ride-along investigations
·         Instrument to measure engagement
o    Define the mobile engagement – their tasks and your goals
§  Based on value to your business Vs value to your customer
o    Engineer your processes, platform and products for mobile moments
§  Are your technology platform ready to support mobile engagement?
§  Are your business processes designed for mobile moments?
§  Are your people recognized understand and iteratively deploy mobile services?
o    Analyze to optimize outcomes and improve the customer experience
§  Check real-time, operational, historical metrics for technology, engagement and business.

What technology will you need?
·         The need for content in context drives the biggest tech investment. We have to concentrate here on WCM, analytics majorly.
A digital experience platform need to develop to provide content according to context.