Search This Blog

Sunday, July 26, 2015

List Defination in SharePoint and how to Create List Defination using Visual Studio ?

List Definition 

list definition includes a Feature.xml file, an element manifest file (see List Template Files), and aSchema.xml file within a Feature folder (%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\FEATURES).
  
A list template Feature includes a Schema.xml file that serves as the base file for a list definition. The List element is the root element of a Schema.xml file, which contains default view definitions, definitions for special fields used in the list, the toolbar definition for list views, content type declarations, and other metadata for the list.


Why we need List Definitions?
We need to have List Definitions for creating multiple list instances from it. This is the best way if we are dealing with data capture of same column types.
The built-in list definitions of SharePoint serve the same purpose. Example: Contact List, Task List, etc. Similarly depending on your project domain, it might be a good idea to turn common list formats into list definitions so that you can create multiple instances easily.
For example: a Computer Configuration list definition could be created for later creation of actual lists like Desktops and Laptops.

 How to Create List Definition using Visual Studio  
 
In Visual Studio 2012 select File | New Project
Select Templates | Visual C# | Office/SharePoint | SharePoint 2013 – Empty Project

If you don’t see this type of project available then you may need to download and install the Microsoft Office Developer Tools for Visual Studio 2012
Provide a name and location for the project/solution and OK
In the SharePoint Customization Wizard Prompt, configure the server to use for developing/debugging. If possible you will want to try and achieve a Sandboxed solution over a Farm Solution due to it’s ability to be able to be reused in more scenarios requiring less permission is the SharePoint environment.

Once the new solution has been created, we can use the new Visual Designer to create the List Definition. Right click the project in the solution explorer and select Add | New Item


Select Visual C# Items | Office/SharePoint | List, provide a name and click OK


Provide a display name for the list. We just want to create a list definition, not an instance of the list; This isn’t an option so what we do instead is go with the “Create a customizable list template and a list instance of it” and we will make some mods to the generated project files to remove the list instance so we are just left with the definition.



You should now see the list instance and definition files in solution explorer. 

If you select the SettingsProfile in the solution explorer you will get the new List Visual Designer. Notice the “List” tab, this represents the instance of the list.


Since we only want the list definition, we are going to delete the list instance files from solution explorer. Select SettingProfileInstance, right-click and Delete.


You should now be left with just the list definition, the “List” tab will now be greyed out.

 Deploy the Solution in  your targeted web application .

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

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. CatalogsA 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 PublishingA 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 PartA 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 URLsThe 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 NavigationA 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 VariationsVariations, 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 PublishingSearch 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 ManagementSome multilingual improvements and new capabilities implemented in the Managed Metadata service application. For example, translation of terms is supported.
9. Machine Translation ServiceThe 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 DomainsFinally, 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 markupMuch cleaner and lightweight HTML markup. No more tables for web parts and zones. CSS was rewritten and remarkably simplified.
12. Image RenditionsAbility 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 ImprovementsNew video rendition feature, embedded videos, automatic thumbnail generation. Video player has an HTML5 implementation (with fallback to Silverlight).
14. Content Copy-PasteContent 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 ManagerVery powerful tool to brand your site based on HTML & CSS files.
17. Composed LooksPre-defined packages of master pages, background images, fonts and color palettes.
18. Theming ModelNew theming model that applies colors, fonts and background images.
19. Device ChannelsControl 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 CompatibilityFull 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 PageRedirection 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 SitemapsAutomatically generated robots.txt file. XML site maps are automatically created and referenced in robots.txt.
23. Friendly URLsCleaner URLs (e.g.: lack of /pages in URL, user-friendly URLs). Ability to define friendly URLs for web pages.
24. Canonical URL FilteringAn 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 PropertiesSEO 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 ModelNew 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. RESTRepresentational 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. SearchRe-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. MobileNew 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.