Skip to content

Instantly share code, notes, and snippets.

@alex0112
Created January 3, 2019 00:03
Show Gist options
  • Save alex0112/699b2fd116d77439bfe24b13fc60f313 to your computer and use it in GitHub Desktop.
Save alex0112/699b2fd116d77439bfe24b13fc60f313 to your computer and use it in GitHub Desktop.

Framework options:

A note on architecture:

A microservice based architecture will better suite our needs considering we have one team working on machine learning and another working on application development. It would be best to have our machine learning, API, and front-end client run as separate services unaffiliated with one another except through their respective interfaces. Regardless of which framework or language we end up deciding to use, loosely coupling our view layer with the remainder of the application will improve our likelihood of a clean codebase that will be more easily maintained in the future. I've created an application here that follows this pattern using a Rails 5 API and a ReactJS client, and I'd like to push for something similar with this application.

Pros & Cons

Pros:

  • I'm partial towards rails as a framework due to its rapid development capabilities. Rails will allow us to quickly abstract and define a database and templates out of the box.
  • Many enterprise level apps are written in rails, including Airbnb, GitHub, and Twitch.
  • Rails offers an easy learning curve to new users, which will allow us to onboard and develop in a quick and agile way.
  • Rails offers strong and opinionated conventions that will lead to a consistent codebase, while still providing the flexibility to work around those conventions when the need arises.

Cons:

  • When scaffolding a new application, poor configuration at the beginning can cause problems later in a more stable mature application.
  • For apps that require high performance time, rails is probably not the best choice. However, our app does not fall under that category unless we expect our user capacity to begin exceeding Airbnb, Twitch, and Github.

Pros:

  • Consistent stack if we're using tensorflow.
  • "Explicit is better than implicit" - Python favours a high level of clearness and explicitness in programming, which improves code quality.
  • Rich selection of active libraries to choose from.

Cons:

  • Learning curve
  • Slow development speed
  • Lack of generators
  • Not convention oriented like Rails

Pros:

  • Express is written using Javascript/ES6, one of the most used programming languages in the world. There is no shortage of Javascript developers, so future hiring and maintenance of this project will be easier.
  • Follows an event driven programming model, making its applications both powerful and fast.
  • Rich selection of active libraries to choose from.

Cons:

  • Javascript comes with it's own set of unique problems being an asynchronous language.
  • Whether using npm or yarn, dependency management in Javascript applications can quickly become very messy and consume a lot of developer resources.
  • Learning curve issues.

To conclude: I think Rails will best suit our needs for this project. We can develop our tensorflow & machine learning software as a separate service and use Rails for the web API, with ReactJS as the frontend client. This will allow us to develop quickly and produce a working deliverable product to the market sooner, while still providing a clean consistent codebase for future developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment