DEV Community

Discussion on: Building JavaScript Frameworks to Conquer eCommerce

 
ryansolid profile image
Ryan Carniato

I have a few ideas on how to achieve that. But nothing exists today meets what would be needed. Marko is closest, Qwik has promise. But you need to take aspect of basically both approaches and fast forward about 3 years. I can picture what it looks like mechanically but to actually bring it to where it needs to be, to be consumable is still years away realistically.

Thread Thread
 
redbar0n profile image
Magne

Could it be done at all, starting from an existing SPA approach? Or would it need a fundamental re-architecting from scratch?

Thread Thread
 
ryansolid profile image
Ryan Carniato

It would be hard. I'm looking at this with Solid to a degree. But realistically it is much easier from MPA. I think Qwik is the closest to a SPA friendly approach and even Misko acknowledges the approach isn't compatible with any existing SPA framework because of the way you need to approach the parent child relationship. In Qwik all data is dependency injected. props.children is fundamentally awkward to deal with. I think a smart enough compiler could reconcile these differences and we are incredibly close to doing so with Marko but it takes starting from different core assumptions/restrictions. For instance all data passed between components needs to be serializable. That isn't exactly 100% the way it needs to be (that assumes components are the boudaries like in Qwik) but same category of considerations apply.

I'm hoping as we learn more a path will form here. But right now between Marko and Qwik MPAs are leading the way on this. They will push the boundaries here further before SPA frameworks can catch up to what Marko was doing in 2014. Which is fine since this isn't what SPAs were made for. It's just going to take some time.

Thread Thread
 
luizz4ugusto profile image
Luiz Augusto Schneider da Silva

Take the reversed way, add a serializable tag/props in solidjs.