Friday, 18 July 2014

Spring JDBC connection with jdbcTemplate and JdbcDaoSupport


Hello! Today I want to make a couple of examples of database access using JDBC within Spring framework. In this article we'll see how DB's manipulations can be  simplified using jdbcTemplate and JdbcDaoSupport.

Cute image from me:
If we don't use jdbcTemplate we must again and again, in every method, repeat yourself writing duplicate code for opening and clothing connection to DB, etc.

Why? I really don't understand, this solution is opposite to the one of OOP design principle (DRY: Don't Repeat Yourself). If you use some code more then ones - then you must detach it to a separate method and invoke it every time you need in the future.

Spring developers offer us to avoid repeating yourself and use jdbcTemplate which can do all redundant work for us.

Let's see the differences!

Monday, 7 July 2014

Script debugging in browser (JavaScript + Chrome example)

Hello! Time for the next debugging mini-lesson. Today I want to give you an additional information about debugging web-app. If you have some JavaScript (or other scripts) on your page it is very simple to debug it in familiar way.


All you need for this lesson - Chrome browser and some working project with couple of JavaScript lines inside.
I am using my pet-project to make some clear images for you.