Web apps with no backend code: the Jekyll-Angular-Firebase (JAF) stack

If you're a web developer like me, you're probably spending a lot of time writing and maintaining backend code.

Now, for a moment, imagine there is no backend code. Not a single line. Your entire web application consists of a set of static files, served inexpensively by a CDN or for free by GitHub Pages. There's still code, but it runs entirely on the client in JavaScript, supported by the framework of your choice. For reading and writing data, it talks directly to a Backend as a Service (BaaS) provider (think database plus authorization and security rules).

How far can you get with this approach?

Out of curiosity, I've built a simple test app using three...

Read More

Java can haz Lambdas (C# does haz for 10 years)

Did you hear? Java 8 now has Lambda expressions!

My first reaction was this:

Lambda expressions are a compact way to represent functions inline as expressions. If you're a C# developer like me, you've already been using them for years. For example, with LINQ to Objects:

var numbers = new List() {1, 5, 10, 12, 13, 17, 20, 22}; var evenNumbers = numbers.Where(m => m%2...
      
Read More

Querying Elasticsearch

One of the many things I like about Elasticsearch is its JSON-based domain-specific language (DSL). For example, a simple search query looks like this:

{ { "from": 0, "size": 10, "query": { "query_string": { "query": "banana" } } }

Kimchy could have created a SQL-like query language for Elasticsearch, in which case the query above would probably look somewhat like this:

query (query_string = "banana") with from(0), size(10)

Fortunately, he didn't. Let me explain why I think...

Read More

Dear Uber: you're great but please add this feature!

UPDATE: A few additions at the end. I was pretty surprised (and so was my WP server) that that this made HN front-page. Also - hello, Cloudflare!

When ordering an Uber ride, I (obviously) have to enter my pickup location.

Can I please also enter the intended dropoff location? Maybe like this:

set_dropoff

Or, maybe even better: let me enter it after the pick-up has been confirmed, while waiting for the driver. And, while we're at it: let me also pick a preferred route, if I want to.

Why? Because...

Read More

Dart + CI with a few lines of code

Dart not only runs in the browser, but also on the server. Just like JavaScript, since the invention of node.js. 

Here are two simple answers for two practical questions:

1. What's keeping my Dart process alive?
2. How can I set up continuous integration?

Keep Yourself Alive - Keep Yourself Aliii-hiive ...

Let's say you wrote a social networking web site in Dart, like this:

 import 'dart:io'; import 'dart:math'; void main() { HttpServer.bind(InternetAddress.ANY_IP_V4, 80) .then((HttpServer server) { server.listen((HttpRequest request) { var n = (new Random()).nextInt(1000); request.response.statusCode = 200; request.response.write( "

Welcome...

Read More

View older posts...