Skip to main content

Posts

Showing posts from November, 2014

Developer Productivity tools

This post will serve as a reference for different tools that help the developer to be more productive
and make his life easier, most for Java, others are general
I'll also list some popular libraries
IDEs and EditorsVSCode [https://code.visualstudio.com/] Notepad ++ [http://notepad-plus-plus.org/]Eclipse [https://eclipse.org/]Webstorm [Java script IDE :https://www.jetbrains.com/webstorm/]Graphics online photo editor [http://apps.pixlr.com/editor/]3D design : Blender [http://www.blender.org/]Mocking & wire framinginvision [https://www.invisionapp.com/] UML toolsdraw.io [https://www.draw.io/]Visual Paradigm [http://www.visual-paradigm.com/download/]Windows toolsTabbed windows explorer [ Clover 3 : http://ejie.me/] Tabbed CMD  [ ConEmu : http://sourceforge.net/projects/conemu/]Browsers Extensions:FireFox, Dark reader (dark mode for any website) performance testingJMeter [http://jmeter.apache.org/]Scheduling and time managementTom's Planner [http://www.tomsplanner.com/] Trackin…

Java Validation standard JSR-303

Every application needs to do some validation, and it varies from simple checking on values to complex business rules, like verifying if the user bill has been paid and payment received before we are able to call the print bill API.

 So the java people have created a standard for us under the number JSR-303 that creates a pretty nice way to validate our entities. javax.validatio, inside the validation-api.jar, is the API package for this standard.

The most popular implementation for that API is Hibernate-validator gradle dependencies : compile 'org.hibernate:hibernate-validator:5.0.1.Final'




What mainly is in the validation-api jar are the constraints and the generic interface ConstraintValidator, these are what I'm going to work with here.

there are two methods in this interface the one that does the work is the isValid method, this what will be called, and this what we need to implement  if we need a custom validation rule.

the standard rules are the following :
AssertF…