PHP Nette Framework Interview Questions

PHP Nette Framework Interview Questions

Nette Framework is an open-source MVC based framework for creating web applications in PHP 5 and PHP 7. Here we a have written some possible PHP Nette Framework Interview Questions that may be asked companies where Nette Framework developers are required.

Download PHP Nette Framework Interview Questions PDF

Below are the list of Best PHP Nette Framework Interview Questions and Answers

Nette Framework is an open-source MVC based framework for creating web applications in PHP 5 and 7. It supports AJAX, DRY, KISS and code reusability.

Nette is a free software released under both[2] the New BSD license and the GNU GPL version 2 or 3.

You can install Nette Framework via composer or directly downloading Nette as Package from https://nette.org/en/download.

To install Nette via composer please run below command on your terminal

composer create-project nette/web-project

AS on August 2017 Nette 2.4 is latest stable version of Nette framework

  • Nette 2.4 requires PHP 5.6 or newer and is compatible with PHP 7.1

Below are some key features of PHP Nette Framework

  • Inbuilt Security
  • Debugging Tools
  • Fastest frameworks
  • Active Community
  • Easy to learn and understand
  • Modern Framework that supports AJAX / AJAJ, Dependency Injection, SEO, DRY, KISS, MVC, Web 2.0 and cool URL
  • Plugins and Extensions
  • Open Source License

Nette is a full-stack framework composed of a set of decoupled and reusable components

  • Application – The kernel of web application
  • Bootstrap – Bootstrap of your application
  • Caching – Cache layer with set of storages
  • Component Model – Foundation for component systems
  • DI – Dependency Injection Container
  • Database – Database layer
  • Finder – Finds files and directories with intuitive interface
  • Forms – Greatly facilitates secure web forms
  • Http – Layer for the HTTP request & response
  • Latte – Amazing template engine
  • Mail – Sending E-mails
  • Neon – Loads and dumps NEON format
  • Php Generator – PHP code generator
  • Reflection – PHP class reflection enhancements
  • Robot Loader – Comfortable autoloading
  • Safe Stream – Safe atomic operations with files
  • Security – Provides access control system
  • Tester – Comfortable and easy-to-use unit testing tool
  • Tokenizer – String tokenization
  • Tracy – Debugging tool
  • Utils – Utilities and Core Classes
  • deprecated – Namespace containing deprecated classes

source:https://en.wikipedia.org/wiki/Nette_Framework

If you store the constants inside parameters array in the neon file, you will be able to access it from presenter’s context like this:

// $this is instance of Nette\Application\UI\Presenter
$this->context->parameters['constants']
// $this is instance of Nette\Application\UI\Presenter
$this->context->parameters['constants']

source: https://stackoverflow.com/questions/37926060/how-to-get-values-from-neon-file-in-nette

Following are the list of some string Filters in Latte.

  • lower: makes a string lower case
  • capitalize: lower case, the first letter of each word upper case
  • substr (offset [, length]): returns part of the string
  • padLeft (length, pad = ‘ ‘): completes the string to given length from left
  • reverse: reverse a UTF-8 string or array