Imagine a web component distributed as a single .js file and containing everything. We would still have our basic style sheets, but the dynamic CSS would be a part of JavaScript. Now this is possible, and one way to achieve it is with CSSX. Similar to JSX, CSSX offers encapsulation. Being able to see all parts of a single component is a big step forward. The separation of concerns defined development for years, but the web is changing. Understanding what is going on is easier when everything is in one place.
Read more…
These frameworks and the whole idea of building mobile apps with JavaScript never appealed to me, though. I always thought, why not just learn Swift/Objective-C or Java and build real apps? That definitely requires a significant amount of learning, but isn’t that what we developers do and should be good at? Quickly learn new languages and frameworks? What’s the point, then? For me, the advantages never outweighed the doubts.
Read more…
Finding little techniques and tricks to help you get to results faster can immensely improve your productivity, so you don’t have to waste time on solutions that will never see the light of day. Vitaly Friedman loves finding those little useful front-end goodies that make our lives easier. Since technologies emerge and evolve permanently, keeping track on what’s going on is often difficult, especially since specifications change and so does the browser support.
Read more…
What is that preload? What does it do? And how can it help you? Preload gives developers the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders incur. In human terms, it’s a way to tell a browser to start fetching a certain resource, because you as authors know that the browser is going to need that particular resource pretty soon.
Read more…
It’s possible to make visually impressive augmented reality projects using just open source libraries. In this tutorial, Martin Sikora will make use of OpenCV in Python to detect circle-shaped objects in a webcam stream and replace them with 3D Earth in Three.js in a browser window while using WebSockets to join this all together. His core idea behind this demo was to use tools that are common on the web and don’t require any prerequisites so anyone can start using them right away. That’s why Martin wanted to use just circle detection and not pattern matching, which would require to print or have some particular real-world object.
Read more…
In this article, James Miller and Mate Marschalko cover the basics of how to get started building for your own IoT devices using JavaScript. When building IoT devices, the task is typically divided between two roles: A hardware engineer creates the physical device, and a developer the ecosystem. However, this is not always necessary. In the case of JavaScript, its isomorphic nature allows for one language to be used across multiple platforms — including hardware. While the prospect of building your own hardware can be daunting, hopefully, after working through these two examples, you’ll be already thinking about the possibilities and planning your next project. Many components are compatible with the Johnny-Five library, meaning that the only limit is your imagination.
Read more…
Enter the amazing world of rational agents, supervised learning and unsupervised learning. Start developing algorithms that can solve daily life problems by simulating the thinking of the human mind. In this article, Arnaldo Perez Castano will describe an artificial intelligence by means of an A* search algorithm for the sliding tiles puzzle. You will be able to compete with friends and create artificial intelligences for this and many other puzzles and games!
Read more…
There have been some amazing quantum leaps in JavaScript tooling which have made it possible for you to dive head first into writing fully ES6 modules, without compromising on the essentials like testing, linting and (most importantly) the ability for others to easily consume what we write. In this article, Jim Cowart is going to focus on how to create a JavaScript package written in ES6 that’s usable in a site or app regardless of whether you’re using CommonJS, asynchronous module definition (AMD) or plain browser global modules.
Read more…
Service workers do a lot of different things; there are myriad ways to harness their powers. In this article, Lyza Danger Gardner explains what a service worker is and how to put together your own by registering, installing, and activating it without any hassle. She decided to build a simple service worker for her website that roughly mirrors the features (provide a customized offline fallback experience, make the website function offline, and increase online performance by reducing network requests for certain assets) that the obsolete Application Cache API used to provide.
Read more…
JavaScript developers faced a great revolution with Node.js, by allowing them to write code that runs directly on their machines. They started to easily write tools for the command line that automate a lot of things in their development cycles. npm, which is bundled with Node.js, made this even easier by giving them quick and easy access to tools that others have created, which they install on their machines to access from wherever they are in their system. Make the most out of it Installing packages from npm globally.
Read more…