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
590
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ma caisse enregistreuse en NodeJS
paul souche
May 19, 2014
More Decks by paul souche
See All by paul souche
Une API from scratch avec NestJS
paulsouche
0
180
Unit test in deno
paulsouche
0
180
One spec to rule them all
paulsouche
1
320
Analytics reverse engineering
paulsouche
0
180
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
250
The internal modules strike back
paulsouche
0
140
AngularJS + Typescript === <3
paulsouche
0
360
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
270
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
230
act2-costs.pdf
sumedhbala
0
110
継続モナドとリアクティブプログラミング
yukikurage
3
500
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
480
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
310
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
150
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.8k
なぜ関数型プログラミングで「型」と「証明」が語られるのか #fp_matsuri
kajitack
3
800
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
200
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
360
共通化で考えるべきは、実装より公開する型だった
codeegg
0
210
Featured
See All Featured
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
230
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Being A Developer After 40
akosma
91
590k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Amusing Abliteration
ianozsvald
1
220
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
870
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
930
Mobile First: as difficult as doing things right
swwweet
225
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
650
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
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