To get started download the framework and read the Wiki.
Features overview:
- Map Sitecore item fields directly to object properties
- Handle type conversion including IEnumerable<> and IList<>
- Reading and writing to fields
- The ability to create properties for children and parents
- Create, Save and Delete objects directly back to Sitecore
- Create both classes and interfaces
- The service that interacts with Sitecore is interfaced to allow unit testing
- Map item properties directly to object properties e.g. item path, item URL
For more information on these features see the Features page.
The Aim
The aim of the framework is to give the ability to completely model a Sitecore solution and remove the need for complex mapping code, no more of this:
Database db= global::Sitecore.Configuration.Factory.GetDatabase("web");
Item homeItem = db.GetItem("/sitecore/content/home");
HomeClass home = new HomeClass()
{
Content = homeItem["Content"],
Title = homeItem["Title"],
DateTime = DateUtil.IsoDateToDateTime(homeItem["Date"])
//keep adding mappings and type conversions
};
//do some work
Instead we have something simple like this:
ISitecoreService service = new SitecoreService("web");
HomeClass home = service.GetItem<HomeClass>("/sitecore/content/home");
//no mappings, all handled by the framework
//do some work
You can see the markup for the HomeClass on the Simplicity page.
