Martin Spasovski

Read this first

Useful demo/reference Spring based projects - Vol. 2

This is a second blog post in a series of posts which will highlight useful demo/reference Spring based projects. To check Vol. 1 go to cool demo projects from #SpringOne2GX 2014.

  1. spring-boot-graph-processing-example

  2. PiggyMetrics

  3. spring-boot-netflix-example

  4. spring-angular2-starter

  5. rxjava-spring-boot-starter

  6. spring-boot-keycloak-server-example

  7. spring-boot-docker

Continue reading →


Inspect element and JavaScript console on Android and iOS devices with weinre

From time to time a developer needs to run some JS, or to check out the source of a page that is loaded, on a tablet or a smartphone. The first thing you’ll notice that Chrome has no developer tools on mobile. Fear not, remote access is possible.

Enter weinre (WEb INspector REmote). With weinre you’ll get the Chrome Developer Tools on your desktop - for every device that opens your specific web page.

Lets install and start weinre, and we’ll see how it works.

 Installation:

First you’ll need node and npm installed. After that, install weinre with

npm -g install weinre

 Running:

After weinre is installed, start the ‘server’ on your machine with

weinre --boundHost 127.0.0.1 --httpPort 9090

Change the IP address and the port to your needs.

And one last and very important step, include the following snippet in your relevant web app template:

<script

Continue reading →


Cool demo projects from #SpringOne2GX 2014

Want to learn Spring by example? Use the source, Luke!

This is a list of the coolest example/demo projects that can be found at the SpringOne2GX conference Github space. For each project there’s a related presentation as well.

  1. Rective Geocoder - code, presentation: uses Reactor, Spring Boot, and Ratpack.

  2. Recommendation Engine - code, presentation: uses Hadoop, Spring XD, Apache Mahout, Spring Batch, Spring Boot, etc..

  3. Microservice Security - code, presentation: uses Spring Boot, Spring Security, Spring Session, OAuth 2, etc..

  4. Spring Resource Handling - code, presentation, uses Spring Boot, Spring MVC, Groovy, Handlebars, Node, Gulp.js, etc…

  5. Intro to Spring Hadoop - code, presentation, uses Hadoop, Spring XD, Spring Data Hadoop, Spring Boot, Hive, etc…

  6. Spring-a-gram - code, presentation, uses Spring Boot, Spring MVC, Spring Data JPA, Spring Data REST, Bower, RequireJS, jQuery, etc…

Continue reading →


Publishing developer documentation

While searching for a nice and easy way to publish developer documentation and make it available to other folks I found several options, so I’m sharing them here in this short-but-informative post.

The main distinction between the options is that some are self-hosted and some are available as a service.

 Self-hosted:

  • Flatdoc: Github / Homepage
  • Slate: Github / Wiki

Both tools use Markdown for writing and don’t require server-side processing except serving file resources (html/css/js). You write the documentation in Markdown, customize the templates, generate the pages and put them on a server. This means that the documentation can be hosted on pretty much everything, from GitHub Pages to Heroku and more. The only difference between these two is that Flatdoc is not generating the static pages - it’s loading the Markdown documents in the browser and renders them in place.

 Hosted:

Continue reading →


Think like a caching mechanism

We keep the things we use around us, in reach, in all sorts of situations. Stuff on the desk at work, stuff on the coffee-table in the living room, on the drawers in the bathroom, in the garage, etc…

One day, while sorting and storing things around the house, a thought emerged, we should manage these items like a caching mechanism!

Cache, as described in Wikipedia, is:

a component that transparently stores data so that future requests for that data can be served faster

For example, when a blog post is opened, the system does not read it from database the data per every request, but it caches and retrieves it in an instant, from the RAM memory. Or another example, instead of going to the basement for your favorite wine, keep one in the fridge.

How can we apply this kind of thinking around the house? Let’s see the characteristics of a cache:

Cache size: imagine your most accessible

Continue reading →


Book “OAuth 2.0 Identity and Access Management Patterns” is available

I’m proud to announce that the first book I authored, OAuth 2.0 Identity and Access Management Patterns, is out and available for purchase.

 Background

OAuth 2 is a protocol with which I had been working with at my day-job on several occasions, so the practical experience and previous research done on this topic was very useful (just to note, I have been working with OpenID and Persona as well).

When the team at Packt Publishing contacted me, I was happy to author a book on this topic.

 What is the book about?

First a short intro on OAuth: We use OAuth every day, for example: I want my Foursquare check-ins to be auto posted on Facebook. So I go in Foursquare and say add Facebook account. Then I am redirected to Facebook where it asks me if I want to approve the application request – where I say yes or no – and then I am redirected back to Foursquare. In this final step, if the

Continue reading →