Nette Framework 2.1.0 finally released!

Notice: This thread is very old.
David Grudl
Nette Core | 8215
+
0
-

After two years of development we are very proud to announce the availability of Nette Framework 2.1.0!

New release has many innovations (see migration guide):

Application & Presenter

  • PresenterFactory: configurable mapping Presenter name → Class name
  • Route: new pseudo-variables %basePath%, %tld% and %domain%
  • Presenter: new method sendJson()

Caching

  • added SQLite storage (Nette/Caching/Storages/SQLiteStorage)

Database (NDB)

  • complete refactoring, a ton of bug fixes
  • lazy connection
  • much better (dibi-like) SQL preprocessor
  • Selection, ActiveRow: insert() & update() methods return row instances with refetched data
  • Selection: added placeholder support select(), group(), having(), order() methods
  • SqlLiteral: added placeholder support
  • Selection: added WHERE conditions consider NOT for IN operator
  • new driver for Sqlsrv
  • Sqlite supports multi-inserts

Debugger

  • Bar: you can see bar after redirect
  • Dumper: colored and clickable dumps in HTML or terminal
  • Debugger: full stack trace on fatal errors (requires Xdebug)

Dependency Injection (DI)

  • auto-generated factories and accessors via interface
  • adding compiler extensions via config file
  • configurable presenters via config file
  • annotation @inject
  • bullet syntax for anonymous services

Forms

  • setOmitted: excludes value from $form->getValues() result
  • implemented full validation scopes
  • Form::getOwnErrors() returns only errors attached to form
  • Radiolist::getLabel(…, $key) returns label for single item
  • added ChoiceControl, MultiChoiceControl and CheckboxList
  • SelectBox and CheckboxList: allowes to disable single items
  • UploadControl allowes multiple files upload
  • validators Form::INTEGER, NUMERIC and FLOAT converts values to integer or float
  • validator Form::URL prepends http:// to value
  • Form::getHttpData($htmlName) returns data for single field
  • supports Twitter Bootstrap 2 & 3 (see examples)
  • removed dependency on Environment
  • improved toggles
  • data-nette-rules attribute is JSON

Latte

  • supports <tag attr=$val> without quotes
  • new macro n:name for <form> <input> <select> <textarea>
  • partially rendered radiolists using {input name:$key} and {label name:$key}
  • new modifier |safeurl which allowes only http(s), ftp and mailto protocols
  • safeurl is automatically used for href, src, action and formaction attributes (can be bypassed by |nosafeurl modifier)
  • new modifier |noescape which is preferred over exclamation mark
  • {foreach ...|nointerator} bypasses creating variable $iterator
  • new macro n:ifcontent
  • {include block} can be written without hash

Http

  • added new SessionPanel
  • RequestFactory: new method setProxy()

Utils

  • new utility class FileSystem
  • new utility class Callback
  • Arrays: new method isList()
  • Arrays: method flatten() supports key preserving
  • Strings: new methods findPrefix() and normalizeNewLines()
  • Json: supports pretty output
  • Validators: new method isType()

Mailing

  • SmtpMailer: persistent connection

Others

  • minified version is PHAR file
  • ObjectMixin: magic methods setProperty(), getProperty(), isProperty() and addProperty() by @method
  • SafeStream: supports ftruncate (requires PHP 5.4+)

Nette Framework also comes with updated documentation. How to get started? Try Quick Start tutorial.

crempa
Member | 198
+
0
-

Great news, thank you!

Jan Suchánek
Member | 404
+
0
-

It's great! Thank you!

Milo
Nette Core | 1283
+
0
-

@David Grudl Many thanks for a great job!

Šaman
Member | 2658
+
0
-

Thanx, DGX!

What about czech documentation and quick start? There are updated too, or english vesion is better?

Filip Procházka
Moderator | 4668
+
0
-

Czech quickstart was updated too. Documentation was updated by @dg (what was missing).

Last edited by Filip Procházka (2014-01-02 11:36)

David Grudl
Nette Core | 8215
+
0
-

Quick start is updated and updating of documentation is still in progress.

Vojtěch Dobeš
Gold Partner | 1316
+
0
-

Thank you very much, great work!

thunderbuff
Member | 164
+
0
-

Yes! THX

uestla
Backer | 799
+
0
-

Worth waiting, thanks!

hrach
Member | 1838
+
0
-

:heart:

MartyIX
Member | 217
+
0
-

Thanks! :-)

David Grudl
Nette Core | 8215
+
0
-
Jan Tvrdík
Nette guru | 2595
+
0
-

Wow, the forms are even better than I thought! Well done =)

Last edited by Jan Tvrdík (2014-01-05 01:05)

Felix
Nette Core | 1195
+
0
-

Good job!

screenas
Member | 5
+
0
-

great job! (:

greeny
Member | 405
+
0
-

Is that typo?

{foreach …|nointerator} bypasses creating variable $iterator

Jan Tvrdík
Nette guru | 2595
+
0
-

No Ok, it is a hard to spot typo

Last edited by Jan Tvrdík (2014-01-08 12:06)

jasir
Member | 746
+
0
-

Jan Tvrdík wrote:

No

No? I think it is typo.

Jelen
Member | 18
+
0
-

Thanks a lot :-)