Monday, July 25, 2016

Spring batch


Configuration
Parameters and context
Transactions
Scaling


Examples
Job database schema

Spring boot properties

# Don't create the tables
spring.batch.initializer.enabled=false

# Don't launch all the jobs on app start
spring.batch.job.enabled=fasle

Oracle



Sunday, July 24, 2016

Vaadin containers

  • BeanItemContainer: the properties of the container are determined automatically by introspecting the used JavaBean class. Uses the beans themselves as identifiers.
  • BeanContainer: unlike BeanItemContainer, the item IDs do not have to be the beans themselves.  Uses explicit IDs or implicit IDs with setBeanIdResolver or setBeanIdProperty.

Friday, July 15, 2016

RapidClipse

https://www.rapidclipse.com/
Eclipse, Hibernate and Vaadin based rapid development environment.

  • Complete project setup wizard.
  • Good IDE layout: entities, DAOs, UI, etc.
  • Nice UI preview.
  • Diferent UIs in the same project: desktop, tablet and mobile.
  • Database/entity diagram.
  • Desktop (SWT) or client-server (HTML) apps.
  • Uses Vaadin component subclases (propietary).
  • Theme and per component SCSS support.
  • Includes authentication and authroization support (DB or LDAP).
  • No text documentation available (only screencasts).
  • No SQL (no Hibernate) DAO support.
  • Maven and Java 8.

Thursday, July 14, 2016

Angular 2 change detection

Default behaviour

Change detection is fired on each event loop chance (events, http requets, timers, ...).

Components are allways explored form the root to the leafs of the component tree.

By default, A2 is conservative and explores the complete tree and evaluates all the expressions in each component or directive template. Then compares the output of each expression to its previous output. If the result of an expression has changed, A2 updates the DOM accordingly.

This is as fast as posible; A2 generates change detectors with Javascript VM-friendly code (monomorphic). As the application grows, things may start to lag.

This is the default CD strategy and is called ChangeDetectionStrategy.CheckAllways.

OnPush mode

In order to reduce the performance impact the CD strategy of components can be set to ChangeDetectionStrategy.OnPush.

OnPush means that the change detector will only run on a component or directive if one of the following occurs:
  • An input property has changed to a new value (new primitive value or new object reference).
  • An event handler fired in the component or directive (???).
  • You manually tell the change detector to look for changes.
  • The change detector of a child component or directive runs.
OnPush should be implemented starting on leafs, otherwise child components or directives on them with CheckAllways strategy won't be allways executed.


References