Freitag, 16. September 2016

BedCon 2016 - Vergleich von WebFrameworks

http://www.slideshare.net/GEDOPLAN

https://github.com/GEDOPLAN/webclients-check

BedCon 2016 - Resilience Patterns

BedCon 2016 - Resilience Patterns

https://www.slideshare.net/mobile/ufried/resilience-reloaded-more-resilience-patterns

BedCon 2016 - Softwarearchitektur für optimale User Experience

BedCon 2016 - Softwarearchitektur für optimale User Experience

User Experience Tool: balsamiq.com

BedCon 2016 - JPA Best Practices

JPA Best Practices

- EntityManager immer nur im RequestScope laufen lassen ( also nicht per Session ).
Der EntityManager ist an eine Transaktion gebunden, Außerhalb von Requests können sonst Nebenläufigkeiten entstehen.

- EntityManager per @Inject reingeben statt @PersistenceManager . Bei @Inject muss der EntityManager von einer Factory erzeugt werden über @Produces im Request-Scope. Auf diese Art und Weise kann der EntityManager auch an anderen Stellen verwendet werden, so @PersistenceManager nicht erlaubt ist. Hier ist aber darauf zu achten, dass der EntityManager per se immer trasaktional arbeitet. Jede Attributänderung einer JSF ManagedBean wird direkt weggespeichert wenn diese Bean dann attached ist. Durch ein explizites Ausstellen (Modus Unsynchronized) der Transaktionalität beim Produzieren des EntityManagers in der Factory lässt sich das verhindern. Allerdings muss dann der EntityManager bei einer gewollten transaktionalen Verarbeitung wieder manuell an die Transaktion gebunden werden (entityManager.joinTransaction())

Donnerstag, 15. September 2016

BedCon 2016 - Docker Orchestrierung mit Docker Swarm & Compose

BedCon 2016

Docker Orchestrierung mit Docker Swarm & Compose

- Docker mit Overlay Network braucht mind. Linux Kernel 4.2.x (basiert auf vxlan)

- Docker Compose konfiguration in yaml

BedCon 2016 - GUI Testing - Wartbare Alternativen zu Record&Play


 Wartbare Alternativen zu Record&Play GUI Testing

Slides

1. Möglichkeit: Grafisches GUI Test Tool, Tests zusammen klicken
UI elemente anhand von xpath erkennung ist gefährlich --> bei änderung der anordnung der elemente geht nix mehr
--> regressionstests nicht möglich
Lange Laufzeiten
Lange Entwicklungszeit (weil lange Laufzeiten)

2. Möglichkeit: Selenium
selenium for chrome, ff, safari, etc, and mobile
pros: programmatic tests
cons: spagetti code, bad technical API
--> Problem: Es gibt kein Model der GUI, die getestet wird
--> Lösung: Ein Model (und damit API) schaffen für die GUI
Page Object Pattern:
Selenium Page Objects
Arquillian Graphene
GEB
Testframework in groovy, hat auch Page Objects
Test-DSL

Alternativen
CATJS
Testcode (JS) im HTML enthalten

Test-Strategien
- test on lowest level! (besser viele günstige Unit-Tests als wenige teure GUI Test)
- lange laufzeiten vermeiden
- wenn extra QA Abteilung/MA, dann co-working Dev<->QA             

Dienstag, 12. Juli 2016

SonarQube for Maven

If you have a SonarQube server running somewhere in the network you can check any maven project on it.
All you have to configure is the SonarQube plugin group and the SonarQube connection parameters in your maven settings.xml


<settings>
    ...
    <pluginGroups>
        <pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
    </pluginGroups>
    ...
    <profiles>
        <profile>
            <id>psipenta-nexus-pjf-suite</id>
            ...
            <properties>
                <sonar.host.url>
                  http://localhost:9000
                </sonar.host.url>
                <sonar.jdbc.url>
                    jdbc:mysql://localhost:3306/sonar?useUnicode=true
                </sonar.jdbc.url>
                <sonar.jdbc.username>
                    sonar
                </sonar.jdbc.username>
                <sonar.jdbc.password>
                    sonar
                </sonar.jdbc.password>
            </properties>
        </profile>
    </profiles>
</settings>
 
Be sure that the profile, you configure the connection properties for, is the active maven profile.

Having done this, a maven project can be checked on SonarQube with

mvn sonar:sonar
 
This goal is being executed after mvn verify. This means, the project is also built and installed with this command.

As a result, you see your project at the SonarQube dashboard: http://localhost:9000/

Hint: The SonarQube project name is the project artifact name by default. It is possible to configure that name via maven:

mvn sonar:sonar -Dsonar.projectName=MY_PROJECT_ON_SONAR


Further Information

http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven
http://docs.sonarqube.org/display/SONAR/Analysis+Parameters
http://stackoverflow.com/questions/38330295/cant-sort-a-cyclic-graph-exception-running-sonar-with-eclipse-rcp-application