All tags
Posts tagged with "javascript"
🧱 Refactoring for Sanity: Taming a Wild Merchandising Widget
A deep dive into how I stabilized a high-traffic merchandising widget by rebuilding it layer by layer—from fragile frontend to brittle backend.
Single Page App with Vanilla ES6 | Part 2
In the second installment we will finish rendering the whole app as well as add some basic URL routing to control the state of our app
Single Page App with Vanilla ES6 | Part 1
ES6 gives us new native js features that make making a SPA a little easier. We will be making use of modules, template strings (and "tagged template literals"), classes, promises, and arrow functions
Binding a backbone model to the query string
It's very common to use backbone's router to drive application state with the window's url. The basic idea is that popstate or hashchange events are matched to a hash of routes and invoke a handler function. This approach works well for changing views, but not so well for setting application state.
A Method for Objected Oriented Node
One frustrating part of learning how to use node is implementing JavaScript style OOP. I don't mean that Node's JavaScript engine is different than a browsers with respect to objects. What I'm talking about is understanding how to use objects in an asynchronous environment.
KnockoutJS Best Practices
Here's a collection of some simple best practices I've picked up while working with knockout.
Knockout Observable Extenders
Knockout observable extenders give custom functionality to observables. nuff said. No need to sell you on how useful that is. I'll just show how I used extenders in a recent project.
Custom Knockout Bindings
Knockout's custom bindings are awesome. If your view has bindings are getting out of control or you have some complex functionality then custom bindings are for you.
APIs with Node
With a little work, node can be used as a complete web server, but it's probably something you shouldn't do. Node's speed is limited when it comes to traditional web-server applications because it runs inside an interpreter (like all javascript) and just wont be as as fast at things like reading from disk.
Beginning Ajax
Ajax is a method of using Javascript to load resources without causing the page to be refreshed. Traditionally when you click a link on a webpage, the browser asks for that page and renders it in place of the previous page. Ajax offers an alternative for situations when page refreshes aren't ideal.
HTML5 Dataset
Dataset allows for valid use of custom HTML attributes, prefixed with "data-" Before HTML5 you could use custom attributes at will but it would not be valid HTML. One of the things dataset does is make this practice pass validators and it allows for more easy access of custom attributes with javascript.
Node Server
As a web developer, building a node server has a lot of value not only in terms of gaining node programming skill, but also in understanding how web servers and fundamental web technologies such as HTTP work.