miercuri, 18 octombrie 2017

Weird new JavaScript syntax? It's called ES6

Weird new JavaScript syntax?

ECMAScript6 (or ES6 for short) is "a kind of JavaScript" that does not run in the old browsers. It is the modern version of the well-kown ECMAScript (commercially known as JavaScript) and it is heavy inspired from TypeScript.

https://engineering.carsguide.com.au/es5-vs-es6-syntax-6c8350fa6998


The first example is from Polymer Project: https://www.polymer-project.org/2.0/start/quick-tour

class CustomElement extends Polymer.Element {
    static get is() { return "custom-element"; }
    constructor() {
        super();
        this.textContent = "I'm a custom-element.";
      }
  }

Right, ES6 classes are available in Chrome 42+ (starting with 2015-04-14)
Documentation: https://googlechrome.github.io/samples/classes-es6/

The second example is from Ionic Framework: https://ionicframework.com/docs/components/#action-sheets

import { ActionSheetController } from 'ionic-angular'; export class MyPage { constructor(public actionSheetCtrl: ActionSheetController) { }
...

Imports and exports are part of ES6 Modules Final Proposal

Recommended book (online): Exploring ES6

miercuri, 2 august 2017

Progressive Web Apps Will Impact Your Mobile App Strategy

You may have heard of web apps, sites that offer the features of an app without requiring a download. See how they could be the future of mobile.

Read more on D-Zone

Have you been hacked, or been the victim of malware or ransomware?

Have you been hacked, or been the victim of malware or ransomware? Humans make the internet vibrant, but we’re also the weakest link — we’re predictable and often easily fooled. This episode of IRL focuses on our internet insecurity. Meet the unsung heroes fighting to keep us safe.

Read more on IRL podcast

vineri, 16 iunie 2017

Kohana Framekwork is for geeks, for nerds, for hackers

Today I found that Kohana Framework (the best fork of CodeIgniter for PHP5+ out there) has been declared deprecated from now on.
If you can just imagine that they declared Kohana defunct just because it is not using PHP7. So for some, everything that is not trendy or fashionable is considered dead. This is nothing but a speculative thinking.

I think Kohana deserves to continue its story and I am going to fork and maintain it.

Here is the new repository of Kohana Framework fork with Haxe interfaces called KoHaxe:
Enjoy!

https://github.com/barebonemvc/kohaxe .

miercuri, 17 mai 2017

JavaScript parseInt() performance

Have you ever wondered how to efficiently convert a string into an integer in JavaScript? There are several methods. Question is which one is the fastest? Actually it depends on your browser

But anyway, I tested with Firefox 53 on Windows 10. Here we have the results:

Test Ops/sec
Bitwise or
var i = number1 | 0;
var j = number2 | 0;
var k = number3 | 0;
var l = number4 | 0;
1,048,932,896
ParseInt()
var i = parseInt(number1);
var j = parseInt(number2);
var k = parseInt(number3);
var l = parseInt(number4);
4,148,982
Using unary
var i = +number1;
var j = +number2;
var k = +number3;
var l = +number4;
2,240,860
By multplication
var i = number1 * 1;
var j = number2 * 1;
var k = number3 * 1;
var l = number4 * 1;
1,789,007

duminică, 26 martie 2017

The Joomla Legacy Explained

This is a technical insight article that explains how Joomla works. From how views are loaded to how routing and controllers work in this framework/CMS.

1. Templates

A template in an instance of JDocumentHTML class which provides an easy interface to parse and display a HTML document.

vineri, 24 februarie 2017

Font is blurry on Chrome?


If website fonts looks very blurry on your Chrome on Windows.

Blurred text on the left, normal text on the right.



Chrome for Windows uses a new text rendering method called DirectWrite. This method is hardware accelerated and it's supposed to be better than the previous one, but obviously it's caused some issues for you.

Please disable this feature searching for it in chrome://flags

Source: Neatorama

For my version of Chrome (Version 56) it was called "Zero-copy rasterizer" Instead of "Direct Write"