background preloader

Web

Facebook Twitter

Mikko : Governments, The Web and... Governments, The Web and Surveillance. But, eventually, politicians and leaders realised how important the internet is. And they realised how useful the internet can be for other purposes — especially for surveillance of citizens. The two chief inventions of our generation — the internet and the mobile phone — changed the world. However, they both turned out to be perfect tools for the surveillance state. And in such a state, everybody is assumed guilty. US intelligence agencies have a full legal right to monitor foreigners — and most of us are foreigners to the Americans. Advancements in computing power and data storage have made wholesale surveillance possible. While governments are watching over us, they know we're watching over them. Mikko Hypponen This column was originally published in Wired's Web at 25 Special. WebSockets and SockJS with Immutant and Vert.x - Part 2.

This is a followup to our post last week on WebSockets with Vert.x. If you haven't read it, you should do so now. In that post, we set up a simple echo service in Vert.x that bridged the Vert.x EventBus to the browser. But that echo service wasn't very useful - there was no way to process incoming messages outside of the daemon, and no way to send messages down to the browser client from other parts of the application. Today, we're going to look at bridging the EventBus over to Immutant messaging, allowing us to actually interact with the client from anywhere within our application.

Our application We'll be using the same application we used in the last post, but will be working off of a branch. To get started, clone the app and run it:1 cd /path/to/simple-immutant-vertx-demo git checkout with-messaging lein do immutant deploy, immutant run Then browse to Let's see some code! Most of the application remains the same as it did before. Touch the UI from anywhere. Twelephone. Lab Report: Sketchbots. Multi-Device Layout Patterns. Through fluid grids and media query adjustments, responsive design enables Web page layouts to adapt to a variety of screen sizes.

As more designers embrace this technique, we're not only seeing a lot of innovation but the emergence of clear patterns as well. I cataloged what seem to be the most popular of these patterns for adaptable multi-device layouts. To get a sense of emerging responsive design layout patterns, I combed through all the examples curated on the Media Queries gallery site several times. I looked for what high-level patterns showed up most frequently and tried to avoid defining separate patterns where there were only small differences. Mostly Fluid The most popular pattern was perhaps surprisingly simple: a multi-column layout that introduces larger margins on big screens, relies on fluid grids and images to scale from large screens down to small screen sizes, and stacks columns vertically in its narrowest incarnations (illustrated below).

Column Drop Layout Shifter. Microjs: Fantastic Micro-Frameworks and Micro-Libraries for Fun and Profit! Ruby on Rails Tutorial: Learn Rails by Example book and screencasts by Michael Hartl. Michael Hartl Contents Foreword My former company (CD Baby) was one of the first to loudly switch to Ruby on Rails, and then even more loudly switch back to PHP (Google me to read about the drama). This book by Michael Hartl came so highly recommended that I had to try it, and the Ruby on Rails Tutorial is what I used to switch back to Rails again.

Though I’ve worked my way through many Rails books, this is the one that finally made me “get” it. Everything is done very much “the Rails way”—a way that felt very unnatural to me before, but now after doing this book finally feels natural. The linear narrative is such a great format. Enjoy! Derek Sivers (sivers.org) Founder, CD Baby Acknowledgments The Ruby on Rails Tutorial owes a lot to my previous Rails book, RailsSpace, and hence to my coauthor Aurelius Prochazka. About the author Michael Hartl is the author of the Ruby on Rails Tutorial, the leading introduction to web development with Ruby on Rails.

Copyright and license 1.1 Introduction. NoSQL Data Modeling Techniques « Highly Scalable Blog. NoSQL databases are often compared by various non-functional criteria, such as scalability, performance, and consistency. This aspect of NoSQL is well-studied both in practice and theory because specific non-functional properties are often the main justification for NoSQL usage and fundamental results on distributed systems like the CAP theorem apply well to NoSQL systems. At the same time, NoSQL data modeling is not so well studied and lacks the systematic theory found in relational databases. In this article I provide a short comparison of NoSQL system families from the data modeling point of view and digest several common modeling techniques.

I would like to thank Daniel Kirkdorffer who reviewed the article and cleaned up the grammar. To explore data modeling techniques, we have to start with a more or less systematic view of NoSQL data models that preferably reveals trends and interconnections. Key-Value storage is a very simplistic, but very powerful model. Conceptual Techniques. Designing a Secure REST (Web) API without OAuth. Situation You want to develop a RESTful web API for developers that is secure to use, but doesn’t require the complexity of OAuth and takes a simple “pass the credentials in the query” approach… or something equally-as-easy for people to use, but it needs to be secure. You are a smart guy, so you start to think… Problem You realize that literally passing the credentials over HTTP leaves that data open to being sniffed in plain-text; After the Gawker incident, you realize that plain-text or weakly-hashed anything is usually a bad idea.

You realize that hashing the password and sending the hash over the wire in lieu of the plain-text password still gives people sniffing at least the username for the account and a hash of the password that could (in a disturbing number of cases) be looked up in a Rainbow Table. That’s not good, so you scratch your head some more… “Still not quite right!” Solution So you keep searching for articles on “secure API design“… That seems pretty straight forward.

Essential JavaScript Design Patterns For Beginners. Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others. In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language.

Acknowledgments Credits Reading We already use patterns everyday. Bootswatch: Themed swatches for Twitter Bootstrap. 10 UI Ideas to Learn from Gumroad) 10 UI Ideas to Learn from Gumroad Gumroad is an exciting new startup that lets anyone sell digital content with just a link. It was founded by the prolific Sahil Lavingia. Sahil has designed a number of useful apps, ranging from Pinterest in the early days, to Turntable, to Crate, to Caltrainer, etc. He’s got a keen eye for design, so why not learn from him and his work? This is how the Gumroad home page looks, un-dissected. And here is the dissected version, with the 10 things we’ll learn - Let’s get started - 1. This top bar has become increasingly common. When we visit sites, a split second is used to subconsciously say “Oh, these are the colors we’re using here. Note that Sahil has picked energetic colors. 2. A lot of logos have very little to do with the name or product of a company.

But others have plenty to do with the name of the company/product. Also, it is not easy to make a well-styled logo or favicon that integrates multiple colors smoothly the way that the Gumroad logo does. 3. CSS-Tricks. Backbone patterns. Building apps with Backbone.js Here, I try to document the good practices that our team has learned along the way building Backbone applications.

This document assumes that you already have some knowledge of Backbone.js, jQuery, and of course, JavaScript itself. Table of contents Thanks. A re-introduction to JavaScript. Why a re-introduction? Because JavaScript is notorious for being the world's most misunderstood programming language. It is often derided as being a toy, but beneath its layer of deceptive simplicity, powerful language features await. JavaScript is now used by an incredible number of high-profile applications, showing that deeper knowledge of this technology is an important skill for any web or mobile developer. It's useful to start with an overview of the language's history. JavaScript was created in 1995 by Brendan Eich while he was an engineer at Netscape.

JavaScript was first released with Netscape 2 early in 1996. Several months later, Microsoft released JScript with Internet Explorer 3. Because it is more familiar, we will refer to ECMAScript as "JavaScript" from this point on. Unlike most programming languages, the JavaScript language has no concept of input or output. Overview Let's start off by looking at the building blocks of any language: the types. Numbers parseInt('11', 2); Patterns For Large-Scale JavaScript Application Architecture. Today we're going to discuss an effective set of patterns for large-scale JavaScript application architecture. The material is based on my talk of the same name, last presented at LondonJS and inspired by previous work by Nicholas Zakas. Who am I and why am I writing about this topic? I'm currently a JavaScript and UI developer at AOL helping to plan and write the front-end architecture to our next generation of client-facing applications.

As these applications are both complex and often require an architecture that is scalable and highly-reusable, it's one of my responsibilities to ensure the patterns used to implement such applications are as sustainable as possible. I also consider myself something of a design pattern enthusiast (although there are far more knowledgeable experts on this topic than I). Can you summarize this article in 140 characters? In the event of you being short for time, here's the tweet-sized summary of this article: What exactly is a 'large' JavaScript application? Initializr - Start an HTML5 Boilerplate project in 15 seconds! The 30 CSS Selectors you Must Memorize.

Scaling Your JavaScript Applications (Videos) Summary Developers creating JavaScript applications these days usually use a combination of patterns like MVC/MV*, modules, widgets and plugins for their architecture.Whilst this works great for apps that are built at a smaller-scale, what happens when your project starts to grow? In this talk, I present an effective set of design patterns for small, medium and large-scale JavaScript applications. You’ll learn how to separate concerns, keep your application logic decoupled, build modules that can exist on their own or be dropped into other projects and scale your applications to minimize any breakage in the user experience. Slides The slides for this presentation can be found over on SpeakerDeck. Video 1/3: Architecture For Small-Medium Size Apps (23 mins) Video 2/3: Writing Modular Code (16 mins) Video 3/3: Patterns For Large-Scale Development (33 mins) It's important to stress that there are many ways of building large-scale applications.

Javascript Best Practices. Introduction This document is a list of best practices and preferred ways of developing javascript code, based on opinions and experience from many developers in the javascript community. Since this is a list of recommendations rather than a list of absolute rules, experienced developers may have slightly differing opinions from those expressed below. Always Use 'var' Variables in javascript either have global scope or function scope, and using the 'var' keyword is vital to keeping them straight. When declaring a variable for use either as a global variable or as a function-level variable, always prefix the declaration with the 'var' keyword. The example below highlights the potential problem caused by not doing so. Problem Caused By Not Using Var var i=0; // This is good - creates a global variable function test() { for (i=0; i<10; i++) { alert("Hello World!

") Fixed Function function test() { var i=0; for (i=0; i<10; i++) { alert("Hello World! ") Feature-Detect Rather Than Browser-Detect. Foundation: Rapid Prototyping and Building Framework from ZURB. Lumbar. Lumbar is a js-build tool that takes a general codebase and list of platforms to generate modular platform specific applications. Introduction You can think of lumbar as a conditional compiler that targets platforms.

However, it doesn’t rely on variables in your source code. There’s no #ifdef or #endifs. Rather you can include and exclude files by associating them with a platform. It allows you to define multiple routers in your code.It pulls in your mustache or handlebars templates.It pulls in your stylus styles and generates css files.It outputs standalone javascript and css files.It wraps your code in the correct scope (module pattern), or not.

Lumbar works well with Backbone allowing for grouping of routers, models, views, and other application code into stand alone modular javascript and css files which can be lazy loaded when the route is encountered. High Level Overview Lumbar is modeled and built around platforms. The next big term are module(s). Following module(s) are package(s). Custom Scrollbars in WebKit. Way back in the day, you could customize scrollbars in IE (5.5) with non-standard CSS properties like scrollbar-base-color which you would use on the element that scrolls (like the <body>) and do totally rad things. IE dropped that. These days, customizing scrollbars is back, but it's WebKit this time. It's a bit better now, because the properties are vendor-prefixed (e.g.

::-webkit-scrollbar) and use the "Shadow DOM". This has been around for a couple of years. David Hyatt blogged it in early 2009 and put together an example page of just about every combination of scrollbar possibilities you could ever want. The Goods The Different Pieces These are the pseudo elements themselves. The Different States These are the pseudo class selectors. :horizontal :vertical :decrement :increment :start :end :double-button :single-button :no-button :corner-present :window-inactive I'm going to steal this whole section from David's blog post on the WebKit blog because it explains each part well: In The Wild.

JavascriptTips - jslibs - JavaScript language advanced tips and tricks - standalone JavaScript development runtime environment with general purpose native libraries. Addyosmani/backbone-fundamentals - GitHub. CSSDeck. Design Seeds®: For All Who Love Color.

Useful HTML5 Frameworks, Template Generators and Tools. JavaScript pattern and antipattern collection. 20 Useful CSS Graph and Chart Tutorials and Techniques. Ember.js - Documentation. Backbone.js. Underscore.js. Todos.js. Organizing your application using Modules (require.js) - Backbone.js Tutorials.