End-to-end testing Java web applications with an embedded Tomcat

 In this instalment on assembly testing [1] I'll talk about how automated system tests run over my Java web applications. The set-up is rather cheap, not very labour-intensive and can incrementally evolve from a simple assembly test (aka smoke test) to a full-fledged system test. Since this post is rather concrete naming tools and frameworks, … Continue reading End-to-end testing Java web applications with an embedded Tomcat

Heisenbugs with angular.js and Internet Explorer 9 or: missing console.log

I'm developing a proof of concept web application based on angular.js for corporate users, which - as so often in my career - means that they are using Internet Explorer. Several users complained about sporadic failures which were really hard to pin down, but during debugging sessions boiled down to a simple observation: the errors … Continue reading Heisenbugs with angular.js and Internet Explorer 9 or: missing console.log

AngularJS, Internet Explorer 9 and watch error

While working on an enterprise project (of course...) I run into an error with Angular (1.3.13), Internet Explorer 9 and $watch-ing a scope when programming a directive:   TypeError: Object doesn't support property or method 'watch' I'll never find out what the reason is. The collective wisdom of Angular users claims that including JQuery solves … Continue reading AngularJS, Internet Explorer 9 and watch error

Fauxjsp: productive JSP development

Important note: This post is not being updated. For up-to-date information refer to the project repository: https://github.com/ggeorgovassilis/fauxjsp/ About JSP In this post I'll present a new open source project I'm currently working on, fauxjsp [1] which re-implements JSP in a way that is more robust and faster for developers. It is intended for development, where … Continue reading Fauxjsp: productive JSP development

Programmatically selecting a tab with angularjs and bootstrapui

Let's say you want to programmatically select a tab with angularjs and bootstrap ui: [CODE MISSING] According to the documentation for 3.1.1 it should be enough to modify the model; here controller.tabUsers or controller.tabGroups. Only: it doesn't work. We'll never know why. The way out is simulating the click with jquery: $("#tab_users a").trigger("click");

Note to self: how to post on facebook as a page

How to obtain a long-term access token for a page and programmaticaly post to it: From here: http://stackoverflow.com/questions/8231877/facebook-access-token-for-pages Go to the Graph API Explorer Choose your app from the dropdown menu Click "Get Access Token" Choose the manage_pages permission (you may need the user_events permission too, not sure) Now access the me/accounts connection and copy … Continue reading Note to self: how to post on facebook as a page

Replacing social sharing buttons with javascript-less alternatives

Social sharing widgets slow down page loading For every public facing site there comes the moment where its content has to be shared in social media. We all know the dreaded "Like" or "Tweet" buttons on many sites or blogs. They not only compete for the reader's attention but also for screen real estate and … Continue reading Replacing social sharing buttons with javascript-less alternatives

On URL accuracy, versioning and the immutable-redirect pattern

So you have this requirements: serve content (might be a static file or a dynamic page) under a URL make it cacheable by defining appropriate HTTP expiration headers yet, the content might change - serve it under a new URL the old URLs should still be valid but show the new content In my current … Continue reading On URL accuracy, versioning and the immutable-redirect pattern

HTTP: The importance of declaring non-cachable resources as such

It works fine with Chrome and it fails on an Android 2.3 browser - the page is performing an XmlHttpRequest to the server for a resource that just changed for sure and yet it gets back an older version. That's the result of a. the browser assuming a resource is cachable even if no Etag … Continue reading HTTP: The importance of declaring non-cachable resources as such