zikula-modules / DizkusModule

Official repository for Dizkus, a fully integrated forum solution for Zikula 1.4+
21 stars 7 forks source link

Api refactor #293

Closed Kaik closed 7 years ago

Kaik commented 8 years ago

We need to discuss files and functions new placement that are in Api directory. AccountApi - LinkContainer AdminApi - LinkContainer BlockApi - ? CronApi - ? FavoritiesApi - ? ForumApi - some functions are not needed smarty helpers, some can be replaced by Entity/Repository ModeratorsApi - one funcion NotifyApi - ? ParseTagsApi - quote and code tags handler PermissionsApi - ? PostApi - Repository - ? PrefsApi -LinkContainer ? RankApi - ? SyncApi - ? service TopicApi - Entity/Repository - ? UserApi - various -? UserDataApi - ? on function.

Please look those files and let me know what you think @craigh @cmfcmf @Guite

craigh commented 8 years ago

API means something that is useful outside this application - intended to be used outside the application. It seems unlikely that ANY of those functions are truly APIs.

Basically, they should all be moved to helper services or replaced by repository functions, etc. and the API tag/name must be removed it it really isn't an API. 😄

Kaik commented 8 years ago

I'm pretty sure that Api folder will go. I'm asking because you might have some good ideas where to put some of those. I bet I will ask you about some functions where to move it service-repo that is why I have created this issue to have, a place to discuss it :dancers:

Kaik commented 8 years ago

I need to spend some time to find a good place/replacement for each function. Will be back soon 3-4 days.

Guite commented 8 years ago

CronApi, FavouritesApi, NotifyApi, RankApi are probable candidates for services.

craigh commented 8 years ago

if it has no dependencies, it can just be a standalone class...

Kaik commented 7 years ago

Ok api s done and with it most of dizkus. I will back soon to finish what is left bit by bit...