SharePoint4us

Explore the Experience in SharePoint 2013

Sunday, November 30, 2014

What is SharePoint and Top reasons to Use SharePoint Server 2013 for Public-Facing Internet Sites

No comments

Introduction

SharePoint 2013



Since its beginning, SharePoint has been widely adopted as platform for building intranets, Search and Enterprise Content Management (ECM) systems. Starting with the 2007 version, SharePoint jumped into some new areas including Internet sites, business intelligence and social features.

SharePoint Server 2013 brings a vast number of new features, capabilities, and enhancements in Web Content Management. All these exciting changes and the new SharePoint licensing model will likely mean that we see more and more Internet-facing Web sites based on SharePoint technology.

This article will introduce some of my favorite new features and capabilities of SharePoint Server 2013 that can be used by Internet site architects, designers, and developers. The article does not list all new features, rather focuses on the top 5, subjectively selected by me, across 6 different areas.

 


SharePoint Core Features and Capabilities

First of all, SharePoint Server 2013 uses the reliable and powerful platform introduced in the previous SharePoint versions. The framework provides all necessary core services, features and capabilities, and acts as an outstanding Content Management system.
The authoring and publishing model was extended to build, customize, and maintain publishing sites that meet specific business needs. When building an Internet-facing Web site, the Publishing Portal template and the automatically activated publishing infrastructure are usually leveraged.
SharePoint Server 2013 also takes advantage of previously introduced caching options, such as object, output, BLOB and IIS caching. Additionally, the new Distributed Cache service has been added to improve performance of some SharePoint features.
Although, the service application architecture remained the same, SharePoint Server 2013 brings several new service applications and services, such as Request Management, Machine Translation, App Management and PowerPoint Conversion service applications. Moreover, vast numbers of improvements were implemented on existing service applications (e.g. Search, Managed Metadata, and Word Automation service applications).

Web Site Architecture

SharePoint Server 2013 has taken a new approach to content publishing. It enables you to develop publishing sites that support new, more flexible, and more complex topologies and scenarios. Catalogs, the Content by Search Web Part and Cross-site publishing feature is a new way to reuse content across many site collections. This can be valuable for example in an Internet scenario if you have a catalog of products published on a multilingual Web site. Moreover, the Cross-site publishing model is a good replacement for the Content Deployment model used in previous SharePoint Server versions (but still available in SharePoint Server 2013).


1. Catalogs
A feature that enables content to be reused across site collections. A catalog is defined at the list or document library level. The content from a catalog is crawled by the Search service application and can be displayed by the Content Search Web Parts on other sites.
2. Cross-site Publishing
A site collection feature that uses built-in search capabilities and allows sharing and consuming of catalogs. The feature needs to be activated at the authoring site collection.
3. Content (by) Search Web Part
A very powerful Web part that displays dynamic search results on a publishing site collection. To display the content, you must specify a query. Various styling options can be defined for the Web part.
4. Multiple SPSite URLs
The Set-SPSiteUrl Windows PowerShell cmdlet finally enables a host-named site collection to use multiple URLs (e.g.: http://www.contoso-a.com and http://www.contoso-b.com). You can take advantage of this new feature if you build a multilingual SharePoint Web site based on Cross-site publishing when different public URLs are required per the site collections. For example, in a single web application there are 2 site collections accessible via different URLs:
· Site collection EN
· Site collection PL
5. Managed Navigation

A new way to categorize web pages and build a dynamic navigation structure. The term sets in the Managed Metadata service application can be used to define and maintain navigation. The Managed Navigation can be specified when connecting to a catalog.

Multilingual Sites

SharePoint Server 2010 is powerful platform to build multilingual Internet-facing portals. SharePoint Server 2013 still takes advantage of the same mature multilingual features, such as SharePoint language packs, variations, Multilingual User Interface (MUI), the ASP.NET globalization and resource files, but also introduces some extra features and enhancements.
6. Improved Variations
Variations, the main SharePoint feature that allows building of multilingual sites, has been improved significantly. The functionality is now more flexible and supports automatic content translation. For instance, there is more control over content that is synced between source and target sites.
7. Integration with Cross-site Publishing
Search driven publishing can be leveraged to create multilingual sites and site collections. Cross-site publishing allows rendering content from a multilingual authoring site collection on many publishing site collections. Each publishing site collection can be a host-named site collection created for a particular language (e.g.: http://www.contoso.pl).
8. Improved Metadata Management
Some multilingual improvements and new capabilities implemented in the Managed Metadata service application. For example, translation of terms is supported.
9. Machine Translation Service
The Machine Translation service application can be used to automatically translate a page’s content and terms. Natively implemented in variations.
10. Country Code Top-level Domains
Finally, it is possible to build country code top-level domains, for example: http://www.contoso.pl and http://www.contoso.cz. This can be achieved easily in SharePoint Server 2013 if variations and Cross-site publishing features in an authoring site collection are used. The content from the multilingual authoring sites can be published to different host-named site collections.

Web Page Architecture

SharePoint Server 2013 introduces some enhancements in the web page architecture. Strong emphasis is put on clean HTML markup and lightweight Web pages. Content authors will also like the Word-to-web copy/paste feature and an easy way to create custom error pages on a publishing portal.
11. Cleaner HTML markup
Much cleaner and lightweight HTML markup. No more tables for web parts and zones. CSS was rewritten and remarkably simplified.
12. Image Renditions
Ability to optimize images to improve a Web site’s performance. Images are dynamically rendered depending on the size required and cached in the BLOB cache.
13. Video Improvements

New video rendition feature, embedded videos, automatic thumbnail generation. Video player has an HTML5 implementation (with fallback to Silverlight).
14. Content Copy-Paste
Content authors can copy content from Word, paste it directly into a Rich Text Editor Web Part, Content Editor Web Part or an HTML field control on a page. The Copy-Paste options help to apply correct HTML formatting.
15. Custom Error Pages
A custom HTTP 404 (page not found) error page can be easily customized. Now, by default, all publishing sites contain the new “Error Page” page layout and the PageNotFoundError.aspx page in the Pages document library. You can modify the page and handle the error in a custom way.

Look and Feel

Have you tried to apply new branding in SharePoint 2007/2010? If you are a Web designer and SharePoint developer, it is not difficult. It can be achieved by creating a custom SharePoint master page and CSS files. The problem is that the majority of Web designers know HTML and CSS very well, but they do not understand the ASP.NET master page architecture used by SharePoint, and especially the conversion from HTML to SharePoint master pages is a rather challenging task.
Now, in SharePoint Server 2013, a SharePoint master page can be built directly from a HTML file by a tool called Design Manager. Design Manager automatically converts an HTML file to a SharePoint master page. Further changes in the master page can be done by any Web designer tool (e.g. Expression Web Studio or Adobe Dreamweaver).
Furthermore, thanks to Device Channels, an Internet-facing site can work on practically any device and use the appropriate master page based on a type of mobile device or Web browser.
16. Design Manager
Very powerful tool to brand your site based on HTML & CSS files.
17. Composed Looks
Pre-defined packages of master pages, background images, fonts and color palettes.
18. Theming Model
New theming model that applies colors, fonts and background images.
19. Device Channels
Control the look and feel based on various mobile devices and Web browser types. The site can work on practically any device and use different master pages.
20. HTML 5 Compatibility
Full compatibility with HTML 5.
Extra reading:

Search Engine Optimization (SEO)

The SEO features included with SharePoint Server 2013 help enforce SharePoint Server 2013 as being a great platform to host Internet-facing Web sites.
Now, Internet-facing Web sites based on the Publishing Portal template do not have any nasty HTTP 302 home page redirection and /Pages/ in every URL. SharePoint also automatically creates a robots.txt file in the root of your site collections. Internet crawlers will take advantage of this file and will go to a site map index referenced in the file.
21. No Home Page Redirection
No more HTTP 302 temporary redirection for home pages. Home pages are served directly from an address defined as a host name of the web site e.g.: http://www.contoso.com.
22. Robots.txt and XML Sitemaps
Automatically generated robots.txt file. XML site maps are automatically created and referenced in robots.txt.
23. Friendly URLs
Cleaner URLs (e.g.: lack of /pages in URL, user-friendly URLs). Ability to define friendly URLs for web pages.
24. Canonical URL Filtering
An option to configure which URL parameters are valid and which should be ignored to indicate to search engines whether they influence the content rendered on pages in the site collection or not.
25. SEO Properties
SEO properties are exposed at the site collection, the Managed Metadata service application and page levels. A pages SEO properties allow for example modifying the browser title, meta descriptions and keywords.
Extra reading:

Extensibility

SharePoint Server 2013, like its precursors, is an extensible application platform that can be used as a foundation by application developers to build whatever Internet-facing site they want. The SharePoint 2013 and ASP.NET 4.5 object model is vast. But when considering Internet-facing site development, probably the most significant improvements were applied in the client-side object model, REST and mobile apps development.
26. CSOM
Important changes and improvements in the client side object model (CSOM), for example: remote API via _api alias and access to service applications without server-side code.
27. App Model
New App model to extend SharePoint functionality by using HTML and JavaScript for client-side code. Apps can also execute code in cloud services such as Windows Azure.
28. REST
Representational State Transfer (REST) service that offers an alternative way to interact remotely with the SharePoint object model. You can construct a RESTful HTTP request, using the Open Data Protocol (OData) standard, which corresponds to the desired client object model API. The REST web service handles the HTTP request and serves the appropriate response in either Atom or JSON format. A RESTful HTTP request can be easily used to perform a typical operation against SharePoint sites or lists (e.g. read or update some data).
29. Search
Re-architected Search service application that consolidates FAST Search and SharePoint search features. The new search service brings many enhancements out of the box, for example: a redesigned Search Center, search recommendations, advanced refinements, search analytics and fantastic continuous crawl feature. Furthermore, SharePoint developers can build advanced custom solutions based for instance on a very powerful keyword query language.
30. Mobile
New ways to build mobile apps for SharePoint. Several types of mobile apps are supported, Microsoft Push Notification Service allows for real-time notification of events. Device Channels help to control look and feel.

Conclusion

More than 70% of Fortune 500 companies use SharePoint Products and Technologies for portal, collaboration, search, business intelligence, social computing, record management and/or eDiscovery. The same platform has been used to build fantastic looking and very functional Internet-facing sites for many years. The release of SharePoint Server 2013 brings new powerful features and capabilities that will also be used by Internet portal architects, designers and developers. What’s more, there is nice hosting flexibility as SharePoint Internet sites can be deployed on-premises in a private SharePoint farm, or in the cloud via the Internet-facing Office 365 platform. Finally, the fact that Internet sites will be licensed through SharePoint Server licenses (the SharePoint for Internet Sites license will no longer be required) makes this platform very attractive from a financial point of view.

Referred site for above article : http://blogs.technet.com/b/mspfe/archive/2013/01/29/public-facing-internet-sites-based-on-sharepoint-server-2013.aspx
 

Thursday, November 27, 2014

How to get List Items Count from List Using Visual webpart and ecma script in SharePoint 2010

No comments

Hi  Guys,

Thanks for visiting my blog .

In my previous posts i explained how  to get the list items  count from SharePoint List Using Content editor and ecma script.

In this  Post I would like to explain the same concept using ECMA Script and Visual Studio.

Step :1 Open Visual Studio (Run as Administrator). Create an Empty SharePoint Project.

Step :2 Select Visual Webpart from available templates and add to the Solution .

Step :3 Open ascx file in Webpart. and Add the below Script files in order to refer SP.js files to start
            work with  ECMA Script .

                         <script src="//code.jquery.com/jquery-1.10.2.js"></script>


Step :4 I  want to display the list items count only when the button clicked not by default page gets
             loaded .
                    <input type="button" id="btnSubmit" value="Get The Item Count">.  

Step 5 : Add the Script file .

<script type="text/javascript">

    $(document).ready(function () {
        SP.SOD.executeFunc('sp.js', 'SP.ClientContext', MainFunction);    
    });

    var objContext = null;
    var objWeb = null
    var objList = null;
    var objItem = null;

    function MainFunction() {
        objContext = new SP.ClientContext.get_current();
        objWeb = objContext.get_web();
        objList = objWeb.get_lists().getByTitle("SampleList");  // Passing the list name here.
        objContext.load(objList);

        objContext.executeQueryAsync(Function.createDelegate(this, this.onSuccess), Function.createDelegate(this, this.onFail));
    }

    function onSuccess(sender, args) {
   
        ItemSubmit(); //calls the button Click event.
    }

    function onFail(sender, args) {
        alert('Some error has occured.');
    }


    function ItemSubmit() {
        $("#btnSubmit").click(function () {
            alert('SharePoint Kitchen shows List items count : ' + objList.get_itemCount());
        });
    }

 </script>

 


Please find the screen shot below of code .


Please deploy the solution and place the web part in one site page and test by clicking on the button .
            
 


                      


How to Create Application Page in SharePoint using Visual Studio

No comments


Hi Guys,

Thanks for visiting our blog.

In our previous posts we have  shown you , how we can create a SharePoint Site Page through Out of Box (  Click here for Site Page Creation ) in SharePoint.

In this Post we are going to know how to create Application Pages in SharePoint Using Visual Studio.

Before going to that first we will  have a small description about Application Pages and Site Pages.

Application Pages.
They are same as ASP.net Pages and stored on the layouts folder of SharePoint front end web server. When user requests , application pages are compiled and they are much faster than Site Pages. Admin Pages like settings.aspx, accessdenied.aspx are an example of Application Pages. Thus we can say that Application pages are common to all SharePoint Users.
Note:
1. Application pages such as Create.aspx,Themeweb.aspx. Application pages Can't customized Application pages support code behind file.
2. If we modify the application pages using SharePoint designer then the application pages sits in Content Database.
3.Application pages are shared across all sites on the server, whereas a site page is specific to one site 
Difference between application page and standard  Asp.net page .
The primary difference between an application page and a standard ASP.NET page is that an application page contains content that is merged with a SharePoint master page. A master page enables application pages to share the same appearance and behavior as other pages on a site.

Site Pages.
These Pages are stored in the Content Database and they are parsed when requested by user. A typical web part page is an example of Site Pages. They can be edited, modified by the Power Users and customized according to their needs.

Note : 
1.Visual Studio does not provide templates that help you create site pages for a SharePoint site.
2.Site pages are pages that are created, edited, and customized by end users. They are primarily used for the content in a site.


Lets see how we can create a Application Page using Visual Studio.

Step 1: Open Visual Studio (Run as administartor).

Step 2:  Select the Web Appliaction  and Deploy as Farm Solution



Step 3 :Right Click on Project and Add new Item



                                        Step 4 : Select the Appliaction Page template .



                                          Step 5 : Select the Appliaction Page template .




Step 6 : By Default it  Creates layout folder automatically and places Application page in that folder.





          Step 7 : If  we navigate to the page using URL Then we can able to see the page as below




 Step 8 :  The Physical Location of Application is resides in 14 hive directory .

                 C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\App_Proj
                             
This folder is mapped to an Internet Information Services (IIS) virtual directory called _layouts. Every site and subsite will have access to the application pages by using the _layouts virtual directory. For example, http://myserver/_layouts/settings.aspx and http://myserver/subsite/_layouts/settings.aspx access the same application page on the front-end Web server unlike site pages, which are an instance for the specified site.





This is how we create an Application page in SharePoint 2010 or 2013 .