Skip to content

Commit

Permalink
imported docs from blog
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienFremont committed May 19, 2016
1 parent 7dc4f32 commit 89d050e
Show file tree
Hide file tree
Showing 533 changed files with 8,940 additions and 861 deletions.
2 changes: 1 addition & 1 deletion 20120227-junit3_to_junit4/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From JUnit3 to Junit4
======

![alt text](screenshots/160520002504898.jpg)
![alt text](screenshots/160520005647016.jpg)

A post about simple JUnit tests. Unit testing is necessary, but reduce its volume (source test) is always interresting … it reduces development and maintenance tasks (code analyzer tools are your best friends). We need tools : a code analyzer : PMD, and … a testing framework : JUnit.

Expand Down
2 changes: 1 addition & 1 deletion 20130913-javabatch-helloworld/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Java batch simple helloworld repeat example (without dependencies)
======

![alt text](screenshots/160520002508756.png)
![alt text](screenshots/160520005650817.png)

In Java, the development of batch can be achieved with few solutions. Most applications use their own code from scratch. Here’s a quick example of full java batch, without any external dependecy.

Expand Down
2 changes: 1 addition & 1 deletion 20130914-springbatch-xmlconfig/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SpringBatch xml config helloworld repeat example
======

![alt text](screenshots/160520002513682.jpg)
![alt text](screenshots/160520005655309.jpg)

In Java, the development of batch can be achieved with few solutions. Most applications use SpringBatch. This is the SpringBatch framework with its XML configuration that is used here. Another example with the configuration JavaConfig follow.

Expand Down
22 changes: 11 additions & 11 deletions 20141214-todoapp-javascript/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TODO list exemple – full Javascript avec AngularJS NodeJS Express
======

![alt text](screenshots/160520002517337.png)
![alt text](screenshots/160520005659155.png)

Ce tutoriel est le dev d’une simple TODO list de type client-serveur (front-end + back-end). Le but est d’utiliser une stack technique complète en JavaScript pour comparer avec d’autres technologies.

Expand All @@ -23,11 +23,11 @@ La structure (classique) est composé d’un MVC coté front et d’un service R
# Code

[github ici](https://github.com/damienfremont/blog/tree/master/20141214-todoapp-javascript)
![alt text](screenshots/160520002517367.jpg)
![alt text](screenshots/160520005659183.jpg)

Récupérer le code à partir de github ici.

![alt text](screenshots/160520002517718.jpg)
![alt text](screenshots/160520005659406.jpg)

La partie back se présente avec un fichier de conf, une app et des routes :

Expand All @@ -50,7 +50,7 @@ Faire un clique droit sur le fichier package.json pour lancer une commande Run A
}
```

![alt text](screenshots/160520002517873.jpg)
![alt text](screenshots/160520005659560.jpg)



Expand Down Expand Up @@ -112,41 +112,41 @@ exports.save = function(req, res) {

# Demo

![alt text](screenshots/160520002518125.jpg)
![alt text](screenshots/160520005659790.jpg)

Lancer le server

![alt text](screenshots/160520002518369.jpg)
![alt text](screenshots/160520005700027.jpg)

Vérifier les logs

[http://localhost:3000/api/todos](http://localhost:3000/api/todos)
![alt text](screenshots/160520002518598.jpg)
![alt text](screenshots/160520005700251.jpg)

Tester sur L’URL du back
http://localhost:3000/api/todos

[http://localhost:3000/index.html#/](http://localhost:3000/index.html#/)
![alt text](screenshots/160520002518949.jpg)
![alt text](screenshots/160520005700478.jpg)

Tester sur L’URL du front
http://localhost:3000/index.html#/

Jouer avec l’application.
Le client doit envoyer des requetes PUT et GET au serveur. Serveur qui trace tout dans la console.

![alt text](screenshots/160520002519276.jpg)
![alt text](screenshots/160520005700885.jpg)



![alt text](screenshots/160520002519790.jpg)
![alt text](screenshots/160520005701380.jpg)



PS : en cas d’erreur lors de npm install, tenter la commande
npm install -g express

![alt text](screenshots/160520002520233.jpg)
![alt text](screenshots/160520005701662.jpg)



Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions 20141215-todoapp-java/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TODO list exemple – full Java avec GWT Tomcat Jersey
======

![alt text](screenshots/160520002528932.png)
![alt text](screenshots/160520005709663.png)

[todoapp js](http://damienfremont.com/2014/12/15/todo-list-exemple-full-javascript-avec-angularjs-nodejs-express/)
Ce tutoriel est la suite de todoapp js, mais en java cette fois-ci. C’est le dev d’une simple TODO list de type client-serveur (front-end + back-end). Le but est d’utiliser une stack technique complète en Java pour comparer avec d’autres technologies.
Expand All @@ -14,15 +14,15 @@ Ce tutoriel est la suite de todoapp js, mais en java cette fois-ci. C’est le d
[plugin GWT](https://developers.google.com/eclipse/docs/getting_started#installing)
En DEV : un IDE eclipse JavaEE + Maven et un tomcat7, ensuite installer le plugin GWT, manuellement ou via le marketplace d’eclipse.

![alt text](screenshots/160520002529004.jpg)
![alt text](screenshots/160520005709739.jpg)



[todomvc.com](http://todomvc.com/)
[exemple en GWT](http://todomvc.com/examples/gwt/)
En RUN : le front-end se base sur le site todomvc.com avec l’exemple en GWT. Le back-end est un Tomcat avec une servlet REST HTTP Jersey (JAX-RS).

![alt text](screenshots/160520002529191.jpg)
![alt text](screenshots/160520005709805.jpg)



Expand All @@ -36,11 +36,11 @@ La structure (classique) est composé d’un MVC coté front et d’un service R
[github source](https://github.com/damienfremont/blog/tree/master/20141215-todoapp-java)
Récupérer le code à partir de github source puis builder le projet.

![alt text](screenshots/160520002529427.jpg)
![alt text](screenshots/160520005710033.jpg)



![alt text](screenshots/160520002529990.jpg)
![alt text](screenshots/160520005710568.jpg)



Expand Down Expand Up @@ -256,7 +256,7 @@ web.xml
</web-app>
```

![alt text](screenshots/160520002530268.svg)
![alt text](screenshots/160520005710882.svg)

Coté client, c’est du GWT (classique …et compliqué pour rien. Voir le source sur github ou todomvc.

Expand All @@ -267,7 +267,7 @@ Lancer le serveur.
[http://localhost:8080/20141215-todoapp-java/api/todos](http://localhost:8080/20141215-todoapp-java/api/todos)
Tester sur L’URL du back. http://localhost:8080/20141215-todoapp-java/api/todos

![alt text](screenshots/160520002530366.jpg)
![alt text](screenshots/160520005710977.jpg)



Expand All @@ -278,7 +278,7 @@ Tester sur L’URL du back. http://localhost:8080/20141215-todoapp-java/api/todo
[http://localhost:8080/20141215-todoapp-java/](http://localhost:8080/20141215-todoapp-java/)
Tester sur L’URL du front. http://localhost:8080/20141215-todoapp-java/

![alt text](screenshots/160520002530678.jpg)
![alt text](screenshots/160520005711213.jpg)



Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions 20141216-bootstrap-collapsable_table/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
How to expand/collapse table rows with Bootstrap
======

![alt text](screenshots/160520002537829.jpg)
![alt text](screenshots/160520005717672.jpg)

How to do accordions effect on table rows with Bootstrap? We will see that using a HTML table to make a table … is not a good idea!

Expand All @@ -11,7 +11,7 @@ How to do accordions effect on table rows with Bootstrap? We will see that using

Make a table where each row is clickable to show a hidden sub-content (left side) and / or to navigate with clickable buttons (right).

![alt text](screenshots/160520002537898.jpg)
![alt text](screenshots/160520005717745.jpg)



Expand Down Expand Up @@ -41,7 +41,7 @@ Nothing to say is the most logical solution, because it is the one bootstrap off
</tr>
```

![alt text](screenshots/160520002537935.jpg)
![alt text](screenshots/160520005717777.jpg)



Expand Down Expand Up @@ -73,7 +73,7 @@ Solution: Create a DIV in a sub-TR (optional: add CSS to hide the permanent resi
</tr>
```

![alt text](screenshots/160520002537968.jpg)
![alt text](screenshots/160520005717806.jpg)



Expand Down Expand Up @@ -105,7 +105,7 @@ It works BUT JavaScript lags on expanding/collapsing when there are dozens of ro
</tr>
```

![alt text](screenshots/160520002538001.jpg)
![alt text](screenshots/160520005717839.jpg)



Expand All @@ -129,7 +129,7 @@ Solution: (optional) You must duplicate the CSS if you will get the same renderi
</div>
```

![alt text](screenshots/160520002538036.jpg)
![alt text](screenshots/160520005717875.jpg)



Expand Down Expand Up @@ -158,7 +158,7 @@ Solution: (optional) use a personal style or re-use the class accordion-toggle o
</div>
```

![alt text](screenshots/160520002538074.jpg)
![alt text](screenshots/160520005717905.jpg)



Expand Down
2 changes: 1 addition & 1 deletion 20150113-javaee-beanvalidator/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Comment utiliser BeanValidation manuellement hors d’un serveur JavaEE ?
======

![alt text](screenshots/160520002544712.png)
![alt text](screenshots/160520005724025.png)

Ce tuto décrit comment valider un modèle de données manuellement avec JavaEE BeanValidation (JSR 303). L’intérêt ? Eviter une pile de <If> inmaintenable dans le code quand on n’a pas accès à l’annotation @Valid (pas de server JavaEE, un Tomcat par exemple). Ce point étant couvert par la spécification mais rarement décrit. Les exceptions et les messages d’erreurs seront également abordés.

Expand Down
16 changes: 8 additions & 8 deletions 20150114-javaee-jersey_server/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Comment créer et tester un server HTTP REST en JAX-RS JavaEE sous Tomcat ?
======

![alt text](screenshots/160520002552300.png)
![alt text](screenshots/160520005732093.png)

Ce tutoriel couvre l’implémentation d’un server HTTP REST exposant du CRUD sur un simple objet. Ainsi que ses tests avec l’intégration d’un Tomcat dans JUnit et l’écriture de tests en BDD avec RestAssured. Il se fera en 2 partie : un dev/test de base, puis un dev/test gérant la validation de données et les codes d’erreur.

Expand All @@ -13,7 +13,7 @@ Eclipse, Jersey-Server, Tomcat et RestAssured. RestAssured propose un formalise

# Source code

![alt text](screenshots/160520002552369.jpg)
![alt text](screenshots/160520005732164.jpg)



Expand Down Expand Up @@ -256,15 +256,15 @@ Les tests pourront s’exécuter au choix vers un serveur Tomcat local ou embarq

Voici le test “à la main”. Il faut monter le projet dans un serveur Tomcat installé sur le poste de dev, à l’aide du plugin d’Eclipse par exemple. Puis tester avec votre navigateur web préféré ou SOAP-UI.

![alt text](screenshots/160520002553177.jpg)
![alt text](screenshots/160520005732477.jpg)



![alt text](screenshots/160520002553452.jpg)
![alt text](screenshots/160520005732706.jpg)



![alt text](screenshots/160520002553758.jpg)
![alt text](screenshots/160520005733135.jpg)



Expand Down Expand Up @@ -419,13 +419,13 @@ public class PersonService1Test {
}
```

![alt text](screenshots/160520002554203.jpg)
![alt text](screenshots/160520005733435.jpg)





![alt text](screenshots/160520002554580.svg)
![alt text](screenshots/160520005733640.svg)

C’est quand même plus simple pour tous les jours !

Expand Down Expand Up @@ -586,7 +586,7 @@ public class PersonService2Test {
}
```

![alt text](screenshots/160520002554692.jpg)
![alt text](screenshots/160520005733751.jpg)



Expand Down
Diff not rendered.
Loading

0 comments on commit 89d050e

Please sign in to comment.