Posts

Showing posts with the label library

A pristine Pattern Matching method in Javascript

Whenever it comes to Pattern matching developers have almost always sought JS functions as they provide an easy way to perform pattern matching ranging from numeral and alphanumeric strings to algebraic functions. So though, I'm here to elucidate a more sleek way in which pattern matching can be done in modern JavaScript, I feel that it's crucial to state the predecessor(...maybe not yet!) pattern matching method, that is Regex. Regex Pattern Matching The most common and rudimentary method followed world-wide is the Regex Reference. Regex, that is Regular Expressions, are applied on a character string to check for the existence of a specified pattern. Regex also provides a "match and modify"  functionality, to coin the term. What this means is that we can search for a particular pattern and perform replacement, split, sub-string extractions,etc.  at the same time. The following syntax illustrates the base structure of any regex.           /pa...

AngularJS vs ReactJS

Image
Today I just came across an interesting question and thought of creating this. At many occasions, developers try to render ReactJS as the best over AngularJS. But, according to my personal opinion, this is purely opinionated and also strongly depends on the type of the project in context. First of all, here's a very brief definition of what AngularJS & ReactJS according to their documentations. AngularJS AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. Angular's data binding and dependency injection eliminate much of the code you would otherwise have to write." Here's a perfect example to try out this. ReactJS   React.js is a JavaScript library for building user interfaces. (Famously used by Facebook) The comparison between the two has been jotted out in the following table...

interact.js Javascript Library

Image
Previously we've discussed enabling the drag and drop functionalities using the jsPlumb library. Recently, I stumbled upon the interact.js Javascript library, which I found to be as user-friendly as jsPlumb. Below is a short comparison of the two.    Library License Language/Infrastructure Level Built-in editor Github jsPlumb MIT/GPL2 HTML, JavaScript Medium Not Present 2931 stars, 755 forks interact.js MIT Standalone JavaScript Medium Not Present 5452 stars, 351 forks The above details are not presented here to render either one as the bet over the other.  But, in my own experience, I've blended both in my projects utilizing the drag and drop functions for some elements from jsPLumb and the drag and resize function for one element from inter.js. But the only concern when using both the libraries within one function, issues related to the drag function o...