SymfonyLive London 2015

Cómo modernizar una aplicación PHP legacy

Marek  · 
PHP

Transcripción

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

yeah so as michela said no one really has issues with working with legacy code because everybody is lucky enough to write new applications from scratch with the latest technology so as Michelle assets people call me 'super mark that that's a handle

you can find me on Twitter I'm a software engineer at cells Phillips UK which is part of VK group and that's what I'm doing on my actually day-to-day work is a morning with legacy applications so this is what I would like to share today with you

so before we start talking about how to fix legacy I would like to say a few words about what we mean by legacy applications guess that's what different people different people have different idea of how to approach it so this is the easiest way to talk

about legacy applications is what is legacy code is someone else code I didn't wrote it so I didn't write it so this is legacy application for me you can always say that your application code you've written a couple of months ago couple of years

ago you consider legacy because you don't remember what's going on there the code might be written with the framework you don't know so you treat it as a legacy basically don't want to touch it you afraid to touch it it can be application which

is built over years by different people using different techniques and mixing different styles ideas and and so on the code might be not up to today's standards most of most of it is procedural there is no object orientated oil orientated programming concepts

there will be no no namespace is used there will be no clearcoat convention so it's going to be very difficult to to go through for you being used to things like PSR so the legacy code may also mean things like PHP mix with HTML / using global variables

abusing them actually changing changing get values during your code execution stuff like that so you may also have like Inc files in your public folders with someone forgotten to protect from being accessed through the the web so your business logic and how

your application works is leaking outside you're also your code is your legacy code is usually very difficult to to debug there is no concept of environments there is just probably a zipped copy of production and our logging is disabled because on production

take too much space and slow down the web server so there's probably no conversion control used but the most important bit bit about legacy code is that it has no tests so if you try to modify behavior of any part of your application than you being afraid

that you're going to break something you don't know where so you probably need to employ like a team of QA to go for your application click by click and check if everything is still working after you've change behavior so yeah it's very difficult

to understand our teachers there's no documentation so so basically afraid to touch it and you don't really want to to work with it so how do we get out of this situation how do we how do we try to work with with the code which no one really wants

to work with so before you actually start before you start before you start writing code or changing anything in your application try to figure out what you why you want to change it try to define the clear goal of your of what you're trying to do right

if application is in production and works and provides you some income or provides you some some services for other people you don't really want to change it drastically you don't really want to throw it away and start from the scratch some companies

are lucky enough i remember my builder had like six months to reveal the whole application from scratch using the new frame working don't usually have this luxury so when you when you start talking and ideally you should start talking to your people who

are stakeholders of the application try two hundred five goals so this kind of reason why you want to change your application the reasons might be different it might be you want to improve conversion on the side so you get more sales and that equals two more

income you may for whatever reason you want to you have a huge drop out at checkout because you're missing some information and you would like to change that as well or maybe you want to you just present some weather information to your visitors on your

website and you would like to keep them longer you would like to reduce the bounce rate so if you keep them longer on the page if they keep browsing then that means they they see more adverts and it is Ahmad more adverts you get more income so when you when

you define your goal then you should start thinking of actors who can help you to achieve that goal and thinking about actors think of people who are using your website we're using your application if it's a webshop you're going to probably have

some people who are just browsing and window shopping so probably you will try to you have you have researchers who are looking for specific information you may have people who are coming from your newsletter and they keen to buy something so there are different

type of users different different type of different types of actors trying to access your your your website the same if it's justin for my information type website like displaying the weather forecast or like weather averages for next couple of months

they might be users who are considering going on holidays and showing them advertise of airline tickets or hotels my encourage them to click and you get more income from that so you can also have like internal users people are creating like shop owners or

shop assistants who would have to process your some orders or stuff like that so try to defy the other actors when you haven't tried your actors actors then try to see how they could impact your your goal so let's say in your online shop let's

say you have a legacy application me a small online shop which sells some postcards and you display the price of the postcard but you display the postage how much does going to work so customer will was going for the checkout they may not be happy that they

[ ... ]

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