U4-945 - New Low Level API

Created by Morten Christensen 03 Oct 2012, 08:01:36 Updated by Morten Christensen 04 Jan 2013, 11:00:30

Parent for: U4-955

Parent for: U4-956

Parent for: U4-957

Parent for: U4-958

Parent for: U4-959

Parent for: U4-960

Parent for: U4-961

Parent for: U4-962

Parent for: U4-963

Parent for: U4-964

Parent for: U4-965

Parent for: U4-966

Parent for: U4-967

Parent for: U4-968

Parent for: U4-969

Parent for: U4-970

Parent for: U4-971

Parent for: U4-972

Parent for: U4-973

Parent for: U4-974

Parent for: U4-975

Parent for: U4-976

Parent for: U4-977

Parent for: U4-978

Parent for: U4-979

Parent for: U4-980

Parent for: U4-981

Parent for: U4-982

Parent for: U4-983

Parent for: U4-984

Parent for: U4-985

Parent for: U4-986

Parent for: U4-987

Parent for: U4-988

This post is just a container for the tasks related to creating the new low level API, which will be introduced in version 6.1.0.

The new low level API involves creating new Repositories, Factories, Unit of Work (Umbraco.Core.Persistence) and DTOs (Umbraco.Core.Models.Rdbms) for the current database schema.

  • POCO DTOs, which corresponds to a table in the database schema and decorated with PetaPoco attributes.
  • Repository Resolver, which will resolve a repository based on the entity and configuration in web.config.
  • MacroPropertyType resolver, which will resolve the MacroPropertyTypes that implement IMacroPropertyType (this is done in order to avoid a database lookup in the [cmsMacroPropertyType] table and treat the types as plugins instead).

Repositories

  • ContentRepository implementation
  • ContentTypeRepository implementation
  • MediaTypeRepository implementation
  • DataTypeDefinitionRepository implementation
  • DictionaryRepository implementation
  • LanguageRepository implementation
  • MacroRepository implementation
  • MacroPropertyType Resovler
  • MediaRepository implementation
  • RelationRepository implementation
  • ScriptRepository implementation
  • StylesheetRepository implementation
  • TemplateRepository implementation
  • ''Note that we can't using caching on the repositories as long as we have to go through a Document when publishing''

Factories

  • Factory used by the ContentRepository to map to/from DTO
  • Factory used by the ContentTypeRepository to map to/from DTO
  • Factory used by the MediaTypeRepository to map to/from DTO
  • Factory used by the DataTypeDefinitionRepository to map to/from DTO
  • Factory used by the DictionaryRepository to map to/from DTO
  • Factory used by the LanguageRepository to map to/from DTO
  • Factory used by the MediaRepository to map to/from DTO
  • Factory used by the RelationRepository to map to/from DTO

Unit of Work

  • IUnitOfWork and IUnitOfWorkProvider implementation
  • PetaPoco specific implementation
  • File implementation (simple non-db impl. of UnitOfWork)

Cache Providers

  • NullCache provider
  • InMemory provider
  • RuntimeCache provider

Serialization

  • Port the serialization service from v5 to the codebase

Querying

  • Implement a simple query object that allows LINQ type queries and translates to SQL.
  • Implement a SqlTranslator for the query object.
  • Create custom PetaPoco mapper, which allows the Public API classes to be translated to Sql with the right column and table names.

Comments

Priority: Normal

Type: Feature (planned)

State: Fixed

Assignee:

Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 6.0.0

Sprint:

Story Points:

Cycle: