Categories
Online Marketing

web2py: “Web Development Should be Easy” – Massimo Di Pierro – PyConAr 2012

I will try to explain what that means and more or less why we started building web 2 pi and first of all, I want to thank the organizers and this wonderful conference and the food is excellent and also want to congratulate Mariano, who is a new member Of the Python Software Foundation, ok, so let me first ask a question that some people ask: should everybody learn to program now? First of all, what do I mean by this? Should my mom learn to program? That’s not exactly what I mean.

What I mean by this question is not, and also I don’t mean, should everybody actually be a programmer? The question should people know what the program is, how you build the programs, and so the question is: should people learn how to do it? Is there a value in that? More specifically, we can ask, should every child learn to program and to this question I definitely would answer yes, I think the new generation should learn how to program.

So, let’s see my reasons for that. First of all, there are studies that show that if you know two programs, you improve your cognitive skills. Well, people have shown that if you it’s not sufficient to learn the syntax, it’s important to apply programming to solving problems. But you learn many things. If you do that, you improve your cognitive skills. Also, there are reasons related to job opportunities, because people project that the next 10 years there will be twice as many jobs created in software development than in other areas.

So the job sense of tooth development will grow twice as fast as in other areas, but also, I think we want our kids and the future generation to understand technology, not just being consumers of technology, which is, I think, it’s a big problem today. We all use a lot of technology, but most people don’t understand how it works, and that creates problems so understanding science technology is essential for the progress of society and in particular, computing technologies is what has given us unprecedented means to communicate and build different types of Social relationships that people were not building before now, we are able to meet people who are far away, and we can do that thanks to technology – and I think programming plays an important role.

People who are programmers interact with people who are far away more than people are not programmers. People are not. Programmers tend to only interact with local people, and also it’s important. So this technology can be is for good, but it’s also used sometimes in ways that we don’t like like to take away our rights like we buy a digital book and it’s not clear who owns it. So when I die, can I pass it to my child? I don’t know and stuff that we put on a cloud who owns that.

So I think there’s also an added value in having people learning to program and building an economy based on building software as opposed to building physical things. So we have this capitalistic model which I’ve nothing against it mean it works some extent and makes a distinction between people who invest, for example, in a company by paying for the means of production in the workers who actually build a product and they both a profit.

Well, software is a little different in that, because the means of productions is your education and is your laptop. So you are kind of an investor of yourself. You can start your own company without necessarily having somebody investing in you, that’s kind of a different model and it allows more for less your are keep of society. It allows people to dream about having a better position in society.

That’s to me a very important reason to get into software development, also, the kind of product we make, which is software as economic value as social value, but also it’s something we can easily replicate on our cost and we can discard without polluting the environment. So it’s a important part of the economy. It’s an important part of the economy, which is growing and there’s lots of benefits, so the production production of digital content is specifically.

Software is something that will continue to be important, and I think we should welcome that. We should have more of that. We should value software and more in our society, more digital content. So what kind of society do we want? Why is this important again like today, we start seeing on the market machines. Like 3d printers, we can buy a 3d printer for like two thousand dollars for a small one, and we already see that people are starting to approach that.

It’s not ok that you will start things account, because that undermines our current economic model in which the companies that’s supposed to make things and they own the rights and time. So we have to make a decision which kind of society we want. We want a society which we restrict, what people can do in terms of building intellectual content, software, business content or whether society in which things are shared, and it’s much easier to make things yourself.

Even physical objects and physical object will be made from digital content, which is something relatively new that is going to change our society even more so I don’t know how we go about that. The only thing I know is, I think we need to teach more people out of program. So my next question is: do we teach programming well to our children? Do it teach it in school? Well, I am I’m a professor. I teach in a university and I see a lot of them.

Ok, a students coming is never programmed before and is confronted with public class in the world. The public static void, main string. Args sees out print line in the world. Ok, so we’re trying to teach them that we can tell the computer to print something, and we are a lot of additional structure there. That scares people away, and so we put a lot of obstacles in the way of new programmers and the obstacles are of various nature.

The first obstacle is, they have to use some kind of shell type commands. Well, they don’t have the concept yet that you give commands the computer. So the moment you present a shell, they get a little confused. Also, there are lots of shells that is the Linux bash shell. There is the Windows shell, there is the Python shell and when I see students were master students who cannot tell one from the other, the tape pack, we type Python comments in the bash shell.

The type bash comments into the Python shell and 50 % of the students come to a university in America and they don’t know that Windows is a shell, they don’t know where to type the commands that I give them. So that’s a problem and I think, is IDs now IDs are useful. If you are a good programmer, then a lot of features like auto completion, but they also have a lot of buttons that scare people away myself.

When I try to use the Microsoft IDs and thanks get confused, I don’t know what the different buttons students will also focus, often on languages, syntax and not semantics. So we have to understand what the semicolon mean and things like that and, most importantly, I think we use examples. They do not leverage on. What’s the student knowledge, so students today and every level even the elementary level they go to school and they already know to interact with computers.

They know how to use YouTube. They know you use Facebook. We making this 7 is addicted to YouTube right. So we don’t leverage that we go there and we say: ok now type the Fibonacci sequence code, the Fibonacci sequence called complex numbers, they don’t know what that is. They don’t care, I mean some. Do people will become engineers, they are interested in that, but not everybody. Also. We don’t provide motivation.

Those examples that people use in intro classes are not interesting to the majority of people. It takes a long time in our computer science degree before the students get productive and can build something which they consider to be useful, and we have a lot of classes which are for non computer science majors in which we never teach them to do something. Useful and that’s a big mistake, I think we all set this bottom-up approach is opposed to a top-down approach.

So we start from the very basic concepts which historically are the foundations of programming, which are the for-loop the if statement, and then we go into funk. Some calls, and eventually after years we get into building a web application, and I think we should reverse that. I think they don’t know why you need the for-loop people, don’t know what in the if statement. So first we should start to teach them how to build complex things using complex blocks, and then we should take a more scientific approach and explain them.

How did this block work? These blocks are made of smaller parts which are made of smaller parts and eventually the if statement and the for loop and the function call are the smallest parts. So one thing we can do better. I think here everybody agrees, is you know we can just get rid all the fluff around there and leave only print the Lord, so we can use Python for into classes. So what I teach would start this is that with a lot success, our intro classes in computer science now use Python as intercourse, and then they take advanced programming courses.

But you know what I find very strange is that we were able to do this for computer scientists, but not for all the other majors for the other major sixteen using job, and I think we need to do a better job at convincing people. That Python is a better language for the introductory computer science. Well, can we do even better than this? Well, I think we need to provide motivation. So from the beginning, we should teach students how to build not simply print a long word but to build web applications.

So print L award post it on the web for other people to see. I think that’s the big change that we should do, and I don’t see this done everywhere. Every anyway, people still program these very simple examples that don’t give a motivation, so students already familiar with the web, and we will give a lot of motivation by teaching demo to program web applications and again we as a kid was not addicted to YouTube right.

Okay, so this is my job. This is why I’m giving this talk – and this is why I build the things I build. I want to make web development easier, more accessible to people and my main audience is not necessarily Python programmers but bring people from outside and less error-prone building web applications is it’s complicated today there are security issues. It’s complicated issue, security issues. You can make errors that, because security will never build this, so my interest is: how can we make web development easier, more accessible at the same time enable people to build programs with a lower chance that they make a security mistake and more module? Now I don’t claim that I have any success in this.

I mean I will show you what I’ve been working on, but I don’t claim in success. I’r just saying that I’m trying to do this. This is my goal. My goal is not to make the fastest web application. My goal is not to make the most pythonic web application. My goal is to make the easiest one to use so 2007. I was teaching courses on web development. I was using other frameworks and I had all these problems, the students I could not get them out to speed after four weeks.

They still were confused about basic things, so I’ve started making web 2 pi and what’s web 2 pi, which pi is drop. One file, which is a zip file: you can get the binary version, source version and so on or for Mac or Windows, and includes basically, these three things that includes the web server, the database SQLite and the database abstraction layer. So it works on top of SQLite. But you can replace it, it does my gracious in the sense that you never talk direct to the SQL engine, not even to other tables.

Does that, for you includes a web-based ID. So when you unzip wait to file you just unzip, it click on it. It starts even the opens a browser for you, you don’t have to open the browser, you just that for you and you get the whole idea in the browser and it’s a very simple idea to use for new students and there have no configuration files. It’s not that you don’t need to do the configuration just.

There is no configuration file. It’s supposed to work anywhere. Python runs and we’re packages with it all kind of libraries that we think are important for web development, like libraries to handle to generate HTML, XML, JSON, RSS, ICS, PDF, RTF and all various protocols like similar procedures, an RPC, so different application methods like LDAP, generate Dropbox. Google cast open I’d, be of one and two x.

509 certificate. It’s all built thing, so you don’t have to worry about going fish for the right library, third-party library, which may or may not work with your version. Libraries for generating widgets, like mark me in a Mac down and libraries, to talk to Google Wallet, authorized or net stripe, dot-com payment systems, memcache Redis, Twitter and it’s based on Twitter bootstrap. But you can change that.

Also, one more requirement of way to pi we made in 2007, we required always to be backward compatible, so we never brought backward compatibility since 2007, except for one security issue. So if there is a security issue, we would break backward compatibility. It only happened once like three years ago now wait. Why has a lot of contributors? I’ve listed some here? One of the main contributors is Mariana vengas, which is one of the organizers of this conference.

So thank you to all the contributors. We’ve been doing relatively well. We got two kind of important Awards: 2011. We got the boss award and Justin twelve gauntlet acknowledge the Year award from the same source, both of them. So this is how it looks like you unzip what file you started. You get this ID and this ID basically, on the left hand side, it lists the applications that you have and you can have many applications the same time and the same with my instance, and you can do various things with these applications on the right hand, side You can add more applications, you can create a new one, you can update where to PI and you can up install application locally or remotely and what shows you there with the iPhone.

It shows you that this web ID is also available for mobile devices. Then you click on one application and what you get to get internal structure. So it’s a MVC framework, so internal structure consists of models, controllers and views. Mostly, there are other folders now one important. The two things important here to stress first is the web ID. It’s useful for new users. It’s convenient if you are doing some work remotely, but you don’t have to use.

It is not a central part of what to buy, which buys a bunch of libraries like flask or or Django. You can do everything from the shell. You can edit all your files from the shell, but the ID itself is an application runs on top of those libraries which you can even uninstall completely and everything works. The second thing is the folder structure that you see everything that the web interface shows.

You corresponds to just files and folder in the file system, so here we see we are into the application on webcam. This means that there is a folder called welcome and inside there are models, controllers, views and so on and those are just subfolders and inside there are files and those are the files in the system. There are no other files other than those that you see in the web interface. You can edit a file on the web interface.

You can edit using Emacs from the shell. It’s the same thing, there’s no metadata anywhere. The only thing that the web interface does for you first, it groups them in a way that kind of makes sense in a logical sense. It allows you to edit those files. It also parses those files and finds what’s in there like it, finds that in the controllers that may be some actions defined. So it shows you links, so you can just click on the link and run it same thing with the models.

It shows you which models you have defined and which tables you have, and things like that. So now you had you click on a controller and you get just a web-based editor. Something like this, where you just type in their death index return in the world, finds that there is a function in the X terms in the world and on top there one stays exposed it’s going to list. There is a function index you click on.

It is going to run it you’re going to get the webpage you’re looking we have web-based the bugger, which was created by Mariana, which I think I broke in the latest release and I’m fully responsible for that. So we’ll fix that soon. Also, every application that you run on the web to PI has its own database administrative interface, which is kind of the poor man’s version of the jungle. Min.I serves the same purpose, but it’s a major difference.

The jungle mean is designed to be exposed to users and customized. The word papaya tween is para plication and is designed for the administrator, but the controls, the tar in that mean, can then be embedded into your own applications and I’ll show you that even a more sophisticated controls of those used in there. So when you make a new application in word to buy, it already comes with some tables which you can delete.

If you don’t need so you have authentication table for role based access control, so you have a user group membership permission an event event our login event. Logout event and failed access events, we’re a table called old class every application, which PI is a central dedication, service, client and provider. So you can install to application. You can ask one that the other one will do authentication for it.

You can delegate it wealth of scheduler tables because it comes with a built-in master workers scheduler. So you can start many workers and you can schedule new tasks by entry, new rykor. Do you want those tables programmatically or using the interface, and it will run the tasks in background and the workers available? We pick up the tasks, we’ll type, an internet transition page so anywhere in the code.

You have a string. You want that translating and different, which you just put that in front of the string, and then you you click on the button that corresponds to your language and you get a page in which you just translate those strings in the other language. It’s yellow. If it’s not translated already it’s white, if it was translated already and then you just translate through this interface also, we have a pluralization system.

So what pi understands the rules of many languages? For example, understand Slovenian has four types of plural, depending if it’s zero objects. One object to object or more than two objects. Okay, it understands that and depending on the language you are translating you can specify which words needs to be pluralized, so you may have a print statement you have X. Emails X can be 0 X, can be 1 X can be 2 X can be more than two okay, so what you want to do is you want to say X, is a variable? Email needs to be polarized based on the value of that variable, and this is how you polarize it you go to the web interface.

You type the word email, you type, the plural without there as many plurals as you need in the language that you’re translating we’re a built in ticketing system and again, this is really useful for many purposes. Think about so most most web frameworks have a distinction between development mode and production mode. Well, you want development. If there is a bug in your application, you get some kind of trace back.

Ok, you see what was wrong in your application. You can explore the variables you can go through the stack trace when you are into production mode. That information may be lost. Some frameworks allow you to connect to a tracking system. What eventually gets recorded this is built in into web to buy, and we don’t make a distinction between production, mode and development mode if there is any budget application and any user encounters this bug, what PI takes the entire stack trace, stores it into a ticket and Gives the user a ticket number if the user is an administrator, the user can click on the ticket number and can see the stack trace if the user is not an administrator, can email them in straight and say I have this problem.

This is my code. This might take a number and the administrator can go through. The web interface also looks at all the tickets that have the same error groups them together, so you can see which are always more happens more often, and you can just look at one of them as opposed to look at a lot of errors that basically it May have different variables but they’re exactly the same problem. Another thing we have with some eye level controls, for example, one is the Greek.

So that’s a you have a table and you say I want to greet based on this table and agreed this a widget that allows you to add. The new record list records the pagination search records. Add new records, updated delete and it’s customizable. So you can say I want the record to be represented in this way. I want this field to be representing this way. I want to disable the feature of adding. I want to set permissions so that only these people can edit this record.

So there are kind of things like that you can customize so now let me step back and again, let’s talk about the syntax over to by now I just talked about the web ID. So let’s talk about the syntax a little bit now. Let’s remember this distinction between the Java, syntax and the Python syntax and let’s keep new programmers in mind, not experience Python programmers. So this is how you do a load word in bottle.

What is my favorite micro framework afterwards by, and so this is how it works. You from bottle you import everything you need, and then you write Def index with on a low Ward. That makes it just defines a function, and then you say you want to turn that into a web page, so you say at get slash index. So that means, if you, if you do a get request for the page, slash index, that function should be called, then that fact that your application may need to understand.

We need to serve images, so you need to tell bottle that you want to handle static files. So they would be under slash, static, slash filename, and you need an action that can do that and at the end you start the web server. Okay, all we want to do is write. A load word same thing with flask, so in flask, from flask import flask and up equals. Flask underscore underscore name now, explain that to kids just learning to program, but that’s my issue.

They all have other things in common, like uproot slash index. So you are mapping a URL into function, same thing with tornado tornado, you are grouping the routes in one place and you need the classes that do a function to handle the requests and then your class can call the function. This is the pyramid example. It’s even more complicated, but it’s always same again, so we made which pipe, because we wanted to be able to do that.

We want to be able to say you just type the name of an app slash, the name of a file, slash index. It should call the function index in that file. That’s what we wanted to do and there was the basic idea from which the old thing started, and we wanted to do that through the ID, and that should give me a page which says a lot world. So as simple as that now people are very confused by that say what is everything else and that’s a good question.

So this is how things work inside, and this is the main difference between web pie and every other Python framework. Every other part of framework. You start from the user application and you import the libraries of the framework, and then you start the web server. They all work like that and in what PI? We do the opposite. You start the framework, even if you don’t have an application and that executes the user application and because it executes the user application, you can have more than one and each of them is its own environment.

So if you look at the right, this is more or less the logic in a way which is more, very simplified, but not exactly that, but so a request arrives. First of all, the request is parsed, so we we validate the URL other others. We established a session we, the term in which language has been requested. We look for the proper translation. 5. We do all kind of things that the user may or may not mean, but we still want to expose them to the user.

Then we build an environment based on this request, so we know what the client is telling the server and we build this environment, which is a bunch of symbols, a bunch of variables. Then we find the application which has been requested from the path info and that’s basically a folder which contains a controller file, and then we execute the controller file into that environment. Ok, so that that file already see is certain variables.

The variable C’s are very well documented. It’s always the same. It’s not that many and there’s not much change there. If you read the documentation, that’s pretty straightforward. So there are two different approaches here. In the left hand, side so most frameworks prefer to follow the Python motto which explicit is better than implicit and that’s perfectly fine. For me, I prefer to follow, don’t repeat yourself, because I want to make sure that it’s as easy as possible for new users and also we follow a convention over configuration and so in some sense we are close to Rails than we are to jungle.

Everything is a default like if I make my action index and I call index dot HTML, I get a default HTML representation. If I call dot XML. I got next time error presentation. If I got called dot JSON, I get a JSON representation of the data without doing any coding. Now I may not like what I get so I can change it, but I have a default like I can create an action and I don’t need to define routes like you’re doing you are at stop py like you’re doing jungle.

You don’t need to create views. You get the default one and then you go and change it. If you don’t like it, you should change different approaches of different pros and cons. So the import approach is faster specifically for simple apps. It sometimes is faster for more complex app, mostly because the Sun code, which is executed only once when you import it, and then it’s not executed any more, give a little bit more flexibility and in some sense there is no magic there.

In our approach, we have less code, so it I believe it’s faster to develop with our approach. It certainly is lower for simple applications, because there are certain things we do, even if you don’t want so you kill us in a lowered type of benchmark like we create a session, even if it’s not used, we determine which language is the proper translation. Even if you don’t use it okay, so that that kills you in in certain benchmarks, it does not affect you very much in real-world application, so we don’t mind we’re working and we are making some things lazy.

So eventually we will improve on that. We can go out swap a code, so it doesn’t matter which web server you are using. You can use a production web server like Apache or nginx. You can. While the server is running you can replace any file. You can install a new application. You can delete an application and nothing gets affected. You can have multiple applications at the same time. What I call in application is what jungle calls a project.

So if you have jungle, you have one jungle, installation. Typically, you have all your files share one settings and that contains the connection database. In our case, we can have multiple applications under the same instance of the framework. Each of them can have one or more database connections or 0 and they can share data base connection, but by default they are separate and and they’re completely different.

They don’t have any configuration file, but they’re completely isolated one from the other. They can even come with their own vital modules separately. They all see more or less the same environment, but there is some magic involved. So eventually you need to read the comment age to understand some things. Another thing that makes again here I’m making way to by examples, but some of the site concepts are more general and other things that scares new users in particular when they go to build web applications, is that you have layers of code.

You like embed SQL into Python. Ok, you something like execute and then you will select your SQL statement into Python code or any other language. Now, that’s conceptually complicated to understand is the cause of many problems like SQL injection. So what’s the solutions? Well, some framework, seven ORM, some frameworks like with five wave, a database, abstraction layer, and I will show you some examples of that.

Another thing is: sometimes you have HTML inside code, you have piece of Python code is to generate HTML and you end up doing string combinations again, that’s the source of errors, it’s logically complicated, so you still need to understand it to some extent, but you act by. We provide helpers and l person worked by have the same names as the HTML tags. So deep is called deep, which one’s called h1, and so you never do string concatenation.

You just use the helpers. Sometimes you need code into HTML. So that’s what you do in the templates and well, the MVC model obsolete a bit because you minimize the logic that you put into the HTML, but you still need to do it. So what we don’t have a solution for that problem. But what we can do is we say that we use pure Python in to Daisy Emma you just forget: indentation, a block starts with Colin and ends with pass, which is a Python keyword and it gets rained out internally automatically.

So you don’t need to worry about that, but you don’t need to learn another language. It’s exactly the same anything you would write in Python. You can put into an a template. Another thing is JSON into HTML that again scares people because some more libraries in another language. Well again, sometimes you cannot really avoid that. But we have something called the load function which allows you to load one action into a template via Ajax and let’s say that action contains a form which is self submitting and so on.

The other thing is automatically done for you here Ajax and I’m going to show you an example of that this really makes certain kind of JavaScript functionality easier. So let me talk again about the word to pie database abstraction layer which, for most people is and the nicest thing in what to buy, and in fact, if I were to the right way to buy, I would rewrite a lot of stuff today, different than the Way I did it years ago, but I would keep this so yes, first of all, we support really a lot of databases out of the box.

We actually should put more, but some are not really well tested. Those ones are, that’s it we’re automatic migration. So you can add the field you can delete the field, it talks a little base, that’s alter table. We can support multiple database connections for every application connection, pooling round-robin redundancy. So if you have a master slave, that master master slave database with many database slaves – and you may want to try to connect to one of them are random, and if it fails, you want to try to connect to next one.

You will do that. It has distributed transactions cross database. You may have a connection to PostgreSQL one two or a call, and you want to distribute transaction, does that support joins left, joins aggregates nested, selects the castle selects and you can merge them. The idea is, is not a no around. We are not trying to map SQL into Python. I don’t think that can be done reliably. It can be done, but you have limitations to do that.

So what we try to do is we try to have a Python syntax that correspond exactly to the SQL. We just make it in a direct independent way, so you write once and then you can swap the database engine and will rewrite it for you. So here’s an example: the beak will dial SQLite, so it makes a connection to SQLite and you can replace that with Oracle Postgres or whatever, and they will say the final tabled person with a field name.

The final table thing with a field name in the field owner, which is a person and the beating insert name Mac, so there’s a new thing, which is a Mac which is owned by the paper to insert max so max on the Mac. Now you say whether something says ownership equal so in creating our relation ownership. Equal is a relation between a person ID and a thing owner. So a thing owner is person ID and then I say things like variable that says the beating at the count so count the IDS of things at this point I’m not talking to the base.

Yet there is no database interaction and then I say rows equal. The B ownership so from this ownership relation that defines a set of Records, select the person name and the number of things ordered by the person ID group by the person ID. So that’s giving a joint for me and is doing an aggregate and then following rows, bring the row pursue name in the row number of things and I get a list of persons no mean things.

They are and that’s how we write almost every every query and what you see is that insert maps into SQL insert select Muppets into SQL select, will sub, delete and update similar syntax. There is no other keyword. Everything else is done with operator overloading. What is an another thing we are working on right now. I can try, show you so I’m going to this is for interactively, so I’m going to see okay.

So this is my some interface I login. This is what people see you have an application, my app, which I made I’m going to uninstall it. Yes, I’m sure. Now I want to make another one, and I call it my up again, so I just made a new up. I could see things in there. I can make, for example, a new table and I go and call it and made it so go back to the Edit Page to the base administration. I have a table, I can already insert stuff in it and look at them and I’m going to go back to the design page I get to log, I can see the table was created for me.

I can go in after it, so I can go and I can edit this table and I can say I’m going to add another field, which is description and this thing is text, and then I save it go back to edit that the base administration, if I, If I, the new record, I see that this is here and actually let me do one more thing here. That means I have another field which is created on which is a date time again same thing added.

If I look at this, I already get the pop-up and where pop-ups for various types of fields, date date and time time Pickers things like that and again, if I look at the skewer log, he did the outer table for me at the two other tables. I added the description and I had the timestamp, so I really very rarely you need to talk to the base ever so well. What can we do? Programmatically? Let me delete a few things starting here.

Let me put the deaf index return and award, so I’m going to save it and I can click it. I say hello world. Let me return dictionary which I have like rose, which is database, the big thing select as list. So again we can look at this and I get the rose and we want them in XML with adjacent first okay. So what doesn’t work? Xml is missing the top line. That’s a bug in my version in principle, you can do things that, like added RSS, just that there is no RSS type of data in there.

So it’s not email SAS. But if there were events with start time and end time, it would make the RSS you can do ICS from the Google map the same way. Let me make, let me make two more things. Maybe make a form for the big thing. Let me return. The form select sorry process. Okay. So if I do this, I get an entry form, so it’s a widget, I can add everywhere. Let me make a more complicated form. Let me make a great thing and let me require login so, okay now it says you have to login.

So I register all this stuff is out of the box for every application. Okay, so this is the widget that just embedded, so I can create a new record and I can view it you can edit it and so on and delete it. They can search them. I can build queries, name contains C, and things like that. I can export them in different formats and I can customize this with. I can register callbacks and do various things with this.

Okay. This is still this. One final thing: I want to show you, which is compact here, I’m going to rename this thing, I’m going to call it manage and I’m going to return just the widget. So if I call manage should do something, if I call manage, I just get the HTML, I don’t get the frame now, I’m going to turn sandy called out wiki and so there’s a new feature that we have. So if I now call index this exposing our all wiki, so I can create a new page index from not and plate from this lag.

So the page is my own page and you reckon and bad things like I can target with PyCon, Argentina and so on. I can go. I can edit this page, so there’s a wiki syntax to to do things like. I want your like lists. Let’s do one thing we go to youtube will have me search for some article. It doesn’t work, yeah, that’s what okay, so here’s a article, so I think I’ll just cut and paste the link here and I can do a preview but then just going to submit so it talks to use the embed protocol talks to YouTube embeds the article.

It understands of kind of embed server protocols, but now what I can do is I can use the wiki. I can I create many pages through the wiki I can edit the menu. Let me make a manual here. There are no things like this, so here I just added the menu, so I can build my own applications, a wiki and in particular, if I go to my March pages, my own page edit down page, I can also embed components. So the thing I built, which is default, manage the manage things, so my form is now embedded into my application and when I submit a new thing like a table, this is submitted via Ajax is not a fresh.

Little page is only the fresh in the component. Two minutes: okay, so well! This is what we just built. This is the total code that we just wrote and that’s a lot of things. So it shows you the same thing. It just showed you. So what is my conclusions? Well, my conclusions is that there’s some elitist approach to programming only people who can do should do it. The other people should not even try.

I think that lead us to the wrong path. I think there is not one solution. Different people are trying to teach programming in different ways, and also there is not one web framework. Different web frameworks are different strengths and weaknesses and target different kind of audiences, and what we need to do is, I think we need to learn from each other. I think we learned a lot from other frameworks.

I really owe a lot to Django, in particular, is the one I was using a lot before. I think I learned almost everything I learned this jungle. We took some ideas from flask like from flask. We took the idea of the thread-local context, which I did not show, but we use it internally. I think we need to build a better society where technology is controlled by people and not by large corporations, and the way to do it is to get more people to program.

And that’s why I’m doing this and we need to build tools that are easy to use for users and more effective that allow people to use the web in a more meaningful way in which, if they have data, they can expose the data they can expose. Your opinion, they can automate processes and this really empowered people. I think it’s really important. We do it ha tenemos paranthas see. I will shoot up report roses, you know Kiran, do you need religion? Why there’s? No so many ISP that supports a per 2 pi as default because he said that is such a good framework, but the most the ISP doesn’t know hosting, doesn’t support it with question.

Well, normal normal austin services that have a regular virtual machine with a file system. If they support jungle, they support what pi, because it’s wsgi application. They may not say, but this exactly the same thing. So if they support any other Python framework which by works, the exception is some places like a Roku, for example, which they don’t have a writable file system. What 2 pi uses the file system it needs to write it like when you upload an application.

You are. Writing in the file system, so that’s the main problem we have, I mean we could deploy on a Roku if we were to package an application and give the application to them as any other frame of desert. But the our distinction is that people can go through the web interface and can change the code and they don’t allow that. So we don’t have a solution for that. We we could. One solution could be.

We could store the applications and substance database. I don’t think it’s a good idea because of performance we could cash it we create. We would have to create a lot of new structure for that, so any virtual private server any shared web hosting. That is a writable file system. If jungle works with by works and the instructions are exactly the same, you started calling the Django angular, you call the web 2 pi, WS GIM same thing Oroku and a few other things like that.

We’re working it open, open shipped. We work another shift. In fact, this one thing I didn’t show, which is if I go to the list of interface here there is you – can deploy in the Google App Engine from the interface. You can deploy an open shift to directly from here. So it takes your applications that push them to open shift. You need to configure it. This is one thing you need to configure it a little bit like in the case of Google App Engine.

You have to tell it where it’s your app CFG configuration file which applications you want to deploy. I want to deploy this one and throw this one, and then your Google password and then we’ll deploy on Google