Showing posts with label SharePoint 2013. Show all posts
Showing posts with label SharePoint 2013. Show all posts

Monday, October 5, 2015

SharePoint App's

Advantages of using SharePoint App

  • Keep custom code off of the SharePoint servers! Administrators spend a lot of their time setting up and maintaining the SharePoint servers in your organization. Apps for SharePoint either run 100% client-side within SharePoint, or separate web application server (hosted or on premise). Either way, apps are isolated from SharePoint so a poorly performing app will not affect your entire SharePoint environment. This also allows Apps to be installed without downtime in SharePoint.
  • Give control to site owners to allow them to install the apps they want on their site either from the Microsoft store or your organizations internal App Catalog.
  • Keep control by disabling the public Microsoft store or require approval for the apps that site owners want to add to their site.
  • Apps are first-class citizens in SharePoint! Apps are given their own permissions to specific SharePoint resources such as lists, documents, sites, search, etc… User security still applies as well. An advantage is that when content is created or modified it shows Modified By <> on behalf of <> allowing administrators and users to see what app is making changes to the content. Separate permissions also allows for the App to be revoked access, without changing the permissions of the users.
  • Since Apps are isolated, the SharePoint environment is much easier, and therefore cheaper, to migrate or upgrade when the next version of SharePoint is released.
  • Apps are supported in the cloud. SharePoint Online fully supports the new app model, making it a much more viable option for organizations who are considering moving to the cloud.
  • Apps can be written in several different ways. This allows developers to use their core strengths to develop their apps. This may be HTML5, JQuery, CSOM, C#, PHP, Java, etc…
  • Already have a custom web application and now you need to integrate it into SharePoint? No problem. Create an App Package that points to your existing web application and you’re good to go. Of course, if you want your application to read from or make updates to SharePoint, you’ll need to make some additions to your application. But this doesn’t necessarily mean a complete rewrite.
  • Sell your apps! If you or your organization has developed a great reusable app, you can publish it to the Microsoft Office Store and sell it to others. Microsoft handles the billing and delivery of the app, so all you need to do is build it, publish it, and support it.
  • The Office Store makes it easy to find and purchase apps that you know have been vetted by Microsoft.


Monday, April 6, 2015

SharePoint Portal - User Engagement Tips

We are seeing now many organizations have implemented their internal portals using SharePoint or corporate are thinking in direction to do the same. One of the common challenges faced when we roll out the portal is User Engagement. 

User Engagement 

  1. How much your employees love this portal and use it in day to day activities. 
  2. Do they have all the needed content in the portal? Is everything cooked up in the home page itself (I mean all the information in single page itself)?
  3. First of all, do they visit this site? If it all is it attractive to them?
These are all the common questions which immediately pop up when we want to understand and get tangible outcomes on user engagement in the SharePoint Portal.  There are some simple tips that we can follow throughout the Portal design to improvise the user engagement. Here you go,

Keep it Simple
Simple doesn't mean plain. Do not over complex your portal or information access in the portal and don't think everyone who accesses this portal should be aware of what you have developed. Simple means free of complexity and unnecessary elements, that could clutter your portal which eventually keep the users from engaging with your content. Rather than distracting the users, we want to include features they need and will use. Of course, different organizations need different functionality for their portal, but no matter what those needs are, we should keep portal clean and clutter-free


What is Important
Draw user attention to what is important for your portal or the actual purpose the portal serves. You can avoid all cosmetics stuff and high light only the content that you want to convey to users. Also understand how do you want to arrange your content in the page (like which needs to first, what content need to be placed in the sites, any information that need to be placed in the bottom of the page, any content which needs to be pop-up..etc). Because eye-tracking studies show that users tend to look at web content in a certain order, and by following that order we can present our information in an effective way.

Keep it clean
Either it is internal site or heavy user based public facing site, keep the site clean and simple. Use an appropriate font, color, images as the way we tend to deal with the contents. Don’t put too much of jazzy things when you want to convey an important information to users via portal. “White Space is allowed” – yup, don’t try to occupy every pixel in the page with information; having a desirable white space is still attractive and brings more focus to the content.

Communication
Developing the portal itself is quite easy compared to communicating the need to portal to everyone in organization. Try to create communication channel or plans to bring people to the portal and make innovative marketing to attract the people.



What you develop, it is tangible and measurable only when people use it. All your metrics around the portal is purely dependent on your user engagement.

Tuesday, March 31, 2015

SharePoint 2013 - Best Practices

Dear folks,

Thought of sharing you couple of best practices that every architect or team lead must be aware when they proposing a solution on SharePoint or when designing the SharePoint solutions. I see most of the successful project implementation ends up with a common problem on -Performance, Reliability issues.. etc.

I tried to list down some of the basic things that we should take care when we play around in SharePoint.

  1. Standard Naming convention across SP Farm. Use standard naming convention as per your governance process or policy for all your accounts, service application, web applications, database name, site collection names..etc. This will really help you when you want to maintain the farm and to do some changes in future easily if needed.
  2. Have defined physical infrastructure setup. Really mean, have a dedicated systems as when required (like for Domain Controller, Database server, Web App server, App Server, Office Web Server). Don't mess up multiple server roles in a single server itself. Also see what you can virtualize and what you cannot.
  3. Have defined logical setup for your farm elements (Web applications, Service Applications). Don't try to create everything under same roof or don't create everything as an isolated items in SP farm. Analyse and group all the necessary items and create a required structure. Example( All service applications can be pointed to one app pool and all the web applications can be pointed to another app pool. Don't create app pool for each web application unless it is really needed)
  4. Follow a proper capacity planning process (model, design, pilot, deploy, monitor & maintain), because capacity planning is not something a one time activity or single solid solution. It is more like an evolution and on going process. Also check for attributes like latency, throughput, data-scale, reliability..etc
  5. Be aware of capacity boundaries/limits of SP 2013, both software and hardware boundaries
  6. Training - its must for all the folks who uses SharePoint, its not just for the developer/administrator/monitor/security guys. We have to train the potential users of SharePoint to make better use of it. Only when users started using the site we will be able to get real metrics and measures valued properly against your capacity/performance..etc. otherwise everything is just theory, only in papers
  7. Avoid GUI based installation process, use powershell script to the maximum extent for all the installation and configuration of SP farm. I am quite sure you will understand the importance of using powershell instead of GUI when you want to setup a proper sharepoint farm.
  8. Avoid using Configuration wizard to setup service applications in SP farm. Do it manually or use powershell script to create Service applications.
  9. Do not use dynamic memory for Virtual VM's, its a complete performance degradation of SP farm either it is development, test or production environment. 
  10. Follow all critical updates, cumulative updates, public updates, service packs, SharePoint Updates from Microsoft, evaluate the updates before apply in production. Make sure things are good on the updates.
  11. Keep close eye on your SharePoint farm, monitor it perfectly and detailed
  12. Optimize your Search service to greater extent, because it is one of the major performance tied up factor in SharePoint. Try to distribute the search load to couple of servers in the farm and have an optimized search topology.

The detailed list of best practices on individual topics is available here
http://social.technet.microsoft.com/wiki/contents/articles/12438.community-best-practices-for-sharepoint-2013.aspx

Tuesday, November 18, 2014

Choose between SharePoint Cloud IaaS & SaaS

Take this survey to get answered for all your questions and decided to move on either to IaaS (Hosting SharePoint in Azure Vm's) or SaaS (SharePoint Online in O365)


Questions
Answers
Do you have more functionality that would require heavy customization in SharePoint? Or Do you have many custom solutions already in SharePoint?
Yes / No
Do you have trained SharePoint engineers in place (Developers, Administrators, architects)
Yes / No
Do you need to deliver SharePoint content to external users, systems, customers/partners?
Yes /  No
Do you use SSRS, Performance Point, BCS, and Search heavily in your SharePoint sites?
Yes / No
Do you have many 3rd party solutions (full trust deployments) deployed in SharePoint farm or planning to have or build many full trust codes?
Yes /  No
Do you require a highly customized look & feel, branding – navigation for your SharePoint sites
Yes / No
Do you have infrastructure capability, process and governance in place to manage SharePoint applications, Disaster recovery..etc?
Yes / No
Do you already use or host any applications in Azure? Or any other cloud providers
Yes / No
Do you have any restrictions to move on to cloud because of corporate regulations, compliance..etc?
Yes / No


What is the outcome from this survery
1. If you get "Yes" as an answer for most of your questions, SharePoint IaaS is best option to chooose
2. If you get "No" as an answer for most of your questions, SharePoint Online (SaaS) is best option to stick
3. If you get equal amount of "Yes" and "No", then think of consolidating the applications and plan for a Hybrid Model.



Monday, October 27, 2014

SP 2013 Interview Questions

Hi folks,

I just across this article which gives an oversight about the interview questions which usually been asked on SP 2013


http://www.onlysharepoint2013.com/2012/09/sharepoint-2013-interview-questions-and.html


Quite Interesting, I will try to add more on this from my end.


Happy job hunting :)


Added some more here

SharePoint 2013 Q&A

1) What are the three user authentication methods that SharePoint 2013 supports?
  1. Windows claims
  2. Security Assertion Markup Language (SAML)-based claims
  3. Forms-based authentication claims
2) Out of the available authentication methods, which one would is considered the recommend according to Microsoft?

Claims-based authentication methods are recommended.

3) What protocol does server-to-server authentication extend?

SharePoint 2013 extends OAuth.

4) SharePoint Store and App Catalog Access SharePoint resources on behalf of a user using?

OAuth 2.0.

5) What Business Data Connectivity (BDC) connections types are supported in SharePoint 2013?
  1. WCF
  2. SQL Server
  3. NET assemblies
  4. Open Data Protocol
6) What are some examples of technology that OData leverages?
  1. HTTP
  2. Atom Publishing Protocol (AtomPub)
  3.  JavaScript Object Notation (JSON)
7) What types of authentication does Business Connectivity Services support?
  1. Anonymous
  2. Basic
  3. Windows
  4. Custom authentication to OData services when it is used with the Secure Store Service
8) What does a BDC model do?

Describes which tables to read, which items from those tables are of interest, and which operations to perform on them.

9) How is the BDC model in SharePoint 2013 more streamlined than in SharePoint 2010?

Visual Studio 2010 is able to connect to the OData endpoint through Business Connectivity Services and read the OData source. Visual Studio 2010 will then automatically generate the BDC model.

10) How is the BDC model used after being built?

Imported into the Business Data Catalog as a farm-scoped external content type, or be included in an app for SharePoint.

11) What Is An Event Listener in SharePoint 2013?

The event listener includes an event subscriber. The subscriber receives notifications from the event publisher (on the external system side) on changes to the data and then initiates predefined actions when changes occur.

12) How is an event listener useful?

Enables SharePoint users and custom code to receive notifications of events that occur in an external system.

13) With an event listener, what are the supported connections for an external system?
  1. OData
  2. SQL
  3. WCF
14) What are apps for SharePoint?

Apps for SharePoint allow addition of functionality to a SharePoint site by using the self-contained app for SharePoint.

15) What is the primary benefit of using apps for SharePoint?

Each app for SharePoint is isolated from the rest of the system.

16) How are BDC models and apps for SharePoint related?

BDC models can be scoped to apps for SharePoint and connection information is defined and stored separately from the app-scoped BDC model in BDC connections.

17) What is eDiscovery in the context of SharePoint 2013?

Introduces a new site for managing discovery cases and holds. The site allows one to access discovery cases to conduct searches, place content on hold, and export content.

18) What are some examples of some things you can related to an eDiscovery case?
  1. Sources
  2. eDiscovery sets
  3. Queries
  4. Exports
 19) What is an in-place hold?

Content that is put on hold is preserved, but users can still change it.

20)  What the content can be included with SharePoint eDiscovery export?
  1. Document
  2. Lists
  3. Pages
  4. Exchange objects
21) In terms of enterprise-wide eDiscovery, what actions can be taken by an authorized user?
  1.  Create a case, define a query, and then search SharePoint Server 2013, Exchange Server 2013, and file shares
  2. Export all of the content that was identified.
  3. Preserve items in place in SharePoint Server 2013 or Exchange Server 2013.
  4. Track statistics related to the case.
22) What are the different types of mobile views offered in SharePoint 2013?
  1. Contemporary view
  2. Classic view
  3. Full screen UI
23) What is the Microsoft Push Notification Service?
Supports applications on mobile devices that should receive notifications from a SharePoint site.

24) What field type would be used when working location specific SharePoint applications?
Geolocation field type

25) What is Site-based retention?
You can create and manage retention policies in that will apply to SharePoint sites and any Exchange Server 2013 team mailboxes that are associated with the sites.

26) What does a retention policy contain?
Generally what causes a project to be closed and when a project should expire.

27) What are some improvements in Excel Services in SharePoint 2013?
  1. Field list and field well support
  2. Calculated measures and members
  3. Enhanced timeline controls
  4. Application BI Servers
  5. Business Intelligence Center update
 28) What is the In-Memory BI Engine (IMBI)?
The In Memory multidimensional data analysis engine (IMBI), also known as the Vertipaq engine, allows for almost instant analysis.

29) What does the Power View Add-in for Excel do?
Power View (“Crescent”) enables users to visualize and interact with modeled data by using highly interactive visualizations, animations and smart querying.

30) Can PerformancePoint be displayed on iPads?
Yes.

31) What is the Analysis Services Effective User?
Eliminates the need for Kerberos delegation when per-user authentication is used for Analysis Services data sources. By supporting Analysis Services Effective User feature, authorization checks will be based on the user specified by the EffectiveUserName property instead of using the currently authenticated user.

32) What are Community Sites in SharePoint 2013?
Community Sites offer a forum experience to categorize and cultivate discussions with a broad group of people across organizations in a company.

33) What is the primary change with MySite document libraries in 2013?
Users can specify permissions for a specific document without having to understand the inheritance model.

34) What are Image renditions?
Image renditions let you display different sized versions of an image on different pages.

35) How are multilingual sites implemented?
Variations, integrated translation service, cross-site publishing

36)  What is Cross-site publishing?
Cross-site publishing lets you store and maintain content in one or more authoring site collections, and display this content in one or more publishing site collections.

37) What is Managed navigation?
Managed navigation lets you define and maintain the navigation on a site by using term sets.

38) What are Category pages?
Category pages are page layouts that are used for displaying structured content such as catalog data.

39)  What is the Content Search Web Part?
Displays content that was crawled and added to the search index.

40) What are Refiners and faceted navigation?
Refiners are based on managed properties from the search index. With faceted navigation you can configure different refiners for different terms in a term set.

41) What is the Analytics Processing Component?
Runs different analytics jobs to analyze content in the search index and user actions that were performed on a site to identify items that users perceive as more relevant than others.

42) What does the Workflow Manager do?
High Density and Multi-Tenancy, Elastic Scale, Activity / Workflow Artifact Management, Tracking and Monitoring, Instance Management, Fully Declarative Authoring, REST and Service Bus Messaging, Managed Service Reliability.

43) What is a ranking model in SharePoint 2013 search?
A ranking model determines recall (which items are displayed in the search results) and rank (the order in which search results are displayed).

44) What actions can a query rule specify?
  1. Add one or more result blocks
  2. Change ranked results
  3. Add Promoted Results (formerly called Best Bets) that appear above ranked results
45) What are Result sources?
Result source allow you to restrict queries to a subset of content by using a query transform.

 46) What is a Continuous crawl?
Eliminates the need to schedule incremental crawls and automatically starts crawls as necessary to keep the search index fresh.

47) How can you remove items from the search index?
Using the crawl logs.

48) How can you specify which entities to look for in the content in relation to SharePoint search?
Create and deploy your own dictionaries

49) What does document parsing functionality do?
Document parsers extract useful metadata and remove redundant information.

50) Is Visual Upgrade available in SharePoint 2013?
No.

51) What are the New Changes in Search?In SharePoint 2013 the best of two Search Engines "SharePoint Search" and “FAST Search Server for SharePoint” was combined
to make one Search Engine that would provide greater redundancy and for better scalability. For more Info on Search architecture see Search 2013 Architecture

Q2. What is Continuous Crawl?
Ans: A new Crawl Option "Continuous crawls" has been Introduced in search's Crawl Schedule Category to help keep the search index and search results as fresh as possible. Continuous crawls run every 15 minutes by default.

Q3. What are Display Templates?
Ans: To eliminate the fact that the designers and power users needed to modify the XSLT each time they needed a particular look and feel in SharePoint, a new concept of Design Templates has been introduced. Each Display Template consist of two files an HTML file (.html) and JavaScript File (.js). For more Info on Display templates see Display Templates

Q4. What is the new Analytics Processing Component in SharePoint 2013?
Ans: The Analytics Processing Component in SharePoint Server 2013 analyzes both the Content and the way users interact with it.The results from the analysis are added to the items in the search index to be used by Search Webparts,Recommendation Reports,Most Popular Items reports and other WebParts.

Q5: What analysis are done by Analytics Processing Component in SharePoint 2013?
Ans: The Analytics Processing Component runs two main types of analyses: Search analytics and Usage analytics. Search analytics analyzes content in the search index, and usage analytics analyzes the user actions.

Q6. What is the purpose of new Content Search Web Part(CSWP)?
Ans: In SharePoint 2013 Microsoft has introduced a new webpart called “Content Search Web Part (CSWP)”.This Web Part queries
against search Index to display results. The webpart displays search results in a way that you can easily format it and customize it.

Q7. What is Shredded Storage?
Ans: It’s a new Feature Introduced in SharePoint 2013 where Documents and Changes to the Documents are stored as “Shredded BLOBS” in the new DocStreams Data Table. Unlike SharePoint 2010, it helps to lower down the amount of storage required for saving files by saving only the Changes and not the entire Versions of the Files in database.

Q8: Why would you Disable Shredded Storage?
Ans: Shredded storage is a per document feature.So if two Copies of the exactly same document is stored in two different libraries, these two documents will still have their own set of shreds which will take up twice the space of each individual document.

Q9. Whats new in SPSite Powershell Cmdlet?
Ans: SPSite has few new parameters in SharePoint 2013 to make Site Collection Operations easier.
New-SPSite cmdlet allows to Create a Host-name Site Collections adding a using the HostHeaderWebApplication parameter that identifies the Web Application where the site collection is being Created.
Copy-SPSite (new) Use the Copy-SPSite cmdlet to make a copy of a site collection from one Source content database to a specified destination content database.The copy of the site collection has a new URL and a new SiteID.This will be very useful when renaming a SiteCollection.


Q10: Whats are the new Delegate Controls in SharePoint 2013?
Ans: In SharePoint 2013, three New Delegate Controls have been Introduced for the purpose of displaying the new Top Suite bar (with links SkyDrive, NewsFeed,Sync,follow). These Controls are -
  • SuiteBarBrandingDelegate delegate Control
  • SuiteLinksDelegate delegate Control
  • PromotedActions Delegate Control
Q11: What are the Changes in CSOM and REST based APIs?
Ans:  Microsoft has improved both Client Side Object Model (CSOM) and Representational State Transfer (REST) based APIs by adding a much needed support for the Search, User Profiles, Taxonomies, and Publishing Object Model.Client.svc service is extended with REST capabilities and accepts HTTP GET, PUT, POST requests.


Q12: What’s the new App model?
Ans: SharePoint 2013 Introduces a Cloud App Model that enables you to Create apps.Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Q13: What is the new SPSecurityEventReceiver?
Ans:  SharePoint 2013 Introduces a Cloud App Model that enables you to Create apps.Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. An app may include SharePoint components such as lists, workflows, and site pages, but it can also surface a remote web application and remote data in SharePoint.

Thursday, October 23, 2014

SharePoint OnPrem to Azure Migration

Hi,

Recently I happen to work on a proposal for which we need to provide  multiple options to migrate a SharePoint 2007/2010 farm to Azure and also to SP Online to some extent. There are couple options got discussed and each one has it own pros and cons. Choosing the option and methodology is purely based on the business scenario what you are handling right now. I tried to detail the various options here,

Option 1 : SP OnPrem Upgrade - then to Azure

First Upgrade the On-premise previous version SharePoint farm to latest one (SP 2013) and then migrate the upgraded SP 2013 Vms to Azure as VM's.


Things to keep in mind
  • SP 2007/2003 does not have a direct upgrade to SP 2013, it needs to be followed sequentially (2007 to 2010 and then 2010 to 2013). you need to plan an infrastructure setup and cost accordingly also the licenses
  • This option will work out very well if your on-premise infra is virtualized and applications are running in VMs
  • Copying Vm from On-premise to Azure for various products has various approaches  like VMware to Azure, Hyper-V to Azure..etc
  • All customizations, orphaned/unwanted sites, content cleanup, 3rd party components compatability, site restructuring, taxonomy redfine..etc will be checked and fixed before we are moving the application to cloud.
  • Data migration from Azure Vm to SP Online will be bit faster as compared to doing it directly from On-premise. Because the data transfer rate between the Microsoft  data centers will be fast as when compared to the On-Prem and SP Online
  • Site to Site VPN tunnel can be established between On-Premise and Azure to fasten the vm copy process

Option 2: SP OnPrem to Azure and then upgrade
Move an existing On-premise vm to azure as it as (using microsoft acelerator tool for azure) first and then upgrade the Azure old version farm to SP 2013


Things to keep in mind

  • As-Is Vm movement from On-premise to cloud and then an upgrade, so user will get the feel of SP 2013 use only at the end of the migration phase
  • Immediate movement of an on-premise vm to azure will have an drastic change in your infrastructure cost
  • Cloud enablement and cloud dependent solutions, 3rd party components surprises will come only after you start doing the SP upgrade in azure
  • 2 environment need to be available in azure, i.e. SP 2010 farm and SP 2013 farm along with your typical ALM (Dev, Test & Staging) environments. 
  • Maintaining the same kind of environment on-premise should be costlier than in Azure


Option 3 : SP Onprem to Azure using 3rd party tool
Move an existing On-premise SP any version application to Azure SP 2013 using any 3rd party data migration tool like metalogix, docave..etc


Things to keep in mind

You will have complete freedom to redfine the IA and taxonomy in the new platform and make use of the new features while defining the architecture itself
It is only data migration between On-prem to azure not an environment movement
Manually need to move all the custom components, 3rd party solutions to new environment and rebuild to make it compatible in SP 2013
3rd party migration tool is needed to do this migration, ofcourse the tool cost you have to keep in mind
Network latency and migration tool capability to transfer the data b/w on-prem and azure need to be considered and should do migration plan based on how much(GB) can be transferred in how much time (hr)


Happy Migration !

Thursday, October 16, 2014

No-code solutions using SharePoint 2013 Composites

I just came across this page in TechNet and its really a useful one when we wanted to have a no-code solution for some of our business requirements in SP 2013 and 2010

Try it out by your self
http://technet.microsoft.com/en-us/office/dn756398

 

ULS Viewer for SharePoint 2013

Hope everyone is aware of ULS viewer and its usage in SP 2010 environments  (Check with developers and Support team), it will be nightmare if we don't have this tool to identify an exact issues.
 
Microsoft released ULS Viewer for SharePoint 2013. It is a very good tool for developers to get very good debugging information. This version has some very good fixes.

Here is the download link for ULS Viewer.
 
 
Source : TechNet
 

Content Query Webpart Vs Content Search Webpart

There are two Web Parts on a SharePoint publishing site that are very similar: the Content Query Web Part (CQWP) and the Content Search Web Part (CSWP). Just by looking at their names, it’s not clear to distinguish the difference between the two.
Content Query and Content Search Web Part
 
 

Compare the strengths and limitations of the Web Parts

It’s important that you understand the strengths and limitations of the two Web Parts because if you choose the wrong one, your site could run into performance problems. You can use both Web Parts to show content that is based on a query. In a simplified world, here’s how you can decide between the two:
  • Use the CQWP when you have a limited amount of content, your query is simple, and you don’t expect your content to grow much in the future.
  • Use the CSWP in all other scenarios when you want to show content that is based on a query.
The table below gives a comparison of the two Web Parts:
Web Part behaviorContent Query Web PartContent Search Web Part
Query configurationEasyYou’ll need to know about certain search features such as managed properties.
Query across large amounts of contentLimitedYes
Handle complex queriesLimitedYes
Scale to handle future content growthLimitedYes
Display content from other site collectionsNoYes (see section below)
Design of query results can be customizedYes, by using XSLT.Yes, by using HTML.
Maintenance cost in a complex site architectureHighSmall (see section below)
Narrow down the query results that are displayed in the Web PartNoYes, in combination with the Refinement Web Part.

How the Web Parts display content

You can use both Web Parts to display information that is stored in a subsite. The user experience for content authors and home site visitors is identical, regardless of which Web Part you use. The difference between the two Web Parts is the technology that the Web Parts use. The CQWP queries a database, whereas the CSWP queries the search index.
Here’s an example of how these Web Parts behave. Example A shows a company that’s using a CQWP to show content from its sales subsite, and example B shows a company that’s using a CSWP to show content from its sales subsite.
How CQWP and CSWP display content
Image calloutExample A:
Content Query Web Part
Example B:
Content Search Web Part
1You author content in a list.You author content in a list.
2The list items are immediately stored in a database.At a set time interval, the list items are automatically crawled and added to the search index.
3A visitor views the home site. The CQWP automatically issued a query to the database.A visitor views the home site. The CSWP automatically issues a query to the search index.
4The database returns a query result and displays it in the CQWP.The search index returns a query result and displays it in the CSWP.

Factors that you should to consider

Because the Web Parts use different technologies, the use cases for when you should choose one Web Part over the other differ. A use case is often more complex than the simple example shown in the previous section. Before you decide which Web Part to use, it’s important that you consider the following:
  • How much content do I have?
  • How complex will by query be?
  • Where’s my content going to be stored?
  • How much will my content grow over time?
  • How much will my maintenance costs grow over time?
We recommend that you address all of these areas as a whole rather than separately.
 Note    If you’re considering moving from a SharePoint on-premises site to a SharePoint Online site, and you are using CQWPs on your SharePoint on-premises site, you could run into a couple of performance issues. In SharePoint Online you won’t be able to scale your tenant to improve performance. Also, the caching functionality behaves differently in SharePoint Online than in SharePoint on-premises.

What can affect the performance of the Content Query Web Part

In the previous example, if the News list contains less than 5000 items, the performance of the CQWP is likely to be very good. However, if the News list exceeds 5000 items, and the query in the CQWP is complex, the Web Part can run into performance problems. It’s difficult to define exactly what a complex query is, but a Source that goes across all sites in your site collection is more complex than aSource that queries a specific list. Also, if you query uses Additional Filters, the query complexity increases. The query complexity increases depending on the site column types and conditions that you use. Here are some examples:
  • A query that filters on a site column of type Multiple lines of text is more complex than a query that filters on a site column of type Yes/No.
  • A filter that uses a contains condition is more complex than a query that uses an is equal to condition.
  • Multiple Or conditions increases the complexity of the query.
Query configuration in CQWP
The performance of the CQWP is also affected by where your content is stored. If your content is stored across several sites, the total amount of list items the Web Part has to process will affect its performance. For example, on your company’s home site, you want to display the latest news items from lists that are maintained in multiple subsites. Each list contains 1000 items. That means that the CQWP will have to query across 3000 items.
Query across multiple subsites
In this example, if the query is simple, the performance of the CQWP is likely to be good as long as the total amount of items is less than 5000. However, if the query is complex, the CQWP could run into performance problems even when the total amount of items is a few thousand.
Another important factor that can affect the performance of the CQWP is if your content grows. A solution that works well today might not apply to your future content. If you expect a large increase in the number of sites or amount of content, you should not use the CQWP.

Use the Content Search Web Part to keep maintenance cost down

You can use both Web Parts to display content based on information from your site navigation. For example, when a visitor goes to a page, the Web Part on that page automatically issues a query that contains information from your site navigation. The search results are displayed in the Web Part. If you don’t have much content and the query is simple, you can use several CQWPs to display your content. However, because you have to maintain each CQWP individually, your maintenance costs can quickly escalate.
By using the CSWP with managed navigation and a category page, your maintenance costs will stay the same as your content grows. For example, if you add a new navigation category to your content, you can use the same category page to display the content that belongs to the new navigation category. So even though your content is growing, you’ll only need to maintain the same amount of pages.
In the example below, you can see how four CQWPs can be replaced by one CSWP on a category page.
Complex site architecture


Use the Content Search Web Part to display content from other site collections

You can use the CSWP to display content from other site collections. For example, if you want to author content in one site collection and display this content in another site collection, you have to use the CSWP. The CQWP can only display content from one site collection.
Query for content in another site collection

When in doubt, choose the Content Search Web Part

 
If you’re unsure about which Web Part to use, then the CSWP is probably the best choice in most cases. This Web Part is more flexible than the CQWP and will give you better performance results if you’re planning on expanding your content over time.
If you decide to use the CQWP, we recommend that you do testing to find out if the Web Part meets your current and future performance and maintenance requirements.
 
Source : Microsoft Office