joyn

joyn

18 Followers
joyn is your streaming app with over 50 live TV channels, exclusive previews, originals, and collections.

Decisions 12

Oleksandr Fedotov

Senior Software Engineer at joyn

Initially making a decision to use Flow vs Typescript we decided to go with flow as we wanted our code to run in a way we wrote it, because when using Flow types are simply removed from the code without modifying the code itself. Sadly, the type system of Flow was in some cases very hard to understand and declare the types correctly, especially in cases when the structure is very dynamic (e.g. object keys and values are created dynamically). Another reason was bad integration with IDE and frequent crashes which made DX very poor. Therefore, we made another evaluation of Typescript and decided to move towards it. As our code base was pretty big when we decided to migrate to TS we couldn't just stop and re-write everything, that's why we started writing new modules in Typescript as well as transforming old components. To make that possible we had to configure Webpack loader to support simultaneous bundling of Flow&JS and Typescript. After around 2 months of the transformation we have around 40% of code being written in Typescript and we are more than happy with integration TS has with IDE, as well as ease of declaring types for dynamic modules and functions.

4 13.3K

Oleksandr Fedotov

Senior Software Engineer at joyn

As we have to build the application for many different TV platforms we want to split the application logic from the device/platform specific code. Previously we had different repositories and it was very hard to keep the development process when changes were done in multiple repositories, as we had to synchronize code reviews as well as merging and then updating the dependencies of projects. This issues would be even more critical when building the project from scratch what we did at Joyn. Therefor to keep all code in one place, at the same time keeping in separated in different modules we decided to give a try to monorepo. First we tried out lerna which was fine at the beginning, but later along the way we had issues with adding new dependencies which came out of the blue and were not easy to fix. Next round of evolution was yarn workspaces, we are still using it and are pretty happy with dev experience it provides. And one more advantage we got when switched to yarn workspaces that we also switched from npm to yarn what improved the state of the lock file a lot, because with npm package-lock file was updated every time you run npm install, frequent updates of package-lock file were causing very often merge conflicts. So right now we not just having faster dependencies installation time but also no conflicts coming from lock file.

3 44.8K

Oleksandr Fedotov

Senior Software Engineer at joyn

Simple but flexible API for web, what allows us to have a very quick start of using this tool and doesn't cause any headaches exploring the specification. Flexible API allows to easily override some default properties in the context. Issues with inconsistent data can be resolved very easy and fast with real-time debugging.

3 1.6K

Oleksandr Fedotov

Senior Software Engineer at joyn

As we work in the area of smart TVs, performance optimization is a very important aspect for us. That's why we want to have a full control of the data we are receiving over the network. Graphql allows to solve exactly this problem, so you will receive only the data you need, this way you can prevent overfetching, which does not only influence network bandwidth, but also computation resources needed to parse the JSON. Another good reasons to go with Graphql are data schema and analysis of your queries which prevents many errors (like property name mismatch, invalid nesting, etc.) already during the development time. Last but not least, it's very easy to understand what data the component is using just by looking at the declarative structure of the query which is used for this component, so no more need to run the application in the debug mode to see what data is received in the component as an input.

2 1.5K

Followers 18