To create a project with purple run the following command:
npx emerald-templates create-project https://github.com/L1lith/Purple
Purple is a powerful website template based on Astro. It's currently operational but it's still very young. It aims to provide translations baked-in at the HTML level. Read about the translation: How translation could be easier in JavaScript
Feature | Stage |
---|---|
Translation | Beta (functional but very immature) |
Website Template Library | Consideration |
Offline Support | Planned |
I've spent a long time researching a variety of web frameworks (from Ruby on Rails to React & Solid.js) Here's what I learned about good framework design:
Writing apps in JSX is actually quite fun. State solutions in the browser (like MobX and Redux) when combined with rendering libraries seem like the new browser side MVC architecture, and if any of these terms sound confusing that's because they are. By pushing all of our code into the browser as Javascript we make it easy to develop highly interactive apps, and deploy them isomorphically (meaning we can run the same code in the server and the browser).
In a lot of cases this ends up sabotaging the user experience, but it doesn't have to. This problem stems from the fact that HTML is incredibly faster than JavaScript. HTML is "stupid", like a rough rubric of a page. It's super easy to show a page but it breaks down quickly when you want to do something a little more complicated. JavaScript is super smart, and a much easier way to write a powerful app, but due to these capabilities it takes much longer to evaluate. Now appears two (seemingly) diametrically opposed forces:
-
The user who wants to get their page as fast as possible
-
The developer who doesn't really feel like maintaining two separate code bases for the front end and back end, and/or prefers JavaScript for it's nice syntax and good async/streaming capabilities.
Normal apps using JSX run one of the following ways
-
Run everything in the client (Super Slow, the lazy way)
-
Run everything in the server to get the HTML and then re-run everything in the client (Still Slow, easy for devs)
-
Qwik.js runs the code in the server then only parse the JS it needs (Quite fast but it's immature, and it still downloads all the code from my understanding)
I was noticing a trend. To make the best framework you can't get there by comprimising load times. To make the best apps we need to focus on doing as much work in the server as possible, and not dump a whole bunch of code into the browser (this is the symptom of coding tools being poorly optimized, not an inherent trade-off).
New fangled JS frameworks might be on the road to creating better developer tools, but they're still experiencing growing pains. We need to re-evaluate which parts have made developing apps harder not easier compared to "ancient" languages like PHP and Rudolph on Rails. Here's some of the other places I've had the hardest time
-
General lack of high-quality add-on plugins/packages in the ecosystem (leading to the next 2 issues)
-
Support for CSS Modules & Preprocessors
-
Internationalization is very hard
-
Lack of adoption limits a project's potential (less field-testing, contributors, and job opportunities)
Purple is being developed to solve these issues. It strives to seek harmony between user and developer experiences. I previously took a break from this project and now I am rewriting it from scratch. I plan to write as much from scratch as I need to, while still relying on as many high quality open-source projects as possible to improve maintainability.