As of now, the server code base is not as good. Improve it so that it becomes easy to understand and faster to develop.
Some Suggestions
Make a YoutubeVideo class that represents Youtube video. It should be able to render object in many ways -
From video ID
From video URL
From raw HTML
Also, it should be lazy. i.e. it should not load resources from the Internet until requested. e.g. if we rendered an object using video ID, it should not load its description or title until asked for.
Make a YoutubeSearch class that would do all the searching stuff under the hood and return YoutubeSearchResult.
Make a YoutubePlaylist class that would represent a complete Youtube playlist.
Make a ConnectionManager that would manage connection pools and return new connections whenever needed.
As of now, the server code base is not as good. Improve it so that it becomes easy to understand and faster to develop.
Some Suggestions
YoutubeVideo
class that represents Youtube video. It should be able to render object in many ways -YoutubeSearch
class that would do all the searching stuff under the hood and returnYoutubeSearchResult
.YoutubePlaylist
class that would represent a complete Youtube playlist.ConnectionManager
that would manage connection pools and return new connections whenever needed.