how to convert yii 1 application to version 2 - yii

We have website which built in yii 1.1 version, now we would like to convert it to version 2. But we already have a lots of functionality and we do not have much time to do everything by scratch in yii 2. please do suggest.

I don't think there is a fast way of converting or migrating from Yii 1.1 to Yii2. They are similar in some ways but different enough.
I would recommend you first read most of The Definitive Guide to Yii 2.0, which includes Upgrading from Version 1.1.
In my opinion the best you can do is try to replicate the same modules and their functionality one at a time, trying to reuse as much code as you can from the 1.1 version. A few things that i think would be important are:
Create the new Yii2 models using Gii and adapt methods from your Yii 1.1 models. Edit and add validation rules as needed. There are many rules that might not have been available in Yii 1.1, however it can also be true the other way around.
Generate Yii2 modules with Gii. Just need these to create a better project structure. If you didn't use modules on Yii 1.1 i would recommend doing so for Yii2.
Generate Yii2 CRUDs with Gii inside the corresponding modules. This will help generate the controller, actions, views and search model needed for basic CRUD functionality. After that, you will need to edit the views and controller to fit your needs, which you can use your 1.1 code for reference.
Install needed extensions and widgets using composer. Many extensions from Yii 1.1 have updated versions for Yii2, but for those that do not you will have to find substitutes, which shouldn't be too difficult, although you will most likely have to read the documentation for both familiar and new extensions.
In the end you will need to spend time to have a Yii2 version of your website, there is no easy and fast way to jump

You don't need to convert your application completely you can use both at same time please have a look to
http://www.yiiframework.com/doc-2.0/guide-tutorial-yii-integration.html

Related

Piranha CMS How To Extend

I've just started looking at Piranah as a way to jump start a personal project. It looks great, but I would like to extend some of the models. For example, have an physical address field for every bog post.
What is the best way to add that, without causing issues when upgrading later?
Given that you’re using the latest version of Piranha for .NET Core the content types are very flexible and you can extend them in many ways through the framework. You can find good documentation on this here:
http://piranhacms.org/docs/basics/how-to-setup-content
If you’re using the legacy version of Piranha (2.x) you can read about it here.
http://legacy.piranhacms.org/docs/extend/page-post-types
The content model of the latest version of Piranha is far more flexible.
Best regards

Phalcon: How i can design a website with multi languages?

Later i worked with symfony framework. In this framework we can easily build a multi language project by using FOSUserBundle. But i do'nt know what to do in phalcon! In the Phalcon documentation (multi-lingual-support) explained a way for it! But if i have many languages this way is too difficult!
Do yo know about any provided library for multi language projects?
You can either use the Phalcon\Translate to translate all your strings in respective arrays - one file per language. The reference in the documentation as you correctly posted is here and it refers to the native array adapter.
There are additional adapters in the incubator repo, for PO files or database driven.
You might also want to see the internationalization area in the documentation.
take a look at this piece of code
https://bitbucket.org/moderndeveloperllc/phalconlocale/src

Can modules(extensions) be modified in Yii?

I am new to Yii framework, and just came across extensions provided by Yii. But I am confused whether we can modify the extension which are provided by Yii.
For example I am using Yii-user module, Now if I want to change the registration form provided by this module, So can I directly change it(by changing the files) ?
If - Yes: Will there be any problem while upgrading Yii version ?
If - No: How can be change it(May be from our custom file) ?
Yii-user module is provided by the community not an official yii extension, yes you can modified by replace it with another view file, if you mean a class the best way to modifie it is by extend it and override the methods you want to change.
Hope it helps
Yii is designed to build custom solutions, you should feel free to modify anything that is part of the generated 'site' including extensions and everything in the protected folder. However, conforming to the psyche and standards of coding used in Yii is certainly a good practice to benefit fully from the framework and you can only get into a habit of doing that after developing and re-developing with Yii over a period of time.
Upgrading Yii version updates files in the framework directory only so its safe to make changes in your site part.
You cannot upgrade that individual extension if you modify them directly(as now you have your own custom version). extending an extension as suggested by Cherif is a good option if you want to keep upgrade-ability for the extensions (protected/extensions).

Integrating an Orchard module that depends on NHibernate 3.x

We have an existing site that we would like to convert to an Orchard module. The module will need to continue to use it's own database and data access.
Is it possible to use a different version of NHibernate (3.2) to that of the Orchard Framework and what extension points can be used to hook into Begin/End requests so that ISessions can be managed?
Sorry, no, that is not possible. Or at least very very very difficult. Probably not worth it.

Sitefinity 4 custom modules: OpenAccess necessary or not

With Sitefinity 4, is it a must to use OpenAccess, is it recommended, or is it just an alternative option?
OpenAccess is the ORM used by Sitefinity, so it is certainly recommended and encouraged. However, if you are developing your own modules, user controls, etc and want to use your own data source you're free to do so. Check out this example on building a simple hello world module for Sitefinity 4 that doesn't use openaccess at all.
I hope this is helpful!