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
480
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
210
Analytics reverse engineering
paulsouche
0
110
TypeScript + lerna + yarn monorepos FTW
paulsouche
1
1.8k
Test like a boss with TypeScript
paulsouche
0
190
The internal modules strike back
paulsouche
0
100
AngularJS + Typescript === <3
paulsouche
0
330
Other Decks in Programming
See All in Programming
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
120
Git Rebase
bkuhlmann
11
1.6k
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
180
What We Can Learn From OSS
inouehi
0
420
GraphQLサーバの構成要素を整理する #ハッカー鮨 #tsukijigraphql / graphql server technology selection
izumin5210
4
820
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
Rethinking UI building strategies @ SFI 2024
letelete
0
270
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
180
Fragment Composition of GraphQL
quramy
4
770
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
新宿ダンジョンを可視化してみた
satoshi7190
2
240
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
Rails Girls Zürich Keynote
gr2m
91
13k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
A better future with KSS
kneath
231
16k
GraphQLとの向き合い方2022年版
quramy
32
12k
Why Our Code Smells
bkeepers
PRO
331
56k
It's Worth the Effort
3n
180
27k
Navigating Team Friction
lara
178
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
14
1.5k
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