angular-cmf / resource

It provides a library for handling cmf resources.
Other
6 stars 0 forks source link

Persister Layer #9

Open ElectricMaxxx opened 9 years ago

ElectricMaxxx commented 9 years ago

To add some flexibility a DEVELOPER wants to switch between different persisters or add an own on.

AC's

ElectricMaxxx commented 9 years ago

@sspringer82 can you help me with that?

I want to make the service, which is able to call the api endpoint, more flexible and keep the interface. So i want to introduce the idea of persisters like doctrine's UoW has it. What would be common way to switch/toggle different services based on some configuration? Idea: keep the ResourceService as it is, with its methods/interface and call a PersisterService to do the work. The current implementation would be moved into a RestApiPersister, but i can imagine to have some LocalStoragePersister with an equal interface.

Would be an abstract factory a good idea? (Not the angular service, the pattern)

ElectricMaxxx commented 9 years ago

I think i will skip that idea to prepare an implement all needed functions for the call to the CMF resources API.

ElectricMaxxx commented 9 years ago

Reopended that ticked as i realized, that the Cmf will have diferent endpoints:

ContentBundle

will provide a REST API to serve Documents based on the configured routes. So that Endpoint can be one done by one Persister. @lsmith77 what is the state of that Endpoint? I think i wanted to do that, right? Is it possible to build same resources (working with Typescript and interfaces in here) as the ResourceRestBundle does?

ResourceRestBundle

will provide a REST API based on the PHPCR tree. Atm the read action is available. So that Endpoint can be done by a separate Persister.

ElectricMaxxx commented 9 years ago

In a skype call with @springer we decided to use the UoW as a so called Provider, so we are able to inject the Persister.