"RSJS makes JavaScript easy to maintain in a typical web application. It’s written for the typical conventional web app in mind: a collection of HTML pages that occasionally need a bit of JavaScript to make things work."
Anti-patterns addressed:
- Ambiguious sources: It’s not obvious where to look for the JS behavior. (Is the handler attached to .author, .footnote, or .profile-link?)
- Non-reusable: It’s not obvious how to reuse the behavior in another page. (Should blogpost.js be included in the other pages that need it? What if that file contains other behaviors you don’t need for that page?)
- Lack of organization: Making new behaviors gets confusing. (Do you make a new .js file for each page? Do you add them to the global application.js? How do you load them?)
In a nutshell:
- Keep your HTML declarative (get rid of inline scripts).
- Put all your imperative code in JS files.
- Reduce ambiguity by having straight-forward conventions.
- HTML elements can be components that have behaviors.
- Behaviors apply JavaScript to a [data-js-behavior-name] selector.
Some practical tips:
- onmount (interesting but almost no users so far)
- store shared data in
<meta>
tags:function getMeta (name) { return $('meta[property=' + JSON.stringify(name) + ']').attr('content') }
Recipe on how to build a 35$ cloud hosted distributed Python web scrapper.
There is also really interesting advice on the legal aspect of scrapping on this blog: https://benbernardblog.com/web-scraping-and-crawling-are-perfectly-legal-right/
Small JS lib to create smooth transitions between pages.
slideleft / slideright transitions are really nice
js;dr = JavaScript required; Didn’t Read.
Many reasons to disable Javascript:
- Professionalism
- Security
- Tracking
- Resilience
- Performances
- Business & Ethicds: Are we creating a Wealthy Western Web ?
- Accessibility
- Empathy
- React is all about components
- What the flux is JSX?
- You can use JavaScript expressions anywhere in JSX
- You can write React components with JavaScript classes
- Events in React: Two Important Differences
- Every React component has a story
- React components can have a private state
- React will react
- React is your agent
- Every React component has a story (part 2)
Pants supports Java, Scala, Python, C/C++, Go, Javascript/Node, Thrift, Protobuf and Android code.
Amazing svg-based rendering examples
using: https://greensock.com/timelinemax
With examples for React & VueJS, applications to responsive design, page transitions, image compression
<g fill="currentColor">
HTML_CodeSniffer is a client-side script that checks HTML source code and detects violations of a defined coding standard.
It comes with standards that enforce the 3 conformance levels of the Web Content Accessibility Guidelines (WCAG) 2.0
function lazyRender(el, html) {
let cloneEl = el.cloneNode();
cloneEl.innerHTML = html;
window.requestAnimationFrame(function(){
morphdom(el, cloneEl);
});
};
Customizable SVG map visualizations for the web in a single Javascript file using D3.js
Another interesting simple solution, using JS atob base64 decryption function: https://stackoverflow.com/a/41408157/636849
Alt. that creates a download button: http://iamdav.in/2014/10/24/bookmarklet-creating-csv-html-table/
To recap, our findings, Vue’s strengths are:
- Flexible options for template or render functions
- Simplicity in syntax and project setup
- Faster rendering and smaller size
React’s strengths:
- Better at scale, studier and more testable
- Web and native apps
- Bigger ecosystem with more support and tools available
boomerang is a piece of javascript that you add to your web pages, where it measures the performance of your website from your end user's point of view. It has the ability to send this data back to your server for further analysis. With boomerang, you find out exactly how fast your users think your site is.
Free for: max 20,000 Hits, 1 Application, 1 User, 30 Days Data Retention & max 10,000 Errors/Month
Closed-source server backend
Supported languages:
.NET, Adobe Air, Android, Cold Fusion, Drupal, Go, iOS, Java, JavaScript, Python, macOS, Nancy, Node.js, PHP, Ruby on Rails, Unity, WordPress
Closed-source server backend
https://airbrake.io/languages :
Ruby, Rails, Java, Javascript, Magento, Php, .NET, Python, Django, Node.js, Swift, Android, Go, Sinatra, Angularjs, Flask, Ember, Express, Hapi
Open-source server backend of Airbrake (which has a closed-source backend)