I built a doubly static site using React (inc react-router) and Webpack. You can see the current demo here on GitHub or continue reading the following post that explains the steps I took during this experiment. This post proves the basic concept and there will be a followup post covering the fine tuning needed to put this into production.
One of it’s unique selling points is that not only does it perform on the client side, but it can also be rendered server side, and they can work together inter-operably.
The way React works, rather than taking the real person and rebuilding them from the ground up, it would only change the face and the arms. This means that if you had text in an input and a render took place, as long as the input’s parent node wasn’t scheduled for reconciliation, the text would stay undisturbed.
In this article we show some nice features of Spring Security, Spring Boot and Angular JS working together to provide a pleasant and secure user experience. It should be accessible to beginners with Spring and Angular JS, but there also is plenty of detail that will be of use to experts in either. This is actually the first in a series of articles on Spring Security and Angular JS, with new features exposed in each one successively. We’ll improve on the application in the second and subsequent installments, but the main changes after this are architectural rather than functional.
How many photo carousels have you built? Date pickers? Dynamic tables and charts? Wouldn't it be great if there was a way to make these custom elements encapsulated and reusable? Welcome to Web Components!
In this article, I am going to describe 16 steps that front-end developers should go through when planning a front-end web application. These steps aim to cover the entire life-cycle of a front-end application. However, before diving in, I need to clarify a few front-end terms that remain unsettled in the industry.
Separation of concerns has its own tradeoffs. A lot of people doesn’t seem to understand this; they tend to use Controller for everything. Even library authors instruct that way. Although library authors are not to be blamed, it seemed to have been applied in practice by everybody, and that’s not awesome.
n this post we build a small example UI following a data-first approach. What the user sees is just a representation of a piece of data, the app state. And when she interacts with the interface, she is just applying transformations to that piece of data.
When building Angular applications, one of the cornerstones we will use is ng-repeat. Showing data is something that we do in applications like when we show a table of users or whatever other data we need to show our users....
Via Jason McClean
We need to move beyond monolithic frameworks to a component/library-based front-end solution, but there’s too much fragmentation/abstraction to create an industry standard approach. Below are some constructive thoughts aimed at building a more viable and stable alternative.
your entire view is a single complex vtreeyour entire view state is a single complex immutable object.your rendering function is pure, it takes just the view state (disclaimer: hooks & widgets are not pure).you declare all user input as channels up front in your view state.the view state supports cursors, you can nest components in components.
Mercury is unidirectional because:
A DOM event triggers a value to be send to a channelThe listener for the channel updates the view stateAn update to the view state triggers a re-renderA new vtree is createddiff() and patch() update the DOM.
mercury is similar to react, however it's larger in scope, it is better compared against om or quiescent
mercury leverages virtual-dom which uses an immutable vdom structuremercury comes with observ-struct which uses immutable data for your state atommercury is truly modular, you can trivially swap out subsets of it for other modulesmercury source code itself is maintainable, the modules it uses are all small, well tested and well documented. you should not be afraid to use mercury in production as it's easy to maintain & fix.mercury encourages zero dom manipulation in your application code. As far as your application is concerned elements do not exist. This means you don't need to reference DOM elements when rendering or when handling eventsmercury is compact, it's 11kb min.gzip.js, that's smaller than backbone.mercury strongly encourages FRP techniques and discourages local mutable state.mercury is highly performant, it's faster then React / Om / ember+htmlbars in multiple benchmarks TodoMVC benchmark\ animation benchmarkTodoMVC benchmark sourcemercury comes with FP features like time-travel / easy undo out of the box.mercury is lean, it's an weekend's read at 2.5kloc. (virtual-dom is 1.1kloc, an evening's read.) compared to react which is almost 20kloc (a month's read)
Via Jan Hesse
AngularJS expects to be feed a factory function that returns an object that defines parameters and functionality for your directive.
Variable scoping has always been a part of every programming language. Whether we are using a class based object oriented language (e.g. Java/C#) or a class-less object oriented language, scope has a very important role to play.
So what if at work you need to write an automated functional regression for non angular site? If you’re a lucky guy/gal you spend your days dealing with AngularJS and you have convinced your manager to use protractor to write the much needed automated functional suite. Now your manager comes back with a smile on his face asking you to create a new set of tests for this other non angularized web application.
Some would be scared, somebody would run, not you! That’s because you know how this thing actually works. You know you can always get the webDriver instance and do some vanilla selenium things. That’s why they call you ‘The Selenium dude’ and sometimes other names which are outside the article’s scope.
AngularJS today is one of the most powerful, user-friendly and popular JS frameworks to work on web applications. Surprisingly, one of the main weaknesses of this framework is poorly structured documentation and the lack of ready-made solutions. In this report, we will try to work out the best approach to the organization of large and very large applications. We will also speak about the tools that will be useful at every stage of the application development and tools and practicesthat will help you to work in the continuous delivery mode.
In this post, I’ll outline some recent observations and approaches to delivering sites for speed and broader access, and link out to various tools we are using to facilitate our approach. All of the tips mentioned in this post are implemented on this very site, and we’ve tested them heavily to ensure that they’re working as well as they can.
I’ll start with some high-level observations, then later I’ll dive into the more technical how-to. First, some general notes about page loading performance and what we aim to accomplish.
A few months ago Jake Archibald wrote an article about the awesomeness of the asyncfunctions in ES7 and how we can “emulate” them using ES6’s generators, using his spawn function, which has subset of the features of co.
In this blog post we’ll take a look at standard ways of handling asynchronous calls and how we can improve the readability of our code using generators. We’ll also take a further look at the implementation of spawn, since there are few tricky moments there.