Devreal

Scala on Rails: Yet Another Web Framewor...

Event: Scala by the Bay

scala.bythebay.io: Kazuhiro Sera, Scala on Rails: Yet Another Web Framework as a Scala Gateway

Recording: scala.bythebay.io: Kazuhiro Sera, Scala on Rails: Yet Another Web Framework as a Scala Gateway

you thank you for coming my talk first of all I prepared so many tries for 20 minutes talk so i will share that you are in this right they'd also protect the details for for teachers on the slides and I came from Japan and I came from Japan yesterday and this is my first second visit to San Francisco I'm really glad to be here because I I'm willing to meet I will be able to meet mini scallions we just hear so that's very exciting for me but I have a great community also in Japan so let me inform your God coming garage conference in Japan that is schematically the monthly means first of all in Japanese and the last one had over 30 500 or 10 days there and the next one will be held at the same venue or so this will just say sing at the same scale so now the organizers are looking for the speakers until the next weekend so let's submit you talk to to them because they will provide trouble spot for speakers so if your interest in the conference I've let me know I will support you they join the conference that's it yes so let me introduce myself more i'm working at the smog news which is a tokyo-based the startup making the news aggregation up we use the machine learning and data science to their poor quality information to our users this is madness Oh smart news is available on the App Store and Google Play and up this man use we use heavily heavily used java and other Gillian wrong itches too of course it's cara and katrina and groovy also used for limited purposes and the fortune of our banking services are built-in skaara for the data American arises system using the bots park and also to some of our art system for Jeremy addition the for example using the clinical to build the high-traffic servers to deboard adds to the users and also we use spray on skinny to build our web apps and though we have an office or on the second street so um and we are looking for the tourniquet engineer in San Francisco as well so we friend you if your interest in your service or company please come on visit us anytime yes other than as an individual or I have been as currency just for more over five years and write the scenes scar was still 2.8 I started some project but I also maintained its existing some project as well Oh yes so I think I'm the most active maintainer of the DS project does collateral and JSON boys in this great the recently resumed did a solid project and I just published the new version for Scott to point well and the skirt jdbc and the ski is the popular project I've started at some level and but I'm afraid it's they are not asleep not so famous in the US but actually doing why white we accept it except in Japan and other nearby countries so many company already using the deal serious project oh oh sorry so and that's good to see that the older library i assume i mentioned in the previous sidewalk Scott 2.1 2.2 already I think it's quite important I we have to wait for the deployment of the sub party library thing upgrading the skirt version the in the post we saw the same situation every time score major Warren was reached so I'm trying always publish the new bhajan as soon as possible okay let's move on to the main theme of this topic this talk it's about skinny the skinny is a project is about not only web but the basically the core part of the press Starkey's refrain mark which is highly inspired by ruby on rails so skinny web framework is also full stack that means it provides the pots to use very often all over the box the these are the components by skinny so let's get started with skinny if you if you want mac user you can store the skinny command or buy a home group that if not so you can download the band project from the option website the other thing you need to prepare is just on the JFK the evenness VT project also SVT command is not not needed so after putting a new project by hitting the skinny drunk man and the web server will start and will await for that changes on the project and the scaffolding is the well-known feature of ladies so of course can you also has it the different thing is that you can put you can specify the skirt type such as option for each attribute and after creating the table you can see the word generated crop pages like this the by default the skinny offers boot strong based based layout and it was especially mentioning the generated automatically reflect each columns date type and the requirement to the validation rules such as quiet the max friends the specified date type such as dating the timestamp tiberium also so in that respect I think the skinny generated might be better better than the original rebels generator and woman one more interesting feature is reversed affording the ethernet cropped from the existing database tables and furthermore the basketball or come on diversity for all the scan all the table in the same same schema so now let's watch the video now how this reverse careful all generate for all the table or left mine as you know read my is the famous bug tracker with a big to his race the the project has the 55 tables in the same schema then now you can see the generator is creating a what not created one is does it now you can see the joint and creating a 55 skateboard up doll then not only that the generated command can compile without modifying it will find code at all maybe that will be finished doesn't so and then then this is the generated pages the basically it's already ready to use as is ok so in the next part we are right back into the details of skinny start but maybe I prefer to mince right here so i will explain briefly this is the diagram of the skinny stack the main part is a web framework but others are completely independent from the web framework and the web framework is a very top under robar your name to scheme micro the school micro is fork of Skeletor I must have I'm still a maintainer of this character but I it super skinny because I needed to change the its internals a lot while focusing on the skinny to optimization and new requirements so anyway that's the white I afford it the further musky web framework has do things like rarest and understanding my this is a tiny member of example I will to assume Michael the web up our web app the simply read files that you put Jason swing the you can build the single jump five to invoke the jetty servers so it's very lightweight to start a small web app now this is routing dsl this basically it is the free compatible was the scar across one and this is a controller you the basically it is likely latest but the days actually it's a scar so it's a statically typed and yes it's runs on the Japan this is some form validation example the basically it's it's also rightly similar to run Davis but the interesting point is the tension of the politician who is very few more readable and when calling the partition Mossad the web frame up or mark rebind errors in to view templates that I know it is immutable until the car the mess up once but the after I think such approach is useful find building the ordinal web up so if we don't abuse it it's a okay for such a purposes that this is the skinny resource is crowd control us like raves resource routine the scaffold command generates this control the next one is horrible pod the skin is our motto is highly inspired by the Davis active record and it is built upon the aroma raya and described GBC thus correct service is because been there before i started skinny so i chose it as a foundation of the new or I and this is an example and the entity cross and it's damnable die made it it is made from only five lines of code the data map and naturally provides a many useful method for insertion and operate and deletion and this is more example to show queries the basically the AV is a very similar to toe tip black code but but its type saved on some level and this is a help of a rolling I think it's quite useful for debugging the it shows user d actual sequel under spend time underline line number of the court where the sub queries actually issued so this is the skinny one it is quite useful for many purposes the DA respond is a tent pretending the skin chose the right as the default the reason for that is the Wizards current we can promptly reload the pages after after changing them in the rocker development i believe is quite important to make for making the rhythm of web development even means Carl the intern interestingly does scurried off for the Civil temperance try so are you interesting the visit the official website for details and the skinny also has a more optional modules but I still I should skip skip them not to none to the time are done at a time so i entice them with the single phase this is the building oz integration growths that many major providers of course including scar our Twitter and the skimmer is like action mirror unless it's a hundred ESO to send our emails this is a generic example the this is a factory girl is the copy of the famous ruby gem to make a fixture return for testing and ski is skara brae max so we cannot have sporting scourge areas then you can start scourges with no preparation alright just hitting the skinny scourges column watch just watch the changes on the skull she is called and of course the source map is available thanks to the greatness of skeletons project so I think it's quite amazing to finally I'd like to show you a little example to prove the usability of each asker component but this is a diagram of skin start again and this these blue components are usable at outside all those skinny web framework so I wishing it to your example within with visiting the first one is the pre-integration the deal worn on the key to hug the birch trees shows you how to use the skinny on or em and the skin is task runner in the prey applications and this is it there is no difference even if it works in the playoffs because it doesn't Bend any play meet specific aps and the task normal is same the next one is the integration with spray that yes I know the spray project is no longer active but before the other special situation happened i created the module to integrate this spreading about two years ago so it is quite smooth to integrate with that this is them to show you the hunting whiskey bar data on this spray project ballistically i'm planning to making something to integrate skinny things wisdom archive sleepy but it still work in progress i hope you publish the initial version personal possible so that's it now if you interesting skinny or any others we ask me anything anytime you in the conference the thank you for recently and i'm looking for to see you at the skull motsi in February so thank you