PyCon Australia 2013

Cómo convertir una aplicación legacy en PHP a Django

Ben Sturmfels  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

hello and welcome our next presenter been stem cells as a software developer and activist from Ballarat in Victoria he organizes free software Melbourne and leaves the end software patents Australia campaign today he's going to teach us about his experiences

transitioning from PHP to django on the sly please make him feel welcome hello everyone it's a privilege to be here I'm really grateful for the conference organizers for running such an awesome conference and it's it's a lovely community to

everyone's very easy going in the Python world which is nice on that note how do you how do you know if someone's a ruby developer or not they tell you in a few minutes second time we can so this talk is um I'd like to encourage you to move you

know you have the ability to move from PHP to python I'd like to tell you a little bit about how that how you can do that like that's it's not a big deal it just takes a while and there are some steps you can do to progressively do it so a lot

of our time is spent dealing with existing software it's it's a fact of working in software is that not everything is you know this greenfield development you get to you know you do you do your django tutorial and you're like right I've written

a blog now we use that for you know now make my next big application the the fact of the matter is that often you're working with something that's existed or existed for a long time even so really if you want to work in Django often you just you're

going to have to deal with some existing software in another language could be PHP or could be something else and there's a few ways you can go about it so starting from scratch is the most attractive way you know we'd like to be we love having a clean

slate to work on and it's it's just a really appealing thing oh there's something about it but the problem with this approach is that it's a good way to put yourself out of business and lose your client in the process even if you do manage

to provide the software in the end you know it may not be what what was actually wanted or may be completely irrelevant in the market by the time it's you've got it up and working there's been lots of people writing and talking about this approach

over you so this isn't a new thing starting software from scratch is a bad idea the big problem here is that it's great we can start it and you start writing and you get to the point where now you need to hook it into the existing client systems you

know yeah you've got a registration system and you need to replace it with your new one and the best analogy I could come up with was the bridge where you've done all this work but you don't actually know how to put that piece in the middle you

end up kind of stuck so the approach I'm encouraging you to use is an incremental approach the analogy I wanted to use was that you can it's kind of like replacing the train tracks while the trains are still running which probably doesn't you know

lend well to the way train tracks are replaced in say Melbourne for exist for example they do tend to cause interruption but this approach is like replacing the rails without stopping the trains so the idea is that it's progressive rather than a big bang

approach and the idea is that you maintain compatibility at all the time and you spread the changes in little pieces out over over time and what this does is it dramatically reduces your risk the system's always running it's always you know you're

always taking payments or registrations or what have you do in your business and at any point you don't have this big amount of risk sitting there you know you haven't run away and started building something and then you don't know whether it's

going to work or not your systems always working so this this isn't the most easy approach so to have to say like it's it it works well but it's it's a long journey and a bit about what I want to tell you about in this talk was a bit about

how you can how to navigate it that's my train again so I am this talk at me three years ago because i was starting on this path of wanting to move an existing client to django so we had an existing client with an established so it was a Victorian charity

they have well-established and rapidly growing and we we had a long and healthy relationship with them which was great they trusted us as a as a technology provider and they also understood the benefit of investing in good technology to save themselves time

in the long run that's not always common but it was really good in this case so what they had was a moderately common moderately large PHP application that did things on the public side and also stuff for their internal stuff so systems that and I owe

take incoming messages from the public and they can filter them and send with different people registrations mapping things all of the stuff that just saved them time in their organization the reason I'm using I'm contrasting PHP and Django which you

know it's I'm comparing apples and oranges in a way because pH is a language and Django is a framework that's built on top of Python but the reason I'm doing that is because we this this code base was started before you know systems like frameworks

of PHP like codeigniter and cake and all this stuff that I don't really know that much about so it was just PHP and I was going to django so we built some in-house you know as everyone does when they start to build a moderately large PHP application is

you start building your own tools in your own you know ORM you type things and all sorts of stuff so the the other thing about that was that these these tools were things that were actually useful to the organization we wanted to keep them so it wasn't

[ ... ]

Nota: se han omitido las otras 2.951 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.