exercism / discussions

For discussing things like future features, roadmap, priorities, and other things that are not directly action-oriented (yet).
37 stars 5 forks source link

Choosing a software stack for the Exercism reboot #127

Closed ErikSchierboom closed 7 years ago

ErikSchierboom commented 7 years ago

In #113, plans are discussed for a reboot of Exercism. This will probably involve rewriting the front-end application. With a rewrite always comes one extremely important question: which stack to choose? Unfortunately, for client-side applications, the number of potential frameworks can be, well, staggering. There is Angular (1 and 2), React, Aurelia, Knockout, Ember, Vue, and much more. Recently, Matt Burgess tried to provide an unbiased overview of client-side frameworks.

To choose a client-side framework, there are several selection criteria, of which I feel the following are important (in random order):

Perhaps we can have some discussion here on which frameworks people would like to work with and why?

kytrinyx commented 7 years ago

I think these are exactly the right concerns to consider.

kotp commented 7 years ago

The Client Side vs Server Side decision has apparently already been made?

ErikSchierboom commented 7 years ago

@kotp Well, not really I guess. Perhaps I should have made myself more clear and noted that I think using the specified client-side frameworks would be a good choice. It doesn't exclude server-side rendering, but it does imply more focus on client-side code. Perhaps we should be having the client-side vs server-side discussion at this point?

As a side note, almost all the criteria also hold for server-side frameworks. Shall I rephrase?

kotp commented 7 years ago

I just thought that the server side stuff would be decided first, what is going to be used to do the rewrite? Is it PHP, or Rails, Revel, or Phoenix or something else? Perhaps that doesn't even play into the decision for doing client side things...

kytrinyx commented 7 years ago

I don't think the server side language plays into the decision for the client side language, and I'd rather not discuss the backend language in this issue in order to keep this discussion on track.

jtigger commented 7 years ago

FWIW:

ThoughtWorks maintains a technology radar:

jtigger commented 7 years ago

I've personally used Angular 1. I can safely recommend we do NOT use. :)

Scale:

  1. excellent
  2. good
  3. fair
  4. poor
ErikSchierboom commented 7 years ago

Over the last couple of years, I've worked with several frameworks. Here's my take.

Scale:

  1. excellent
  2. good
  3. fair
  4. poor

Angular 1:

I have nothing to add to @jtigger's comments. We really shouldn't be using Angular 1, as it is old and not being updated.

Angular 2/4:

Aurelia:

Knockout:

ErikSchierboom commented 7 years ago

Just came across this nice article on choosing a JavaScript framework.

zachgersh commented 7 years ago

@ErikSchierboom,

I had been talking to @jtigger a bit here in the office (since we work together) and felt like the selection criteria had one hole in it:

I know I have recently waded back into the world of frontend frameworks and have been slightly saddened that most frameworks devs talk about how many problems their framework solves but never mention (or even show examples) of how the whole thing should be tested.

Testing is so important and I believe it is EVEN more important for beginners looking to contribute to a project. A beginner, even if they don't TDD, should be able to play around with the tests or even just read them over to glean an understanding of what a component is supposed to be doing.

I am still struggling to adapt to the best practices for testing on the react project I am doing and I wish that testability had been given a consideration before the technology was adopted.

side note: seems like vue.js actually has docs on their site with testing examples (that is definitely a start)

ErikSchierboom commented 7 years ago

@zachgersh Great point! Totally forgot about that. I've updated my initial post and my response.

zachgersh commented 7 years ago

@ErikSchierboom - thank you for adding it! Could you add more more thing to the criteria for testability.

are there examples on the web of how to structure / write the tests

This one will be huge for when people don't have an example of what the tests are supposed to look like or have to troubleshoot an issue with a test.

ErikSchierboom commented 7 years ago

@zachgersh Done!

jtigger commented 7 years ago

For completeness' sake, I included it in the Angular 1 assessment.

jtigger commented 7 years ago

@zachgersh do you have enough experience with vue.js you'd feel comfortable enough to include an assessment, here?

zachgersh commented 7 years ago

@jtigger sorry for the delay - I unfortunately do not have enough knowledge of vue to be able to comment on its testability.

arumoy-shome commented 7 years ago

I am quite surprised that nobody has mentioned Elm. If you don't already know, Elm is a functional language that compiles down to Javascript. It's quickly becoming very popular due to it's delightful community and is being used in production by companies such as Pivotal and NoRedInk.

This video is a great place to start exploring the language.

kytrinyx commented 7 years ago

Also: http://exercism.io/languages/elm/about :-)

joeljuca commented 7 years ago

I'd rather prefer using more popular tools for the same reasons mentioned above (documentation, adoption, complexity, feature set, performance, tooling, testability), plus community. By using a more popular framework, chances are that peopl already know how to use it. Using a different language, framework, tooling, etc., is tough, since you'll need to learn best practices of the new language, framework and tools, plus understanding how to leverage its community, get help, etc., etc.

Regarding architecture, A decoupled system (web service oriented back-end with mobile/web client apps) might be better for us, since we could split a monolithic project into many, and manage them separately. If for some reason we are forced to use another language/framework/library/tool/etc. for the front-end or back-end we can do it by just respecting the HTTP interface (ideally, we would have an internal lib abstracting the HTTP communication).

When I think about Exercism as a product these arguments gets even stronger. I remember trying to solve an issue in the command line client, but I realized that it was written in Go, so I just gave up. But since Exercism is written Ruby, almost all its contributors are Ruby programmers and the language already have a pretty good community, tool set, etc., I couldn't imagine a good reason for it being written in Go (no need to discuss this matter, I'm just giving an example of how choosing a non popular language/framework might create barriers for contributions).

So, my #2cents: keep Ruby on Rails as back-end - since it's a rock solid platform and is still evolving very well, and choose a front-end frameworks for desktop/front-end/mobile apps. I would use React, since its ecosystem is really good, is growing very fast, everyone knows React and there's even solutions like React Native for mobile development.

kytrinyx commented 7 years ago

Sidebar:

I couldn't imagine a good reason for it being written in Go

The CLI was originally written in Ruby, which was great when there was only one language track. The problem arose when we had people doing languages like Haskell: they needed to install an entire Ruby development environment... just so that they could do Haskell exercises. Go lets us distribute a single binary with no runtime dependencies. You stick it in your PATH and it works. On all the operating systems that we support.

Also: many contributors to Exercism do not know Ruby. Many know Go.

We are trying (and doing a better job of) choosing more common technologies that are better documented and are more likely to attract contributors, while also making choices about the best tool for the job. For the CLI, Go was a good choice at the time, and remains a good choice. For the website Ruby is a good choice, but Sinatra (the current choice) is not. We will use Rails in the next iteration, because the documentation is better, and the standards and conventions are stronger.

For JavaScript it's truly difficult to choose a "standard"—there's really no such thing in the JavaScript world. For anything. And yet, there are certainly things which have a longer history, better documentation, and which have good trade-offs for some situations and not others.

Our final choice will likely depend on both how well-established the technology is, and how much JavaScript we need and what we need it for.

joeljuca commented 7 years ago

@kytrinyx thank you very much for such a great explanation!

ErikSchierboom commented 7 years ago

@kytrinyx At what point in the reboot are we at the moment? Are we anywhere near choosing a software stack?

iHiD commented 7 years ago

Hi @ErikSchierboom. We (Thalamus + @kytrinyx) are currently building out a prototype based on everything we've been discussing from the last few months. The prototype is a straight-forward Rails app (with the API ported into it) and just using standard HTML for the front end. No front-end framework and minimal JS in general. Our aim is to have that launched in the next few weeks. At that point, we'll push it out to the world for all the feedback possible and then either decide it's great and that it should be the permanent solution, or the we'll all decide that it needs lots of things doing and maybe would be better if it was developed using some other tech stack.

The key aim of this process is for us to understand whether all of the concepts and decisions we've made make sense, and whether the UI that we're designing "works" from a product and UX POV. The specifics of the tech that powers it is something I feel less concerned about, so I'm going for established harder-to-make-bugs-in tech, which Rails fits for me.

Does that make sense?

ErikSchierboom commented 7 years ago

@iHiD That makes perfect sense! Looking forward to seeing the results.

kytrinyx commented 7 years ago

We ended up not using a whole lot of JavaScript at all—if this changes, then I think we should reopen this issue.

Thanks everyone for weighing in. This whole v2 prototype process has so many moving parts, it's really great when the community is able to grab one and run with it.