Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public API OC6 - introduce lib/private #4988

Closed
wants to merge 3 commits into from

Conversation

DeepDiver1975
Copy link
Member

As discussed in #4863 (comment) we clearly separate public namespace from private namespace.

lib/public - OCP
lib/private - OC

@karlitschek @blizzz @bartv2 @bantu @icewind1991 THX

@bantu
Copy link

bantu commented Sep 25, 2013

Is there some documentation of the differences between the public and private namespace? Especially documentation of the guarantees of the public namespace?

@DeepDiver1975
Copy link
Member Author

Especially documentation of the guarantees of the public namespace?

The idea is to pump up the PHPDoc on all OCP entities and generate proper api docs on api.owncloud.org

The separation of OC and OCP should already be explained in the existing dev docs afaik

@MorrisJobke
Copy link
Contributor

👍 Clicked a bit around and all works as before.

Conflicts:
	lib/private/vcategories.php
@bantu
Copy link

bantu commented Sep 26, 2013

I am not sure whether this is such a good idea. I remember seing quite a few classes in OCP that are trivial wrappers around equivalent classes in the private namespace. Maintaining these is just unnecessary work. Aren't there alternative approaches? For example, I don't remember Symfony and Doctrine having equivalents of OC and OCP.

@DeepDiver1975
Copy link
Member Author

I remember seing quite a few classes in OCP that are trivial wrappers around equivalent classes in the private namespace.

The new public api will be introduced with oc6 - the basic concept is described in #4459 and #4863
The amount of interfaces will increase/has already been increased dramatically compared to oc5.
This layer made up with interfaces is necessary to provide clearly defined api layer in OCP which will remain stable and we need to make sure not to break at any point in time.
Whereas the implementation in OC is allowed to change and has to change in order to get new functionality into the core.

New APIs are introduced on an additive approach where we add new interfaces and methods to existing interfaces.

Maintaining these is just unnecessary work.

It's additional work - yes - but necessary for sure.

For example, I don't remember Symfony and Doctrine having equivalents of OC and OCP.

Well this comparison is not valid because you upgrade these components on purpose and you are in the position to adopt the changed API calls.
With ownCloud the aim is quite different - more comparable to mobile platforms - as soon as you break the api most probably a lot of apps will not work any more. This is not acceptable for us.
And that's why we actually need to separate implementation from API declaration.

@bantu does that make sense?

@bantu
Copy link

bantu commented Sep 26, 2013

@DeepDiver1975 Yes, that helps. Thanks.

@DeepDiver1975
Copy link
Member Author

Thanks for asking these questions - from time to time I'm lost in details and it's good to get dragged out and see the big picture again! ;-)

@bantu Keep up asking questions and thanks for all the code reviews - much appreciated!

@ghost
Copy link

ghost commented Sep 30, 2013

Test passed.
Refer to this link for build results: https://ci.owncloud.org/job/pull-request-analyser/1278/

@lock lock bot locked as resolved and limited conversation to collaborators Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants