This content originally appeared on Level Up Coding - Medium and was authored by Layne Sadler
In the context of MVC application development & data science
This post is a prologue for Dash is Deeper than Dashboards.
When Node.js was released in 2009, there was widespread speculation that — given JavaScript’s pre-existing front end dominance and Node’s new backend capabilities — it was just a matter of time until we all became fullstack JS developers. However, that future was never realized.
☯️ The backend/front end divide
Major Web 2.0 players like Facebook & Twitter were busy building upon other languages like PHP (the old guard of web backends) and Ruby — where Model-View-Controller (MVC) frameworks like PHP-Laravel, Rails-Ruby, and Python-Django (not so prominent at the time) greatly simplified the application development process.
It was around this time when the web began to transition from static to real-time content. Social features such as chats, likes, comments, & deep scrolling feeds demanded a more interactive experience, which pushed tools like jQuery & AJAX to their limits. Having to do a full F5 state refresh of a webpage just to check for any potentially new data was no longer acceptable. These were highly uncertain times with hip new JS frameworks coming out every week. It ultimately sparked a battle royale for single-page application dominance between Google’s Angular and Facebook’s React, with the latter ultimately reigning supreme. Vue also emerged as more lightweight best-of-both-worlds. It also provides an alternative for those who are afraid of being swayed by playing in the FANG sandbox.
😵💫 Oil & water
At this point in the story, we’ve got great backend tools & great front end tools. The only problem is that getting them to work together is a total hack job.
Having learned to program on Laravel, built my first startup on Rails, and hacked together numerous Django apps with different data stores & REST API frameworks — the applications I was developing were becoming more advanced and I was getting frustrated with the limitations of one-off AJAX queries and Jinja handlebars. Yet every time I attempted to integrate either React, Vue, or Angular into my Django apps — I came away frustrated. The way I saw it, these backend & front end frameworks just weren’t designed to work together and it was best to wait for a framework that made it more intuitive.
📊 Cloud analytics shook things up
Meanwhile, the analytics space was shaking up the foundations of application development:
- The rise of planet-scale object stores like AWS S3 led to a major shift away from traditional SQL databases. This essentially nullified the role of the relational Model component in MVC pattern.
- Serverless and distributed containerized technologies discouraged monolithic applications in favor of microservice architectures.
- D3.js empowered data scientists to construct interactive visualizations. Plotly charts simplified this process.
- The Python ecosystem surged to the forefront and began to dominate what seemed like every programming use case, especially machine learning. Finding talent for the other programming languages becomes harder.
✨ R Shiny
‘Hobbits really are amazing creatures… You can learn all that there is to know about their ways in a month, and yet after a hundred years they can still surprise you at a pinch.” — Gandalf/Tolkien
Ironically, it is perhaps the most understated and unexpected player that deserves the most credit for changing the game. R is known as the traditional statistician’s programming language. To my knowledge, it had no web frameworks. They say that “necessity is the mother of invention,” and that is certainly the case in the development of R Shiny.
As data science IDEs like RStudio, iPython/ Jupyter, & Spyder began displaying more and more advanced visualizations — it becomes clear that researchers needed a way to interact with dashboards in order to rapidly communicate insight to teams. Fortunately, the corporate arm behind RStudio had the resources champion this effort and they released Shiny in 2012. The structure of a Shiny app is as follows:
- Define logic (callback functions) in the server.R file.
- Define dashboard layout in the app.R
📚 If you want to learn more, I recommend the book, Web Application Development with Shiny (Beeley, Sukhdeve).
The commercial arm of Plotly didn’t release Dash until 2017. So Dash is just an extremely well-executed Shiny clone with the addition of:
- Support for not only Python but also R and later Julia.
- Doing the hard work of wrapping React.
Brief History of Reactive Web Dev was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.
This content originally appeared on Level Up Coding - Medium and was authored by Layne Sadler
Layne Sadler | Sciencx (2022-04-18T01:00:43+00:00) Brief History of Reactive Web Dev. Retrieved from https://www.scien.cx/2022/04/18/brief-history-of-reactive-web-dev/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.