Client Side Rendering "Custom Field"

Target:
In SharePoint development make your change as least as can to make customization simple and don't lost any SharePoint features.
If you want to change field displaying in SharePoint list forms, this don't mean replace all list forms make it simple by replacing field html only. Client Side Rendering (CSR) will help us to do this.

Profile Customization From A to Z

Target:
Customize SharePoint Profile properties.

Details:
Demo:
Create custom property with name "gender". By default it renders as textbox, in the following demo we will change this default behavior to make this property renders as radio button.
1-    Open Central Administration site and click on manage service application link.

Custom SharePoint List Forms

Business Cases:

In SharePoint you can customize list forms by different ways.
1-    SharePoint Designer.
Allow you to apply CSS and use JavaScript because the forms are Site Pages, you are restricted from  using code-behind or embedded code. Additionally, SharePoint Designer may not be available to  everyone, nor does it produce a reusable solution. (But you can use this output in visual studio by  using wsp package for the site).
§  Using XSLT.
                                          i.    This way is perfect in small scale of customization like replace SharePoint field by another presenting.
§  Using JavaScript.
                                          i.    You can use this solution for many cases one of them is create cascading dropdown menu.
2-    InfoPath.
§  Is quick and easy and is used throughout SharePoint, particularly for Workflow forms, however, you can't use JavaScript or code-behind for processing, nor can you use CSS to style the form.
3-    Visual Studio.
§  Replace form by application page.
                                          i.    This case is useful when you want to replace all page by another page which you can control everything in it.
                                         ii.    Don't use this solution as you can, because you can create your own custom field and do everything you want.

WCF Services in SharePoint 2013


Target 
How to host WCF service in SharePoint web environment using Visual Studio.

Constraint
To use WCF service in SharePoint you must review the following constraints :-
a.  WCF Security (RunWithElevatedPrivileges) concern:
        When a web application is configured to use claims authentication (Windows claims, form-based authentication claims, or SAML claims), the Internet Information Services (IIS) website is always configured to have anonymous access turned on. Your custom SOAP and WCF endpoints may receive requests from anonymous users. If you have code in your WCF service that calls the RunWithElevatedPrivileges method to access information without first checking whether the call is from an authorized user or an anonymous user, you risk returning protected SharePoint data to any anonymous user for some of your functions that use that approach.
b.  Using dynamic configuration is preferred in SharePoint.
The recommended way to expose a WCF Service through SharePoint  is to NOT manipulate the Web.Config manually/through code to set your WCF bindings.

How to create custom field type in SharePoint ?

Business Cases:

Custom field type in SharePoint is very useful solution for many problems and can be used for several times. It used when you need new type of columns which not found in SharePoint out of the box types. Business Cases which you can use like (color field, Attendance Filed, etc.).I will illustrate these types in the next demos.

To implement custom field types in SharePoint you have 2 methods:
§  Using client-side rendering.
§  Using server-side rendering.