 Nikolai, I came here from Sydney, so I'm gonna have some funny accent today Our four company called nine fold where we do amazing things with hosting for rails application, Ruby and stuff, but in my spare time I hike around mobile applications particularly with iOS and And I'm a Ruby motion and today I came around to talk about one of my projects Which based on top of Ruby motion talk about the story of this thing do some like hiking in demos So I'm a web developer. I did this thing. I do this thing for like 15 years, right? When I started I looked at this at web, right? It's a HTML and some pieces of JavaScript and I say like hey, it's simple, right? There's a button on click and you've got some function and you can quickly make things running and In that we've got things like HTML where you can define dome structure like your object The main object model we've got CSS to paint things up and make them look nice and we've got the pieces of JavaScript to Like make changes to pages make them do useful things Funny thing all these two pieces. They were successful because they represent classical and with the structure Basically you can see how it like your scripts are your controller. It changes the domain model of your page and You can treat your dome as a model and CSS as a view and then it's kind of all fills together A cool thing in the in that is that all the three parts and we and see I implemented in different languages So you have pretty much zero chances to Mix them together. Well, you kind of can't do inline JavaScript and CSS and HTML But it's always was considered like bad practice, but it is a sustainable Model right it's really extendable it grows really nicely and yeah We've got a good progress On the other end of the spectrum. We've got typical desktop development Sorry, I feel like I'm in a boy band or something So on the other end of the spectrum we've got a typical desktop Development style where everything you've written in a single language Right and compiled down to native application. We've got like UI libraries where we are signed Like content to your things for API make changes assign event listeners stuff like that It was great But like for us as a developers when it comes to choose how we implement mobile It's always a struggle right as a web developers like most of Ruby developers are web developers essentially we've got Used to certain standards to certain ways to deal with things like how we like we've got certain mindset how we implement things and native application Development especially for iOS or Android the same thing they came from They derive from Desktop development right they came from that branch of things and it's always like compromise right you You end up with something like like native web right like something like phone go up or something Where we make certain compromises you want to keep your habits you want to know how to build things and extend things But you sacrifice like performance, which is often an issue resources with with hybrid applications it's Real pain in the neck to integrate with actual native application system If you ever work with a phone gap and try to make in a pic in our payments You probably know what I'm talking about It's really hard. So Then Ruby motion appeared right and Ruby motion is a project by one of the X April employees What they've done they created basically a compiler for Ruby which can convert Ruby basically into object to see and then down to a real native application So good thing. It's 100% Ruby right you can write all you you all things In Ruby and like you know the language the learning core is small much smaller and It's also 100% native from directly from Ruby you can access any native APIs make access like file system network I don't know webGL OpenGL To this guy is a limit Unfortunately, you will end up dealing with April API with native API and you will be thrown in Into that desktop developer mindset Which for a web developer is quite a large learning curve Although you will be familiar with the language and you will be able to spawn a class and Know how to do things But a lot of concepts which you will be dealing with Will be completely unfamiliar like a lot of things they do is completely different like even just making simple thing is a button It is like completely new task. You don't know how to do this You need to go in read all the API. You need to figure how people like how even attach an event listener to API to a button. It's all quite different in there so That's where my project starts. I Thought about it back and forth and I thought like let's think about it Let's think about multitude of applications native applications on your phone that it is kind of like Internet's right and Some of them live on up stores and live on your application And then every application is pretty much like a website, right? And then when you tap in Icon on your phone, it's kind of like you type in in an address in your browser, right? And then you can extend like follow this analogy further like multiple screens on application You can think about them as a multiple pages in a web browser, right on the same web server So my thinking is let's go further Let's basically build abstraction on top of desktop application which will Represent us interface which is familiar for web developers and transfer all these Objects we deal in we as a web developers into native counterparts And then we can treat a native app as a web app, although it's not really a web app There is no browser, right? It's just all conceptualized thing which looks like a browser feels like a browser So you as a developer as a web developer Instinctively know what to do with this thing, right? But in the end it will compile everything back to native application And you don't have to make a choice between like knowing what to do and accessibility to actual native APIs So I built this project called under us. It's kind of hard to explain So what I come up with is to do a short live demo We've got the under us project available at the Ruby gem You can install it in gem and then it will provide you with a template for Ruby motion and you can spawn it's kind of like that You go there you say Show me the thing and then you can just compile it Ruby motion will go through all the gem files or your files and compile them into native Code meanwhile, I'll just show you it's pretty simple You've got up folder where we've got layouts, which are pretty much HTML, right? And then we've got style sheets where everything like CSS and we've got pages Where every screen on your application is treated as a like conceptually as a web page and it has a context with Javascript is looking DSL, right? So there is like layout right with just a bottom a bunch of CSS which positions it and Script which basically tops it to say it's like on top. Do you alert? Right here is an application It is a completely native application. There is no like overhead or anything. It's compiled down to real thing So what we're gonna do is to build Calculator up. I'll show how quickly and easy it is So let's give it a title So to show the result, we will use just a label. That's a comfortable desk You can use like normal classes. It's all like handled for you Column right? Let's duplicate it a bunch of times We're gonna need a bunch of buttons. You have to watch for what I'm doing. I'm in a different time zone I should be asleep right now percent and And now I need to add Spread this buttons by columns in rows That's pretty simple Be quick This one T345 there's all five four I guess this one right and I'm not gonna bother you with CSS. So just copy it Can you see it's alright? Not really, right? How about now? Should I make these font size larger? Here you go Better just same and like I'm here to please So we wrote a HTML and a bunch of I copied a bunch of CSS which like paint stuff Now we can just like rerun the whole thing On the actual gem is compiled is like the rest of them pretty quick So you see it starts to look like application like calculator We need to make double size zero and paint those things a bit. I already have classes in my CSS in here double Double ops top. So I'll just throw them in those will be operations Okay, looks more like a calculator, but there is no label for number The thing is that the actual label is up here. It's by default to just zero zero In iOS everything is absolutely positioned We emulate through CSS like absolute position and relative scopes, but at this point is just by default it's zero zero The cool thing is that we can In a console I've created a little hack which is jQuery scene right you can it's called you because we cannot use We cannot use dollar thing, but it's similar concept See you can just access it like that Right and then this thing has like text. It has style You can assign styles a top equals 80, right? And you see like label mode here real time. You can mangle with right here White it's white or because it's Ruby and we can do it nicer than JavaScript You can just throw in a hash and it supports most of the CSS So you can go like wide 320 880 pixels font Size 80 Text-align Nicola why was it just like that? I already prepared it a little like here right here in my CSS. I'll just uncomment it and You can quickly like build UI you want and You will understand as a web developer what's going on in there like it's all classes or HTML. It's all pretty simple if you feel like you want to build UI with the Xcode UI constructor you also can do that. You can just build up Their files throw it in and hook up into a page as a layout right here saying like layout my thing But by default it's HTML and CSS so we knew what to do and final step is the actual Execution context the script or how makes things alive It is kind of JavaScript style programming. I guess a callback you specify like You specify like events and our callbacks is blocks. You can also navigate the DOM Although it's virtual. It's not rendered But you can access it in normal ways here result. It was first result we can go find all buttons button on top say handle top And just go in text simple enough. Let's see how it works. So now we can do stuff with it Because it's a bit we can do nice things say when it's Number or dot decimal point We just say result text last equals button text just append it in there probably also Erase result if it's initial initial step result text Let's build some operations as well when it's plus minus We save the first number and operation and person heats equal we calculate I'll do just really dummy implementation, which is not correct, but it's simple First known second and need to convert both of them to either float or Integer and then I'm just sending operation to first known and assign result Make sense. I forgot one thing when you enter I start to enter a second number. We need to reset the thing Try again. Damn it live demo Yay success So the cool thing is that as you notice I didn't touch any iOS at all Right Like it's all pure Ruby. There is no native things in there like all concepts pretty much make sense Right, you can like show this thing to any Ruby slash web developer and they will instinctively know what to do with it cool thing is that Conceptually I Under us or you was because like it's all about you guys Conceptually it is kind of like a jQuery it lives in parallel with your native Native infrastructure with your native APIs like at any point right here. You can just start making like You a label and a lock and go with anything you want All right But I'm trying to abstract from that thing and Mike like come find a common ground around web and Ruby there are proxies for say in under us to say talk to you file system which provides you with Ruby like file open and things like that. It's also has the HTTP stack a bunch of Shortcards like you can have icons and things like that The point here is that it is completely extendable It is virtual environment Which is just looks like a browser at any point you can create your own custom tags as of use as a components Basically, you can extend you can extend inherit and like any class in the system like unlike a browser or normal you can just inherit a button or someone else's widget and monkey patch it and Do whatever you do is normally breeze normally like a Ruby developer so Why it's matters because it is friendly for web developers is reduce Reduces your initial learning curve. You can quickly start building things. You can ship it on On Apple store. No none will know how you build it It's by as far as they are they concern it will be completely native application But it will reduce greatly your learning initial learning code curve It is Ruby friendly a lot of things you would normally do with Ruby motion and I was development quite an ruby Like you need to do like memory allocation All the API is like talking to HTTP or file system or things like that or say Jason's realization They dance through in iOS through their own World view, but we got used to a lot of certain things in Ruby environment like So we've got proxies for that as well. So you can feel at home in there And it's independent like it's not tied to any provider at this point like it's rebellious thing in like a lot in the ween of Ruby community so it monkey patchable. It's all up to you how you implement those things You're not dependent on native APIs anymore and it's hackable, right? It's abusable. It's Ruby. You can make changes to it You can extend it through our ruby gems. You can The whole thing is actually like for ruby gems You can like big things separately like throw what you don't need new ones like extended And big what if the moment is that Ruby motion work the ruby motion guys work hard to deliver Android support Like any day now they should release a new version of Ruby motion, which will provide us with Android support so the big goal of The under us project is to provide this Vabish interface Vabish proxy, which it will be useful for web developers But underneath it can compile to anything because as you saw it does not really touches like on on your application level It does not touch the native API and we can abstract from that and build our own thing We can build our own thing as we see it fits Which is kind of great moment, I guess And That's pretty much concludes my talk Trying to keep it short Not large. It's my pet project. I guess Pardon me Repeat the question. The question was how large the community behind under us It is well known in the Ruby motion community, but under on You can say that Ruby motion community itself is not that large it is a commercial project You need to pay license fee for using Ruby motion, which is I think it's a good idea because like you need to Make money in the end and I'm happily happy to pay them But it is commercial project and the community Ruby motion community itself is not that large But within the community it's a known project, but it is Like out-of-work project right now, right? We're trying to figure out how things work What we what we can get away with Like this guy is a limit, but it is non-standard at this point. It's more research and having fun No, I don't think it's gonna be blocked by Apple because by in the end Ruby motion uses Apple API it uses Apple infrastructure like it uses Apple compilers in the end There was heaps of applications already on App Store and it just keeps growing I'm thinking about it, but it's not Yep, the question sorry the question was what what I was thinking about making Russian of under Ross and Swift Swift is young No one really knows how it's gonna play out at this point. It is really interesting Language, I'm quite excited about it But conceptually it's still objective C, right the good thing about Ruby motion for us Ruby developers is that it gives an opportunity to build applications without switching a context the Swift it kind of looks simple and scriptable as a scripting language But conceptually it is not scripting language. It is actually like compilable language with static typing Like a lot of things you do in Swift Curl light like one to one to what you do in objective C. It's just nicer looking API Not at the moment It's a I forget refuting things. I'm assuming like everyone hears them The question was do we support how to lay out in CSS at this point not but the goal is to basically wrap it around Again web idioms with media queries and to the classes. I'm actually working on it right now Yeah, because it's virtual like everything needs to be implemented manually pretty much and The amount of features which we support in CSS and HTML they keep growing It's ongoing process at this point We support most of the stuff from CSS like padding margins position backgrounds colors like things like that, but like no, it's not supported a hundred percent I'm basically going after what ever is most useful at this point. Yeah, but after layout is pretty much next thing No as the question was does work for all six Not really I'm I'm not desktop developer. I'm not really interested in that at this point, but the Good thing is that API for iOS and OS X development. It's pretty similar It's a lot of this a lot of the same and I guess at the point when we make out layout work and all this media queries work We should be able to abstract from actual device or platform you run it on Okay, the question was which features I really want to get in A few things Like first first of them is auto layout is like no brainer It's like the first thing because especially now when April released the new iPhone My goal is basically to allow you to make layouts like pretty much Be independent from a platform from our device So you could write in CSS specify how things should look like on ipod iphone different sizes of screens So auto layout rotation support. That's one thing another thing. I'm working is Game development So as you know in iOS 7 April released a sprite kid, which is like nice library for 2d games development So what I'm trying to do is to build a little Nice useful game engine on top of that because the good thing is that Ruby is extremely good for game development Like a lot a bunch of games and the cool thing that Ruby in Ruby can write night DSLs Right, you can overload operations centers. You can write really neat APIs for your units and express all the logic in relationships really cleanly and nicely and Yeah, so the goal is to provide you with this feature But underneath it will render everything to sprite kid and in the end you will end up with native application That's kind of exciting moment Yep, any more questions Cool. Thank you