Sunday, 18 October 2015

My Zk expirience

As I mentioned before I have to do one thing in zk framework. My fillings are quite good comparing them with that filling what I had after developing in GWT. Maybe because ZK is different than GWT. ZK is server side oriented framework otherwise than GWT - client oriented.
Firstly GWT need special compilation after every little change, zk only when interface changed. In other cases hot swap every time works.
In ZK all business logic can is on server side. Forms looks like jsp and are processed by zk dispatcher.
Today I found one thread at stackoverflow.com comparing them. There is one comparison of project developed by two teams, one in ZK and second in GWT.  ZK win, it took one third of developing in GWT. I can say the same about developing in  clean JavaScript and Angular.
Comparing user experience of using application developed with ZK and GWT users didn't see any difference.
Conclusion
If you afraid of JavaScript and your clients can be always online, use ZK, otherwise you can reflect use GWT or domesticate with JavaScript and Angular

Thursday, 15 October 2015

log4j vs slf4j

I didn't know that slf4j is another abstraction for ex. log4j. Slf4j independence application from using ex. log4j or common logs. It doesn't log anything if behind it there isn't any logging library. 
Slf4j gives something useful in its interface - something like string format. You can write

LOGGER.debug("This my log in class {} and method {}", getName(), "my method");
and then, when this class is at higher logging level then debug it doesn't concatenate string)


I think it doesn't  protect us from writing sometime like this:

if(LOGGER.isDebug()){
     String s = someLongExecutionOperation();
     LOGGER.debug(s);
}

Tuesday, 13 October 2015

Data transfer in application

Lately it returns one topic in my mind. How to implement data flow between layers in my application.
My last habit was to convert entity to immutable dto (service layer) and then when I'd like to update object I converted another time dto (at controller layer) to bean. In this case I have 2 mapping. When I need to add some attribute I have to change 3 objects.
I always assume that entity can't go out from service, so my new idea to improve this solution.
Now I try one of case:
  1. use class with excluding interface . 
  2. create builder as now with getters. 

Other idea is to use mutable beans when I plan to update object or immutable in other case.

Thursday, 8 October 2015

Zk framework

Today I started to study zk solutions in application which I support. zk is alternative for famous framework as gwt or JSF. I didn't check performance of zk but as I could expirence, it is comparable.
In zk you request about zul file and this file execute controller class.

Friday, 2 October 2015

Maven 2.x vs 3.x

Today I wanted to know what is difference between version of this tool. I didn't use Maven at advance level so for me it is only some change in pom file.

Anyway I find out:
  1. I can run maven in multi thread mode and processor multicore mode.
  2. I can use maven shell
  3. It is a little faster then before but in my situation it doesn't matter.
  4. Logs are more verbose
Other useful option:
  1. I can convert pom file into some other JVM languages script like grove.
There are more changes but I'm not going into great details here.