Interfacing the Network 111 Interface to HTML Developers
Interfacing the Network 111 Interface to HTML Developers In terms of the HTML interface, abstraction of code and layout is done using templates.This is the easiest possibility for tweaking an application to your needs,yet it s also the most powerful.Within seconds,you can change the look and feel without having to modify a single line of code. Everyone with basic HTML knowledge could completely restructure the way the application would show itself to a user.As this method is discussed elsewhere in this book, we won t go deeper into it here.To find more details about using templates,please read Chapter 5, Basic Web Application Strategies. 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, this is realized as shown in Figure 3.9.
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost PHP MySQL Web Hosting services