I create a web application using ASP.net MVC, this project will invoke multiple 3rd party services (YouTube, Vimeo..), and i will cache result in memory, so i am thinking of create Layer (separate project) named it MyApp.Services will contains all services in separate folders
- MyApp.Services
- YouTube
- YouTubeService.cs
- IYouTubeService.cs
- YouTubeConfigurationsFactory.cs
- IYouTubeConfigurationsFactory.cs
- Vimeo
- VimeoService.cs
- IVimeoService.cs
- VimeoConfigurationsFactory.cs
- IVimeoConfigurationsFactory.cs
And will create Factory Class for creating all services configurations and choose between them (ConfigurationsFactory.cs),
And i will create MyApp.Repository will contains dependency injection and VideoRepo to get ready object from Factory class, cache it and use it.
- MyApp.Repository
- dependencyInjection.cs
- VideoRepo.cs
- CacheHelper.cs
- VideoRepoFactory.cs (to choose between them (YouTube or Vimeo))
Is it good design or over engineering design. ? Any better ideas ..
Aucun commentaire:
Enregistrer un commentaire