I’ve been working with React components for about the last 3 years now, with a variety of different state-management conventions being employed, from internal state to object literals to Backbone models to Redux. One of the things I enjoy the most about React is the simplicity of swapping out templates based on whatever logic you want to use. You can have functions that are conditionally called and output template fragments, you can inline your logic as part of a template itself, or you can have entirely different components to render your output conditionally, based on some logic determined by a parent component.
ES5 is fairly mainstream at this point, but a lot of real-world developers still have to deal with the likes of IE8 or other legacy support, and shims and polyfills to add missing and expected functionality. ES6 has been pretty heavily fleshed out, and is starting to gain adoption amongst some of the evergreen vendors, but still has a long way to go. ES7 is still very much in the proposal stages.
I’ve previously mentioned that I work on the Platform team within my current company, as the caretaker of our central UI widget repository. As part of an ongoing effort, we’ve been in talks with our offices in Washington, D.C. about how to share some of the development effort between our teams, and get the most out of the finite front-end engineering resources we have at our disposal. In our most recent round of collaboration, there was some terminology brought up that I really liked as a method of conceptualizing the building of widgets, and how they should relate to each other. It was put into the context of the building blocks of life itself: Elements, Compounds, Cells, and Organisms. Continue reading
I have my first large-scale public presentation coming up in about a month and a half, at the jQuery Conference here in Austin, TX. My topic is about getting the most out of jQuery UI Widgets, mostly dealing with some tips and tricks I’ve either learned or developed over my own time in working with the factory. Some things I’d planned to present were still just conceptual at the time I made my proposal. One of them almost bit me in the ass because of something I hadn’t considered, but having just nailed it with some help from something buried in the bowels of jQuery, I feel compelled to write an article about it, to deviate from some of the more basic, foundational things I’ve been writing about lately. Continue reading
If you come from a more traditional programming language like C++, Java, or even PHP, you’re probably already familiar with the concept of encapsulation. So what is encapsulation? It’s the act of hiding some parts of your code from some other parts of your code, and only exposing what’s deemed necessary for the consumers of that code. Think about it as your custom object types providing an API, or interface, to any external code that might be consuming the functionality your custom objects provide. Continue reading