Nette Application
Nette Application is the core of the Nette framework that brings powerful tools for creating modern web applications. It offers numerous exceptional features that significantly simplify development and improve code security and maintainability.
Installation
Download and install the library using Composer:
composer require nette/application
Why choose Nette Application?
Nette has always been a pioneer in web technologies.
Bidirectional Router: Nette features an advanced routing system unique in its bidirectionality – it not only translates URLs to application actions but can also generate URLs in reverse. This means:
- You can modify the URL structure of the entire application at any time without modifying template files
- URLs are automatically canonicalized, improving SEO
- Routing is defined in one place, not scattered in annotations
Components and Signals: The built-in component system inspired by Delphi and React.js is unique among PHP frameworks:
- Enables creating reusable UI elements
- Supports hierarchical component composition
- Offers elegant AJAX request handling using signals
- Rich library of ready-made components on Componette
AJAX and Snippets: Nette introduced a revolutionary way of working with AJAX in 2009, before solutions like Hotwire for Ruby on Rails or Symfony UX Turbo:
- Snippets allow updating only parts of the page without writing JavaScript
- Automatic integration with the component system
- Smart invalidation of page sections
- Minimal data transfer
Intuitive Latte Templates: The most secure templating system for PHP with advanced features:
- Automatic XSS protection with context-sensitive escaping
- Extensible with custom filters, functions, and tags
- Template inheritance and snippets for AJAX
- Excellent PHP 8.x support with type system
Dependency Injection: Nette fully utilizes Dependency Injection:
- Automatic dependency passing (autowiring)
- Configuration using clear NEON format
- Support for component factories
Main Benefits
- Security: Automatic protection against vulnerabilities like XSS, CSRF, etc.
- Productivity: Less writing, more features thanks to smart design
- Debugging: Tracy debugger with routing panel
- Performance: Intelligent caching system, lazy loading of components
- Flexibility: Easy URL modification even after application completion
- Components: Unique system of reusable UI elements
- Modern: Full support for PHP 8.4+ and type system
Getting Started
- Understanding Applications – Understanding basic architecture
- Presenters – Working with presenters and actions
- Templates – Creating templates in Latte
- Routing – URL configuration
- Interactive Components – Using the component system
PHP Compatibility
version | compatible with PHP |
---|---|
Nette Application 4.0 | PHP 8.1 – 8.4 |
Nette Application 3.2 | PHP 8.1 – 8.4 |
Nette Application 3.1 | PHP 7.2 – 8.3 |
Nette Application 3.0 | PHP 7.1 – 8.0 |
Nette Application 2.4 | PHP 5.6 – 8.0 |
Valid for the latest patch versions.