简体   繁体   English

使用PHP使用Atg Dynamo

[英]Working atg Dynamo with PHP

I Was suddenly wondering of working ATG with Object Oriented PHP ? 我突然想知道ATG面向对象的PHP一起工作吗? Is it really possible? 真的有可能吗? If not why? 如果不是,为什么?

Example

:We use droplet to perform certain functions in ATG whereas same functions can also be done in PHP. :我们使用Droplet在ATG中执行某些功能,而在PHP中也可以执行相同的功能。

Also Why Repositories(database) will not work with PHP? 另外,为什么存储库(数据库)不适用于PHP?

The ATG framework is written in Java, to run within a Java VM. ATG框架是用Java编写的,可以在Java VM中运行。

The code that one writes, to customise, enhance or extend ATG, is deployed alongside existing Java code, to run in the same VM, and requires the developer to invoke methods on Java objects or to extend Java classes. 编写,自定义,增强或扩展ATG的代码与现有Java代码一起部署,以在同一VM中运行,并且要求开发人员在Java对象上调用方法或扩展Java类。

The framework provides tags for accessing ATG functionality from the UI layer. 该框架提供了用于从UI层访问ATG功能的标签。 These tags are written in Java and implemented as JSP tag libraries, intended to run within a Java-based web application server (such as JBOSS or WebLogic) 这些标记是用Java编写的,并实现为JSP标记库,旨在在基于Java的Web应用程序服务器(例如JBOSS或WebLogic)中运行

PHP is an entirely different application framework. PHP是一个完全不同的应用程序框架。 It does not run in a Java VM, and there is no simple mechanism to invoke Java methods from PHP code. 它不能在Java VM中运行,并且没有简单的机制可以从PHP代码调用Java方法。

I would question what it is you really want to achieve? 我会问您真正想要实现什么? Is it that you need to make use of underlying ATG functionality, but prefer the syntax of PHP for UI code? 您是否需要利用底层的ATG功能,而更喜欢UI代码的PHP语法? Are JSP, JSTL and the DSP tags really that different and difficult to work with in comparison? 与之相比,JSP,JSTL和DSP标签真的那么不同并且难以使用吗?

If you really want to continue to use PHP syntax but to make use of ATG features, you may look at some kind of PHP interpreter within Java - integrating an implementation of PHP to run in the Java VM. 如果您确实想继续使用PHP语法但要利用ATG功能,则可以查看Java中的某种PHP解释器-集成PHP实现以在Java VM中运行。 I believe that Caucho Resin is one such implementation, but I have no idea how stable, reliable, or featured it is. 我相信Caucho Resin就是这样一种实现,但是我不知道它的稳定性,可靠性或功能。 Even with that, you may not be able to use the DSP tags, and will need some other mechanism to bind to Java code from your PHP code. 即使这样,您也可能无法使用DSP标记,并且需要一些其他机制来绑定PHP代码中的Java代码。

Is it that you wish to re-implement the underlying ATG functionality into a PHP based framework? 您是否希望将基本的ATG功能重新实现到基于PHP的框架中? ATG has been actively developed, on a commercial scale, for around 20 years. ATG已经以商业规模积极开发了大约20年。 Of course, you may not want to implement everything that ATG does, but take a good look at everything that the ATG framework does. 当然,您可能不希望实现ATG所做的一切 ,而是要仔细了解ATG框架所做的一切。 You should have a clear idea of what it is you want to achieve. 您应该对要实现的目标有一个清晰的认识。

If you do intend to re-implement ATG functionality as, say, an open-source commerce platform, you should also consider whether PHP is in fact a suitable language to do so (I suppose I am at risk of starting a flame war here). 如果您确实打算重新实现ATG功能(例如,开放源商务平台),则还应该考虑PHP是否实际上是适合这样做的语言(我想我有可能在这里发动大战) 。

In addition, you should bear in mind that when creating a platform (as opposed to a solution) you need to not only provide the basic business functionality, but also a mechanism for other developers to customise, enhance and extend. 另外,您应该记住,在创建平台(而不是解决方案)时,您不仅需要提供基本的业务功能,而且还需要其他开发人员自定义,增强和扩展的机制。 Especially in a way that does not hamper an upgrade path - so there needs to be a clear separation of what is in the platform and what is custom, but also with very easy access to modify or override that which is in the core platform. 特别是在不妨碍升级路径的情况下-因此,需要明确区分平台中的内容和自定义内容,而且还需要非常容易地访问以修改或覆盖核心平台中的内容。

ATG is a Framework for how to build websites with specific modules for Personalisation, Shopping Cart etc. It is based on JAVA. ATG是一个框架 ,用于建立带有个性化,购物车等特定模块的网站。它基于JAVA。

In the same way that the functionality exists in competing products to ATG, like WebSphere Commerce or Hybris, there is no reason why you can't build the same functionality in any language or platform of your choice. 以与WebSphere Commerce或Hybris之类的ATG竞争产品中存在的功能相同的方式,没有理由不能以您选择的任何语言或平台构建相同的功能。 The question you should be asking is how much of that functionality do you want to build yourself and how much would you like to 'reuse' from the framework provided by the application vendor. 您应该问的问题是,您希望自己构建多少功能,以及您想从应用程序供应商提供的框架中“重用”多少功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM