Javascript

Isomorphic Aurelia Applications

Update March 2018: Two years on from the original publish date, Aurelia finally has support for server-side rendering. This means it is now possible to create isomorphic web applications in Aurelia that work with and without Javascript disabled, resulting in faster initial rendering speed. If you would like to see a working example, the Skeleton repo has you covered. Now, onto the existing article. Isomorphism is all the rage in the Javascript world. The server can return rendered HTML complete with pre-computation (converting bindings and templating specific events already taken care of increasing initial load speeds and time to paint quite substantially.

The Equivalent of Angular 2 EventEmitter In Aurelia

If you are like me, you browse Github for cool new repositories. My new hobby is looking at what the community are building for rival frameworks and one of those frameworks is Angular 2. The Angular 2 community has done a great job of porting over not only existing libraries from Angular 1, but also creating new ones. There are some that are not available for Aurelia, but fortunately there is quite a lot of overlap between the two frameworks in ECMAScript and TypeScript syntax.

Shared State in Aurelia

In a single page application (SPA) like Aurelia, shared state is one of those important things every developer mostly encounters. Sharing the current state of a logged in user or sharing a shopping cart’s contents throughout the app. Fortunately, Aurelia makes it easy to build applications with shared state. By default a class in Aurelia is a singleton. If you create a service called UserService and inject it throughout different parts of your app, provided you’re injecting it without telling Aurelia to do anything non-standard, it will be a singleton.

Using jQuery UI Widgets in Aurelia

When it comes to adding in on-page functionality in the form of custom selects, autocomplete fields and more, jQuery UI is still an undisputed popular choice amongst some developers and using it within Aurelia is super simple. Because Aurelia does not replace your HTML or parse it any differently than your browser does without Aurelia, it allows you to use any third party library or plugin inside of your Aurelia application without worrying about it messing with anything.

Why Angular 2 Is DOA

With the beta release of Angular 2 in mid-December after almost 2 years in development, high hopes have been placed upon the framework who in its absence of release has seen other competitors such as ReactJS mature and Aurelia release into beta. I have seen and heard some ambitious things being said about Angular 2. It appears as though everyone is making the assumption that because the Angular brand is so well known and people are falsely under the impression it is a first-class Google project (even though Google offers no support).

Deep Cloning Objects In Javascript Without Dependencies

There is one thing that really irks me in Javascript, everything is passed by reference. Recently in a project I was working on, I had an object of widget options I needed to modify. I also needed to offer the ability to revert the changes made to this object. The kicker is: this object is complex. It isn’t just properties and values, it has other objects inside of it and arrays. Everyone has an opinion on how you should do it, many ways to skin a cat so-to-speak.

Object.observe Proposal Being Withdrawn From Javascript TC39

One of the much-promised features coming in the ECMAScript 2016 specification was Object.observe. It promised us the ability to watch objects for changes and react accordingly, akin to two-way binding found in frameworks like Angular 1.x. However, Adam Klein one of three people responsible for introducing the idea of Object.observe is withdrawing the proposal from TC39 which is currently at stage 2 in the process and also hopes to remove it from V8 (Chrome’s Javascript engine) by the end of the year.

A List of Great Blogs & Sites About Javascript

When it comes to resources on Javascript, I just can not get enough. And, for the best exposure for your business a denver marketing agency can give you great ideas on ways to boost your visibility, using sites as converted.co.uk to get more leads and conversion to your business in the right way. I have an entire folder dedicated to interesting blogs and a sub-folder for interesting blog posts. A few of these have some recognisable names like Addy Osmani and Paul Irish who both work for Google and are on the Chrome developer tooling team. If you have some of your own, please leave a comment and I will add them to the list if they’re good. The community near Honolulu SEO is a beautiful and innovative place to set up a marketing agency.

Polyfilling "position: sticky"

One of my favourite and lesser known additions to CSS is position: sticky which essentially allows you to create an element that snaps at a specified position of the page to the top of the screen. At present, support for position: sticky is relatively non-existent according to caniuse. The desktop browsers that currently have this implemented are Firefox and Safari. But thankfully there are some great polyfills out there for this, the one I have found to be the more performant polyfill is by the Filament Group.

AngularJS vs MeteorJS: How about no?

It seems anything remotely written in or affiliated with Javascript gets compared with Angular these days. AngularJS vs React.js AngularJS vs Node.js AngularJS vs Ember.js AngularJS vs Microwave AngularJS vs PHP AngularJS vs jQuery AngularJS vs Bear Grylls AngularJS vs AngularJS One thing I see being compared a lot is Angular and Meteor. Whoa. Hold on just a second there. Let us all just take a step back here for a moment. Angular and Meteor are not the same. They’re not even in the same league. Angular is a roller derby and Meteor is the stadium. While Angular can be used inside of Meteor and Meteor can be used in place of Angular, they are not the same.