使用 PHP 进行组件开发?

发布于 2024-08-19 01:32:52 字数 454 浏览 3 评论 0原文

编辑:问题仅涉及 100% Web 开发。请不要将问题与桌面开发联系起来。请在回答之前阅读整个问题。

如果目前有兴趣以更类似于桌面的方式开发 PHP 应用程序,我当然很感兴趣。我的意思是类似于 ASP.NET 的经典 WebForms 实现,其中封装域、业务和 UI 逻辑的组件在某种程度上放在一个页面(应用程序)中,并且它们通过由以下对象处理的事件相互“交谈”:主应用程序。此外,母版页可以在声明组件时设置一些组件参数。对于许多开发人员来说,它可能不是当今的选择,但它肯定有用途,就像 ASP.NET 有用途一样 - 以数据为中心的应用程序、内部网应用程序或需要重用某些组件逻辑的应用程序多次使用不同的输入参数,会得到不同的结果。

据我所知,曾经有一个类似的东西 - 一个名为 PRADO 的框架,我不再确定它的存在。该网站仍然存在,但我猜社区工作进展缓慢。

我很高兴听到答案,当然还有批评。我很高兴知道当前的任何进展,以及为什么不知道其用例。

Edit: The question concerns 100% web development only. Please do not relate the question to desktop development. Please read the entire question before responding.

I am certainly interested if there is currently any interest in developing PHP applications in a more desktop-like fashion. I mean something like the classic WebForms implementation of ASP.NET where components encapsulating the domain, the business and the UI logic are sort of put together in a page(the application) and they "talk" to each other through events that are handled by the master app. Additionally the master page could set some component parameters when declaring them. It might not be the choice of the day for many developers, but certainly there are uses for that, just as there are uses for ASP.NET - heavy data centric applications, intranet apps, or applications, where certain component logic is to be reused many times with different input parameters, and different results are expected.

From what I know, there used to be something like this - a framework called PRADO, of whose existence I am no longer sure. The site is still there, but I guess that community work is slow.

I will be glad to hear answers, and of course criticism. I will be glad to know any current development, and why not, use cases for that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

口干舌燥 2024-08-26 01:32:52

除了 Prado 之外,还有更活跃的 yii 框架。另外,作为类似 ASP.NET 的平台,我可以推荐 Embarcadero HTML5 Builder,它是 Delphi4PHP/RadPHP 的最新版本

Besides Prado there is yii framework which is much more active. Also as an ASP.NET like platform I can recommend Embarcadero HTML5 Builder which is the latest version of Delphi4PHP/RadPHP

肩上的翅膀 2024-08-26 01:32:52

你的意思是类似 php-GTK 的东西吗? http://gtk.php.net/

或更多类似 RIApplications(例如客户端上的 Flash 和 php/flex)在服务器端?

do you mean something like php-GTK ? http://gtk.php.net/

or more like RIApplications like Flash on the client and php/flex on server side ?

终难愈 2024-08-26 01:32:52

您可以看看我几年前开发的Tigermouse Framework。这似乎正是您正在寻找的东西。它采用这种 Web 表单方法,您可以在其中定义视图和表单,在其上放置其他控件并分配事件,然后在服务器端处理这些事件。

看看这个简单的拖放购物车应用程序 并查看源代码

You may have a look at Tigermouse Framework I developed years ago. It seems to be exactly what you are looking for. It has this web-form approach, where you define views and forms, put other controls on it and assign events which then are handled on server side.

Have a look a this simple Drag-n-drop shopping cart app and see the source code.

蓦然回首 2024-08-26 01:32:52

有一个很棒的软件Delphi4PHP,它允许您像asp一样进行php开发/组件创建.net 即 Visual Studio 或 Visual。它还具有出色的视觉库 VLC(视觉组件库),它允许您使用拖放支持来创建元素。

There is a great piece of software Delphi4PHP that allows you to do do php development/component creation like asp.net that is visual studio or visually. It also has great visual library VLC (Visual Component Library) which allows you to create elements using the drag and drop support.

恰似旧人归 2024-08-26 01:32:52

考虑到 PHP 的缩写代表 (PHP) 超文本预处理器,并且所有将 PHP 用于桌面开发的方法本质上都是一种 hack,所以我不会。肯定不是原生的。

我建议将 PHP 留给预处理超​​文本和构建桌面软件的专用解决方案;-)

Considering the acronym for PHP stands for (PHP) Hypertext Preprocessor, and all the methods to get PHP used for desktop development is essentially a hack, I'd so no. Definitely not natively.

I'd advise leaving PHP for pre-processing hyper-text and dedicated solutions for building desktop software ;-)

梦巷 2024-08-26 01:32:52

您似乎对自己想要在这里实现的目标有点困惑。

Prado 做了很多工作将客户端事件与服务器端处理绑定在一起。它不是关于构建复杂的逻辑逻辑。此外,PHP 不适合传统的应用程序服务器模型,例如由 Java 或 ASP.NET 实现的模型 - 然而,当拥有应用程序服务器的原因主要是为了克服这些语言的缺点时,这并不是一件坏事。网络开发。 OTOH 在极少数领域,PHP 的无共享模型可能会显得很突兀(例如,考虑文件锁定队列的问题)。

想必根据您对 ASP.NET 的描述,您认为 PHP 不适合此类任务?如果有某种方法可以在不同的上下文中重用同一个类就好了? (!!!!!!)

我对大多数 PHP 工具包/框架的不满是,它们试图满足每个人的需求,但最终在特定领域表现不佳。这并不是说现有的工具不够好,例如 ADOdb、jpgraph、Smarty。前一段时间,我开发了一个表单绘制工具,旨在与 PHP 应用程序(PfP Studio)集成,也许有一天我会抽出时间来完成它。然而,对于使用哪个框架,肯定有大量选择,而不必求助于抽象表示,例如 Prado 或元数据库使用的抽象表示。我首先想到的是 CakePHP、Symfony、Zend 和 Horde,但还有其他一些。我想 PHP 与 .NET 或 J2EE 的区别在于没有人告诉您必须使用他们的解决方案。

C.

You seem to be a bit confused about what you are trying to achieve here.

Prado does a lot to bind together client side events with server side processing. Its not about structuring complex logic logic. Also PHP does not lend itself to a conventional applications server model such as that implemented by Java or ASP.NET - however INHO that is not a bad thing when the reason for having application servers is mostly to overcome the short-comings of these languages for web development. OTOH there are a very small number of areas where the shared nothing model of PHP can be obtrusive (consider the problem of file lock queuing, for example).

Presumably from your description of ASP.NET you think that PHP is not suitable for these kind of tasks? If only there was some way I could reuse the same class in different contexts? (!!!!!!)

My beef with most of the toolkits/frameworks for PHP is they attempt to provide for everyones needs and end up being somewhat poor in specific areas. That's not to say that aren't good focussed tools out there, e.g. ADOdb, jpgraph, Smarty. Some time ago I worked on a form painter tool intended to be integrated with PHP apps (PfP Studio) maybe one day I'll get round to finishing it off. However there is certainly plenty of choice as to which framework you use without having to resort to abstract representations such as those used by Prado or metabase. CakePHP, Symfony, Zend and Horde spring to mind but there are others. I guess the difference with PHP compared to .NET or J2EE is nobody's telling you that you must use their solution.

C.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文