note 25541 added to ref.com
| From: | daveNO at SPAMovumdesign dot com | Date: | Fri, 27 Sep 2002 02:52:06 +0000 |
| Subject: | note 25541 added to ref.com | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-37316@lists.php.net to get a copy of this message | ||
The documentation for this feature is a bit redundant. It mentions that COM performs and encourages
information hiding (a.k.a. encapsulation) three times. Perhaps instead it could expand a bit on what
COM is useful for, and particularly why combining it with PHP can be beneficial.
The contributed examples above do a nice job of illustrating the benefits of PHP+COM. In a nutshell,
many Windows applications (especially office suites and databases) expose useful functionality
through the COM interface.
For example, Microsoft Word can read RTF files and (of course) write Word Documents. You could use
PHP to generate RTF and then use Microsoft Word via PHP's COM interface to convert the RTF to a
DOC. The amazing thing about this is that you can actually insert PHP (or template) code into Word
itself, because RTF files are text-based like HTML. Throw Distiller into the mix and you've got
a web-based, template-driven, maybe even database-driven PDF generator!
Have fun,
Dave
--
http://www.php.net/manual/en/ref.com.php
http://master.php.net/manage/user-notes.php?action=edit+25541
http://master.php.net/manage/user-notes.php?action=delete+25541
http://master.php.net/manage/user-notes.php?action=reject+25541