A major problem present in many "old-school" PHP applications is the mess created by PHP files that contain both PHP code, SQL queries, and HTML. Such applications, especially as they mature, become more and more difficult to maintain and develop.
The Tangra Framework separates logic, data and presentation as follows:
Although forms are processed in Model-View-Controller fashion for the purpose of example, Tangra Framework itself is not MVC based. MVC is well suited for monolith applications written in C++, Java and similar languages, but it can quickly become a burden when applied to web applications. The Tangra Framework model is targeted to deal more directly with web abstractions such as "Site", "Page", "Form", "Grid", etc.
Many database-dependant PHP applications are initially written using MySQL for RDBMS. However, as that application evolves and increases it's scalability, MySQL may have to be replaced by a more heavy-duty RDBMS such as Oracle or PostgreSQL. The problem is that many PHP applications contain hardcoded mysql_* functions calls, rendering the process of database transition anywhere from a inconvenience to a near impossibility. To counter this, the Tangra Framework employs ADOdb as database abstraction layer. In theory, this makes it possible to change the underlaying RDBMS without causing repercussions within the application. Instead, the application will continue to work happily, without even knowing that there has been a change of database. Of course, in practice things are more complicated or there may be other extenuating circumstances, but the actual transition from one RDBMS becomes a much simpler task. This ability allows developers to create very portable applications, that can be easily scaled to meet a particular need.
Plans for upcoming versions of the Tangra Framework include creation of DBAL modules for other AL such as PDO and Zend Framework's zend_db.
One of Tangra's core concepts is modularity. Developers are presented with a choice of 63 modules (and counting). When creating new application a developer may choose a site template which contains predefined set of modules. At any time however, these modules can be removed, or replaced with others selected exclusively for the job at hand. Tangra's Module Manager will ensure that the modules installed have their dependencies met, so developers are freed from having to worry: "is module X compatible with module Y?"
Modularity also provides code reusability. Why spend hundreds of hours developing something that is already coded, tested, packaged into module and ready to use? It also provides developers the opportunity to share their modules, and contribute to Tangra's open-source developer community.
Form- and Grid-related classes and modules provide a unified mechanism for creating HTML forms and grids. Never again will you have to manually check common form fields for validity. The Tangra Framework provides integrated validation classes for common fields, such as "text," "number," "integer," "money," "date," "email," "file," "hidden," "password," "radio_group," "select," "select_multiple," "textarea," etc.
Grid classes provide automatic pagination and an easy way to define filters and sorting.
Modules such as form_html_tpl_static_ajax_metallic-1.0.0 provide set of HTML templates for forms and form fields. You just have to define what fields you want and the appropriate HTML will be automatically generated.
The Tangra framework makes extensive use of the new PHP5 classes and exceptions. Data hiding and encapsulation, in conjunction with enhanced data, logic and presentation separation makes development as a team simpler and more efficient, because it is more difficult to "step on each other's feet."
The » Tangra coding conventions provide a set of rules and recommendations that make reading other developers code easier, because it looks just like your code.
If you haved employed other frameworks for your PHP applications, you may have encountered a situation where project is almost finished, but you face a problem that cannot be solved with the current framework because of some internal limitation, and the framework does not allow you to bend the rules. Time is running, the deadline pressure is raising and you are in trouble.
This is all irrelevant with the Tangra Framework. It provides a set of functionality, but in no way prevents you from going "free style." You can use all the features of TF, while at the same time modifying and extending them as much as you want.
Often, a PHP application can be a nightmare to test. In most cases you must open your browser and manually test each feature in order to track down an elusive bug.
The Tangra Framework provides mechanism for automated testing. Each page works in context which can be externally loaded and fed to the page class. This allows you to create scripts that simulate many different scenarios and user behavior, and quickly test the responses of your application under each circumstance.
Finding and correcting bugs consumes a large portion of the total effort spent on a web project. The Tangra Framework provides the option of automatically saving the current context when an error occurs. Later you can load this context file and feed it into the page class in order to ascertain what exactly went wrong and on which line the error occurred. The end result is that the time required to find and fix a bug is shortened.