7 killer features of Nette Framework

Filip Klimeš
3 min readJan 22, 2015

--

Disclaimer: this article is based on my opinions and personal experiences.

Although PHP is considered unsuitable by some, it is still a very popular choice amongst web developers. Mainly because it's so easy to learn. Sadly, this also means there are lots of unexperienced developers who don't quite know what they are doing.

Fortunately, you don't need to be an expert to create a good application. All you need is to use the right tools. And Nette has them all.

Debugging

Debugging can be hard. Without enough information, you are likely to spend more time finding a problem than actually solving it. Nette offers a brilliant debugging tool named Tracy, believed to be a benchmark in the field. If something goes wrong, a bluescreen is displayed, displaying pretty much everything you need to know. And even if you find something missing, you can happily create your own extension.

Implicit security

With freedom comes responsibility. That being said, security is without a doubt one of the greatest horrors encountered when developing PHP applications. Every input or output has to be sanitized explicitly. Programmers tend to forget, though.

With Nette, you don’t have to worry anymore. Everything is sanitized for you, unless you say not to. The impact is huge. It allows beginners to write secure code without having to be an expert on web safety. In particular, context aware escaping is the thing taking security one step further.

Routing

Nette provides awesome router, which makes link building a piece of cake. It uses two-way routing allowing you to decouple URLs from application structure. That's very important for maintainbility of your project and efficiency of its development. This way, changing your routes is easy and doesn't affect the rest of the application.

Modularity

Since version 2.2, Nette has been divided into standalone components. That means you can use any part of the framework you want, independently. Moreover, this also means faster access to new versions, as the packages are developed individually.

Unit testing

Although it's so easy to make a mistake in PHP, many developers don't use any form of automated testing. Frankly, PHPUnit isn't helping. Nette Tester is the answer. It allows you to create unit tests rapidly and without pain. Since it is so easy with Tester, I prefer writing a short unit test, rather than navigating through the application to see that my code is working.

Encouraging best practises

Best practises help you achieve better quality of your code. Nette is not enforcing any of them, that wouldn't be right. However, the whole framework is built on best practises, Dependency Injection being one of the most important. This encourages you to stick with them and make better decisions when designing your application.

Extensions

If you are working on a bigger project, the chances are you will need something Nette doesn't provide. Don't worry though, there are plenty of extensions to choose from. Just run a quick google search or browse addons portal and see for yourself. Personally, I love all the Kdyby packages. Nextras are also very nice.

So, if you are interested in developing a web application, consider using Nette. Even if you`re not familiar with PHP. Take a look at the introduction or follow the quickstart. You won't be disappointed.

--

--