How does Gentics Portal.Node PHP work?

This chapter tells you about used technologies, architecture of application and request lifecycle

1 Developing Gentics Portal.Node PHP

For the development of Gentics Portal.Node PHP we used a set of verified, modern technologies which helped us to build a fast, secure and easy extensible application.

Core of Gentics Portal.Node PHP is the modern, secure and fast Yii framework

  • Yii is a high-performance PHP framework best for developing Web 2.0 applications.
  • Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.

1.1 Key values of Gentics Portal.Node PHP

1.1.1 Fast

Yii only loads the features that you need. It has powerful caching support. It is explicitly designed to work efficiently with AJAX.

1.1.2 Secure

Security comes as standard with Yii. It includes input validation, output filtering, SQL injection and Cross-site scripting prevention.

1.1.3 Professional

Yii helps you develop clean and reusable code. It follows the MVC pattern, ensuring a clear separation of logic and presentation.

1.2 Directory structure

The directory structure of Gentics Portal.Node PHP is slightly different from the basic YII application structure:

  • build – scripts using for building process
  • common – main core functionality
  • custom – client-specific configs, modules, templates etc.
  • doc – documentation (guides and API documentation)
  • framework – YII framework
  • frontend – main portal configuration, entry point of web application
  • scripts – scripts for administrations needs
  • tests – unit tests

Let us look closer to the reasons why we have chosen such a structure.

Gentics Portal.Node PHP consists of:

  • YII framework components/helpers/tools
  • portal specific modules/components developed by Gentics.

YII framework folder should be unchanged and only updated by Gentics in case of a new YII framework release.

But there are possibilities for a client to modify Gentics Portal.Node PHP specific modules/components. For this reason we create a separate folder – custom. In custom folder clients can overwrite the complete Gentics Portal.Node PHP module or only overwrite specific templates (views). Also additional translation for I18N can be added in that way.

Folder frontend contains the main Gentics Portal.Node PHP configuration and it is also the entry point of the entire web application. It stores runtime files, like logs, assets, etc.

Most of the Gentics Portal.Node PHP modules are covered by unit tests written in PHPUnit. They are stored in tests folder.

1.3 Model–View–Controller (MVC)

Gentics Portal.Node PHP is based on the prinicipal of Model–View–Controller (MVC) pattern. MVC is a computer software design pattern that separates the representation of information from the user’s interaction with it.

1.4 Request lifecycle

For a better understanding of the architecture of the application you should know how the request lifecycle is based on a simple request