上海品茶

您的当前位置:上海品茶 > 报告分类 > PDF报告下载

MobiDev:2023年PHP遗留应用程序现代化的挑战及解决方案(英文版)(22页).pdf

编号:124857 PDF  DOCX  22页 1.37MB 下载积分:VIP专享
下载报告请您先登录!

MobiDev:2023年PHP遗留应用程序现代化的挑战及解决方案(英文版)(22页).pdf

1、Table of Contents6 Signs Your PHP Application Needs ModernizationFROM A BUSINESS POINT OF VIEWFROM A TECH POINT OF VIEWWhy You Should Use Supported PHP VersionsChallenges of Migrating Legacy PHP Applications(To Migrate or Not to Migrate?)Two Approaches to PHP App ModernizationAPPROACH 1.REWRITE EVER

2、YTHING FROM SCRATCHAPPROACH 2.STAY WITH A CURRENT APPLICATIONWorkflow for PHP App Modernization at MobiDevOur Case Studies for PHP Legacy Software ModernizationCASE STUDY#1.UPDATING LEGACY LARAVEL-BASED SUBSCRIPTIONPLATFORMCASE STUDY#2.MODERNIZING A LEGACY APP ON CODEIGNITERFRAMEWORKCASE STUDY#3.REW

3、RITING A LEGACY PHP COMMUNICATION APPLICATIONFROM SCRATCHWhy PHP is Still Good in 20231The fact that PHP projects can run for many years is one of the most awesomestrengths of this technology.But at the same time,outdated versions of PHPwith unsupported frameworks and libraries cause a lot of proble

4、ms for productowners.Your system may still work but have some issues preventing it fromadding new features and scaling.Still,the main challenge of modernization is toupdate without harming the current product,which may lead to losingcustomers and money.If you are among those who experience difficult

5、ies in finding PHP developersable to scale hours immediately to modernize your app,or your previousdevelopers have not lived up to their commitments and left you with nothingright before the deadline,this article is for you.As a PHP/DevOps Group Leaderat MobiDev,I have worked on dozens of PHP projec

6、ts and would like to shareour approach to modernizing legacy applications to help you tackle this task inthe most efficient way.6 Signs Your PHP Application NeedsModernizationFirst of all,lets start with a quick diagnostic process to find out if your PHP appreally needs to be modernized.There are ce

7、rtain signs which can tell you thatsomething is wrong.FROM A BUSINESS POINT OF VIEW1.Unpredictable behavior of the application causes poor UX2.The price of infrastructure support is too high3.Security breaches cause a bad reputation4.You lose your clients because your application is too slowFROM A T

8、ECH POINT OF VIEW1.Unstable work of the application:errors,outages,long downtime2.Security issues caused by an outdated tech stack and/or vulnerable code3.The current tech stack no longer meets your business needs.There arebetter technical alternatives.24.Hard to add new features because of messy so

9、urce code and complexbusiness logic5.There are unsupported or unmaintained libraries/technologiesIf you come across the above-mentioned issues,your app really needs to beupdated to stay competitive in the market.The more points that are true foryou,the sooner you should start reviving your PHP proje

10、ct.Why You Should Use Supported PHP VersionsAt the time of writing this article,the officially supported versions of PHP are 8.0,8.1,and 8.2.But according to statistics,about 80%of PHP users are still on PHP7.4 and lower.PHP 8 has been out since November 2020,but only 7.9%ofwebsites have made the sw

11、itch to it:SourceThere are many reasons to stay on the supported version of PHP and keep yourproduct updated.The most preferable option is to stay on the latest stableversion since it provides you with better UX and improved applicationperformance.Among other reasons,you should consider the followin

12、g:3Security.Most of the security issues in PHP apps are related to outdatedversions of PHP.Security vulnerabilities can cause data loss,data leaks,outages,etc.Support of modern libraries.Outdated versions of PHP may causeissues with updates to newer versions of libraries/frameworks.Librariesand fram

13、eworks can also be vulnerable and sometimes you may beunable to update separate libraries without PHP update.Integrations.To speed up development,you often need to usethird-party services that can provide libraries,clients,and SDKsintegrations.You may not be able to use such services until you updat

14、e tonewer versions of PHP.Same story with PHP frameworks.There is ahigher chance to find integrations for modern frameworks than foroutdated ones.Adding new features.Newer versions of PHP provide a variety ofcapabilities to speed up the development of new features and improvethe readability of the c

15、ode.That means you can easily expand your teamwith new developers.Also,many engineers prefer to work with moderntech stack rather than with legacy applications.This is also a reason tothink about regular updates and stay on a stable modern version.Performance.Core PHP developers are constantly worki

16、ng on improvingPHP performance.For example,JIT-compilation has been added since PHP8,which opened the door for enhanced data processing.Challenges of Migrating Legacy PHPApplications(To Migrate or Not to Migrate?)Modernization of outdated code is crucial,but it comes with some risks.Migrating a lega

17、cy PHP application presents challenges for both a developmentteam and the product owner.Lets imagine how developers and product ownerssee the same situation:4And they are both right.They have to find some kind of compromise so that theproject effort is justified.In most cases,it is possible to suppo

18、rt currentapplications and do updates step by step while also adding new features.Thedevelopment speed would not be so great in this case though.The main point is that developers need to do extra steps before starting themigration process or adding new features such as:1.understand legacy logic laid

19、 by previous developers2.do refactoring in case of dirty code3.prepare code for adding new features.Only after this work is done will PHP developers be able to add newfunctionality.Product owners will benefit from such work in the long run.Aftersome time,the speed of the app will increase,and the st

20、ability and security willalso grow.This is a kind of investment in the future of your application.Two Approaches to PHP App Modernization5When it comes to PHP app modernization there is one difficult question:shouldyou continue using the existing application after updates or should you rewriteeveryt

21、hing from scratch on a modern tech stack?Answering this question givesus two main approaches to PHP app updates.APPROACH 1.REWRITE EVERYTHING FROM SCRATCHRewriting your app from scratch is the most guaranteed way to achieve qualityand stability of the application.But a lot depends on the state of th

22、e currentsoftware product.Sometimes it is really better to rewrite everything fromscratch because it will take less time than fixing and updating legacy code.In this case,a development team can start working on a new application withmodern technologies using the old app as a reference to business lo

23、gic.Thenewest versions of PHP or some alternatives like Node.js or Ruby can be usedhere.This will provide a better understanding of the business needs,taking intoaccount previous user experience,parts of the application that work well forusers and parts that can be improved.As a result of this work,

24、you will get abeautiful modern application based on your legacy one.Let me answer the questions that you may have at this stage:Is it an expensive approach?Yes.Such work will consume a lot of time andmoney.Should I do a feature freeze?Probably,yes.You would pay twice if youcreate new features on a l

25、egacy application and after that you need tocreate the same features on a modern application again.APPROACH 2.STAY WITH A CURRENT APPLICATIONThe previous approach will not work for most businesses.In most cases,abusiness needs new features to live.Using the current application is possible incases wh

26、en the approximate time for an upgrade will take less time thanrewriting everything from scratch.A lot depends on the current technology stackand the technical state of the system.What parts are most critical to update?Are there any security vulnerabilities?Arethere any libraries that are not suppor

27、ted anymore?6Only after analysis,can technical experts suggest an upgrade plan.The mostvaluable activities will be done first.During the upgrade process,PHP developerscan add new features to the current application as well.What issues can bring such an approach?Potential non-obvious bugs.Fixing one

28、bug may bring on another bugbecause of the level of complexity and quality of the legacy code.Difficulties with compatibility.You can update the version of PHP andsome parts will work well but some parts will not work because ofbreaking changes.Complex logic.If you have a complex application with a

29、huge code base,then upgrades should be done step by step.That means there would bepart of logic with updates and part of logic without updates.These maybring some temporary dirty hacks,extra levels of complexity,and causesome difficulties in the onboarding of new developers who are notfamiliar with

30、the project.Workflow for PHP App Modernization atMobiDevRegardless of which of the above-mentioned approaches you choose,theprocess of PHP app modernization will look almost the same.Based on ourexperience with many legacy applications,I can say that this workflow is themost efficient for both the p

31、roduct owner and the development team.It consistsof 10 steps:Step 1.The client sends a request for a project review to a technical expert.Step 2.The technical expert analyzes the project and discusses with the clientthe possible ways of modernization and estimated timelines.Step 3.The client request

32、s a development team that will start working on aselected approach.Step 4.Containerize the application.Docker will help with this.This allows foradding an extra isolation layer for the parts of the app.With Docker,we can7easily manipulate any version of the service that we need for applicationfuncti

33、onality.Step 5.Deploy everything in a sandbox environment for testing anddevelopment.Step 6.Involve the QA engineer.Start testing the application to find the mostcritical issues.Step 7.Prioritize the list of issues and start working on them.Step 8.Work on updates and fixes iteration by iteration.Ste

34、p 9.(optional).After the stabilization of the application,new features can beadded as a priority to updates.Step 10.Your software is upgraded and ready to go.8Our Case Studies for PHP Legacy SoftwareModernizationLets go through some cases from our experience that will illustrate the solutionof busin

35、ess challenges with the modernization of legacy PHP applications.Thesecases include comments from project developers that will help you betterunderstand why a specific solution was chosen.CASE STUDY#1.UPDATING LEGACY LARAVEL-BASED SUBSCRIPTIONPLATFORMThe client came to us with a request for the mode

36、rnization of the PHP platformin a critically short time frame.Since the previous developers of the projectfailed and didnt do what they promised,the client needed a reliable team thatwould take up the challenge and meet the deadlines.Main challenges:1.Build the back end for the existing front end2.F

37、ind and fix issues preventing the system from working correctly3.Prepare the product for adding new featuresSolutionThe initial request was to rebuild the platform,but after code assessment andanalysis of the clients business needs,our PHP development team suggestedimproving the existing system inst

38、ead of rewriting the product from scratch.Such a decision was influenced by the following factors:The platform was already in production and had an active user base.Itwas crucial for the business to keep the product running.Our client had a limited budget and timelines to make the system stableand p

39、repare it for adding new features.91.Build the back end for the existing front endWhen we delved into the project,we found out that its deployment,including the assembly of the front end,took place directly on the server,which required routine manual work,and significantly increased the timeand cost

40、 required for debugging.Weve integrated Ansible,a software provisioning and configurationmanagement system,and added rules to automatically build,deploy andupdate the software.This helped the client to save on servers since theassembly of the front end on the server required quite large capacities,w

41、hich was unreasonable for everyday tasks.2.Find and fix issues preventing the system from working correctlyThe fact that the platform was written on an outdated version of theLavarel framework led to unstable operation of the entire system(unpredictable errors,inability to use stable modern librarie

42、s,slowresponse from the server,etc.).Moreover,the PHP version also neededan update.Bugs in the framework plus PHP bugs were superimposed onproject code bugs that created a danger to the security of customer data.So our PHP team decided to update Laravel to 5.5 LTS and PHP version to7.0 on all server

43、s as the latest versions at that time.This made it possibleto eliminate system vulnerabilities and fix critical bugs.3.Prepare the product for adding new featuresThe poor quality of the code was a real challenge for the team,as a largepart of the code needed refactoring.Plus,the project had nodocume

44、ntation,which complicated the process.Also,in order to use athird-party payment system,it was necessary to update the SDK since itsversion conflicted with the modules used by the project.So code refactoring and regression work was done.After that,we were able tocontinue adding new features with mode

45、rn technologies and an up-to-dateversion of our built-in and external modules.We created tech documentationthat will allow the client to significantly save on onboarding new developers andadding new functionality in the future.10“It was really challenging to update the framework version by version:5

46、.2-5.3-5.4-5.5.because all of them were not backward compatible and each subsequentversion radically changed either the architecture or the logic or even the names ofthe framework functions.It was also important for the client to implement full GDPR compliance,at that timethere was little informatio

47、n about it and it required additional research from theteam.Overcoming these challenges assured the client that we have great expertise inPHP app development and they still trust us to introduce new features into theplatform.Oleh SichevskyiPHP Team Leader”CASE STUDY#2.MODERNIZING A LEGACY APP ON COD

48、EIGNITERFRAMEWORKOur communication with the customer started with the request to solveproblems with the current API for CRM and mobile app with legacy code(Codeigniter 3,PHP 7.3).The client had tight deadlines:the software had to beupdated within a month.It is difficult to complete refactoring of th

49、e entire system in such a short periodof time,so we decided to approach the improvement of the code very selectivelyand gradually.We drew up a plan with the most critical issues and startedworking on it.11Main challenges:1.Update the highly outdated version of the framework to improve systemperforma

50、nce2.Improve code quality under tight deadlines3.Configuring the mechanism of code delivery to the server4.Build new scaling infrastructureSolution1.Update the highly outdated version of the frameworkAs the Codeigniter version of the framework was no longer supported,our PHP developers suggested gra

51、dually migrating the entire applicationto a newer version.The team created a plan with prioritization anddivision of all functionality into modules.Each module is a fully isolatedfunctionality in a new project with up-to-date versions of dependenciesand environments.2.Improve code quality under tigh

52、t deadlinesThe poor quality of the code caused additional problems.We had tospend more time studying the logic of each method,even for the smallestchanges.At the same time,there was no way to fix everything at once dueto the large size of the project and the large amount of functionality.Eachchange

53、required a full understanding of the requirements for a specificfeature,which could take a very long time and thus delay the releasedate.The solution was to refactor only those places whose functionality wewere currently working on and proceed to other parts gradually.It made itpossible to meet the

54、deadline and save the clients money.Within sixmonths,about 80 percent of the code was already covered.3.Configuring the mechanism of code delivery to the serverAt the start of the project,we had only one production environmentavailable.Making edits to the code was very time-consuming and involvedthe

55、 risk of human error,which put the seamless operation of theapplication under attack.To mitigate these risks we needed to prepare aseparate environment for testing and development.This was done withan automated code delivery process with Docker Stack+Ansible+JenkinsCI/CD,first for the test environme

56、nt and then for the productionenvironment.124.Building new scalable infrastructureThe old system was a monolithic server with a database and a folder tostore all uploaded files.This architecture makes server load scaling verydifficult and is obsolete in 2023,mostly suitable only for CMSout-of-the-bo

57、x solutions but not for frameworks.Deploying new code tothe server was only possible via FTP and had to be done manually.To resolve these issues,first of all we moved the database and file storage fromthe server to remote services(AWS RDS,AWS S3).Third-party services are morestable and already have

58、a backup mechanism that is more secure and helps toprevent data leakage.The next step was to wrap architecture with Docker and isolate each service(NGINX,PHP and Socket)into containers.This made it possible to configure a13stable automatic code delivery to the server(CI/CD)and also addedopportunitie

59、s for the optimization of the server resources.Finally,we gradually moved the code to a newer framework(Codeigniter 4).Forthis purpose,a separate Docker container with a newer version of PHP wasprepared.Our team also created API Documentation(Postman Collection)with samplerequests/responses from the

60、 server to help front-end and back-end developerseasily communicate about the nuances of the API.14“Initially,the project only had a months work to do.It was difficult to fit all thenecessary improvements into such a limited period of time,and it was a reallyinteresting challenge for us to choose wh

61、at was the most critical.Its important to find ways to communicate the need for some code changes to thecustomer,even if the end user wont see a clear benefit from it,but its crucial forfunctionality in the future.You need to have the trust of the customer and providetransparency in your decisions.A

62、s a result of a months work,the client decided to continue cooperation with ourteam,and it made it possible to improve the code according to the plan preparedearlier without stopping the delivery of new functionality.Georgii MirgorodPHP Team Leader”CASE STUDY#3.REWRITING A LEGACY PHP COMMUNICATIONAP

63、PLICATION FROM SCRATCHThe clients request was to add an iOS app to the existing website,as well asimprove the overall stability and maintainability of the system.In the process ofthe initial investigation,our team discovered that it was quite difficult to do thiswith the current architecture,which p

64、resented us with the following challenges:1.Bad app performance because of poor source code organization andquality152.Data split across several data storages made the support of the systemcomplicated and time-consuming3.Multiple bugs and errors prevented the system from adding new featuresSolutionO

65、ur PHP experts suggested rewriting the app from scratch since:Working with the existing code base and infrastructure would take moretime than rewriting the applicationThe client was not limited in time and was focused on maximumimprovementThe product was not used actively in the production environme

66、nt1.Fixing bad app performance because of poor source codeorganizationDuring the analysis stage,our team discovered that the current applicationarchitecture was quite difficult to maintain and it did not allow for the easyaddition of an iOS API.The project included pieces of code written in differen

67、tlanguages and pieces of data stored on different platforms,such as MySQL,Neo4j and Google Cloud storage&Firebase.The logic was mostly client-side,with the notifications system being the only server-side asset.So we set about creating a new version from scratch,moving the logic to theserver side and

68、 consolidating the existing data into a single database.Theexisting legacy project helped us define the ultimate vision for the new app.Wechose a new technology stack with a modern PHP framework and created aneffective and scalable architecture.16The iOS app and its API were the main development foc

69、us and in the laterstages,we recreated the existing website as a SPA using the same API.Thisapproach was intended to provide easier iOS app integration,improve stabilityand performance,and provide opportunities for potential future improvements.2.Consolidating data into a single databaseThe existing

70、 MySQL database was taken as the basis of development,as itcontained the most data;however,we made improvements to its structure andindexes to provide better performance and data consistency.We also added amigration tool.Since then,the old version of the project has not been used forreference;instea

71、d,the functionality was rebuilt based on the customers currentvision and ideas.17The development and testing servers were created on Amazon Cloud.We alsoadded an admin panel to simplify user data management and an automaticdocumentation page for the API that updates in real-time and provides theabil

72、ity to test API functionality for client-side developers.3.Adding new features to the systemAfter the successful launch,we continued to improve the project.A cache wasadded and the database was moved to RDS to improve performance.Websocketnotification was implemented to provide real-time chat.Weve a

73、lso updated thenotification system to be easily configurable and include email and SMSnotifications.The admin panel receives constant quality-of-life updates,including the ability to communicate directly with users through the associatedaccount.“After about a year of cooperation,the new project bran

74、ched offfrom the existingone,taking its data as a basis.This new project was later successfully migrated toanother cloud service due to a number of legal and geographic reasons,and now itsin constant development alongside the original one.Currently,both projects are still actively used and allow use

75、rs around the world toconnect and share their experiences.Dmytro LisovinPHP Developer”Why PHP is Still Good in 2023If you have concerns about whether you should stay with PHP and opt formodernization or better migrate to another tech stack,let me dispel your doubtsand tell you why PHP is still in de

76、mand in 2023.18Being an open-source PHP has a great development community that constantlyimproves this programming language.New frameworks and tools open the doorfor new opportunities and help PHP stay competitive in the market.Low cost fordevelopment and maintenance with very high performance and r

77、eliability madeit the main choice for 77.5%of all the websites,according to W3Tech.PHP is used by both enterprises and startups.It is a great option for long-termprojects that want to grow since PHP is scalable by design.Also,it has a goodloading speed,even on slow Internet connections.Since PHP 5.6

78、,itsperformance has increased almost two times over.In our experience,PHP is a great tool for the following types of projects:Server-side rendering(SSR)websitesRESTful web services(API)Social applications that require scalable architecture and specific featureslike likes,dislikes,messaging,commentsS

79、erver-less applicationsComplex systems with great functionality like ERP and CRM platformsE-commerce,marketplace,booking platformsMobile Device Management(MDM)systemsHealthcare projects that focus on securityOf course,PHP is not a silver bullet and it has certain drawbacks.For example,its not the be

80、st choice for CPU-consuming tasks.If you need to run heavy taskswith the best possible performance then its better to use other compiledlanguages like Golang,C+,or C.If all of the above meets your business needs and you are ready to modernizeyour PHP application,lets get started without wasting time

81、.I know that thequestion of modernization is usually raised when everything is already on fireand it is quite difficult to find a reliable partner capable of quickly allocatingresources and starting work on the project.Years of experience allow us to takeon such challenges.Whether you need to update,rebuild or adjust the systemwell be happy to help you.19

友情提示

1、下载报告失败解决办法
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站报告下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

本文(MobiDev:2023年PHP遗留应用程序现代化的挑战及解决方案(英文版)(22页).pdf)为本站 (无糖拿铁) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。
会员购买
客服

专属顾问

商务合作

机构入驻、侵权投诉、商务合作

服务号

三个皮匠报告官方公众号

回到顶部