This article is about a way to publish aggregate data using the MongoDB aggregation framework with Meteor.js.
Your new post is loading...
Your new post is loading...
This article is about a way to publish aggregate data using the MongoDB aggregation framework with Meteor.js. No comment yet.
Sign up to comment
The Problem Last week, a friend of mine asked me how to handle a file upload with Meteor project. I recommended him using Collection FS, so he followed the README.md instructions on their repo. The file upload feature works fine on localhost, but it doesn’t work once it is deployed to the free meteor testing server. In fact, the whole server would keep refreshing, not even load a page. In this blog post, I provide an in-depth explanation of reactive programming. I talk about the technical details of how reactivity is implemented in the Meteor framework. I also explain how you can take advantage of reactivity by using the Session object and reactive variables. Finally, I provide you with advice on getting the best performance when using reactivity. A couple of months ago, I learned React by writing a game called Flip. Since then, React and the Flux architecture have attracted a lot of attention in the web developer community. Because of React’s superior DOM performance, and the scalable nature of Flux’s one-directional data flow, many in the industry suspect that React+Flux may become the “next big thing” in front end web development. Facebook doesn’t provide a framework for Flux, only how to make one from scratch. So I began searching for implementations. Surprisingly, there are already a few good (though somewhat poorly-named) options: jFlux, Fluxy, Fluxxor, and finally, Reflux. Of them, Reflux appeared to have the most backers and the most elegant API. I was also won over by Krawaller’s explanations of the overarching philosophy behind Reflux and how using Reflux can dramatically simplify a Flux application. Use Meteor to embed your HTML, your CSS and your JS in a single source file, just like AbsurdJS Fynx (formerly known as Flox) is an architecture library for React loosely based on the Flux architecture and inspired by Reflux and Fluxxor. Fynx tries to be as unopinionated as it can while remaining useful. The architecture recommended by this document is intended as a guideline, not a law. You may deviate from it as much as you like.
Jan Hesse's insight:
AngularJS expert Abraham Polishchuk walks through strategies to maximize performance in large Angular apps.
By the 5th of January I had a laptop and a couple of days to spend on some development. Having estimated what I can do here, I decided to create a mobile app that would work faster than the original. For this, I needed to find communicative creators of a popular app. In our experience developing web, iOS, and backend applications, we’ve found that much (if not most) coupling, complexity, and bugs are a direct result of managing changes to application state. With ClojureScript and Om (a ClojureScript interface to React), we’ve finally found an architecture that shoulders most of this burden for us on the web. Two months ago, we rewrote ourwebapp in this architecture, and it’s been a huge boost to our productivity while maintaining snappy runtime performance. This new codebase weighs in at just under 5k lines of ClojureScript (excluding libraries), about five times smaller than our previous ClojureScript codebase. Of course, size isn’t everything. Every member of our backend team has made significant contributions to the new codebase, which says a lot about its readability and accessibility. Read on for more details about how we’ve been iterating faster with ClojureScript, React, and Om. The Internet is full of smart peanut-size examples of how to solve X with "FRP" and Bacon.js. But how to organize a real-world size application? That's been asked once in a while and indeed I have an answer up in my sleeve. Don't take though that I'm saying this is the The Definitive Answer. I'm sure your own way is as good or better. Tell me about it! I think there are some principles that you should apply to the design of any application though, like Single Reponsibility Principle and Separation of Concerns. Given that, your application should consist of components that are fairly independent of each others implementation details. I'd also like the components to communicate using some explicit signals instead of shared mutable state (nudge nudge Angular). For this purpose, I find the Bacon.js EventStreams andProperties quite handy.
Get this party started. Let's build an API and CMS to expose our data layer to the world. Ember.js has a gang now. It's got a lot of characters and it could be quite daunting for someone without any knowledge of how the different pieces fit and play along. Some call this Ember's "learning cliff". Ember's "learning cliff" is tough, but it instills a bit of what makes server-side frameworks like Rails so nice... This blog post explains the ECMAScript 6 (ES6) feature proxies. Proxies enable you to intercept and customize operations performed on objects (such as getting properties). They are a meta programming feature. The code in this post occasionally uses other ES6 features. Consult “Using ECMAScript 6 today” for an overview of all of ES6. Before we can get into what proxies are and why they are useful, we first need to understand what meta programming is. Last month I noted my opinions on why we should stop using Grunt, Gulp et al. I suggested we should start uing npm instead. npm's scripts directive can do everything that these build tools can, more succinctly, more elegantly, with less package dependencies and less maintainence overhead. |
As an introduction to Meteor.js, I set out to build a simple but properly tested web application and share what I learned. Now I love Behaviour Driven Development I love it for many reasons but my main reason is the way it completes my development process. TDD allows me to test how my code works to validate that the new function has been implemented correctly, to put me in the mindset of writing minimalist and well structured code and to give me confidence I am not breaking any existing code. It is not so great at describing behaviour that the system is supposed to exhibit and if you work with an Agile methodology it is a pretty terrible interface between the developer and the customer. Don't ReactReactive Programming is an Enlightened Path to Programming Utopia Yet to be Grokked By Mere Humans * Why this presentation? When AppCache arrived on the scene it gave us a couple of patterns to make content work offline. If those were the patterns you needed, congratulations, you won the AppCache lottery (the jackpot remains unclaimed), but the rest of us were left huddled in a corner rocking back & forth. With ServiceWorker we gave up trying to solve offline, and gave developers the moving parts to go solve it themselves. It gives you control over caching and how requests are handled. That means you get to create your own patterns. Let's take a look at a few possible patterns in isolation, but in practice you'll likely use many of them in tandem depending on URL & context. ReactJS is becoming a hugely popular solution for building complex Web Applications. It is so nice to use because it really resembles building applications like you used to in the good old PHP days a long time ago, where you construct the HTML once on the server, and be done with it. Don't think about changing state over time, just render once, and refresh once the data changed. ReactJS runs entirely in the Browser. You give the components data, and it constructs the DOM for you. One small thing that confused me as I was learning Javascript was the many different kinds of ways to define a Javascript function. I could never seem to find one place that showed all of them, and explained why you might use each one. That is the aim of this post. So without further ado, here are ALL the ways to define a Javascript function. In the context of a computer program, reactivity is the process of receiving external stimuli and propagating events. This is a rather broad definition that covers a wide variety of topics. The term is usually reserved for systems that respond in turns to sensors, schedules, and above all, problems that exist between the chair and keyboard. The field of reactivity is carved into plots ranging from "reactive programming" to the subltly distinct "functional reactive programming", with acrage set aside for "self adjusting computation" and with neighbors like "bindings" and "operational transforms". Adherents favor everything from "continuation passing style" to "promises", or the related concepts of "deferreds" and "futures". Other problems lend themselves to "observables", "signals", or "behaviors", and everyone agrees that "streams" are a good idea, but "publishers" and "subscribers" are distinct. A brief journey into reactive interfaces with FRP and React.js In this post, I will discuss the way we approach building interfaces with reactive programming and React, and how it’s changed the way we think about writing effective code. The first half will cover how we use reactive programming — RxJS, more specifically — to compose our data sources, and the second will talk about feeding that data into React. Contexts are a feature that will eventually be released in React.js - however, they exist today in an undocumented form. I spent an afternoon looking into the present implementation and was frustrated by the lack of documentation (justified, as it is a changing feature). I've pieced together a few code examples that I found helpful. In React.js a context is a set of attributes that are implicitly passed down from an element to all of its children and grandchildren.
React
Building large web applications using Backbone.js can be hard. Backbone is a great tool, but it's designed to be minimalist and useful in a wide variety of situations. As a result, you get less guidance and support from the tool as you scale up than you do from more opinionated frameworks like Angular and Ember. When a Backbone application grows, maintaining it requires adding structure, either through a custom set of conventions and components, or based on somebody elses framework. There are a lot of different Backbone frameworks out there, but I want to make the case for using Marionette.js. Google Analytics, Mixpanel, Disqus - just to name a few products that heavily rely on third-party JavaScript development. In this post we are going to take a look on the principles of third-party JavaScript development - in Part II we will take a look on how other companies do it in details. Before going into the details on how the big players out there do this, let's take a look at the key points that you should pay attention to.
Jan Hesse's insight:
|
Your new post is loading...