Can an Angular 6 Library be bundled and used in an Angular 5 Application? - angular5

I'm on a team that is programming a new application and is also developing a pattern library for that application. When we began coding this application, we used Angular 5. However, we have seen it would be much easier to implement the pattern library with Angular 6. If we bundled the Angular 6 library, will it be usable for Angular 5?
Note: The main reason we're using Angular 6 is because it makes producing a pattern library much easier (i.e the new angular CLI). We aren't using any other Angular 6 features.

After some initial testing, I've found that you can. My test was very basic (i.e. one exported component from the library, that only was comprised of divs) but the difference in Angular versions didn't seem to cause errors.
EDIT: ^^ Is incorrect. When I first answered my own question I used a test that ended up being incorrect. I don't think there is a good way to integrate an Angular 6 library into an Angular 5 projects, because the difference in all of the #angular dependencies are too great to allow for effective integration. I had to downgrade my library to Angular 5.

Related

How to downgrade bootstrap from version 4 to 3?

I am working on a project that is using bootstrap 4. How do I downgrade the version being used on the project from 4 to 3 while maintaining the functionality of the website.
I think there's no way. To do that, you have to check on all html pages and javascript files.

Vue.js roadmap and backward compatibility

We are working in an environment where the overall web application is maintained by a core team, but developers internal and external use the frameworks and tool to develop on the application.
If the frameworks used are not backward compatible, overtime it will be impossible to upgrade the systems as other developers used frameworks to develop (old versions for example).
We would like to choose a modern JS framework, thinking a bit more serious about Vue.js.
Can anyone share thoughts about Vue.js roadmap and upgradability of the framework as it goes to V3, V4, etc?
Is the core team's mission to keep it the new versions backward compatible? not to break any APIs offered in the previous versions, etc?
I and my team have been using Vue.js for quite some time for almost 2 years. Before that, we used Angular for 4 years.
I can surely say that future Vue.js will not be fully backward compatible with past Vue. This was true when v2 was released. In fact, this applies to any major JS framework out there. Most of them will not be backward compatible. Look at Angular, Hapi, Koa, Rx.js, etc.
There is a good reason for that. JS is evolving in ways you or me as a single person cannot comprehend in one go. Not all browsers support all features. Web components are coming since 2015 and still a way for them to reach a general consensus. For example, in case of Vue 3.0, the idea is to use ES proxies that will probably be backward incompatible. As web components get adopted by browsers, the idea of Vue.js component will change and it will again be backward incompatible.
Having said this, Vue.js is unlike any other framework out there. The core team is trying its best to preserve core framework compatibility. What happened with Angular 1 -> 2 or Vue 1 -> 2, there is a least likely chance of that happening
As long as you are using Vue public API, you should be good. The transition if any will definitely be smooth, less head-spinning and you will have a clear upgrade (read as - temporarily compatible) path.
Graceful evolution is one of the reasons why we are using Vue as our large-scale application framework.

Cucumber : Integration with two different projects

We have two different projects, one in JS and the other with Java, you know if a single cucumber layer can help me integrate between two project, let's say that one project (JS) is running some operations (testing) that appear on the web application and the second project (JAVA) is running the actions on a mobile device, so we want to be able to combine the two actions, mobile and web application, appreciate the help or ideas, thanks Eyal
1) Are they different projects or the same project but there are 2 or 3 out of web, ios or android versions?
2) Must you write your automation suite in the same language as the application to install test data or use it on this suite?
If you answered 1) with "different projects" or 2) with "Yes" - then it's not wise to do this.
If you want to write a library of helper functions for cross platform purposes, then you can definitely do that. I'm currently looking into the 3 platforms myself, dividing my library into modules and requiring the one I need at the start of run time.
EDIT
In your case, I would go for writing a Cucumber JVM framework, as Java has more robust libraries for working with Desktop and Android applications than JS, from what I've seen on this site.

Incremental migration from Vue 1.x to Vue 2. Could I do it?

My team and I have a medium-large web application which uses Vue 1 and Vue-router 0.7.
Last days I was thinking about how I can migrate my project from Vue 1.x to Vue 2. In my opinion there are two possible methods:
Stop my web application development and migrate all the platform in
a few weeks.
Do an incremental migration. Some componentes will use Vue 1 and
other components will use Vue 2.
CONSTRAINTS of each option
I can't stop my web aplication because It is stable in a production
environment and I have to add features and fix issues.
I did satisfactory tests with components using Vue 1 and Vue 2. The
problem is that It is not possible to use same Vue-router version,
so I can't share routes and navigate between components...
The best option for my web application could be doing an incremental migration but...could It be possible?
Thank you for everything!
I think it is possible.
The key thing is we have to make sure Vue 2.x and Vue 1.x are able to pass data to each other, and the reactivity should work to avoid complicated blocks of code.
I've made an example here: https://trandinhkhang.github.io
About Vue router, I think we can watch for a property and then do a router.push("some-url") in both Vue Router Vue 1 and Vue Router Vue 2 to navigate. Etc.
My company have the same troubles as yours and migrating a monolith into new platform is hard and seems impossible. Lolz. Incremental migration still the best option here.
VueJS 1.x and 2.x is totally different. 2.0 is written from scratch. VueJS have an awesome migration helper which can be used and it will do lots of work for you.
Read the following migrating guide: https://v2.vuejs.org/v2/guide/migration.html
I am not sure who gig your app is but it should not take more than 2 days for a medium size application.
Here are few points from their official doc:
Where should I start in a migration?
Start by running the migration helper on a current project. We’ve carefully minified and compressed a senior Vue dev into a simple command line interface. Whenever they recognize an obsolete feature, they’ll let you know, offer suggestions, and provide links to more info.
After that, browse through the table of contents for this page in the sidebar. If you see a topic you may be affected by, but the migration helper didn’t catch, check it out.
If you have any tests, run them and see what still fails. If you don’t have tests, just open the app in your browser and keep an eye out for warnings or errors as you navigate around.
By now, your app should be fully migrated. If you’re still hungry for more though, you can read the rest of this page - or just dive into the new and improved guide from the beginning. Many parts will be skimmable, since you’re already familiar with the core concepts.
By the way, You should not upgrade the app incrementally, In my experience, it will be total mess.

Bootstrapping Aurelia

Finally, I start to work with Aurelia. There is a starter kit available Here which facilitates initializing Aurelia. But it is a template which should be used within a Web Site template.
I have a pre-configured WebApi project and I want to use Aurelia in it. I've just added the starter kit files and folders to my project. But unfortunately it shows 27651 errors fo files in jspm_packages.
What am I doing wrong? Is there any Nuget bootstrapper for Aurelia available?
Start with the aspnetcore template from Here
You can use web api from the template.
You will be up and running in minutes.
If you are using Web API, starting from an MVC5 project might be faster.
The following link is an Aurelia starter kit with MVC5.
You will have to update it to the latest version of Aurelia, but I managed to make it work with web api 2 and oAuth authentication.
https://github.com/rmourato/Mvc5-Aurelia
A tutorial can be found here.
http://ruimourato.com/2016/01/26/running-aurelia-on-mvc5.html
Hope this helps.
Well you asked what the errors are from. First thing is that you should exclude the jspm_packages folder from VisualStudios solution explorer Right click on it and mark 'exclude from project'.
Next, setup your project on source control (git) if not already and add the following to your git .ignore file
jspm_packages/
node_modules/`
I would suggest creating a second project aside from your WebAPI project that can contain static html, css and js files and do your Aurelia application there separate from your Web API project but in the same solution.
I could possibly give you a solution that is already setup, that shows how to use web api along with aurelia. But it would take some time for me to setup.
For all of my projects using Aurelia, I use the aurelia-cli which you get through npm and I would also recommend this approach.
You can be up and running with hello world in under 5 minutes.
You will then be able to build all the appropriate bits and pieces to talk to your api.
http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/the-aurelia-cli/1