Glossary
Nette Framework
Nette combines a PHP framework with libraries for common parts of a web application; its advantage is a clear application model, not an automatically complete architecture.
Short definition
A framework from the Czech ecosystem for HTTP applications and their technical foundation.
Nette Framework is a framework for PHP web applications. It handles receiving an HTTP request, selecting the target part of the application, rendering a response, configuring services, forms, and supporting security mechanisms. Alongside the full framework are independently installable packages such as Nette DI, Forms, Database, Security, and Utils.
Nette has historically held a strong position in the Czech and Slovak PHP communities. Modern versions are divided into Composer packages. Latte is a template system closely associated with Nette but is a separate project; Nette Forms or the DI container can likewise be used without the full framework.
Use cases
Where Nette is useful in practice
It is often used in long-lived Czech applications where the team values established conventions and locally available ecosystem knowledge.
- internal and administration systems with sign-in, roles, and forms
- online-store administration, catalogues, and back offices over a relational database
- content and customer web applications rendering HTML with Latte
- gradual maintenance and development of an existing Nette application
- standalone use of forms, DI, the database layer, or Tracy outside the full framework
Practical example
Editing a product in an online-store administration interface
The router maps the administration URL to ProductPresenter. The Presenter creates a form for the product name, price, and status, validates the input on the server, and passes the data to an application service after a successful submission. The service evaluates business rules, such as permission to edit the price list or price rounding, and stores the change through a repository.
The Presenter then displays a flash message and redirects the user to the detail page. The form, Presenter, and Latte template therefore do not need to carry pricing rules. The same service can later be used for an import, API, or command-line task.
How it works
From a URL to a response
Nette Application divides responsibilities among the router, Presenter, components, and template. Application rules are best kept outside the entry layer.
- Router Creates an application request from the URL and selects a Presenter and action; the same router can also generate links back into the application.
- Presenter The entry point for a page, similar to a controller in other frameworks. It receives parameters, checks permissions, coordinates a use case, and returns HTML, JSON, a redirect, or another response.
- Component and form A reusable UI component can handle a form or interaction. Input must be validated on the server even when JavaScript provides additional validation.
- Application service Carries business decisions and communicates with a repository, database, or external API. A Presenter should pass clearly defined data to it rather than HTTP details.
- Latte or JSON The output is rendered by a Latte template with context-aware escaping, or the Presenter sends a data response for an API.
Important components
What makes up a Nette application
The full framework brings several packages together. Their presence does not change the responsibility for domain design and application operations.
Presenters and the component model
A Presenter represents a page or another application response and can contain reusable UI components. It is not the place for database queries, pricing rules, or coordinating several integrations at once.
Latte
Latte renders HTML templates and understands HTML context, so it automatically escapes output according to where it appears. Security still depends on correctly handling trusted HTML and inputs.
Forms and Security
Nette Forms supports rendering, validation, and protection of the form flow; nette/security handles identities, authorization, and secure password storage. A form alone does not replace a permission check for a specific change.
Nette DI and NEON
The DI container assembles services and supplies dependencies. Configuration is generally written in the readable NEON format; values needed by a class should be passed to its constructor rather than read from global configuration.
Nette Database
Provides Connection, SQL queries, and Database Explorer for working with tables and relationships. It is not Doctrine ORM: it works directly with database rows and queries rather than a Unit of Work over entities.
Benefits and limitations
A framework helps with structure but does not design the system for the team
Benefits
- unifies routing, forms, templates, configuration, and HTTP responses
- the DI container makes service dependencies visible and easier to replace in tests
- components and forms can be used independently and reused
- the Czech and Slovak communities offer readily available experience in maintaining Nette applications
What to watch for
- domain logic directly in Presenters or components is difficult to reuse outside the web UI
- the magic of persistent parameters, signals, and components must not hide data flow and permissions
- Database Explorer does not automatically solve data design, transaction boundaries, or the performance of every complex query
- tight coupling to framework types in the application core makes later changes and isolated testing harder
Scope of use
Suitability depends on the application context, not a framework ranking.
Nette makes sense for a PHP web application that benefits from its Presenters, forms, Latte, DI, and the team’s existing conventions. Gradual development of a working Nette system can also be a good choice when dependencies, tests, and responsibility boundaries improve at the same time.
A standalone package or smaller solution may be enough for a purely command-line script, one-off import, or service with minimal web needs. Conversely, when working with a team accustomed to another framework, a rewrite based solely on technology preference is rarely more important than business value and safe change.
What to keep in mind
A healthy Nette application separates the web UI from system rules
As the application evolves, clear dependencies and verifiable rules matter more than the number of framework features in use.
- keep Presenters as the entry and presentation layer rather than the centre of the domain
- validate form data on the server and authorize a specific operation over specific data
- supply services and configuration values explicitly through DI
- parameterise database queries and define a transaction around important changes
- test application services and key HTTP scenarios and update dependencies continuously
Common questions
What to know about Nette
Is Nette Framework the same as Latte?
No. Nette Framework provides the application structure. Latte is a separate template system commonly used with Nette but able to work outside it.
Is a Presenter the same as a controller?
In Nette, a Presenter is the entry class for a page or application response and is closest to a controller in other frameworks. It should mainly coordinate the request; business logic and database work belong in separate services.
Does a Nette application have to use Nette Database?
No. Nette Database is one option. The application can use Dibi, Doctrine, another database library, or explicit SQL according to the project’s needs.
Does Nette Forms automatically protect the entire application?
Forms help with validation and a secure form flow, but do not replace authorization, correct input handling, or safe design of database and integration operations.
Is Nette better than Symfony or Laravel?
There is no universal ranking. Choose a framework according to application needs, team experience, operational requirements, and existing code. In a long-term project, sound design and maintenance usually matter more than changing frameworks without a clear reason.
How I use Nette in practice
I have used Nette in both personal and team PHP applications.
For specific professional experience with Nette, Dibi, and Tracy, see the dedicated experience page linked from this entry.