Merken

Reahl: The Python-only web framework

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
European I'm delighted to be here today interesting 1 always thinks that so all we know that the Python community is what makes it what it is today really the ecosystem
but when you you you sort of see up close that's all the individuals were at the little bit of good will to make it so that's really nice to be able to to see that before I start a couple of words about myself I come from far away so as Africa where I
spent my career entire career either programming or working very close to it most of that happened in the financial industry um and about 15 years ago I made for the 1st time not long after that I was part of a team who developed quite a complicated financial system user interface using the 1st so I don't have anyone who worked with that at any rate that sparked my interest in web frameworks and I wondered started wondering about how things ought to be done and had very idealistic ideas I started investigating these things a little while later I was lucky enough to get a paper published in an academic journal about where I surveyed 80 different with frameworks and try to see how and when decide what the differences are and the similarity is it's a truck load while after that a colleague joined me Craig announces since then we've been working on making those idealistic ideals of reality and that's what I'm going to present you today real the last version was just over 26 thousand lines of code of which 40 % of tastes effect interesting to anyone of course anything like this needs to be funded and uh because you don't really make money from open source software How I do that from my side is I'm lucky enough uh in the financial industry what you see is you'd big systems that lived for many many years and grow many thousands of lines of code and become really complicated for people to deal with so I basically consult honor part time basis back to some of these companies will allow me to the incident was teams of programmers and help them to try and improve some of these designed so that these guys can actually deal with but tricky job but it's give me kind of a feel field for small design issues that over time can become a big problem and I really like that of course is the knowledge that I get there I tried to work into real and similarly the knowledge I did in real way we have complete freedom to do what we wanna do I will back into those environments that we cover and then I try and tell you what really is how it works and why you should give those of important things of course I can't get into too much technical detail but I'm going to try my best please ask me I think there a mixed audience here so if the something that you don't know come and talk to me ieee I'm 1 of those introverted people so if if I'm at a conference like this and I stand outside of the coffee break after work really ordered meeting people so you will be doing me a favor I also wanted to local little bit about strategy and our status and I'll come in and do this quickly enough to do give us some time for questions as long as there is simple 1 so what would you expect from a from web framework these days you probably would know that and HTTP request will come in and that the framework must do something to map this to some of your code that's going execute where do something like freed from a database and eventually use a template language to produce HTML but you think back right on top of this this probably all kinds of odds and ends that that added to be able to reuse bits of templates for example to be able to deal with the space and is now a big ecosystem and the jobless crepancies is world more tools and tools to help you deal with that what strikes me about this is that is that it has a very much a technology-focused it's almost as if the tools target particular layers of technology that we use and I don't want that so that's what I would like to change what if you could take all of these layers of technology and push it down and Endesa layer of Python that allows you to actually just think in terms of and focus on what you're actually building and not on all the different bits of technology that's getting you how we think that 1 ought to do this is firstly you need to be able to focus on the different views that your user will have in this application also on the particular user interface elements that are on the by and how the user gets to move in between the different views right and something like a button that I've got here is we will take care of that by implementing behind that Python lost a vertical slice of all these technologies just for that but I have to explain that a little bit bitter firstly so no
template language in real at all so what is by adjusting well page is that we and how you will build it these you will compose your on page urine widgets by adding other widgets to it as children just like they do in we frameworks most often there's another trick to this that aren't won't have time to talk about them and that's layout because you also wanna add them in particular places and be responsive and all of that we do care about that but he a simple very very simple example of how you can compose widgets or a more complicated which from a simple 1 hour most simplest widgets are actually one-to-one corresponding to HTML elements and in this example we created over and we had a child to it which is a paragraph and you see what it will result in what you would probably expect in a browser right but the simple
examples like that can confuse you because we did some very very much not take him out there are a lot more this example shows what we call a sliding panel it's actually 3 different doses and it only shows 1 at a time we've zoomed in quite a lot so the controls quite big what happens obviously and jobless triplets switches between different panels and if you click on those controls you have you can control when it switches and and what direction it's just take a moment to think what it would take you to bold something like this you probably build some HTML probably didn't show script their couple of different things that you don't have to think about what it will look like in real the you create a sliding panel clause because that's what you want on the screen right and you added those to its as a panel all our Mrs. methods actually return what the added so it's just makes it easy to write one-liners like that assignment to a variable and then can add other widgets that thing that's all there is to it race and just happen for you this is actually more to it than that because look at this example it's still the same thing but what we've done here is we have switched job was scrapped off completely and it's still working obviously degraded but nothing happens automatically but you can still take on those controls to make it move to make something like this work you can probably case that's 0 you just add a query string to the Urals thereby traits that are behind controls but if the user now clicks on 1 of these things it's obviously going
around to the server and the server must now have logic that will allow it to render the HTML differently with the difference that showing so there's some server-side logic necessary for this to happen that's what we can do on top of the technologies we've also added ways for us behind a Python class like sliding panel that you can see here to do other things like and your else to your it doesn't matter on which you you're actually using these widgets um at query string parameters to and server-side logic that happen Of course this building a complicated we did that uses those things is something other people could also use but we haven't documented things up to that level yet so for now we just like hiding as something that you that's probably might so you don't know about this has to do with how long widgets I just want to show you 1 example the parade area they we've decided when we built this particular example that that is a which the heating with all the addresses in it and we call that address book panel I want to show you what that code looks like so in this group always a and in in its init method we had children to it right we had a meeting we query the database and we added an address box for each address that we find in the database the should get you thinking what is the database changes how does this which is actually change and the answer is it doesn't because A doesn't live long enough for it to match widgets are created when a user requests a page in the beginning of the request they do the job with their surrendering or doing server-side logic and they killed at the end of the fight against that's really all there is to it the other 2 things that I say we
want to focus upon firstly is what use there are in your application and secondly how a user moves around between these things let's look at how you define the user interface the user interface is an application in real In this case you inherit from user interface you have a special method called the symbol in which you can define overviews and execute all kinds of code In this case we have 2 views you see the first one it's defined on slash was the title and we the seek a particular widget as its but there are other ways to do this but I wanted to show you only the simplest examples homepages we did like any other the funny thing that we don't construct a widget we create a factory for it because we want the framework lead to create all these widgets depending on which view you're going to be visiting so the creation is a little bit too late the other thing is over the last but of course they have is to say how the user gets transitions between these different views well but it basically saying is that if you are on the head of you and the user clicks on a button that triggers the same event from the server then the user will be moved to the actresses will so that's what we wanted to make clear enough code and then to 10 years quickly and spend a little bit of time trying to convince you that you should care about they I can talk for days about this right so these are the things that I thought or important 1st of all if you can forget the technical details then you can actually focus on the menu from the layouts and this the stuff that you really care about in your application and I think this makes a difference in the quality of what you can bowl it's this is also a lot of stuff that you don't need to know and term I'm lazy so I want to know as little as possible and that's why I tried to build the other thing is Python classes all those words you see up there a Python classes that a wonderful unit of re-use at probably it's much much better than anything you can do with standard languages and includes and macros and things we try to leverage that as as much as we possibly can and because we can't do that we can actually deal with other subtle problems that sometimes broke the cropped up for example and we haven't done this 1 yet but we will this this small little issue of someone who double click on a button instead of clicking on the menu server receives to post requests you ever dealt with something like that how do you sort that out do you really need to worry about that yourself open users a button and have been happening also a couple of complicated requirements that are difficult to to do in a reusable way otherwise what you see here is a table it's got a list of all over speakers at Europe Python there are just 200 of them and so in this particular example we wanted to display only 3 of them at a time in the stable obviously you don't want to actually get to speakers info all 200 of them to be able to do everything that you see here in jobless the only way for you to be able to to only get 3 at the time for example would again be to have some server-side logic and yet we can packages in 1 thing a Python clause that has the server-side logic and it has the job trip and even the styling in this particular example we can actually sold as well and when we sort the stable it's sorted server side so it's the entire table but it's sort not just what you see you guys have to help me creates a new buzzword today I've searched google and I don't find the would know HTML and these will would no sequel I thought uh please do something we created word for us here there's quite a couple of frameworks that are
playing with this idea that they want to get away from HTML they got different focuses different ways of doing it at the end the thing that I soul that sort of similar between all of them is that they all are funny names but when I talk about strategy I need to think about how to differentiate real from all these other so I'm gonna tell you a couple of things about strategy with that hat on real also if you sort of get into the details of how to work see that actually works quite a lot more than like the mainstream frameworks that you used to as opposed to these other guys they generate a lot of code that we don't things like that so the 1st thing we like to maintain the web semantics we riding a wave framework we not writing and growing framework and we like certain things about wave interfaces like you have that browsing bookmarks and things like that we also want to support the ideals of the way things like the fact that if someone switches off the job was script in the browser in that framework will still continue working you might think this is not a big deal but it helps a lot with but crawlers for example but there are other usages for it as well things like independence responsive designs accessibility stuff like that this is a whole lot of knowledge out there about these things the other thing that we are quite adamant about is if you look at the way the world the platform that the wave gives you that's a lot different to what we looked like we got multiple service to balance load we've got multiple clients that 3rd at the same time we've got distributed execution some of happening on the service some of it happening on their clients and different devices so it's quite a different ball game from say your traditional graphical user interface platform and we think it's not a good idea to take an existing graphical user interface framework API and pretend to do exactly that on the Web we rather want to grow from the bottom up in this environment and provide you with an abstraction that's very high level but grown in this particular environment so that we can learn from it we also aim for higher level issues like this particular 1 which or a is implemented you can actually mock a particular method on a class and give it some this by which it can decide whether the the current user is allowed to execute this method or not and the framework will automatically figure out if I'm not able to execute that make that that the button it's attached to it should be great out or not visible things like that because we don't generate code we can actually use all the methods that have grown over time with current web frameworks and this is a nice example of that on the left side you see what we currently have an example that we've got the and you see that we've cobbled together some styling there all by ourselves on the right is the version that will come out next which makes use of bootstrap and you can see the difference it's different when you have professionals who focus on something and you can make use of the tools and you can make use of the knowledge about what sort of which it should exist in the world and how things should be displayed we try to use that as much as possible a quick word on status you know many years ago we had this idea the dream and a dream is a funny thing you that sort of you see it from afar it's like a place you want to be too far away amount and it's difficult to describe to other people you don't see it clearly you don't know how you're going to get the you don't know what obstacles away it's not as if you can just create a project plan and do it and get right there's a lot of risk involved and I think what we have accomplished up to now is we've both a foundation that shows you that this is not idealistic that's not impossible we've we've implemented all the important features this is the risk has gone down very very much and we've got something concrete that you can play with so that you can get an idea for what the stream was about and what we're reading toward of course the road is not quite finished it we've got a lot still to do there are a couple of things you won't be able to do with real that you could guarantee do with other web frameworks we need to work on a to get those things done as well we need to add more widgets with bells and whistles and things like that but we also need to get people interested in Boulder community because this thing is too big for us all its limits ion dream for how big it could gate is much bigger than the resources we have available so that's why I'm here today to get some you involved so this is a dream and you're invited there a couple of things you can do 1st of all what I've given you here to die you probably need a lot more details and need go look at the examples there on the web site join a mailing lists we have 1 that's on which we will only announced create new releases so if you don't want to be bothered in and you want to know when something new happens please go enjoyment it's a little bit more effort I suppose to install something but please go for it to play with it if you've installed that you can follow our tutorial we we will be very very glad to help anyone struggles with what ever and in the tutorial we really explain a lot more detail and a lot of the flexibilities and more complicated use guys and of course we need people to help and there are many different ways that people can help we need marketing people the we need program is really we need all sorts of uh because we're going to have to grow up from where we are now into the future that's all thank you a couple of contact details there for anyone any questions be I expect that just
this morning I saw the keynote about education and that's probably an aspect that you didn't consider at all it's somehow jump to me just a minute ago because some because focusing on only 1 technology on only Python might make it especially easy for a foreign and beginners to to grasp also the web technology so do you think that maybe there on their education level this could have have a goal and I'm not quite sure what do you think that are you asking whether it would be easier for beginners to write website or do you feel that because we're hiding so many things I won't get a chance to be exposed to what we're hiding how would that did just repeat well I I think the 1st thing that you set of was a good thing because well aware that there there is a lot of hidden there the HTML probably is produced at some point and this is is is use and because of hiding that I do feel that it is easier the yeah it easier to to to start up I can imagine that it may be for all 15 year olds using just 1 technology from 1 tutorial would be easier than going through jungle tutorial and having to write it stimulant users as well grandstand is it's not something we really considered but we we wanna make things easy for ourselves as well thank you hi things how I see it is to plug in our like CSS or something to style so web site to generate at the moment what we're working on the next version that we'll release will make use of bootstrap and what we want to do is more and more allow you to customize the bootstrap that whole job a script environment you know with with the tools that have evolved they have like a listening tests and and grant and all of that so that's how we want to make it customizable so it is it easier to handle examples on how we you can use this set the moment we don't have that at the moment if you want to customize his case with basically just saying he is you how you add a link to your own unseen states and then you write your entities but that's what we want to do with the next release to to make it based on bootstrap and add enough you know bootstrap at all it's pretty easy to change things because you just a lot of variables and it looks different OK thanks just a stop on the way here by um you mentioned some things you couldn't do with reject which can be done with a lot of the referral frameworks in the given example that that the most important 1 for me I states it is a book it's been on the internet for while cold wave using interface to the design patterns that and you know that they that we want to try and follow those design patterns 1 of them is called response of disclosure in this book it's when you have a form and you select something and based on that selection more of the form appearance on at the moment you won't be able to use it to do that that's actually the very 1st 1 we want because we feel that's a very important thing so we we sort of have an idea how we gonna get there but currently as as a user who don't know much about the framework you won't be able so I'm not really aware of much else obviously we don't have zillions of black beans and and things like that we taking it 1 step at a time goes on my portion of the that there's been some discussion about the performance of different templates for rendering engines has been going on and that you're not really doing the same thing but have you looked performance what all along the city's excuse developed the actual HTML from Europe charts my stance on performance um my truck you a little bit as I feel that you have to 1st optimized and then you can optimize 1st that optimize profile and then you can optimize right and I think you can do that based win the actual model of how this thing works is beta fleshed out so we wanna concentrate on that they also some things that we have done for performance and they usually mean that things that are dynamically generated the test but you must understand uh think of something like assembler language it's really really fast but you do prefer Python so there is a tradeoff sure there are questions those on computation of all done on the server side because you surely isn't our friends and this lady we the changes you on the world was not changed his on the request to the cell whose when latex usually there is a request to to the server uh because we would like for the HTML to only be generated on the server using the same stuff if we do objects for example we ran realize the entire place but we'll just render 1 which is so the side and then come back and what is the fission do you plan the tool executive themes on their clients by biking and by you know patent going to witness you know there's a lot of exciting stuff happening there at the moment as invasive all sorts of things I think that's too far enough feature to to worry about now that would be nice you know like regular expressions in Python on different array regular expressions in Java Script and Unit difficult to deal with that sometimes but it's certainly something 1 needs to think about but not right now during more questions but you don't have
W3C-Standard
Bit
Güte der Anpassung
Vorlesung/Konferenz
Wort <Informatik>
Computeranimation
Bit
Programmiergerät
Browser
Program Slicing
Formale Sprache
Versionsverwaltung
Kartesische Koordinaten
Element <Mathematik>
Inzidenzalgebra
Raum-Zeit
Computeranimation
Homepage
Prozess <Informatik>
Code
Kontrollstruktur
Gerade
Sichtenkonzept
Template
Datenhaltung
Verhandlungs-Informationssystem
Gebäude <Mathematik>
Stellenring
Ähnlichkeitsgeometrie
Ideal <Mathematik>
Bitrate
Datenfeld
Verbandstheorie
Rechter Winkel
Strategisches Spiel
Programmierumgebung
Ext-Funktor
Subtraktion
E-Mail
Framework <Informatik>
Code
Homepage
W3C-Standard
Benutzerbeteiligung
Software
Reelle Zahl
Widget
Endogene Variable
Optimierung
Ganze Funktion
Soundverarbeitung
Benutzeroberfläche
Division
Open Source
Physikalisches System
Fokalpunkt
Menge
Last
Mereologie
Basisvektor
Brennen <Datenverarbeitung>
Server
Subtraktion
Momentenproblem
Quader
Mathematisierung
Adressraum
Klasse <Mathematik>
Gruppenkeim
Mathematische Logik
Code
Computeranimation
Homepage
Richtung
Übergang
Metropolitan area network
Prozess <Informatik>
Widget
Skript <Programm>
Touchscreen
Parametersystem
Datenhaltung
Gebäude <Mathematik>
Abfrage
Menge
Modallogik
Verbandstheorie
Flächeninhalt
Rechter Winkel
Server
Gamecontroller
Zeichenkette
Mittelwert
Bit
Browser
Bootstrap-Aggregation
Formale Sprache
Versionsverwaltung
Kartesische Koordinaten
Fortsetzung <Mathematik>
Computeranimation
Übergang
Homepage
Formale Semantik
Metropolitan area network
Streaming <Kommunikationstechnik>
Client
Einheit <Mathematik>
Web Services
Prozess <Informatik>
Faktor <Algebra>
Minimum
Speicherabzug
Skript <Programm>
E-Mail
Schnittstelle
Managementinformationssystem
Sichtenkonzept
Abstraktionsebene
Stichprobe
Applet
Übergang
Strömungsrichtung
Ähnlichkeitsgeometrie
Ideal <Mathematik>
Ereignishorizont
Gruppenoperation
Lesezeichen <Internet>
Verknüpfungsglied
Rechter Winkel
Strategisches Spiel
Server
Projektive Ebene
Benutzerführung
Reelle Zahl
Lesen <Datenverarbeitung>
Tabelle <Informatik>
Subtraktion
Web Site
Wellenlehre
Klasse <Mathematik>
Gruppenoperation
Automatische Handlungsplanung
E-Mail
Mathematische Logik
Systemplattform
Framework <Informatik>
Code
W3C-Standard
Benutzerbeteiligung
Lesezeichen <Internet>
Spieltheorie
Reelle Zahl
Widget
Endogene Variable
Inverser Limes
Skript <Programm>
Optimierung
Ideal <Mathematik>
Ereignishorizont
Stochastische Abhängigkeit
Hilfesystem
Schreib-Lese-Kopf
Quarkmodell
Benutzeroberfläche
Spider <Programm>
Stochastische Abhängigkeit
Elektronischer Datenaustausch
Symboltabelle
Mailing-Liste
Quick-Sort
W3C-Standard
Last
Faktor <Algebra>
Wort <Informatik>
Streaming <Kommunikationstechnik>
Bit
Web Site
Subtraktion
Punkt
Momentenproblem
Wellenlehre
Mathematisierung
Applet
Bootstrap-Aggregation
Versionsverwaltung
Zellularer Automat
Computerunterstütztes Verfahren
Framework <Informatik>
Übergang
Internetworking
Benutzerbeteiligung
Bildschirmmaske
Informationsmodellierung
Variable
Client
Einheit <Mathematik>
Prozess <Informatik>
Trennschärfe <Statistik>
Endogene Variable
Skript <Programm>
Vorlesung/Konferenz
Schnittstelle
Softwaretest
Assembler
Template
Entwurfsmuster
Profil <Aerodynamik>
Binder <Informatik>
Quick-Sort
Regulärer Ausdruck
Objekt <Kategorie>
Server
Programmierumgebung
Aggregatzustand

Metadaten

Formale Metadaten

Titel Reahl: The Python-only web framework
Serientitel EuroPython 2015
Teil 88
Anzahl der Teile 173
Autor Vosloo, Iwan
Lizenz CC-Namensnennung - keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben
DOI 10.5446/20131
Herausgeber EuroPython
Erscheinungsjahr 2015
Sprache Englisch
Produktionsort Bilbao, Euskadi, Spain

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Iwan Vosloo - Reahl: The Python-only web framework Reahl is a full-featured web framework with a twist: with Reahl you write a web application purely in Python. HTML, JavaScript, CSS and all those cumbersome web technologies (and a few other lower level concerns) are hidden away from you. As far as web frameworks go this is truly a paradigm shift: away from the cobwebs of all the different web technologies, template languages and low-level details -- towards being able to focus on the goals at hand instead, using a single language. In this talk I will give you a brief idea of what Reahl is all about: why it is worthwhile doing, how it works, where we are and what still needs to be done. I hope to convince you that this is an important direction for web frameworks, and of how unique Reahl is. Developing such an abstract framework is an ambitious goal. I'd like to convey the message that what we have achieved so far, and the strategy lessons learnt along the way demonstrate this goal to be realistic and practical.
Schlagwörter EuroPython Conference
EP 2015
EuroPython 2015

Ähnliche Filme

Loading...