Your Java validation framework

Tue, Dec 20, 2016

If you have ever used javax.validation and friends, you have probably noticed a few of these problems:

  • how cumbersome it becomes with validation groups.
  • since it is a world of web APIs, you want only the first error.
  • trashing domain objects with annotations.
  • restricting validated objects to certain use cases.
  • complexity of validator implementation and a context class to keep it all together.

We have lambdas now in Java8, which makes it possible to embrace the power of simple interface and composition.

Behat Mink sleep alternative

Mon, Jun 3, 2013

This post is response to Matt Waynne’s post and concentrated on Behat Mink example for PHP. In short: sleeps to wait for a state change on test target - is just a guess, which might not be correct for different circumstances, etc.: slow server or network. The solution proposed in this post - is about polling for a state change.

DWM window manager for linux

Sun, Mar 3, 2013

What are window managers and why you should try it. If any of the following points ever concerned you, read further.

  • You do not need “all that stuff you never use” but your desktop allocates resources to it.
  • You wish to have a lightweight, solid, stable environment, just to do the work?
  • You want to build your own environment and know what is happening on your system.

Using prototypal inheritance in javascript

Sat, May 26, 2012

When coding full stack applications in javascript or just a component library, you soon realize how it is important to keep it extensible and maintainable. This article will mainly introduce you, how to use a prototypal inheritance method to apply OOP style in javascript and how to do it well.

Main context:

  • Private variables, methods
  • Prototype extension
  • Overriding methods
  • Runtime method overriding
  • Global scope methods
  • Self invoking functions

Smarty 3 extension for Zend Framework

Wed, Oct 13, 2010

Smarty3 extension is easy to integrate and with full compatibility of view and layout templates which supports all standard features like modules and view rendering in ajax, json, xml. All helpers with Smarty 3 are working nicely without any intervention.

Features:

  • Layout and view rendering by standard rules
  • Static template path for each module
  • All helper support including ajax, json, xml contexts

Compile php on your own

Mon, Aug 16, 2010

This article contains a PHP build script and a quick tutorial on how to compile and setup php-5.[2-5].x version into your server. The article is intended for beginners and has detailed explanations for setting up dependencies and understanding in general how to modify it to your needs.

Steps:

  • Get sources
  • Prepare a build script
  • Prepare used library dependencies
  • Build and install
  • Run on Apache2 webserver
  • Run on Nginx
  • Installation of additional php extensions

Doctrine 2 on Zend framework

Thu, Jul 15, 2010

This article describes how to connect Doctrine2 with Zend Framework.

Main implementation stuff:

  • Bootstrap Doctrine allowing multi-driver support for meta data
  • Configure namespaces and loaders for CLI support
  • Extensive and simple implementation for any usage