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
520
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
120
One spec to rule them all
paulsouche
1
260
Analytics reverse engineering
paulsouche
0
140
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.9k
Test like a boss with TypeScript
paulsouche
0
210
The internal modules strike back
paulsouche
0
110
AngularJS + Typescript === <3
paulsouche
0
340
Other Decks in Programming
See All in Programming
読まないコードリーディング術
hisaju
0
110
Introduction to kotlinx.rpc
arawn
0
770
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
120
バッチを作らなきゃとなったときに考えること
irof
2
540
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
940
Domain-Driven Design (Tutorial)
hschwentner
13
22k
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
120
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
750
color-scheme: light dark; を完全に理解する
uhyo
7
500
AWS Step Functions は CDK で書こう!
konokenj
4
630
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
280
Featured
See All Featured
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Six Lessons from altMBA
skipperchong
27
3.6k
For a Future-Friendly Web
brad_frost
176
9.6k
Adopting Sorbet at Scale
ufuk
75
9.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
Making Projects Easy
brettharned
116
6k
Unsuck your backbone
ammeep
669
57k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Scaling GitHub
holman
459
140k
Product Roadmaps are Hard
iamctodd
PRO
51
11k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Code Reviewing Like a Champion
maltzj
521
39k
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