非常复杂的php应用程序的体系结构? [英] Architecture of very complex php applications?

查看:48
本文介绍了非常复杂的php应用程序的体系结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道开发人员在复杂的php应用程序中使用哪种php体系结构策略.到目前为止,我知道mvc结构,该结构由模型,视图和控制器(以及处理诸如用户访问控制器之类的常见任务的控制器插件)组成.我知道一些好的php框架可以简化一些常用的东西.但是当我对庞大而复杂的php应用程序感兴趣时,问题就开始了.因为在这些应用程序中有很多事情要做或需要检查很多想法,所以我无法决定哪个代码应该在哪里.

I want to know which php architecture strategies developers use in complex php applications . So far , i know the mvc structure which consists of models, views and controller (and controller plugins which handle with common tasks such as user access controller ). I know some good php frameworks which makes some common stuffs easier .But the problem starts when i thing about huge and complex php applications . because in these applications there are lots of stuff to do or lots of think to check, so i can not decide which code should be where .

考虑一下magento应用程序,这是一个非常庞大的应用程序.当我查看应用程序的源代码时,我无法理解设计策略.我知道有一些完美的设计策略可以轻松地处理非常大的php应用程序,因为它们无法用非常弱的设计策略来构建如此大的应用程序.设计策略应支持的功能超出了您的期望,因此您可以改善代码并轻松申请

Think about magento application , this is very huge application . when i review the source code of application , i can not understand the design strategy . i know there are some perfect design strategies which can handle very big php applications easily , because they can not build such a huge application with a very weak design strategy .the design strategy should support more than you want , so you can improve your code and application easily

总而言之,我想知道如何创建更大的应用程序.现在,我在应用程序中使用的设计策略限制了我,因此我无法创建更复杂的应用程序.我想知道哪种设计策略可以处理复杂的应用程序.

To sum up , i want to how can i create bigger applications . Now the design strategies i use in my applications limits me , so i can not create more complex applications . i want to know which the design strategy can handle complex applications.

我知道这是一个非常抽象的问题,但这是因为现在我的php背景来自业余爱好,而不是来自学术界.我想做更多,但是我处在不能再走一步的地方,因为我找不到关于编码的更复杂的信息.总之,我想了解诸如magento之类的复杂php应用程序的设计策略.

i know this is very abstract question , but this is because now my php background coming from amateur hobby not from academic . i want to do more , but i am in somewhere where i can not go one step more , because i can not find more complex info about coding . whatever ,to sum up , i want to know about design strategies for complex php applications such as magento .

也许我所知道的设计策略(mvc,框架ci cake ...)可以处理比我认为更复杂的应用程序.

Maybe the design strategies which i know (mvc , frameworks ci cake ...)can handle more complex applications than i think ..

如果我的问题中有一些错误,请随时改正,对于我英语水平不足的问题表示歉意.

if there are some mistakes in my questions please feel free to correct them , sorry for my inadequate english ..

推荐答案

我相信您的问题的部分原因可能在于创建企业应用程序是任何语言的问题,并且可以实现的设计模式实际上是语言不可知的.

I believe that part of your problem may lie in the fact that creating enterprise applications is a problem in any language, and the design patterns that can implemented are actually language agnostic.

我强烈建议您熟悉Martin Fowler撰写的《企业应用程序体系结构模式》.这是您以后可能会使用的其他任何书籍的开创性著作,这些书籍将以语言特定的格式涵盖相同的概念,并且,如果您想真正了解在网络上创建健壮的,可扩展的应用程序所需要的内容,则需要使自己熟悉这本书.

I would strongly recommend that you familiarize yourself with Patterns of Enterprise Application Architecture by Martin Fowler. This is the seminal work for any other books that you may later pick up that cover the same concepts in a language specific format, and if you want to truly understand what is required to create robust, scalable applications on the web then you'll need to familiarize yourself with this book.

当前,使用Web应用程序的一种非常普遍且流行的设计策略是Model-View-Controller范例.这完全与应用程序中关注点的分离有关,这样就不会将数据库访问代码与html输出混合在一起.

A very common and popular design strategy with web applications right now is the Model-View-Controller paradigm. This has to do completely with separation of concerns in your application so that you aren't mingling database access code with html output.

要很好地处理该主题,建议您查看一个.

For a pretty good treatment of the topic I would suggest that you look here (Zend Framework specific but it covers the general topic well) and here for a discussion about Models specifically. Or if you want to look at a more generalized PHP MVC tutorial, Rasmus Lerdorf has one.

除此之外(您可以再次从Martin Fowler的PofEAA中学习此知识),您将需要了解对象关系映射各种设计模式的优缺点.

In addition to this (and again you can learn this from PofEAA by Martin Fowler) you will need to learn about Object-Relational-Mapping what the strengths and weaknesses are of the various design patterns.

不幸的是,有很多好的方法可以根据您的需要来做事情,但是对于每种好的方法,大约有成千上万种极其错误的方式给他们.

Unfortunately there are many good ways to do things depending on your needs, but for every good way there are about a zillion horribly wrong ways to them.

这篇关于非常复杂的php应用程序的体系结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆