Add New SharePoint Rich Content Editor Styles

Standard

All of us as a developers face a problem of misuse of the rich content editor that makes SharePoint site content looks very bad.

We always blame SharePoint power users (Content Editors) because we think that they must add a new content in a right way that make their content fits well with the whole site look and feel. On the other hand power users is not a web developer they don’t know about HTML and how to use it.

To eliminate this gab between developers and power users, it is good idea to provide them with a predefined custom styles to be used in editing content. To do this follow the following steps:

  1. Add a new CSS file or use any one referenced by that site
  2. Add new CSS class with the same conventions of the SharePoint Content Editor
  3. Save your file and open the SharePoint Content Editor to make sure your new style is their

Continue reading

Advertisements

Service Locator Pattern In C#

Standard

Have you ever use ASP.NET membership provider? All ASP.NET developers know what is the membership and what is the membership provider. They can easily use one of the providers shipped with .NET framework, they can use a provider shipped with a certain product or they can build their own provider. The behind scene for this functionality is a design pattern called Service Locator. Service Locator Design Pattern is a very useful design pattern to make your software extensible and maintainable. Actually  there are many benefits push you to use this approach especially on the big systems as you can separate any part (Service) of your system and test it, re-implement it and deploy it without affect other running parts of the system because of the loosely-coupled relationship between Application and Service Implementation. We can summarize some its benefits as following:

  1. Perform unit-test in a easier way even on the production servers
  2. Make your Application extensible by a third parties
  3. Maintain your Application in a easier way
  4. Provide your customer by updates and hot-fixes that can be deployed without a complete new build

Continue reading