-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration to Angular 2 #1824
Comments
First of all: This is a very good question we where thinking about this a lot, currently (state june 2018) i can summarize the following: LTSAngular JS LTS will end at 2021 (https://blog.angular.io/stable-angularjs-and-long-term-support-7e077635ee9c) we will see what happens then. Maybe they will provide some security patches, or there will be a community fork. AngularJs vs Angular 2What we love about AngularJS is that we can mix it with PHP, i can make you an example of this: People using LUYA are commonly very familiar with Yii, so we try to adopt this strategy. In order to extend the LUYA Admin or the CMS you don't need to know angular at all, but you can. An example with the NgRest Active Windows: <?php
use luya\admin\ngrest\aw\CallbackFormWidget;
/* @var $this \luya\admin\ngrest\base\ActiveWindowView */
/* @var $this \luya\admin\ngrest\aw\CallbackFormWidget */
?>
<div>
<?php $form = CallbackFormWidget::begin(['callback' => 'post-data', 'buttonValue' => 'Submit']); ?>
<?= $form->field('firstname', 'Firstname'); ?>
<?= $form->field('password', 'Password')->passwordInput(); ?>
<?= $form->field('message', 'Message')->textarea(); ?>
<?php $form::end(); ?>
</div> This will generate an angular form, submiting the data to the API. So we are in an angular context, we can not use jquery or "original" post request. Therfore we need a javascript language where we can mix. Otherwise people would need to know angular in order to build such forms. We don't want this, you can if you are experienced with angular, but you can also use PHP and yii2 similar form building technique. And now this is what currently is the problem with angular 2, it should really contain only html and angular 2 code, the strategy and structure of angular 2 has changed. It recommends type script, must be compiled, etc. LUYA admin is not a "true" angular only application, so we are unable to migrate to angular 2. (i don't say its not possible to mix php with angular 2 but it seems not to be part of the angular 2 strategy, angular 2 is perfect for "angular only" applications, this is what its made for.) LUYA 2Rewrite the existing code to angular 2 or any other technique would take so much time, instead we will plan a version 2 of LUYA. What i currently can say is we want to finish a few things (estore, account module, admin for large amount of data) before thinking about LUYA 2. AlternativesIf we reach the point where we start the planing for LUYA 2, there will be the time to decide what technique is part of. Maybe using vue.js, as its similar to angularjs, maybe there are other competitors at this time. In terms of technology, a lot can go on in 3 years. Any suggestions and inputs are very welcome. I hope this gives you somewhat an idea of how we think and plan for the future. |
OK, I can only agree with that. Indeed, the interest of LUYA is to complete Yii. And there are more urgent issues than the frontend language. |
Thanks for asking the question, so i had time to answer this, cause i am sure there will be more people looking for this. 👍 Can we close it? |
So, it's time to have a conclusion ? |
In terms of mixing with PHP, yes it definitely looks like VUE. |
Do you have any plan migrate to vue.js? |
Currently, we don't have any plans to move to vue, this would take sooooooo much time. I guess instead we will create LUYA 2 instead. Maybe then we should also think about the backend technology, which could be Yii 3 or something else. |
AngularJS will be moving to Long Term Support (LTS) mode on July 1st 2018.
Have you planned a migration of the admin UI based on Angular 2 ?
The text was updated successfully, but these errors were encountered: