Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Ma caisse enregistreuse en NodeJS
Search
paul souche
May 19, 2014
Programming
0
550
Ma caisse enregistreuse en NodeJS
paul souche
May 19, 2014
Tweet
Share
More Decks by paul souche
See All by paul souche
Une API from scratch avec NestJS
paulsouche
0
160
Unit test in deno
paulsouche
0
150
One spec to rule them all
paulsouche
1
290
Analytics reverse engineering
paulsouche
0
150
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
220
The internal modules strike back
paulsouche
0
120
AngularJS + Typescript === <3
paulsouche
0
350
Other Decks in Programming
See All in Programming
Le côté obscur des IA génératives
pascallemerrer
0
150
Cursorハンズオン実践!
eltociear
2
1.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
110
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
340
Devoxx BE - Local Development in the AI Era
kdubois
0
130
CSC509 Lecture 06
javiergs
PRO
0
260
そのpreloadは必要?見過ごされたpreloadが技術的負債として爆発した日
mugitti9
2
3.4k
Go言語はstack overflowの夢を見るか?
logica0419
0
320
Flutterで分数(Fraction)を表示する方法
koukimiura
0
130
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.1k
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
130
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
170
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
115
20k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
KATA
mclloyd
32
15k
Build your cross-platform service in a week with App Engine
jlugia
232
18k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
Ma caisse enregistreuse en Node.js Paul SOUCHE
Qui je suis / d’où je viens Paul Souche Développeur
Front-end @
Présentation interactive Essayez le hashTag : #maCaisseNodejs Seulement 20 x
2 caractères → Soyez créatifs vous aurez alors 5 secondes minimum pour prendre une photo...
Le contexte But : Gérer des périphériques monétiques et éditiques
depuis un client léger. Problème : Ces équipements communiquent via le port série.
Le contexte Comment atteindre les ports Série depuis un navigateur
? - ActiveX ? - ChromeApp ? - Applet Java ? - Serveur local Il faudra de toute façon installer quelque chose sur le poste client.
Le contexte Le back est développé sur Wakanda (4D javaScript)
→ permet de ne pas changer de langage Comment gérer le protocole COM sur le front ?
L’architecture Node.js à la rescousse : - API permettant de
communiquer sur les ports séries existante : voodootikigod / node-serialport - Serveur express minimal pour une API bas niveau
L’architecture
L’architecture
La stack - AngularJS - Bootstrap - Express - Node
- npm, Bower & Grunt
La stack Les modules en + : - node-serialPort :
voodootikigod / node-serialport - angular-ui bootstrap : angular-ui / bootstrap - paperwork : lperrin / paperwork - ngTailor : lauterry / ngTailor - nodemon : remy / nodemon
La stack : le front
La stack : le back
La stack : le port série Exemple d’échange : EMETTEUR
ENQ (5) STX + données + ETX + LRC EOT (4) RECEPTEUR ACK (6) ACK
La stack : le port serie
Démo ?
Conclusion Lib serialPort node vraiment complète : - liste des
ports série disponibles sur la machine - accès aux callbacks de déconnexion Les difficultés : - CORS et son application par les browsers - L’encodage ascii avec node : NUL.toAscii = ‘ ‘ (V8)
Questions ? Merci à : - AREGIE - Hamdi, Douglas
& Grég - nodejsParis - Vous - Le fer à souder - La caisse de l’hippopotamus à Neuilly - La caisse du franprix en bas de chez moi