Devops for Growth
112.1K views | +2 today
Follow
Devops for Growth
For Product Owners/Product Managers and Scrum Teams: Growth Hacking, Devops, Agile, Lean for IT, Lean Startup, customer centric, software quality...
Curated by Mickael Ruau
Your new post is loading...
Your new post is loading...

Popular Tags

Current selected tag: 'java'. Clear
Scooped by Mickael Ruau
March 31, 2016 8:13 AM
Scoop.it!

Clean coding-practices

Clean Coding Practices for Java Developers Clean Coding Practices for Java Developers John  Ferguson  Smart …
No comment yet.
Scooped by Mickael Ruau
November 19, 2015 5:35 AM
Scoop.it!

Simple yet Effective Methods to Solve Java Security Issues - InfoSec Resources

Simple yet Effective Methods to Solve Java Security Issues - InfoSec Resources | Devops for Growth | Scoop.it
It is true that Java cannot take credit in being among the safest options to use online, due to the vulnerabilities that emerge within its applications on
No comment yet.
Scooped by Mickael Ruau
June 26, 2015 4:24 AM
Scoop.it!

Ecrire du code testable en Java/JEE | JobProd

Ecrire du code testable en Java/JEE | JobProd | Devops for Growth | Scoop.it

Ces dernières années, on parle beaucoup du Test Driven Development, aussi connu sous l’acronyme TDD. Ce dernier s’inscrit en fait dans une démarche d’amélioration de la qualité des applications. En effet, les tests doivent normalement être écrits avant le code et doivent commencer par échouer. Sinon, le seul intérêt des tests unitaires sera de garantir une non régression par rapport au code actuel. Autre avantage des tests unitaires : pour que votre code soit testable il faut qu’il soit un minimum bien construit, sinon l’écriture des tests devient très complexe. James Carr a d’ailleurs publié un catalogue d’anti-patterns sur le sujet.

Mickael Ruau's insight:
Héritage d’objets, attention danger !

De manière générale, l’héritage ne doit être utilisé que pour faire du polymorphisme et pour rien d’autre. Cela se vérifie de nouveau dans le cas des tests unitaires. En effet, appeler depuis une classe fille une méthode de la classe parente revient à se retrouver dans le même cas que celui des méthodes privées présenté ci-dessus. Sauf que si vous avez beaucoup de classes qui appellent une méthode de la classe parente, le souci se trouve multiplié par 10, 100 ou 1000. Donc au risque de me répéter, utilisez l’agrégation pour réutiliser vos méthodes, et cantonnez l’héritage aux stricts cas de polymorphisme. Cet article parle du problème.

On peut néanmoins utiliser l’héritage avec des tests unitaires en respectant les conditions suivantes :

  • Les classes filles doivent au maximum éviter d’appeler des méthodes de la classe parente
  • L’héritage est fait parce qu’il y a un besoin de polymorphisme, et pas afin de réutiliser du code de la classe parente dans les classes filles.

A noter toutefois qu’hériter d’une ou plusieurs interfaces est totalement différent, étant donné que les interfaces ne servent que pour le polymorphisme.

No comment yet.
Scooped by Mickael Ruau
May 27, 2015 12:35 AM
Scoop.it!

Concise Java

Concise Java | Devops for Growth | Scoop.it
Unix pioneer Ken Thompson once said, “one of my most productive days was throwing away 1000 lines of code.” In this article Cas Saternos highlights practices now possible for writing concise Java code, with a special focus on the new functionality available in JDK 8. Shorter, more elegant code is possible due to the inclusion of Lambda Expressions in the language.
No comment yet.
Scooped by Mickael Ruau
May 12, 2015 10:11 AM
Scoop.it!

What are the Bad Features of Java? | Javalobby

What are the Bad Features of Java? | Javalobby | Devops for Growth | Scoop.it

I hear views from beginners to distinguished developers claiming you shouldn't/I can't imagine why you would/you should be sacked if you use X, you should only use Y.  I find such statements are rarely 100% accurate.  Often there is either edge cases, and sometimes very common cases where such statement are misleading or simply incorrect.I would treat any such broad comments with scepticism, and often they find they have to qualify what was said once they see that others don't have the same view.

No comment yet.
Scooped by Mickael Ruau
April 17, 2015 3:49 AM
Scoop.it!

Why We Need Lambda Expressions in Java - Part 1 | Javalobby

Why We Need Lambda Expressions in Java - Part 1 | Javalobby | Devops for Growth | Scoop.it
Passing behaviors, not only values

What we have seen in the former example is the main and possibly the only reason why lambda expressions are so useful. Passing a lambda expression to another function allow us to pass not only values but also behaviors and this enable to dramatically raise the level of our abstraction and then project more generic, flexible and reusable API.
No comment yet.
Scooped by Mickael Ruau
April 17, 2015 2:50 AM
Scoop.it!

Why We Need Lambda Expressions in Java - Part 2 | Javalobby

Why We Need Lambda Expressions in Java - Part 2 | Javalobby | Devops for Growth | Scoop.it
Efficiency through laziness

Another advantage of internal iteration of collections and more in general of functional programming is the lazy evaluation that it allows.
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 12:41 PM
Scoop.it!

JBoss Tools - CDI

JBoss Tools - CDI | Devops for Growth | Scoop.it
A bunch of wizards are available for easier creation of:

CDI Web project

Bean

Interceptor

Decorator

Qualifier Annotation

Scope Annotation

Stereoptype Annotation

Interceptor Binding Annotation

Annotation Literal

and more.
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 11:37 AM
Scoop.it!

Exception handling techniques - OWASP

Exception handling techniques - OWASP | Devops for Growth | Scoop.it
In Java 7, resource cleanup was automated by means of the try-with-resources block. In practice, this new syntax allows you to declare resources that are part of the try block. You define the resources ahead of time and the runtime automatically closes those resources (if they are not already closed) after the execution of the try block.

A resource can be any object that implements the interface java.lang.AutoCloseable.

Although the try-with-resources block can have a finally or catch block, it is not mandatory.
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 5:45 AM
Scoop.it!

Audit des performances d'une application en Java EE

Audit des performances d'une application en Java EE | Devops for Growth | Scoop.it
Cet article est une introduction à l'audit de performance d'une application en Java/Java EE.
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 5:41 AM
Scoop.it!

Design Patterns du Gang of Four appliqués à Java

Design Patterns du Gang of Four appliqués à Java | Devops for Growth | Scoop.it
Cet article a pour objectif de présenter les Design Patterns du "Gang of Four" avec des exemples concis appliqués à Java.
Chaque Design Pattern est présenté avec son diagramme de classes, ses objectifs, les motivations pour l'utiliser, les responsabilités des classes le constituant, puis une implémentation simple.
No comment yet.
Scooped by Mickael Ruau
March 24, 2015 10:30 AM
Scoop.it!

Java-Only | Annotation driven code generation in Java

Project Lombok is a very interesting API and in this tutorial we will se how to use its build in annotations to generate methods such as getters/setters etc in a simple pojo class.
No comment yet.
Scooped by Mickael Ruau
March 24, 2015 10:24 AM
Scoop.it!

Java Preferences API - Tutorial

Java Preferences API - Tutorial | Devops for Growth | Scoop.it
Table of Contents

1. Java Preferences API
2. Exercise: Using the API
2.1. Create program
2.2. Validate
3. About this website
3.1. Donate to support free tutorials
3.2. Questions and discussion
3.3. License for this tutorial and its code
4. Links and Literature
4.1. vogella Resources
No comment yet.
Scooped by Mickael Ruau
February 12, 2016 3:46 AM
Scoop.it!

Tutoriel sur COJAC - Sniffeur de problèmes numériques et usine de nombres enrichis pour Java

Tutoriel sur COJAC - Sniffeur de problèmes numériques et usine de nombres enrichis pour Java | Devops for Growth | Scoop.it
Apprendre à utiliser COJAC, un Sniffeur de problèmes numériques et usine de nombres enrichis pour Java
No comment yet.
Scooped by Mickael Ruau
July 23, 2015 3:44 AM
Scoop.it!

Retour sur les bases : equals et hashCode

Retour sur les bases : equals et hashCode | Devops for Growth | Scoop.it
Je suis régulièrement amené à recevoir des candidats de tous niveaux afin de procéder à une évaluation technique et une de mes questions fétiches concerne `equals` et `hashCode`. Tout développeur se doit évidemment d'être parfaitement affûté sur ce sujet on ne peut plus basique. Pourtant, la réalité montre que la majorité des réponses sont au mieux incomplètes et bien souvent totalement fausses.
No comment yet.
Scooped by Mickael Ruau
June 1, 2015 2:41 AM
Scoop.it!

5 Advanced Java Debugging Techniques Every Developer Should Know About

5 Advanced Java Debugging Techniques Every Developer Should Know About | Devops for Growth | Scoop.it
With architectures becoming more distributed and code more asynchronous, pinpointing and resolving errors in production is harder than ever. In this article we investigate five advanced techniques that can help you get to the root cause of painful bugs in production more quickly, without adding material overhead.
No comment yet.
Scooped by Mickael Ruau
May 27, 2015 12:31 AM
Scoop.it!

Java 9 On Track for 2016

Java 9 On Track for 2016 | Devops for Growth | Scoop.it
Oracle is targeting a Java 9 GA release date of September 2016. The schedule follows Oracle’s plans to release a new major version every two years, although contrasting to previous releases the currently proposed deadline might be at risk for some slippage.
No comment yet.
Scooped by Mickael Ruau
May 12, 2015 10:09 AM
Scoop.it!

Devoxx France 2015 Jour 3 : Java 8 in Anger – Le Blog d'Ippon...

Devoxx France 2015 Jour 3 : Java 8 in Anger – Le Blog d'Ippon... | Devops for Growth | Scoop.it
J’ai assisté cette année à mon premier Devoxx et je souhaitais faire un retour sur ma conférence préférée de la journée de vendredi, celle sur Java 8 de Trisha Gee. Je ne suis pas biaisée, mais ce serait difficile de ne pas avoir appréciée une conférence par... #devoxx #java8 #javafx
No comment yet.
Scooped by Mickael Ruau
April 17, 2015 3:48 AM
Scoop.it!

Java 8 Lambda Expressions Tutorial. Lambda Expression Java

Java 8 Lambda Expressions Tutorial. Lambda Expression Java | Devops for Growth | Scoop.it
Since the old days of Swing, we always had written anonymous classes if we wanted to pass some functionality to any method. For example the old event listener code used to look like:

someObject.addMouseListener(new MouseAdapter() {
            public void mouseClicked(MouseEvent e) {
                 
                //Event listener implementation goes here...
                 
            }
        });
Here we wanted to add some custom code to Mouse listener. We defined an anonymous inner class MouseAdapter and created its object. This way we passed some functionality to addMouseListener method.

In short, it is not easy to pass plain methods / functionalities in Java that can be passed as arguments. Due to this limitation Java 8 adds a brand new language level feature called Lambda Expressions.
Mickael Ruau's insight:

Functions are first class citizens in a functional programming language. They exists on their own. You can assign them to a variable and pass them as arguments to other functions. JavaScript is one of the best example of an FP language. There are some good articles here and here that clearly describes the benefits of JavaScript as a functional language. A functional language provides very powerful feature called Closure that has quite a few advantages over traditional way of writing applications. A closure is a function or reference to a function together with a referencing environment — a table storing a reference to each of the non-local variables of that function. Closest thing that Java can provide to Closure is Lambda expressions. There is significant difference between a Closure and Lambda expression, but at least Lambda expression provides a good alternative to Closure.

No comment yet.
Scooped by Mickael Ruau
April 16, 2015 3:45 AM
Scoop.it!

Java 8 Default Methods Tutorial. Default methods in Java 8

Java 8 Default Methods Tutorial. Default methods in Java 8 | Devops for Growth | Scoop.it
Java 8 has a new feature called Default Methods. It is now possible to add method bodies into interfaces!
Mickael Ruau's insight:

Why we need Default Methods?

Why would one want to add methods into Interfaces? We’ll it is because interfaces are too tightly coupled with their implementation classes. i.e. it is not possible to add a method in interface without breaking the implementor class. Once you add a method in interface, all its implemented classes must declare method body of this new method. 

Since Java 8, things started getting ugly. A new feature Lambda was introduce which is cool. However it is not possible to use this feature in existing Java libraries such as java.util package. If you add a single method in interface List, it breaks everything. You need to add its implementation in every class that implements List interface. Imagine in real world how many custom classes would change.

So for backward compatibility, Java 8 cleverly added Default Methods.

No comment yet.
Scooped by Mickael Ruau
April 11, 2015 12:19 PM
Scoop.it!

OOP paradigm, principles of good design and architecture of Java appl…

Not so many developers are clearly make a distinction between design and architecture, and the experience of the interviews shows that the basic paradigm of OO…
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 11:32 AM
Scoop.it!

Hibernate - OWASP

Hibernate - OWASP | Devops for Growth | Scoop.it
These issues are discussed in context on this page and are also listed in this section of Hibernate Guidelines.

No communication with the database should occur outside of a database transaction. Doing so will probably result in synchronization issues. Transactions should also not encompass user think time. Details are of how it's done is discussed in the Defining Transaction Bounds section of this page.
createQuery() can easily be passed a tainted SQL or HQL string, dialect is irrelevant. The proper way to construct a sql string hibernate style is to use Query and SQLQuery's setParameter(), setString(), setXXX() methods for named parameter and placeholder binding. Just like prepared statements. Details are discussed in the Creating Queries section of this page.
Persisting tainted objects is stored xss. Since stored XSS is generally hard to find with static tools, it is best to sanitize all data going in rather than waiting for it to show up on a jsp somewhere. Details of these functions are discussed in the Persisting Tainted Data section of this page.
An application should rollback and discard Session instance on error. So if the Session throws an exception, the catch block should have rollback() and finally should call Session.close(). This applies to any SQLException. Pretty cut and dry, see Example1 above.
You may not mix and match JDBC-style parameters ("?") and named parameters (:namedparam) in the same query.
Person aPerson = (Person) session
.createQuery("select :somenamedparameter from ? where x = :someothernamedparameter");
Transaction.setTimeout(int) should be called to ensure that misbehaving transactions do not tie up resources in definitely.
Session sess = factory.openSession();
try {
//set transaction timeout to 3 seconds
sess.getTransaction().setTimeout(3);
sess.getTransaction().begin();
// do some work
...
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 5:42 AM
Scoop.it!

Tutoriel sur les tests JUnit4 avec Spring

Tutoriel sur les tests JUnit4 avec Spring | Devops for Growth | Scoop.it
Cet article présente les tests unitaires JUnit4 avec Spring.

Les cas de tests présentés sont sur des classes sans accès à une base de données et sur des classes nécessitant un accès à une base de données.
No comment yet.
Scooped by Mickael Ruau
April 11, 2015 5:38 AM
Scoop.it!

La sérialisation XML en Java

La sérialisation XML en Java | Devops for Growth | Scoop.it
Ce tutoriel a pour but de présenter la sérialisation XML en Java. Il commence par les bases et continue sur les fonctionnalités plus complexes qui vous permettront une maîtrise totale de ce mécanisme.
No comment yet.
Scooped by Mickael Ruau
March 24, 2015 10:24 AM
Scoop.it!

Java Logging API - Tutorial

Java Logging API - Tutorial | Devops for Growth | Scoop.it
Table of Contents

1. Overview
1.1. Logging
1.2. Logging in Java
1.3. Create a logger
1.4. Level
1.5. Handler
1.6. Formatter
1.7. Log Manager
1.8. Best Practices
2. Example
2.1. Create the logger
2.2. Use the logger
3. About this website
3.1. Donate to support free tutorials
3.2. Questions and discussion
3.3. License for this tutorial and its code
4. Links and Literature
No comment yet.