The Ultimate Web UI Framework

Recently I have found myself in the need of a framework for creating rich, responsive and highly interactive web-based user interfaces that would ideally be easy to use and fast to learn. I was basically only interested in the view part of the presentation tier, that’s the UI running in user’s browser and interacting withContinue reading “The Ultimate Web UI Framework”

Introducing Facelets

You might have already heard about Facelets (docs), a library for Java Server Faces (JSF), and wondered why it is popular and what it is good for. I’ve wondered too and now I want to share the answers with you. Warning: I’m a novice to Facelets and some things may be not completely exact.  FaceletsContinue reading “Introducing Facelets”

Truncating UTF String to the given number of bytes while preserving its validity [for DB insert]

Often you need to insert a String from Java into a database column with a fixed length specified in bytes. Using string.substring(0, DB_FIELD_LENGTH); isn’t enough because it only cuts down the number of characters but in UTF-8 a single character may be represented by 1-4 bytes. But you cannot just turn the string into anContinue reading “Truncating UTF String to the given number of bytes while preserving its validity [for DB insert]”