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
490
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
150
Unit test in deno
paulsouche
0
110
One spec to rule them all
paulsouche
1
220
Analytics reverse engineering
paulsouche
0
120
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.8k
Test like a boss with TypeScript
paulsouche
0
200
The internal modules strike back
paulsouche
0
110
AngularJS + Typescript === <3
paulsouche
0
330
Other Decks in Programming
See All in Programming
Activities at Cairo Library
cairolibrary720
0
1.2k
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
Ruby メモリ管理 プログラミング
megmogmog1965
0
130
Product Management LT会_クアンド新家
shinshin
0
210
Architectures with Lightweight Stores: New Rules and Options
manfredsteyer
PRO
0
100
コード生成を伴うLLMエージェント - 2024.07.18 Tokyo AI
smiyawaki0820
11
4.1k
入社1ヶ月でここまでやった!Findy Toolsインフラ支援の最適化
rvirus0817
6
1.4k
ぼっちを避けて楽しむためのアノテコノテ / Various Tips and Tricks to Avoid Loneliness and Have Fun
nrslib
3
1.7k
CSC307 Lecture 05
javiergs
PRO
0
210
Harnessing Large Language Models for Training-free Video Anomaly Detection
tereka114
1
1.3k
AHC035解説
terryu16
0
710
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
140
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
357
18k
It's Worth the Effort
3n
181
27k
Navigating Team Friction
lara
181
13k
In The Pink: A Labor of Love
frogandcode
139
22k
Atom: Resistance is Futile
akmur
261
25k
The Illustrated Children's Guide to Kubernetes
chrisshort
39
47k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
16
1.6k
GitHub's CSS Performance
jonrohan
1026
450k
Writing Fast Ruby
sferik
623
60k
Visualization
eitanlees
139
14k
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