Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
1–10 of 49 posts
Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#2Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#3While it's refreshing to see people talk about the things they did wrong and how they intelligently approached fixing them, building your own javascript framework from scratch (batman) is something I would have said no to from the start. Not for the faint of heart or those who have not suffered such an endeavor before.
Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#4While it's refreshing to see people talk about the things they did wrong and how they intelligently approached fixing them, building your own javascript framework from scratch (batman) is something I would have said no to from the start. Not for the faint of heart or those who have not suffered such an endeavor before.
If I had to guess, none of the solutions back then sufficed for them. Batman has been around for a while.
Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#5The new admin would make a return to more classic architecture with some modernizations. Our approach would be ERB views and server-side rendering, with the use of Turbolinks, and a lightweight custom JavaScript binding system. This allowed us to tackle problems of code duplication and developer productivity in a single blow.
As always, the devil is in the details and I'm looking forward to seeing what their JS binding system looks like, but the pendulum appears to be swinging back towards server-side rendering and models, even amongst the cool kids.
I have been working on a small library for doing HTML partial AJAX programming, using fairly straight-forward HTML attributes and traditional server side rendering (plus some goodies like custom HTTP header support, timers, etc.):
I'm using it successfully in a few projects and very much enjoy the simplicity of the whole approach when contrasted with full MVC systems.
Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#6Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#7Money quote from the article: The new admin would make a return to more classic architecture with some modernizations. Our approach would be ERB views and server-side rendering, with the use of Turbolinks, and a lightweight custom JavaScript binding system. This allowed us to tackle problems of code duplication and developer productivity in a single blow. As always, the devil is in the details and I'm looking forward…
Clearly at this point both architectures work, it's childish to see this as an argument for server-side rendering. Obviously it works, so do client MVC systems.
The value in this article is the humble detailing of their mistakes that many of us also experience in our careers.
Re: Rebuilding the Shopify Admin: Deleting 28k lines of JavaScript
#8Earlier quoted context omitted.
If I had to guess, none of the solutions back then sufficed for them. Batman has been around for a while.
You're dead on. We started work on Batman some time ago now - options then were quite limited.
Most frameworks weren't even at 1.0 stable yet. I initially wrote a fairly extensive prototype with Ember, but there were breaking changes so frequently I couldn't keep up with the learning curve. In the end I chose Angular because it had the best documentation, Google dogfooding, and testing was an obvious priority. Worked out so well we're on our 4th major Angular app now.