Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon

Tech News - Front-End Web Development

158 Articles
article-image-primetek-releases-primereact-2-0-0-beta-3-version
Fatema Patrawala
28 Aug 2018
2 min read
Save for later

PrimeTek releases PrimeReact 2.0.0 Beta 3 version

Fatema Patrawala
28 Aug 2018
2 min read
PrimeTek announced a brand new theming engine PrimeReact bringing the Nova theme family and the PrimeReact Theme Designer tool to create your own themes with ease. PrimeReact theming infrastructure has been reimplemented from scratch and the Nova theme family has been introduced to give a modern and premium look to the components. Nova themes are open source under MIT license and the css ships with PrimeReact. You can experience the live demo that runs on Nova. Please note that older themes are removed as they can no longer support the new engine. The premium themes such as Ultima, Serenity, Avalon will be updated to PrimeReact 2.0.0 by mid September. Additional features in PrimeReact 2.0.0 PrimeReact designer API is a SASS based theme engine to create PrimeReact themes easily featuring over 500 variables, a demo application and a base sample theme. If you have your own style guide or need a custom theme quickly, Designer API is a perfect tool to design and bring them to existence. Designer also includes the SASS structure and whole variables of Nova theme family, so if you’d like to customize Nova, you may consider Designer as well. Team has also spent significant time on improving the overall quality of maintenance issues. “PrimeReact is very close to 2.0.0-Final release, two remaining main tasks are rewriting the Tree and TreeTable components, we plan to release 2.0.0-Final by the end of September.”, says the PrimeReact team. Is your web design responsive? Tips and tricks to optimize your responsive web design Is novelty ruining web development?  
Read more
  • 0
  • 0
  • 2823

article-image-babel-7-released-with-typescript-and-jsx-fragment-support
Sugandha Lahoti
28 Aug 2018
3 min read
Save for later

Babel 7 released with Typescript and JSX fragment support

Sugandha Lahoti
28 Aug 2018
3 min read
Babel 7 has been released after 3 years of wait after Babel 6. Babel is a JavaScript compiler. It is mainly used to convert ECMAScript 2015+ code into a backward compatible version of JavaScript. Babel gives developers the freedom to use the latest JavaScript syntax without developers worrying about backward compatibility. It has been going strong in the Javascript ecosystem. There are currently over 1.3 million dependent repos on GitHub, 17 million downloads on npm per month, and hundreds of users including many major frameworks (React, Vue, Ember, Polymer), and companies (Facebook, Netflix, Airbnb).   Major Breaking Changes All major changes can be done automatically with the new babel-upgrade tool. babel-upgrade is a new tool that automatically makes upgrade changes: currently with dependencies in package.json and .babelrc config. Drop support for un-maintained Node versions: 0.10, 0.12, 4, 5 Introducing @babel namespace to differentiate official packages, so babel-core becomes @babel/core. Deprecation of any yearly presets (preset-es2015, etc). Dropped the "Stage" presets (@babel/preset-stage-0, etc) in favor of opting into individual proposals. Some packages have renames: any TC39 proposal plugin will now be -proposalinstead of -transform. So @babel/plugin-transform-class-properties becomes @babel/plugin-proposal-class-properties. Introduced a peerDependency on @babel/core for certain user-facing packages (e.g. babel-loader, @babel/cli, etc). Typescript and JSX fragment support Babel 7 now ships with TypeScript support. Babel will now get the benefits of TypeScript like catching typos, error checking, and fast editing experiences.  It will enable JavaScript users to take advantage of gradual typing. Install the Typescript plugin as npm install --save-dev @babel/typescript The JSX fragment support in Babel 7 allows returning multiple children from a component’s render method. Fragments look like empty JSX tags. They let you group a list of children without adding extra nodes to the DOM. Speed improvements Babel 7 includes changes to optimize the code as well as accept patches from the v8 team. It is also part of the Web Tooling Benchmark alongside many other great JavaScript tools. There are changes to the loose option of some plugins. Moreover transpiled ES6 classes are annotated with a /*#__PURE__*/ comment that gives a hint to minfiers like Uglify and babel-minify for dead code elimination. What’s Next There are a lot of new features in the works: plugin ordering, better validation/errors, speed, re-thinking loose/spec options, caching, using Babel asynchronously, etc. You can check out the roadmap doc for a more detailed version. These are just a select few updates. The entire changes are available on the Babel blog. TypeScript 3.0 is finally released with ‘improved errors’, editor productivity and more The 5 hurdles to overcome in JavaScript Tools in TypeScript  
Read more
  • 0
  • 0
  • 5425

article-image-electron-fiddle-a-code-playground-for-experimenting-with-cross-platform-native-apps
Bhagyashree R
13 Aug 2018
3 min read
Save for later

Electron Fiddle: A ‘code playground’ for experimenting with cross-platform native apps

Bhagyashree R
13 Aug 2018
3 min read
Another “code playground” Electron Fiddle comes into the market for enabling developers create, share, and play with small Electron experiments. Electron Fiddle attempts to bring this “fiddling effect” to Electron, a framework for creating cross-platform native applications with web technologies like JavaScript, HTML, and CSS. It provides you with a quick-start template - just change few things, choose the Electron version you want to run it with, and play around. It also gives you an option of saving it as GitHub Gist or to a local folder and anyone can try your Fiddle by just entering it in the address bar. How Electron Fiddle works? 1. Each Fiddle has three files: A Main script A renderer script An HTML file Source: GitHub 2. Choose an Electron Version: Electron Fiddle knows about all released Electron versions. Open the Preferences window to see all available versions, download them and delete the ones which you don’t need. Source: GitHub 3. Run your Fiddle: Hit the RUN button to give your Fiddle a try and start it. Source: GitHub 4. Share your Fiddle: Save your Fiddle as a public GitHub Gist - this will allow other users to load it by pasting the URL into the address bar. If they don't have Electron Fiddle, they can see and download your code directly from GitHub. Source: GitHub You can also package your Fiddle as a standalone binary or as an installer from the Tasks menu: Source: GitHub What are the features it comes with? A good coding experience It uses Monaco Editor by Microsoft, which also powers VS Code, giving users the common benefits of a modern code editor: Code highlighting Basic JavaScript error checking Refactoring Auto-completion Share your work with the community If you are eager to share your work or a bug with the Electron community, you can do that just with a click of a button. To make your Fiddle accessible to those who do not have Electron Fiddle installed, you can share it as a GitHub Gist. Compile and package your Fiddle as an app   With the help of Electron Forge, a command line interface for Electron applications, you can turn your Fiddles into binaries and share it as a app for Windows, macOS, or Linux. A good starting point, continue anywhere you like If you have just started using Electron, Electron Fiddle provides you with a basic introduction of the Fiddle and usage examples for every single Electron APIs. You can export your project with or without electron-forge and then use your favorite editor for further development. With an easy installation process you can start using and experimenting with Electron Fiddle now! You can download it from its GitHub repository. To know more, refer to the announcement on Medium by Felix Rieseberg. HTML5 and the rise of modern JavaScript browser APIs [Tutorial] How to build a weather app using Kotlin for JavaScript Firefox 60 arrives with exciting updates for web developers: Quantum CSS engine, new Web APIs and more
Read more
  • 0
  • 0
  • 6328
Banner background image

article-image-node-js-announces-security-updates-for-august-2018
Sugandha Lahoti
13 Aug 2018
3 min read
Save for later

Node.js announces security updates for all their active release lines for August 2018

Sugandha Lahoti
13 Aug 2018
3 min read
The Node.js team have announced new updates about their August 2018 releases. Per their blog, new versions for each of their supported lines will be released on, or shortly after, the 15th of August, 2018. These releases will address flaws of low severity mostly incorporating a number of security fixes and an upgraded version of OpenSSL. However, the Node.js 10 Current release will not be limited to only security-related updates, as per policy for non-LTS release lines. The releases will also include disclosure of details of the flaws addressed, allowing users to assess the severity of the impact on their own applications. Upgrades to OpenSSL There are two new upgrades to OpenSSL. OpenSSL 1.1.0i and 1.0.2p will be made available on the 14th of August, 2018. These releases will cover three low severity security fixes. Out of these three, two releases are relevant to Node.js users. Client DoS due to large DH parameter: During key agreement in a TLS handshake using a DH(E) based ciphersuite, a malicious server can send a very large prime value to the client. This will cause the client to spend an unreasonably long period of time generating a key, resulting in a hang until the client has finished. This could be exploited in a Denial Of Service attack. ECDSA key extraction via local side-channel: The OpenSSL RSA Key generation algorithm is vulnerable to a cache timing side channel attack. An attacker with sufficient access to mount cache timing attacks during the RSA key generation process could recover the private key. All versions of Node.js 6.x (LTS "Boron") and 8.x (LTS "Carbon") are impacted via OpenSSL 1.0.2. OpenSSL 1.1.0 impacts all versions of Node.js 10.x (Current). All OpenSSL fixes are available on the OpenSSL git repository. Security inclusions in Node.js Apart from OpenSSL upgrades, the August 2018 upgrades also feature security inclusions: Unintentional exposure of uninitialized memory Out of bounds (OOB) write All actively supported release lines of Node.js are impacted by these flaws. Additional inclusions In addition to OpenSSL and security upgrades, the following items are also included for LTS release lines: In inspector the bind address is changed from 0.0.0.0 to 127.0.0.1 so that the bind address can be overridden by the user. This upgrade impacts Node.js 6.x (LTS "Boron") only. In test, keys/Makefile, are updated to clean and build all. This upgrade impacts the test suite for all actively supported release lines of Node.js. The announcement can be read at the Node.js Blog. You can also have a look at the current security policy. Node 10.0.0 released, packed with exciting new features Deploying Node apps on Google App Engine is now easy How is Node.js Changing Web Development?
Read more
  • 0
  • 0
  • 4573

article-image-vue-cli-3-the-standard-build-tool-for-vue-applications
Sugandha Lahoti
13 Aug 2018
3 min read
Save for later

Vue CLI 3.0 is here as the standard build toolchain behind Vue applications

Sugandha Lahoti
13 Aug 2018
3 min read
The team behind Vue has announced Vue CLI 3.0 as the standard build tool behind Vue applications. Vue CLI 3.0 minimizes the amount of configuration developers have to go through. At its core, it provides a pre-configured build setup on top of webpack 4 with features such as hot module replacement, code-splitting, tree-shaking, efficient long term caching, etc. Vue CLI3.0 also comes with a Modern mode where developers can ship native ES2017+ bundle and legacy bundle in parallel. Developers have a Multi-page mode to build an app with multiple HTML/JS entry points. Also, they can build Vue Single-File Components into a library or native web components. Developers are also provided with optional integrations (TypeScript, PWA, Vue Router & Vuex, ESLint / TSLint / Prettier, Unit Testing via Jest or Mocha, E2E Testing via Cypress or Nightwatch) that they can use when creating a new project. Vue CLI 3.0 comes with Zero configuration In most cases, developers just need to focus on writing the code. On scaffolding a project via Vue CLI 3.0, all redundant work such as installing the Vue CLI runtime service, selected feature plugins, and the necessary config files are done automatically. Vue CLI also ships with the vue inspect command to help developers inspect the internal webpack configuration with no ejection required to make small tweaks. A powerful Plugin system Vue CLI 3.0 has an extensible Plugin system which can inject dependencies and files during the app’s scaffolding phase tweak the app’s webpack config or inject additional commands to the CLI service during development. Developers can also create their own remote preset to share their selection of plugins and options with other developers. Instant Prototyping Vue CLI 3’s vue serve command, allows developers to start prototyping with Vue single-file components, without waiting for npm install. The prototyping dev server comes with the same setup of a standard app. This allows developers to easily move the prototype *.vue file into a properly scaffolded project’s src folder to continue working on it. Modern Mode Vue CLI 3.0 has a modern mode with produces two versions of an app. First, a modern bundle targeting modern browsers that support ES modules, and second a legacy bundle targeting older browsers not supporting ES modules The modern bundle is loaded with <script type="module">, in browsers that support it. The legacy bundle is loaded with <script nomodule>, which is ignored by browsers that support ES modules. Modern mode can be activated using the following command: Vue-cli-service build --modern This release focuses on making Vue CLI as the standard build toolchain for Vue applications. However, the longer-term goal for Vue CLI is to incorporate best practices from both the present and the future into the toolchain. Vue CLI 3.0 can be tried by following the instructions from the docs. The list of all updates are available on the Vue Medium Blog. Introducing Vue Native for building native mobile apps with Vue.js Why has Vue.js become so popular? How to navigate files in a Vue app using the Dropbox API
Read more
  • 0
  • 0
  • 5257

article-image-v8-javascript-engine-releases-version-6-9
Melisha Dsouza
08 Aug 2018
4 min read
Save for later

V8 JavaScript Engine releases version 6.9!

Melisha Dsouza
08 Aug 2018
4 min read
The newest version of V8 is now out in its beta form and is expected to go fully live with the Chrome 69 Stable in a couple of weeks time. Considering that there is a new branch of V8 created every 6 weeks, this newly released version of the JavaScript Engine has multiple features that will have developers on the lookout for its full and proper release. Here are some of the features that are expected to improve the previously released versions. Embedded built-ins saving memory The newly released version supports a host of built-in functions. Examples are methods on built-in objects such as Array.prototype.sort and RegExp.prototype.exec, but also a wide range of internal functionality. Built--in functions cause a huge overhead as they are complied at build-time. They are then serialized into a snapshot and finally deserialized at runtime to create the initial JS heap state. In the entire process, they consume around 700KB in each Isolate (an Isolate roughly corresponds to a browser tab in Chrome). To combat this issue, V8 V6.4 included lazy deserialization which meant that that each Isolate only paid only for the built-ins that it actually needs (but each Isolate still had its own copy). Embedded built-ins take this feature a notch higher. This is shared by all Isolates, and embedded into the binary itself instead of copied onto the JavaScript heap. This means that built-ins exist in memory only once regardless of how many Isolates are running. This has led to a 9% reduction of the V8 heap size over the top 10k websites on x64. Of these sites, 50% save at least 1.2 MB, 30% save at least 2.1 MB, and 10% save 3.7 MB or more. Improved performance Liftoff, WebAssembly’s new baseline compiler, helps complex websites that use big WebAssmbly modules to start up faster. Depending on the hardware, there is more than 10x increase in the speed of the system when the latest V8 is used. Faster DataView operations DataView methods have been revamped in V6.9. As compared to previous versions, where calling C++ was costly, this new version has reduced the same. Moreover, using DataViews is now proving to be efficient thanks to the inline calls to DataView methods when compiling JavaScript code in TurboFan. This has resulted in better peak performance for hot code. Faster processing of WeakMaps during garbage collection V8 v6.9 also looks at improving WeakMap processing. It reduces Mark-Compact garbage collection pause times thus leading to faster operations. Concurrent and incremental marking can now process WeakMaps. Previously all this work was done in the final atomic pause of Mark-Compact GC. Since moving all of the work outside the pause isn’t suitable, the GC now also does more work in parallel to further reduce pause times. These optimizations essentially halved the average pause time for Mark-Compact GCs in the Web Tooling Benchmark. WeakMap processing uses a fixed-point iteration algorithm. This can degrade to quadratic runtime behavior in certain cases. The new release is now able to switch to another algorithm that is guaranteed to finish in linear time if the GC does not finish within a certain number of iterations. Previously, the GC took a few seconds to finish even with a relatively small heap, while the linear algorithm finishes the processing within a few milliseconds. Head over to the github page for more information on V8. You can also visit the official blog of the V8 javaScript engine for more clarity on the release. 5 JavaScript machine learning libraries you need to know HTML5 and the rise of modern JavaScript browser APIs [Tutorial] JavaScript async programming using Promises [Tutorial]
Read more
  • 0
  • 0
  • 3470
Unlock access to the largest independent learning library in Tech for FREE!
Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
Renews at $19.99/month. Cancel anytime
article-image-angular-7-beta-0-is-here
Natasha Mathur
06 Aug 2018
3 min read
Save for later

Angular 7 beta.0 is here!

Natasha Mathur
06 Aug 2018
3 min read
After the release of Angular 6.1.0 last month, Angular 7 beta.0 is here. The new version, released last week, explores new features, bug fixes and other updates among others. Angular 7 beta.0 includes a new feature, namely, Angular Compatibility Compiler (ngcc).This new compiler helps convert the node_modules, which have been compiled with ngc, into node_modules that appear to have been compiled with ngtsc. This conversion, further, allows these “legacy” packages to be used by the Ivy rendering engine. Also, XMB placeholders ( <ph>) have been updated to include the original value on top of an example. Now placeholders can have one example(<ex>) tag and a text node. The compiler has been updated to flatten nested template fns. Apart from the newly added compiler features, there are certain bug fixes included as well. In Bazel, compile_strategy() is now used to decide whether to build Angular code using ngc (legacy) or ngtsc (local). compile_strategy() is importable in Angular 7 beta.0 to enable g3 BUILD rules to switch properly. It also allows ivy testing in g3. In Ivy, Template functions are no longer nested inside each other. The parent contexts are re-defined explicitly through an instruction, instead of nesting the functions and using closures to get parent contexts. This gets rid of the need to create multiple function instances for loops that are nested inside other loops. TView.components are no longer used for directive indices (just host element indices). The components array can be cut in half as the context for components is now being stored in the component’s LViewData instance. There’s also a new instruction, reference() (r()) in Angular 7 beta.0. Earlier, closures were used to get access to local refs in parent views. With nested template functions being flat now; we need another way to walk the view tree. reference takes a nesting level, and the local ref’s index then walks the view tree to find the correct view and loads the local ref.w. from there. Angular 7 beta.0 is now enabled with better error handling for @output in cases where the property is not initialized. Angular 7 will be released sometime in September/October 2018. For more information on the latest Angular 7 beta.0 release, check out the official release notes. Angular 6.1.0 is here! Build user directory app with Angular [Tutorial] Why switch to Angular for web development – Interview with Minko Gechev ng-conf 2018 highlights, the popular angular conference  
Read more
  • 0
  • 0
  • 4899

article-image-uber-introduces-fusion-js-web-development-framework
Sugandha Lahoti
02 Aug 2018
3 min read
Save for later

Uber introduces Fusion.js, a plugin-based web development framework for high performance apps

Sugandha Lahoti
02 Aug 2018
3 min read
Uber has revamped their monolithic framework design with a brand new Fusion.js web framework. This plugin-based open source web framework makes it easy to develop lightweight and high-performing apps. Fusion.js is a JavaScript framework that comes with modern features like hot module reloading, data-aware server-side rendering, and bundle splitting support. It also supports popular libraries like React and Redux. Why was Fusion.js required? Uber has been in the app-development business for quite some time now. With the quickly changing web technologies, they wanted to build a high quality framework with modern features which also kept up with the dynamic nature of their web platform. Specifically, they wanted their new framework to address the following pain points: Complex configuration and required boilerplate of multiple tools needed for server-side rendering, code splitting, and hot module reloading Lack of good abstractions for implementing and sharing features that involve different aspects of server-rendered React applications Tight coupling of code located in different places Testing difficulties arising from side effects and singletons Lack of flexibility of a monolithic framework Fusion.js addresses all of these problems. What are the benefits of using Fusion.js? On top of the benefits of a pre-configured, optimized boilerplate, Fusion.js also provides a flexible plugin-based architecture which makes it appropriate for building single-page applications and web apps that depend on complex service layers to meet quality requirements. Fusion.js applications allow apps to have a single entry point file and it’s possible to reuse code on both the server and browser. The single entry point architecture allows plugin developers to co-locate snippets of code based on the library the code pertains to. Plugins use dependency injection so they can expose well-defined APIs as services to other plugins, and a plugin’s dependencies can easily be mocked during tests. For middleware management, Uber uses Koa, which provides a unit-test friendly context-based API. It has a lightweight abstraction for request lifetime management based on the concept of downstreams and upstreams. Fusion.js provides testing tools for developers to test plugins in addition to supporting modern testing tools such as Jest, Enzyme, and Puppeter. The fusion-test-utils package allows mocking the server itself, making it possible to quickly run integration tests between plugins and mocks. For now, over 60 repositories of Uber are using Fusion.js since its internal release. Next in the roadmap are the addition of more performance optimizations, test-oriented tooling, and better flow support. You can checkout the documentation and Github for further information. Masonite 2.0 released, a Python web development framework Is web development dying? Meet Sapper, a military grade PWA framework inspired by Next.js
Read more
  • 0
  • 0
  • 6272

article-image-typescript-3-0-is-finally-released-with-improved-errors-editor-productivity-and-more
Kunal Chaudhari
31 Jul 2018
3 min read
Save for later

TypeScript 3.0 is finally released with ‘improved errors’, editor productivity and more

Kunal Chaudhari
31 Jul 2018
3 min read
It’s finally here! Microsoft just released the latest version of their favorite web development language almost 2 years after TypeScript 2.0 was announced. TypeScript 3.0 comes with plenty of new features and a few breaking changes. The release candidate for 3.0 which was released a few weeks before introduced some new features such as project reference functionality, extracting and spreading parameter lists using tuples, and support for the JSX defaultProps. This final release brought in some new features which makes this new version much more exciting, especially when we consider the changes brought in to improve the developer experience. Improved errors and UX When you see ‘improved errors’ in a feature set, you might think, “Okay, so even now we get errors, but in a better way”. But that is not exactly what the TypeScript team meant. Improving the error messages had been one of the biggest agenda for this release and the TypeScript team has not let us down by introducing related error spans and improved messages and collaboration. Related error spans and elaborated error messages An error can occur due to multiple reasons. One of those reasons and a pretty important one is error coming from different parts of the code. Related error spans are a new way to surface that information to users. In TypeScript 3.0, error messages can provide messages on other locations so that users can reason about cause-and-effect of an error. Since TypeScript 2.9, the team at Microsoft has been investing more resources on how to provide better and accurate error messages, which would lead to faster resolution time. By taking a core set of cases that give a smarter, cleaner, and more accurate error experience. Editor Productivity Writing code with TypeScript has always been a pleasant experience since the language leverages its syntactic and semantic knowledge, which allows one to write code more easily. Editors like Visual Studio, Visual Studio Code, and others with a TypeScript plugin to provide things users love like code completion, Go to Definition, and even quick fixes and refactorings. Building on this same trend, TypeScript 3.0 brings in new features like Named import refactorings, productivity features around JSX like providing completions for JSX closing tags, and Quick fixes for unreachable code and unused labels. Over the last few years, TypeScript has been slowly creeping into more and more web development projects with a clear advantage over JavaScript. Big time frameworks like Angular, React, and now Vue.js have started providing support for this next generation programming language. With this new release, TypeScript looks all set for total domination on the web frontier. For more information on the final TypeScript 3.0 release, check out the official Microsoft Blog. Read Next: TypeScript 3.0 release candidate is here How to work with classes in Typescript Microsoft launches Quantum Katas, a programming project to learn Q#, its Quantum programming language
Read more
  • 0
  • 0
  • 4677

article-image-youtubes-polymer-redesign-doesnt-like-firefox-and-edge-browsers
Savia Lobo
26 Jul 2018
3 min read
Save for later

YouTube's Polymer redesign doesn’t like Firefox and Edge browsers

Savia Lobo
26 Jul 2018
3 min read
YouTube’s recent Polymer redesign upgrade was loved by many, which included improved designs and an added dark theme. Much after all the wow factor became a part of the routine, a new controversy came up stating Youtube slowing down on non-Chrome browsers. This glitch was brought to light by Mozilla’s Technical Program Manager, Chris Peterson. He tweeted, YouTube’s current architecture that includes Polymer is only available in Google Chrome. Thus, making it slower on Mozilla Firefox and Microsoft Edge. Why is Youtube loading slower on non-Chrome browsers Per Peterson, YouTube’s polymer redesign depends on the deprecated Shadow DOM v0 API, which is also the current implementation in Google Chrome. On the other hand, Firefox and Edge browsers have Shadow DOM polyfills, which are slower than Chrome’s native implementation. Peterson also stated that “On my laptop, initial page load takes 5 seconds with the polyfill viz-a-viz one without it. Subsequent page navigation perf is comparable.” What about the Internet Explorer 11? YouTube’s condition in the IE11 is a lot slower than even Firefox and Edge. IE11 is still being served with the old version of YouTube, by default. https://twitter.com/cpeterso/status/1021626510296285185 Is there a fix? Google could have chosen to service the new implementation into Firefox and Edge. A failure to do this, has resulted in the popular video streaming website running substantially slower on these two. However, there is an  easy fix for this issue. Peterson recommends users on both Firefox browser and Edge to revert YouTube to a previous version using add-ons. Firefox users can boost YouTube page load speeds by installing the YouTube Classic extension, while Edge users can do the same by installing the Tampermonkey extension and the YouTube − Restore Classic script. There are speculations that this is Google’s secretive plan to migrate the non-chrome users to Chrome? But that begs the question of whether such a move is worth risking Youtube users leaving the platform due to poor user experience. Considering this, the performance issue is unlikely to be a conscious effort from Google. What is more likely is that Google may’ve considered redesigning it with Polymer could provide great exposure to the web development framework’s features and use-cases. YouTube has more than 1.8 billion registered viewers every month along with 400 hours of video are uploaded to its site every minute. Although it works excellently in Chrome, which is the most popular web browser and accounts for 59 percent of website usage, a significant amount of the population still use Firefox and Edge. As such Youtube users expect a seamless experience regardless of what browser they use, and that is a fair expectation of a product from a reliable brand. YouTube has a $25 million plan to counter fake news and misinformation Vevo’s YouTube account Hacked: Popular videos deleted Firefox has made a password manager for your iPhone
Read more
  • 0
  • 0
  • 5537
article-image-angular-6-1-0-is-here
Natasha Mathur
26 Jul 2018
2 min read
Save for later

Angular 6.1.0 is here!

Natasha Mathur
26 Jul 2018
2 min read
Version 6.1.0 of the popular JavaScript framework Angular is here. The latest version released yesterday mainly focuses on bug fixes, new features, and support for TypeScript. Let’s discuss these major updates that come with Angular 6.1.0. In the new version, a KeyValuePipe has been introduced. Support is now offered for  // ... and // TODO in mock compiler expectations. An urlUpdateStrategy feature have been added to the Angular router which allows you to update the browser URL at the beginning of navigation. Feature defaultKeyValueDiffers has been exported to private API. Angular 6.1.0 enables developers to configure the Angular Router so that it remembers the scrolling position of the user as he/she navigates through an application. You can reset the scroll position with the new navigation event and can restore the previous position on pressing the back button. In addition to these updates, View Encapsulation with ShadowDOM v1 is the new standard. ShadowDOM provides better cross-browser support. Due to this reason, the ViewEncapsulation.Native feature has been deprecated. View encapsulation is the process which associates Cascading Style Sheets (CSS) with the components in which they are defined. The KeyValueDiffer#diff feature now allows null values. The new release also offers support for TypeScript 2.9, and 2.8 in addition to 2.7. Apart from these, there are also other breaking changes and bug fixes. Other Changes Under animation, the end-state styles for orphaned DOM nodes have been rendered. The queried element styles in safari/edge have been properly cleaned up in the latest release. typescript is used to resolve the modules for metadata. Mark Meta and Title services are marked as tree shakable provider. versionedFiles in asset-group resources have been deprecated. SwPush.unsubscribe() has been fixed. To use @angular/bazel rules, you need to add calling ng_setup_workspace() in your WORKSPACE file. Angular 7 will be released sometime in September/October 2018. For a complete list of changes and bug fixes, check out the official release notes.    Angular 6 is here packed with exciting new features! Everything new in Angular 6: Angular Elements, CLI commands and more  
Read more
  • 0
  • 0
  • 3529

article-image-typescript-3-0-release-candidate-is-here
Natasha Mathur
18 Jul 2018
2 min read
Save for later

TypeScript 3.0 release candidate is here

Natasha Mathur
18 Jul 2018
2 min read
After the announcement of Typescript 2.9 RC  back in May, Microsoft’s TypeScript team came out with the release candidate of TypeScript 3.0 last week, unveiling features such as project references, extracting and spreading parameter lists with tuples, a new unknown type and API breaking changes among others. Let’s discuss the highlights of TypeScript 3.0 RC release. Project Reference functionality It allows TypeScript projects to depend on other TypeScript projects. Once these dependencies have been specified in the tsconfig.json file, you can easily split your code into smaller projects. It also provides TypeScript (and tools around it) a way to understand build ordering and output structure. Extracting and spreading parameter lists using tuples This functionality helps with reducing the overloading amount for functions of varied parameter lengths. Also, there is no need to write different overloads to support functions with different number of parameters. TypeScript 3.0 allows to better model scenarios like these by allowing rest parameters to be generic, and concluding those generics as tuple types. This, in turn, demands for richer tuple types to model scenarios such as optional parameters at the end of a parameter list, a final parameter which can be a rest parameter along with empty parameter lists. A new ‘unknown’ type Apart from these features, the new unknown type feature can accommodate APIs that uses variable of any value but requires type checking. Support for the JSX defaultProps There is also support for the JSX defaultProps used in React. These defaultProps allow the developers to define default values for props during creation of a component, such as a source for an Image component. TypeScript 3.0 RC also supports a new type alias called LibraryManagedAttributes in the JSX namespace. LibraryManagedAttributes is just a helper type that tells TypeScript what attributes a JSX tag accepts. Using this general type helps model React's specific behavior for things such as defaultProps and propTypes. Apart from these features, there are API breaking changes API Breaking Changes The internal method LanguageService#getSourceFile is removed, after being deprecated for two years. The function TypeChecker#getSymbolDisplayBuilder and its associated interfaces are removed. The deprecated functions escapeIdentifier and unescapeIdentifier are removed. TypeScript 3.0 release is scheduled for sometime later this month. For more information on the latest TypeScript 3.0 RC release, check out the official Microsoft Blog. How to work with classes in Typescript How to install and configure TypeScript  
Read more
  • 0
  • 0
  • 2870

article-image-react-storybook-ui-logging-user-interactions-with-actions-add-on-tutorial
Packt Editorial Staff
17 Jul 2018
7 min read
Save for later

React Storybook UI: Logging user interactions with Actions add-on [Tutorial]

Packt Editorial Staff
17 Jul 2018
7 min read
Sometimes, you end up creating a whole new page, or a whole new app, just to see what your component can do on its own. This can be a painful process and, which is why Storybook exists in React. With Storybook, you're automating a sandboxed environment to work with. It also handles all the build steps, so you can write a story for your components and see the result. In this article we are going to use the Storybook add-ons, which you can test on any aspect of your component before worrying about integrating it in your application. To be specific we are going to look at Actions, which is a by default add-on in Storybook. This React tutorial is an extract from the book React 16 Tools written by Adam Boduch. Adam Boduch has been involved with large-scale JavaScript development for nearly 10 years. He has practical experience with real-world software systems, and the scaling challenges they pose. Working with Actions in React Storybook The Actions add-on is enabled in your Storybook by default. The idea with Actions is that once you select a story, you can interact with the rendered page elements in the main pane. Actions provide you with a mechanism that logs user interactions in the Storybook UI. Additionally, Actions can serve as a general- purpose tool to help you monitor data as it flows through your components. Let's start with a simple button component: import React from 'react'; const MyButton = ({ onClick }) => ( <button onClick={onClick}>My Button</button> ); export default MyButton; The MyButton component renders a button element and assigns it an onClick event handler. The handler is actually defined by MyComponent; it's passed in as a prop. So let's create a story for this component and pass it an onClick handler function: import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import MyButton from '../MyButton'; storiesOf('MyButton', module).add('clicks', () => ( <MyButton onClick={action('my component clicked')} /> )); Do you see the action() function that's imported from @storybook/addon-actions? This is a higher-order function—a function that returns another function. When you call action('my component clicked'), you're getting a new function in return. The new function behaves kind of like console.log(), in that you can assign it a label and log arbitrary values. The difference is that functions created by the Storybook action() add-on function is that the output is rendered right in the actions pane of the Storybook UI: As usual, the button element is rendered in the main pane. The content that you're seeing in the actions pane is the result of clicking on the button three times. The output is the exact same with every click, so the output is all grouped under the my component clicked label that you assigned to the handler function. In the preceding example, the event handler functions that action() creates are useful for as a substitute for actual event handler functions that you would pass to your components. Other times, you actually need the event handling behavior to run. For example, you have a controlled form field that maintains its own state and you want to see what happens as the state changes. For cases like these, I find the simplest and most effective approach is to add event handler props, even if you're not using them for anything else. Let's take a look at an example of this: import React, { Component } from 'react'; class MyRangeInput extends Component { static defaultProps = { onChange() {}, onRender() {} }; state = { value: 25 }; onChange = ({ target: { value } }) => { this.setState({ value }); this.props.onChange(value); }; render() { const { value } = this.state; this.props.onRender(value); return ( <input type="range" min="1" max="100" value={value} onChange={this.onChange} /> ); } } export default MyRangeInput; Let's start by taking a look at the defaultProps of this component. By default, this component has two default handler functions for onChange and onRender—these do nothing so that if they're not set, they can still be called and nothing will happen. As you might have guessed, we can now pass action() handlers to MyRangeInput components. Let's try this out. Here's what your stories/index.js looks like now: import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import MyButton from '../MyButton'; import MyRangeInput from '../MyRangeInput'; storiesOf('MyButton', module).add('clicks', () => ( <MyButton onClick={action('my component clicked')} /> )); storiesOf('MyRangeInput', module).add('slides', () => ( <MyRangeInput onChange={action('range input changed')} onRender={action('range input rendered')} /> )); Now when you view this story in the Storybook UI, you should see lots of actions logged when you slide the range input slider: As the slider handle moves, you can see the two event handler functions that you've passed to the component are logging the value at different stages of the component rendering life cycle. The most recent action is logged at the top of the pane, unlike browser dev tools which logs the most recent value at the bottom. Let's revisit the MyRangeInput code for a moment. The first function that's called when the slider handle moves is the change handler: onChange = ({ target: { value } }) => { this.setState({ value }); this.props.onChange(value); }; This onChange() method is internal to MyRangeInput. It's needed because the input element that it renders uses the component state as the single source of truth. These are called controlled components in React terminology. First, it sets the state of the value using the target.value property from the event argument. Then, it calls this.props.onChange(), passing it the same value. This is how you can see the even value in the Storybook UI. Note that this isn't the right place to log the updated state of the component. When you call setState(), you have to make the assumption that you're done dealing with state in the function because it doesn't always update synchronously. Calling setState() only schedules the state update and the subsequent re-render of your component. Here's an example of how this can cause problems. Let's say that instead of logging the value from the event argument, you logged the value state after setting it: There's a bit of a problem here now. The onChange handler is logging the old state while the onRender handler is logging the updated state. This sort of logging output is super confusing if you're trying to trace an event value to rendered output—things don't line up! Never log state values after calling setState(). If the idea of calling noop functions makes you feel uncomfortable, then maybe this approach to displaying actions in Storybook isn't for you. On the other hand, you might find that having a utility to log essentially anything at any point in the life cycle of your component without the need to write a bunch of debugging code inside your component. For such cases, Actions are the way to go. To summarize, we learned about Storybook add-on Actions. We saw it help with logging and the links provide a mechanism for navigation beyond the default. Grab the book React 16 Tooling today. This book covers the most important tools, utilities, and libraries that every React developer needs to know — in detail. What is React.js and how does it work? Is React Native is really Native framework? React Native announces re-architecture of the framework for better performance  
Read more
  • 0
  • 0
  • 19737
article-image-someone-created-a-div-that-looks-different-on-every-browser
Richard Gall
10 Jul 2018
2 min read
Save for later

Someone created a div that looks different on every browser

Richard Gall
10 Jul 2018
2 min read
Here's a weird CSS anomaly that you might have missed - Martijn Cuppens, a software engineer, has created a div that looks different on every browser. Cuppens shared his creation on CodePen - you can see the code for yourself here. Here's what they look like on different browsers: https://twitter.com/Martijn_Cuppens/status/1015169981368225793 Note: If you're looking on an iPhone the differences won't appear as all browsers on the iPhone are essentially the same - app store restrictions mean they use the same rendering engine. According to Cuppens, the most 'correct' version is Edge. He explains that he came across the discovery by saying that he "wanted to know if there is a way to inset outlines... turned out 'inset' was a outline-style and a negative outline-offset can be used to inset outlines." https://twitter.com/Martijn_Cuppens/status/1015579527379070976 What Cuppens experiment shows is how widely browsers can vary in their interpretation of CSS. On Twitter, users responded with their own versions, like this: https://twitter.com/frivoal/status/1015533567839911936 Others, meanwhile, were happy to offer droll responses to the challenges and occasional woes of working with CSS... https://twitter.com/kingreza/status/1015360236230606848 Read next Google announces Chrome 67 packed with powerful APIs, password-free logins, PWA support, and more Firefox 60 arrives with exciting updates for web developers: Quantum CSS engine, new Web APIs and more
Read more
  • 0
  • 0
  • 3207

article-image-google-announces-beta-release-of-v8-engine-6-8
Kunal Chaudhari
29 Jun 2018
3 min read
Save for later

Google announces beta release of V8 Engine 6.8

Kunal Chaudhari
29 Jun 2018
3 min read
A beta version of V8 6.8 was announced by Google a few days ago. This release contains a lot of exciting new features such as better memory usage and improved performance. Let’s take a detailed look at what this release has in store for the web developers. V8 Engine Explained When a software is named after an 8-cylinder aircraft engine, only one thing comes to mind- Speed. V8 is an open source JavaScript Engine which was designed at the Google development center in Germany. It is used on both the browser as well as on the server side. V8 works like a usual compiler which translates the actual code into machine code for faster execution. Java developers or developers working with any modern programming language might be familiar with compilers. But what makes V8 stand out from any other compiler, is its ability to not produce any bytecode or intermediate code. The V8 team follows a six-week release cycle, where they come up with a beta of a new minor version followed by a stable release in the next few weeks. Let’s take a deep dive into the feature set of this new release. Memory The sharedFunctionInfo function or SFI, as most developers call it, holds the metadata for other functions. Usually, in function heavy-code JavaScript unnecessarily keeps these metadata functions alive, leading to a lot of memory leaks. The V8 team decided to break the dependency on SFI and reduced the actual size of the SFI itself. This approach reduces the memory consumption drastically and the V8 team is planning to further compress the size of these SFIs for optimum memory consumption. Performance Performance is imperative when it comes to engines, and the V8 team constantly strives to bring improvements to the engine. This helps developers to run high-performance application on V8. This time around they have introduced array destructuring for performance improvements. A new implementation of Object.assign improves performance, via implementation of a fast path for JavaScript. Performance for TypedArrays has been increased in instances when sorting is done using a comparison function. WebAssembly WebAssembly is nothing but a bytecode format which is executed in a web browser. This allows an application to be deployed to a device with a compliant web browser without going through any explicit installation steps. In V8 v6.8 provides trap-based bounds checking on Linux x64 platforms. This memory management optimization considerably improves WebAssembly’s execution speed. You can expect the next V8 6.9 release in a couple of months with more performance improvements. Until then you can visit their official website for a detailed breakdown of all the features in V8 6.8. WebAssembly comes to Qt. Now you can deploy your next Qt app in browser Implementing 5 Common Design Patterns in JavaScript (ES8)
Read more
  • 0
  • 0
  • 2140