Beta And Api Changes

Beta is close. That means API will become more or less stable and it will not be a good idea to change it much.

If you don’t like any method signature or API, it’s time to report it suggesting better variant.

Thank you for the good news!

That’s actually bad news for ones not checked master code yet and not suggested what they need ;)

Is there an approximate time frame?

Depends on many factors. My personal esitmate is "less than a month" but I can be wrong.

That’s good news. I can’t wait to see the beta!

I worked with yii1.1 a little and I love it.

One thing I hope to see in yii2 is built-in support for Right-to-left languages. ( also a shamsi(Jalaali) calendar)

I am a salesforce.com developer. Salesforce is a cloud-based multi-tenant platform and is really easy to customize.

One thing I think is interesting in salesforce is using xml file to define drop down list items which can be viewed differently with different users.

I think using xml files for customization can make developing easier.

Thanks

Are there any issues with RTL now?

I would consider renaming the function yii\widgets\ActiveForm::validateMultiple($models). It was confusing because I didn’t expect it work with an indexed array of models.

Then, the proper way to validate multiple models is to use ActiveForm::validate($model1, $model2, $model3, …), which seems really weird to me.

I think something like this would make more sense:




// validate one model only

public static function validate($model, $attributes = null)


// validate multiple

public static function validateMultiple($model1, $model2, $model3, ...)


// validate indexed array

public static function validateModelsArray($models, $attributes = null)



yii\web\Request::$restParams could be significantly improved. Please see issue #2043 for some background.

Problems:

  • Parsing of restParams is hard-coded. I outline a better way in the issue. (Analogous to web\Response::$formatters.)

  • “restParams” are not RESTful in any meaningful way. This is a buzz-word. They’re just the parsed body, what I’d simply call “params”. Let’s not contribute to developer confusion by using the term “REST”.

Note that Qiang has been editing the file throughout the day, so maybe these issues will be addressed by the time anyone reads this. :)

amnah

Can you create an issue at github about it? Thanks.

danschmidt5189

Very good proposal. Thanks!

I think this one still needs some work: https://github.com/y...ii2/issues/1280 (Gii from the Command Line)

Yes. cebe handles it.

@samdark

The REST API issue hasn’t had much activity lately. IMO that needs a lot more attention. Having worked with Backbone and Angular extensively the past year I am absolutely convinced that’s the direction the web is going, and Yii2 could be a good tool for serving those front-ends.

To be really useful for a corporate client, Yii2 would really need to step up HATEOAS/discoverability support.

@danschmidt5189: Yes, REST support is one of the main things that Yii2 is going to provide. While you don’t see much activity, behind the scene I have been working on this for quite some time, from investigating popular existing solutions to trying out several designs. REST feature will be the last major feature before we deliver 2.0 beta. You are very welcome to propose your ideas.

Whoa, entirely forgot to ask: What’s the status of the api generator? IIRC, qiang wanted to have it ready by the time the beta is going to be release.

Nice!

i want to allow particular user to view particular action example for the user demo i want to allow him to access view,index and for the user admin i want to give him all access like in yii 1.1.x access control by using users array but it is missing in yii2. is there any way to do the same

This can be easily done by overriding AccessRule.

Here’s an example, where I use ‘role’ field from tbl_user to implement simple role-based access.