Tweakers maakt gebruik van cookies, onder andere om de website te analyseren, het gebruiksgemak te vergroten en advertenties te tonen. Door gebruik te maken van deze website, of door op 'Ga verder' te klikken, geef je toestemming voor het gebruik van cookies. Je kunt ook een cookievrije versie van de website bezoeken met minder functionaliteit. Wil je meer informatie over cookies en hoe ze worden gebruikt, bekijk dan ons cookiebeleid.

Meer informatie

Door , , reacties: 0, views: 2.747 •
Bron: Yii PHP Framework, submitter: BBrunekreeft

Yii is een component-based PHP-framework, met volgens de ontwikkelaars zeer goede prestaties, die bijzonder geschikt zijn voor het ontwikkelen van grootschalige webapplicaties. Het framework bevat tal van opties, zoals mvc, dao/ActiveRecord, I18N/L10N, caching, jQuery-based AJAX support, scaffolding, input validation, widgets, events en theming. Voor meer informatie verwijzen we naar deze pagina. De ontwikkelaars hebben versie 1.1.7 uitgebracht met de volgende aankondiging:

Yii PHP framework 1.1.7 is released

We are very pleased to announce the immediate availability of Yii Framework version 1.1.7. In this release, we included more than 90 new features, enhancements and bug fixes.

For the complete list of changes in this release, please see the change log and important feature additions . And if you plan to upgrade from an older version to 1.1.7, refer to the upgrade instructions.

In the following, we briefly introduce some of the most exciting new features in this release. Thank you for your support!

RESTful URL Support
To let CUrlManager to recognize specific HTTP verbs and respond accordingly, one can specify the verb option in the URL rules in the application configuration.

Query Caching
Built on top of data caching, query caching stores the result of a DB query in cache and may thus save the DB query execution time if the same query is requested in future, as the result can be directly served from the cache. Query caching can be used at both DAO and AR levels.

Parameter Binding for Class-based Actions
In version 1.1.4, we added support for automatically populating method-based action parameters. In this version, we extended this support to class-based actions.

Seamless Client-side Validation
CActiveForm is a powerful widget that makes creating form and performing data validation very easy. Previously, CActiveForm supports server-side validation and AJAX-based validation. In this version, we enhanced CActiveForm further with client-side validation. Compared with server-side and AJAX-based validations, the new validation is performed entirely on the client side. Therefore, it can give more prompt response to user inputs and will not bring any extra workload on the server. The best thing about this client-side validation is that it does not require any extra coding. The validation is done based on the validation rules declared in the model class, and the result is consistent with that done on the server side. All these make our code more DRY. To use client-side validation, we simply need to set CActiveForm::enableClientValidation to be true.

Passing Parameters to Relational Named Scopes
It's now possible to pass parameters for relational named scopes.

Using 'through' with HAS_MANY and HAS_ONE
Active Record got through support that allows to build MANY_MANY-like relations with much more flexibility allowing getting and using data from the binding in-the-middle table. For example, it allows getting all comments for all users of a particular group.

Using Transactions in DB Migration
When performing DB migration, we may encounter situations where a part of a migration fails and we want to roll back the whole migration. The solution to this problem is to enclose the whole migration code within a DB transaction. While we can explicitly write this code, the new transaction support for DB migration makes the whole task a lot easier. Instead of implementing CDbMigration::up() and CDbMigration::down(), we can put our code in CDbMigration::safeUp() and CDbMigration::safeDown(). By doing so, our code will be protected by DB transaction. In case any DB operation fails in the middle, the whole migration will be rolled back. Note that in order to use this feature, you DBMS must support transactions.

Registering and Using Custom Script Packages
CClientScript now allows developers to register and use their own script packages. Previously this feature was only available for core framework packages. A script package may include CSS files, JavaScripts, image files, etc., which need to be accessed by end users. A script package may depend on other packages. That is, if a package is registered to be rendered in a page, all its dependent packages must also be registered and rendered. Previously, CClientScript only supported using core framework script packages (via CClientScript::registerCoreScript). In this version, we extended this feature and made it available to custom script packages. To use this feature, one first needs to register the custom packages by configuring the CClientScript::packages property. One then calls CClientScript::registerPackage() to register a package when needed.

Reacties


Er zijn nog geen reacties gevonden

Op dit item kan niet meer gereageerd worden.



Populair: Tablets Nokia Websites en communities Lumia Smartphones Laptops Sony Apple Games Politiek en recht

© 1998 - 2014 Tweakers.net B.V. onderdeel van De Persgroep, ook uitgever van Computable.nl, Autotrack.nl en Carsom.nl Hosting door True

Beste nieuwssite en prijsvergelijker van het jaar 2013