home support FAQ resources services partners contact us contact us
 Web Application Previous  Next  
 Tutorial

Interface to Code Developers

Providing an interface to other developers is usually associated with the term API
(Application Programming Interface). APIs are normally provided by libraries (such as
phpIRC), but not by complete applications. But applications that have the capacity to
be extended by a programmer are much more successful than applications that must
be used “as is.” Of course, in terms of PHP applications, anyone can modify the source
code, but many people refrain from analyzing a complex system and applying
modifications to it.Thus, the application itself needs to expose certain ways of being
extended.

Note:We’re differentiating here between applications and libraries. Libraries are meant
to be used by applications, cannot be run stand-alone, and are generally much easier to
extend than applications. Applications consist of a full, closed system.
Try to find out how common applications can be extended. For example, for
your favorite text-processing tool, see whether the developers provided the
capacity to extend the tool’s functionality.

Two primary possibilities of extending applications have evolved: Either the
application provides scripting capabilities (similar to macros), or the application is able
to use plug-ins. As for PHP, implementing a script language in a time-critical part
of a system…we don’t need to think any further. On top of that, the complexity of
creating a full-fledged parser is way too much to ask. But plug-ins are much easier to
implement and have many advantages. A plug-in is a little piece of code that can
register itself with the application and catch certain events from it, get access to
internal data, and so forth.While integrating seamlessly with the main system, plug-ins
still remain isolated files that can be detached and spread separately.They can be
attached to the system without having to modify a line of code, which allows a system
administrator without any knowledge of PHP to extend the application by using
foreign code. Concretely,
Previous  Next  
Link Partners: Asia florist, Flowers to India, Hong kong flowers, Site submit, Cheap web hosting, China florist, Japan florist