Sign Up Now!

Sign up and get personalized intelligence briefing delivered daily.


Sign Up

Articles related to "javascript"


Improving DataView performance in V8

  • CSA is a portable assembly language that allows us to write code directly in TurboFan’s machine-level intermediate representation (IR), and we use it to implement optimized parts of V8’s JavaScript standard library.
  • In order to make it easier for developers to contribute to the optimized JavaScript standard library in V8, and to improve readability and maintainability, we started designing a new language called V8 Torque, that compiles down to CSA.
  • Implementing TurboFan inlining finally allowed us to match, and even exceed, the performance of our Uint8Array wrapper, and be 8 times as fast as the former C++ implementation.
  • We found that our new DataView implementation provides almost the same performance as TypedArrays when accessing data aligned in the native endianness (little-endian on Intel processors), bridging much of the performance gap and making DataViews a practical choice in V8.

save | comments | report | share on


Setting up tape testing framework for basic frontend development

  • Today we are going to learn how we can use tape to test code that is meant to run in a browser.
  • Tape is a javascript testing framework that provides only essential feature set so you can make assertions about your code.
  • If you find yourself needing to mock ajax calls, or websocket connections, or need to monkey patch your module requires, then I suggest you start to look for a more "feature complete" testing framework like jest.
  • But what if you don't trust in JSDOM or simply think is a bad idea to inject global variables in the node process that runs your test, you can try this in different way.
  • Now if you use the webpack-dev-server command, and open a browser on localhost:8080 you'll see nothing but if open the console you'll see tape's test output.

save | comments | report | share on


Demystifying Webpack

  • Let's breakdown the concepts of webpack and understand what happens during the bundling process.
  • A bundler is a utility/program that takes a number of files and puts them together in such a way it doesn't change how the code works.
  • And I defined A.js as my entry point for webpack and the output to be a single bundled file.
  • The first thing webpack will do is analyze the modules that are present and form a dependency graph.
  • Likewise it keeps adding content of the modules to the output file till it has finished traversing the dependency graph.
  • While webpack is creating the graph it also marks whether the module is used or not.
  • The code is quite simple to understand it takes in a moduleId and checks whether that module is present in installedModules cache.

save | comments | report | share on


Framer – Interactive Design Tool

  • Framer X is the only tool that automatically adapts your layout when you resize your canvas and lets you use flexible stacks to easily rearrange elements.
  • Create high-fidelity scrolling, paging, and screen-to-screen transitions with our powerful interactive tools—all you have to do is point and click.
  • Components in Framer X aren’t just any components—they’re fully interactive, reusable pieces that can include everything from live maps to real data to video players.
  • Find everything from interactive design systems to icons and UI elements in the Framer X Store.
  • Use actual React in your projects to create interactive components from scratch.
  • Create custom UI in the properties panel for your components.
  • Easily import your existing production components into Framer X and then start building upon them.
  • Create custom interfaces that display in the property panel so you can completely fine-tune your components.

save | comments | report | share on


$1m to pay open source maintainers on Tidelift

  • We’re dedicated to creating an effective way to do just that, and today we’re announcing a major milestone on our journey, as we pass $1 million committed to pay open source creators on Tidelift.
  • With the Tidelift Subscription, we make it easy for professional software teams to get one-stop shopping for security, licensing, and maintenance assurances for the wide variety of open source software they use.
  • Tidelift makes it possible for open source creators to get paid by adding net-new valuable assurances around their software.
  • Today we’re excited to announce that we’ve reached a significant milestone, with over $1 million in committed payments for maintainers via the Tidelift platform.
  • Together, we are solving acute problems faced by professional software teams who build on open source software, and in so doing we are rewarding the maintainers of that software and supporting their work.

save | comments | report | share on


React router beginners guide

  • In single page apps, there is only single html page.we are reusing the same html page to render the different components based on the navigation.
  • React router gives us three components [Route,Link,BrowserRouter] which help us to implement the routing.
  • Url parameters help us to render the same component based on its dynamic url like in our Users component assume that they are different users with id 1,2,3.
  • Now open your browser and manually type this url localhost:3000/users/1 you will see an object in your console which is passed by the react router.
  • In our routing app, we have three routes which are [home,/users,/contact] Let’s style them using NavLink.
  • We need to add a new prop called activeClassName to the NavLink component so that it applies that class whenever the route it is active.
  • To navigate programmatically we need to take the help of history object which is passed by the react router.

save | comments | report | share on


Why JavaScript is an OOP Language (Even Though It Doesn't Have Classes)

  • The style of OOP where there is no difference between classes and objects is called prototype-based programming (to make our lives easier, we'll call it PBP).
  • I mentioned earlier that in PBP an object contains all of its methods and properties, as well as their actual state.
  • Like everything in programming, PBP and class-based OOP fall in a spectrum of tradeoffs.
  • Regardless of a developers OOP language of choice, the onus is still upon the developer to use the language well to achieve encapsulation (or modularity), to appropriately use polymorphism, and to judiciously apply inheritance (class-based or prototype-based, depending on language).
  • Inheritance is sometimes abused to achieve reuse of the parent (or prototype) functionality rather than used as a polymorphism facility by the caller of methods of a family of objects who provide the same interface (the same contract of behavior).

save | comments | report | share on


Universal next gen css-in-js library in under 1kb

  • Scoped style aims to be a universal library that you can use to style your components while still maintaining a small footprint.
  • It has currently been tested with react, preact and hyperapp.
  • You can use the full power of css just as you are used to.
  • The project is on github.
  • Contributions are highly welcomed.
  • An experienced software engineer who enjoys working on interesting and challenging projects.Open to new opportunities.
  • We’re a place where coders share, stay up-to-date and grow their careers.
  • We strive for transparency and don't collect excess data.

save | comments | report | share on


Lets Build Web Components! Part 1: The Standards

  • I put together a silly little benchmark that builds a simple table three ways: by cloning a template element, by directly using DOM APIs, and by setting innerHTML.
  • For example, the controls in a video element are actually a separate DOM tree which lives, batman-like, in the shadows of your page.
  • With these three standards: Template, Custom Elements, and Shadow DOM, we have everything we need to write rich component UIs that run directly in the browser without needing any special tooling or build steps.
  • The fourth standard, JavaScript Modules, enables us to factor complex apps composed of custom elements and publish our components for others to use.
  • Web components standards let us factor self-contained, reusable UI that runs directly in the browser without cumbersome build steps.
  • These components can then be used anywhere you use regular elements: in plain HTML, or within your app's framework-driven templates.

save | comments | report | share on


Universal css-in-js library in under 1kb

  • Scoped style aims to be a universal library that you can use to style your components while still maintaining a small footprint.
  • It has currently been tested with react, preact and hyperapp.
  • You can use the full power of css just as you are used to.
  • The project is on github.
  • Contributions are highly welcomed.
  • An experienced software engineer who enjoys working on interesting and challenging projects.Open to new opportunities.
  • We’re a place where coders share, stay up-to-date and grow their careers.
  • We strive for transparency and don't collect excess data.

save | comments | report | share on