Multi-Vendor Software & Smarty Template
One of the primary design goals of our multi-vendor software is to to facilitate the separation of the software code from the presentation code (HTML). Normally, the application code provides the company’s logic of the program, created as well as managed in PHP program code and maintained by web programmers. The actual web presentation is the way your multi-vendor content regularly is actually presented to the end user, that is written and serviced in the theme files. The web templates are serviced by theme designers.
At its simplest operation, the program code collects articles and other content and designates this to the theme program and shows it. The content might be something similar to the subject, tagline, publisher and body of a publication document. The software code has no issue how this article will be shown within the multi-vendor software design template engine.
The theme designer is responsible for the appearance. Designers change the theme files, placing mark-ups and bringing it to completion. This typically involves stuff like HTML labels, cascading design sheets along with tools available through the theme’s engine.
This approach offers several purposes
Graphic designers cannot separate the software code. They are able to play around with the layout all they need, but the html code continues to be intact. The code will remain tighter, more secure and much easier to work with. Flaws inside the layouts are confined to the Smarty’s error handling routines, which makes them as easy and intuitive and manageable for any developer.
With the visualization on its own layer, graphic designers can modify or completely upgrade it from scratch, all without assistance from the programmer. Software engineers will not be messing with themes. They are able to handle and maintain the software code, modify how content is acquired, create new business rules, and so on and all these without disturbing the appearance layer.
Design templates are a close representation as to what the final result will be, which is a user-friendly process. Creative designers do not care the way the written content got to the theme. If you have external information within the theme code, such as an SQL record, this opens the danger of breaking up the application code by accidental deletion or alteration by the designer.
You are not opening up your server to the execution of arbitrary PHP code. Smarty template engine has lots of safety features built in so graphic designers will never break stability, whether on purpose or unintentional. They are able to simply do what they’re confined to do in the design templates.
Even though application code is actually separated from appearance, this does not necessarily mean that logic is actually separated. The application code clearly has logic, but the themes may have logic based on the condition that it is for visualization purposes only. For instance, if the designer would like to alternate table row colors or even upper-case several assigned content, they can. This is presentation logic, a thing the programmer shouldn’t be concerned about. How many times have you ever had a few presentation shown in one column and then you wanted it in two or even 3 columns and the software code required adjusting to accommodate it? A better technique is usually to allocate the content in one array and let the template handle the visualization. This will likely simplify your multi-vendor software template code and keep your themes versatile. The smarty template engine provides several tools for this kind of situation.