We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Building web-based board games only with Ruby

00:00

Formal Metadata

Title
Building web-based board games only with Ruby
Title of Series
Number of Parts
66
Author
Contributors
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
This talk explains how to build web-based board games without JavaScript but only with Ruby. Web programmers are forced to write front-end code using JavaScript. And interaction with the client-side and server-side grows increasingly complex. Board game which has rich UI and communicate in real-time is one of the applications which needs such requirements. Opal is a compiler converts from Ruby to JavaScript. I created some gems for Opal as follow as. Virtual DOM Isomorphic web programming framework dRuby implementation on browser I show you a web- board game demonstration using these gems.
Game theoryBuildingVideoconferencingSource codeCompilerWeb browserSoftware frameworkAdditionComputer programmingIsomorphieklasseAerodynamicsObject (grammar)Physical systemAnalogyDatabaseUsabilityMenu (computing)Rule of inferenceTube (container)Cellular automatonSlide rulePresentation of a groupInstallation artCommon Language InfrastructureNormed vector spaceMusical ensembleGame theoryCartesian coordinate systemFormal languageWeb 2.0MereologyWeb applicationSoftware frameworkCompilerComputer chessSoftware developerUsabilityDifferent (Kate Ryan album)Object-oriented programmingSlide ruleVirtual machineAnalogyMobile appRule of inferenceDatabaseWeb browserIsomorphieklasseSampling (statistics)VirtualizationFiber bundleRuby on RailsProjective planeSource codeInstallation artDebuggerProgramming languageLibrary (computing)DialectFront and back endsJSONXML
Convex hullHill differential equationVirtual realityPersonal identification numberMultiplicationVolumenvisualisierungComputer programmingMathematical optimizationObject (grammar)Software frameworkIsomorphieklasseEndliche ModelltheorieTelecommunicationClient (computing)Server (computing)Social classGame controllerPhysical systemInternational Date LineServer (computing)Software frameworkSocial classGroup actionObject-oriented programmingField (computer science)Mathematical optimizationGame controllerWeb browserSearch engine (computing)Client (computing)Object (grammar)Sign (mathematics)CodeAuthenticationEndliche ModelltheoriePasswordWeb 2.0TelecommunicationLoginVirtualizationConnectivity (graph theory)Computer programmingInternet service providerIsomorphieklasseImplementationArtistic renderingSource codeMessage passingBlock (periodic table)Shared memorySystem callMultiplication signView (database)Computer animation
Social classWeb pageContent (media)Table (information)Finite element methodMotion blurSoftware engineeringLevel (video gaming)CurvatureConvex hullBlock (periodic table)Limit (category theory)Image warpingArmMaxima and minimaLibrary (computing)Moving averageProgrammable read-only memoryError messageInclusion mapLength of stayView (database)Object (grammar)Library (computing)Service (economics)Client (computing)Process (computing)Social classInterface (computing)System callDifferential (mechanical device)FreewareUsabilityFormal language
Inverter (logic gate)Maxima and minimaMoving averageIRIS-TLimit (category theory)Inclusion mapImage warpingCommunications protocolNetwork socketImplementationComputer fileError messageInformation managementStructural loadTorusThomas KuhnIntelWechselseitige InformationLength of stayExecution unitArtificial neural networkObject (grammar)Communications protocolDemo (music)Web browserImplementationServer (computing)Uniform resource locatorOSI modelDifferent (Kate Ryan album)Cartesian coordinate systemProcess (computing)Software testingClient (computing)String (computer science)Computer programSound effectRemote procedure callOperator (mathematics)Game theoryComputer animation
Computer programmingIsomorphieklasseVirtual realityWeb browserMaxima and minimaVirtualizationWeb-DesignerPower (physics)IsomorphieklasseWeb 2.0
Coma BerenicesJSONXMLComputer animation
Transcript: English(auto-generated)
About breathing, we were best board games only with Ruby.
My name is Yoh, Yoh Osaki, I did Yoh-chan. I'm from Japan, and Japan is here. Very soft, so far from here.
I live about 10 hours by airplane. I'm from Asakusa.rb, Asakusa.rb is regional community
in Tokyo, and I'm from Rubikai. I have talked at Rubikai four times, and three of these were about Opal.
Opal, Opal is a source code compiler from Ruby to JavaScript. You can create browser applications in Ruby, it's awesome. I have been developing some libraries and frameworks
for creating browser applications with Opal. I've been doing activities to make Ruby available in various places. Development of the tools related to Opal
is part of the activities. In addition, I'm also developing a deep learning framework for NLP in Ruby. Why do I use these activities?
Because I love Ruby, and I would like to, Ruby, I would like Ruby to be used by more people. I want to write the front-end of web and NLP
using Ruby instead of JavaScript or Python. Remember, 15 years ago, Ruby was just one of scripting languages until 15 years ago.
Ruby on Rails made Ruby into one of the best of web programming languages on the web. Front-end is becoming more important, however.
Today, I talk about creating web-based board games. Although it can be applied as applications on the web,
today's main topic is these three things. At first, virtual DOM, and second, isomorphic programming, and DLP on browser.
It's a way to use WebSocket. Its possibilities is easy to build dynamic UI using virtual DOM, and it provides ease of development
with database applications by transparency access. You can use WebSocket with analogy of distributed object system.
Today, I talk about, I have been developing a board game that is Shogi.
Shogi is a chess-like board game, which is traditional in Japan. One of the differences from chess is, the pieces was reusable.
Shogi rules is here. This is published by International Shogi Association. You can see this on web.
Today's agenda is here. First, I introduce about op-up, and show you how to create an op-up, and then virtual DOM, and isomorphic programming,
and DLP on browser, and at last, I show you demonstration of Shogi, about op-up. Op-up is source code compiler from Ruby to JavaScript,
and you can create browser applications in Ruby. For example, this slide tool, this slide tool is created by GBA.
GBA is tools for create slide tool, inspired a rabbit.
Next, how to create an op-up. I provide CRI tool, and name is Shilica. Shilica is here, let me show you. Shilica can be installed by Ruby James.
My local machine is installed, so just command Shilica new, sample op,
create, and sample op project is created, created these files, under install, sorry.
I'm nervous, sorry, install, okay.
And this is using lock application, so under exec, lock, okay, I got it.
This application, source code is here.
This is virtual DOM, render, welcome, here, okay. You can get scaffold, just one command, okay.
And next, virtual DOM, virtual DOM has gained citizenship.
And highlight is virtual DOM implementation written in Ruby.
This code used in highlight, just including component. For example, modify this code here.
View component can be passed property,
props values via props. This code pass name to view component.
Hi John, okay, I got it, thank you.
Next, isomorphic programming. Isomorphic programming, it mainly has the following to merit, one of this is server-side rendering.
It's for performance improving, and for search engine optimization. And second is shared class definition. It provide transparency access to the server-side object
from client-side. I have made, I have been making a framework named ManyLite, ManyLite is an isomorphic
web programming framework. It's focusing shared models to provide transparency access. For example, sharing class definition.
The framework hide the communication between the client and server. You can never do calls that JSON API.
For example, like this class definition. This is user class, has field name and password.
And you can define action, for example, sign up. Sign up is called creating time.
So I'll create truth parameter, and you can write code, only run in server, this block.
This class definition is run on server-side
and client-side. Controller, controller is running on server-side. Server-side can define action,
for example, logging, logging action, get parameter, user name and password.
And you can find user, and all authentication is passed, session, put into session to use ID.
And client code is here, just called logging method,
and return value, get asynchronous,
next, dluby on browser. Dluby is a distributed object system in Ruby. It's included in standard library.
Dluby is included in standard library. And dluby is a usable library,
pre-Ruby-ish. So IDL, IDL is interface definition language. IDL is not necessary for dluby.
So you can use convenient, easy to use dluby, as here, and I show you.
This is server-side. Array class object, you can start service
with this object, and client-side.
Just call a new, one method, new with URI, okay?
Client object is DRV object, this is, this object can do all method, like array,
for example, this one, package, sorry,
client-side thing, sorry.
Ah, I see, two words, package, why, okay.
Sorry, maybe another process is running, so.
Okay, I got it, sorry.
Oh, this is client-side, it's effect to server-side.
Initially, this is empty array, but client-side object put into array,
so server-side get same value, thank you.
And so, easy to use dluby, okay.
And dluby can be customized protocol layer. I implemented WebSocket protocol, maybe previous problem is process learning for WebSocket, so I confused. Ah, and I implemented WebSocket protocol for dluby,
and dluby implementation of oper, it's dluby WebSocket, dluby WebSocket, and oper dluby.
I show you, and okay, same as previous.
Ah, oh, sorry.
Difference is just URL, this, here is demo, got demo.
This demo is put string into array,
remote object test, this string added, so you can get on server-side, yeah?
Okay, got it, thank you.
So, this demo application means that Blazor is communicating server-side via WebSocket, and dluby, transparency access,
and I show you demonstration for the game Shogi,
Istops server, so.
Opal is compiler, so compiling fast time, Shogi board,
and so, sorry, I have problem for bi-directional
communication, so I can, we completed this application, but this can be,
but no opposite player is not work, sorry.
Congrats, y'all, Opal has found changing web development,
you can get virtual DOM, isomorphic programming, and dluby, there are many tools for modern web development, let's get it started, thank you.