Pull to refresh
204.53
Rating

JavaScript *

High-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm

Show first
  • New
  • Top
Rating limit
  • All
  • ≥0
  • ≥10
  • ≥25
  • ≥50
  • ≥100

Really typing Vue

Website development *JavaScript *VueJS *TypeScript *

Logo


inb4: This is not another "setting up" a new project with Vue and TypeScript tutorial. Let's do some deep dive into more complex topics!


typescript is awesome. Vue is awesome. No doubt, that a lot of people try to bundle them together. But, due to different reasons, it is hard to really type your Vue app. Let's find out what are the problems and what can be done to solve them (or at least minimize the impact).

Read more →
Total votes 11: ↑11 and ↓0 +11
Views 6.2K
Comments 1

Angular vs. KnockoutJS: The Fundamental Differences and Similarities You Should Know

JavaScript *Angular *
It's extremely befuddling when it comes to choosing between two libraries and frameworks, especially when they are almost similar to each other.

I faced the same situation recently when I had to choose one from Angular vs KnockoutJS. The most perplexing part of the two is Angular is a JavaScript-based open-source front-end web development framework while Knockout is a library.

So, the selection is a bit complex task and, as I had to, you might need to go through a systematic and understand the two technologies or web development framework thoroughly.

image

So, you need to begin following the one-by-one method.

What is Framework?


A framework is a model on which you have to build your home. It is having a collection of blueprints which from which it choose the right one for you. In short, the framework is in charge of the flow and it chooses when and how to go.

What is the Library?


The library is like going to a furniture house to get some furniture for your home. Here you are in charge of the flow and you decide when to call the code.

Overview of Angular and KnockoutJS


Angular

KnockoutJS

Stable Release
Version 8.0.0 on / May 29, 2019 3.5.0 / February 22, 2019
Managed by
Google Steve Anderson
Programming Language
JavaScript JavaScript
Type
Web Framework JavaScript Library
Routing
Angular Supports Not Available
Testing
Protractor works as test framework Not Available
Documentation
Well organized Documenations Poor Documentation
GitHub Stars
59,555 9,526

Read more →
Total votes 14: ↑11 and ↓3 +8
Views 3.3K
Comments 2

Top 10 JavaScript Hack for Optimized Performance

Website development *JavaScript *
Sandbox

JavaScript has been ruling the tech arena for more than two decades and helping developers simplifying complex tasks. It allows developers to implement complex task web pages in a most simplified manner. For most of the developers minified JavaScript file is the common phenomena while very few developers may be aware of Optimized JavaScript code. While meeting through many Javascript developers, I have come to know that Optimized JavaScript code is something that confuses developers, some of them might be doing it, but they are not aware of this.


What is an Optimized JavaScript Code


When combinations of uniquely programmed logics along with small hacks utilized to enhance performance and speed is known as Optimized JavaScript code. Optimization not only optimizes performance and speed but also saves maximum development time. When you save time, you save some bucks as well.


So, I am here with some useful and fruitful hacks to help developers optimize performance, enhance speed and save time. Hope, you like the article and after going through it, you may utilize the best of Optimized JavaScript code.

Read more →
Total votes 13: ↑8 and ↓5 +3
Views 2.8K
Comments 1

Protocol for communication between iframe and the main window

Waves corporate blog Website development *JavaScript *TypeScript *
Translation

From time to time, developers need to establish communication between several browser tabs to be able to send messages from one tab to another and receive responses. We have also faced this need at some point.


Some solutions already exist (like, for instance, BroadcastChannel API). However, its browser support leaves a lot to be desired, so we decided to use our own library. When the library was ready, that functionality was no longer required. Nevertheless, another task emerged: communication between an iframe and the main window.


On closer examination, it turned out that two-thirds of the library would not have to be changed — only some code refactoring was necessary. The library is a communication PROTOCOL that can work with text data. It can be applied in all cases in which text is transferred, such as iframes, window.open, worker, browser tabs or WebSocket.


How it works


Currently, the protocol has two functions: sending messages and subscription to events. Any message in the protocol is a data object. For us, the main field in that object is type, which tells us what kind of message it is. The type field is an enum with the following values:

Read more →
Total votes 13: ↑12 and ↓1 +11
Views 2.8K
Comments 2

Sidecar for a Code splitting

JavaScript *ReactJS *


Code splitting. Code splitting is everywhere. However, why? Just because there is too much of javascript nowadays, and not all are in use at the same point in time.


JS is a very heavy thing. Not for your iPhone Xs or brand new i9 laptop, but for millions(probably billions) of slower devices owners. Or, at least, for your watches.


So — JS is bad, but what would happen if we just disable it — the problem would be gone… for some sites, and be gone "with sites" for the React-based ones. But anyway — there are sites, which could work without JS… and there is something we should learn from them...

Get in the sidecar!
Total votes 3: ↑3 and ↓0 +3
Views 662
Comments 0

Selecting, caching and displaying photos on the map

JavaScript *.NET *Microsoft SQL Server *
Translation

In this article, I decided to describe how the functionality of selecting and displaying photos on a specific place on the map was implemented in our photo service gfranq.com. The photo service does not work now.



Since we had a lot of photos in our service and sending requests to database every time the viewport changes was too resource-intensive, it was logical to divide the map into several areas that contain information about the retrieved data. For obvious reasons, these areas have rectangular shape (although hexagonal grid was considered too). As the areas become more spherical at large scales, elements of spherical geometry and tools for it were also considered.


In this article, the following issues were raised:


  • Storing and retrieving photos from the database and caching them on the server (SQL, C#, ASP.NET).
  • Downloading necessary photos on the client side and saving them to the client cache (JavaScript).
  • Recalculation of photos that must be hidden or shown when the viewport changes.
  • Elements of spherical geometry.
Read more →
Total votes 15: ↑14 and ↓1 +13
Views 1.1K
Comments 0

ES6 Proxies in practice

JavaScript *
Sandbox

With the appearance of ECMAScript 2015, an avalanche of features came; some of them make you mad, and others are pleasant surprises, like meeting an old friend after a long time.


Some features are related to metaprogramming. What is that? I'm not very eloquent, so let's turn to our friend, Wikipedia.

Read more →
Total votes 20: ↑18 and ↓2 +16
Views 1.8K
Comments 0

Google+ is Dead. So what?

Information Security *JavaScript *Google API *

Google shut down their social media platform Google+ on April 2, 2019. It’s hard to find some technical article that hasn’t mentioned the end of Google’s social network era. But, a high level of consistency in connectivity within services of the company had received scant attention. In this article I would like to share my thoughts on the internal way of Google services consistency and what it means for Google API users when it comes to a Google+ shutdown.

Read more →
Total votes 6: ↑6 and ↓0 +6
Views 1.3K
Comments 0

Authors' contribution