-
Back in the days when trying to slim down JS I used https://github.com/filamentgroup/shoestring Main reason was because they had offered a custom build to only add what you really need.
It looks like cash has that as well, just bit more hidden in the documentation https://github.com/fabiospampinato/cash/blob/master/docs/par... If I'd use it I'd give that a try.
Somehow I still think going with what the browsers have to offer nowadays is a better option - actually it's really good and jQuery isn't really needed anymore. Especially when even the small jQuery alternative is still 6kB, while Preact, a react like lib, is only half the size.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
I used this initially in a browser extension I'm building. Ended up migrating to a JSX library instead, because jQuery turns into hard-to-reason-about code pretty quickly once you're past “simple app” territory (and I say this as someone who wrote my own jQuery-inspired library[1]). Right tool for the job, as they say.
[1]: https://github.com/aleclarson/dough
P.S. If you can cope with jQuery in a medium/large app, good for you. But it's not my cup of tea.
-
The package is called `typed-query-selector`. Here it is in action: https://github.com/GoogleChrome/lighthouse/blob/main/types/i...
-
shoestring
Discontinued A lightweight, simple DOM utility made to run on a tight budget. (by filamentgroup)
Back in the days when trying to slim down JS I used https://github.com/filamentgroup/shoestring Main reason was because they had offered a custom build to only add what you really need.
It looks like cash has that as well, just bit more hidden in the documentation https://github.com/fabiospampinato/cash/blob/master/docs/par... If I'd use it I'd give that a try.
Somehow I still think going with what the browsers have to offer nowadays is a better option - actually it's really good and jQuery isn't really needed anymore. Especially when even the small jQuery alternative is still 6kB, while Preact, a react like lib, is only half the size.
-
Thanks. It's a small custom framework built from libraries, some custom, some third party.
- File based HTTP router running on top of https://frankenphp.dev/
- ORM/SQL with: https://github.com/cycle/orm but this is preference. Anything works. From SQL builders to ORMs.
I'll try to explain their form handling:
Forms almost always POST to their own GET URL.
If you GET /user/save you'll get back HTML and `` to build the form.<p>If you POST /user/save you're expected to pass the entire form data PLUS an "operation" parameter which is used by the backend to decide what should be done and returned.<p>For example if user clicks [add new user] button, the "operation" parameter has value of "btnNewUser.click".<p>Why pass operation parameter? Because business forms can have more than just a [submit] button.<p>For example, there might be a datagrid filter value being changed (operation: "txtFilter.change"), or perhaps a dropdown search to select a city name from a large list (operation: "textCitySearch.change"), it can be a postal code to address lookup (operation: "txtPostalCode.change"), etc.<p>On the backend, the pseudocode looks somewhat like this but it's cleaner/safer because of encapsulation, validation, error handling, data sanitization, model binding and csrf/xss protection:<p><pre><code> function user_save($operation) {
-
Thanks. It's a small custom framework built from libraries, some custom, some third party.
- File based HTTP router running on top of https://frankenphp.dev/
- ORM/SQL with: https://github.com/cycle/orm but this is preference. Anything works. From SQL builders to ORMs.
I'll try to explain their form handling:
Forms almost always POST to their own GET URL.
If you GET /user/save you'll get back HTML and `` to build the form.<p>If you POST /user/save you're expected to pass the entire form data PLUS an "operation" parameter which is used by the backend to decide what should be done and returned.<p>For example if user clicks [add new user] button, the "operation" parameter has value of "btnNewUser.click".<p>Why pass operation parameter? Because business forms can have more than just a [submit] button.<p>For example, there might be a datagrid filter value being changed (operation: "txtFilter.change"), or perhaps a dropdown search to select a city name from a large list (operation: "textCitySearch.change"), it can be a postal code to address lookup (operation: "txtPostalCode.change"), etc.<p>On the backend, the pseudocode looks somewhat like this but it's cleaner/safer because of encapsulation, validation, error handling, data sanitization, model binding and csrf/xss protection:<p><pre><code> function user_save($operation) {
-
The versions of those methods that support any iterator (including upgrading NodeList "for free") have passed Stage 4 of the process, which means they will be in the next version of the standard and already starting to show up in some browsers.
https://github.com/tc39/proposal-iterator-helpers
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives