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

Angular 2.0 support for NativeScript apps #103

Closed
valentinstoychev opened this Issue Apr 30, 2015 · 40 comments

Comments

Projects
None yet
@valentinstoychev
Copy link

valentinstoychev commented Apr 30, 2015

Angular team is working on the next major update of Angular framework called Angular 2.0 which will be optimized for mobile applications. We are working closely with the Angular team to enable it in a NativeScript app and we created a POC application which you can see here.

Please vote for this feature in our portal

@ch-weiss

This comment has been minimized.

Copy link

ch-weiss commented May 1, 2015

This is great news. Will there also be a sample in TypeScript since Angular 2 is being developed in TypeScript as well?

@pitaj

This comment has been minimized.

Copy link

pitaj commented May 1, 2015

Ewwwwwwww

👎

@RangerMauve

This comment has been minimized.

Copy link

RangerMauve commented May 1, 2015

It'd be nice if any Angular stuff was kept separate from NativeScript core. NativeScript is really appealing because it's fairly low level and doesn't necessarily force you to use a specific framework.

@NathanaelA

This comment has been minimized.

Copy link
Contributor

NathanaelA commented May 1, 2015

I have to agree with pitaj and RangeMauve, I don't want Angular in my app; never been a big fan of that framework. I would rather development work go toward rounding out the issues that trying to add a framework to NativeScript.

@ch-weiss

This comment has been minimized.

Copy link

ch-weiss commented May 1, 2015

I think it would be helpful to bring this discussion to a more concrete level. I would like to have any variant of the MVC pattern. If this is realized by using Angular this is fine for me. What are the alternatives?

@RangerMauve

This comment has been minimized.

Copy link

RangerMauve commented May 1, 2015

Well, I'm personally not against Angular for writing apps with NativeScript. It's just that having Angular integrated with the core would mean that NativeScript's focus would be on Angular rather than low level APIs. If NativeScript itself isn't tied to anything in particular, it'll be much more useful for a variety of applications and would enable much more innovation than stocking to a framework that tries to abstract everything away.

I propose having two projects. NativeScript for the more low level bindings to the different components, and then NativeScript-Angular for the high level Angular stuff.

Separating the two would also allow for people to use whatever other tools they already use. For instance if people want to convert Ember or React apps to use NativeScript. It'd be a lot more appealing of a platform if it wasn't solely focused on a particular framework.

@pitaj

This comment has been minimized.

Copy link

pitaj commented May 1, 2015

@ch-weiss

This comment has been minimized.

Copy link

ch-weiss commented May 1, 2015

I also support the idea of seperation and keeping this out of the core.

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented May 2, 2015

Just to shed some light here. We are not talking integrating Angular in NativeScript. We are talking Angular support in NativeScript, which means that if you are a developer who loves Angular you will be able to use it with NativeScript. But if you don't want to use Angular, just do not include it in your project and use teh default {N} APIs :).

Still this is a very very early work and as you know Angular 2 is also not being released yet, so everything can change.

Our short term idea is to provide a module that will make the integration between Angular and NativeScript natural. Angular will not be part of the core.

@ch-weiss We will provide a TypeScript sample in the future. The thing is that currently Angular is working with TypeScript 1.5, which is still not official and we dont wan't to put it in our CLI for the moment.

I hope this helps and makes sense.

Love the discussion!

@ch-weiss

This comment has been minimized.

Copy link

ch-weiss commented May 2, 2015

@valentinstoychev Thanks for shedding light in ☺ I like very much what you are doing and the way you are doing it.
Speaking about TypeScript I know that 1.5 is still beta and Angular 2 is even alpha. I am not asking for cli support for TypeScript yet if you do not want to do it until the 1.5 production version is released. But the early developer preview of Angular 2 is released in TypeScript. Therefore I would appreciate it to have a starter package or sample in TypeScript for download in Github. Thank you for considering it.

@ch-weiss

This comment has been minimized.

Copy link

ch-weiss commented May 2, 2015

@pitaj Talking about alternatives. Please correct me if I am wrong but to my understanding it is not so easy to find an alternative because most frameworks rely on DOM for the view. Therefore just frameworks can be considered that seperate their runtime into two layers an application layer and a render layer like Angular 2 does it to make it possible to be used with native approaches:
https://docs.google.com/document/d/1M9FmT05Q6qpsjgvH1XvCm840yn2eWEg0PMskSQz7k4E/edit#heading=h.owsdtw3w8t06
Of course there are many nice frameworks out there but unfortunately they can not be used with NS easily. For example I also like Aurelia but as far as I know they do not have this seperation and just render into virtual DOM like most other frameworks. Do I see this correct or do I have missed something?

@pitaj

This comment has been minimized.

Copy link

pitaj commented May 2, 2015

@Sibling10

This comment has been minimized.

Copy link

Sibling10 commented May 4, 2015

"... a module that will make the integration between Angular and NativeScript natural.." is perfect!

@valentinstoychev valentinstoychev changed the title Angular 2.0 as an application framework for NativeScript apps Angular 2.0 support for NativeScript apps May 4, 2015

@SynerG

This comment has been minimized.

Copy link

SynerG commented May 6, 2015

Great approach. Great for Angular and great for NativeScript. I would love to use my AngularJS skills to develop mobile apps that are not hybrid, but supported by NativeScript

@emmanuelbuah

This comment has been minimized.

Copy link

emmanuelbuah commented May 6, 2015

+1 for modules as framework(angular, etc) integration mechanism. I don't use Angular but would be nice for those that do. Most of all, it wouldn't affect progress on the core. Im currently working on integrating Meteor (reactive backend- https://www.meteor.com/) with NativeScript as a module and hope to see more integration that way.

@emmanuelbuah

This comment has been minimized.

Copy link

emmanuelbuah commented May 6, 2015

I also want to say, this is a very slippery slop. This will open up a lot lot of "why not support x framework" or "can you support y framework". I think if the nativescript team can provide guidelines and how-to materials on integrating a framework with nativescript, the community can take on that task to work on those modules per community needs till its worthy to be supported by the nativescript team.

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented May 7, 2015

@emmanuelbuah Good luck with the Meteor integration - let us know how we can help. I definitely agree that we need a good guidelines about how a module can be best created in NativeScript. The one thing that stop us from doing this guide is because we are waiting for our official plugins support where the actions of creating and integrating a module inside NativeScript will be much more polished. Our plugins story should be ready for our 1.1 release in June and I will make sure to have an excellent guidelines so that the community can work on the modules with ease. You can see the proposal for the plugins format here #25.

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented May 8, 2015

If you are interested to write your modules now, please take a look at this blog post.

@calebboyd

This comment has been minimized.

Copy link

calebboyd commented May 22, 2015

I think this is great, If NativeScript can have an adapter that implements Angular's rendering interfaces this would most certainly be an excelent starting point for many other javascript application frameworks, which could only help adoption.

👍

@froyke

This comment has been minimized.

Copy link

froyke commented May 26, 2015

I'm not even a Backbone.js user, but it seems like it is the most relevant MVC framework to integrate with - as it provides MV* programming model with very little assumption for the view layer.
I'm sure the 'el' DOM reference can be easily hacked into reference to {N} Widjet/view element.

Why trying to integrate with a framework that is mostly about next generation of HTML DOM?

@valentinstoychev valentinstoychev modified the milestones: 1.2.0, 1.1.0 Jun 9, 2015

@kpko

This comment has been minimized.

Copy link

kpko commented Jun 9, 2015

Angular 2 was written with the idea of other renderers in mind. You can write your own adapters for rendering, regardless whether you are rendering to the DOM, HTML5 canvas or to native UI elements. Angular 2 is not mostly about HTML DOM, it's mostly about components. It's an application framework featuring dependency injection, components, change tracking and so on.

I think it's a great idea to help integrating Angular 2, as long as it's not done in the {N} core but in a separate module, so you can opt-in.

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Jun 9, 2015

Yes, we are doing it as a separate module. You can follow our weekly meeting notes with the Angular team here.

@hshristov hshristov modified the milestones: 1.2.0, 1.2.0 (Under Review) Jun 10, 2015

@fselcukcan

This comment has been minimized.

Copy link

fselcukcan commented Jun 17, 2015

That would be great if it makes possible to reuse the code, or a significant portion of it, written for mobile apps in the web version of the apps, ie. the version run in mobile or desktop browser.

@kpko

This comment has been minimized.

Copy link

kpko commented Jun 17, 2015

Given Angular 2 and NativeScript (at the top layer) are just JavaScript, I think we will have a pretty high code reuse in our upcoming apps :-) Looking forward to it!

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Jun 18, 2015

@isikfsc @kpko Yes- this is the idea to enable as much code reuse as possible between your web and mobile apps.

@maknz

This comment has been minimized.

Copy link

maknz commented Jul 28, 2015

👍 for separate module and not in the core, we have no intention of using Angular, and it was a deal breaker with other mobile frameworks that forced it.

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Jul 29, 2015

Just to confirm - yes it will be a separate plugin and if you don't want to use it - you will not know for its existence :). If you want to use it will be a single command to enable it. Something similar to tns plugin add nativescript-angular

@valentinstoychev valentinstoychev modified the milestones: 1.2.0, 1.3.0 Jul 30, 2015

@enchev enchev added the in progress label Aug 3, 2015

@SunburnedGoose

This comment has been minimized.

Copy link

SunburnedGoose commented Aug 24, 2015

+1

@enchev enchev modified the milestones: 1.4.0, 1.3.0 Sep 11, 2015

@rawatrob

This comment has been minimized.

Copy link

rawatrob commented Sep 17, 2015

Hi,
I'm new in this group, and didn't have any idea about Angular js so how can I start to learn Angular js 2.0 Right now I'm working with jquery mobile and phonegap but that is not giving native feeling. which one is best jquery mobile or Angular js..

@jimthedev

This comment has been minimized.

Copy link

jimthedev commented Oct 5, 2015

@rawatrob Angular2 is alpha software and the api is changing with each release so even for someone who is following, like me, it can be tricky. The best bet is to learn some of the concepts and maybe learn some TypeScript. I've just given a talk about this content so if you like, hit me up on youtube or twitter and I can send you the content. I'm not going to promote it here. I would absolutely discourage anyone building a production app right now in Angular 2. It will be fantastic when it is ready but in the mean time, don't bet your business on alpha software.

@rawatrob

This comment has been minimized.

Copy link

rawatrob commented Oct 8, 2015

Thank Jim,

Is Angular 2 is total different from angular 1.3 ?

@jimthedev

This comment has been minimized.

Copy link

jimthedev commented Oct 8, 2015

@rawatrob Yes, it is quite different. IMO it is much better.

@rawatrob

This comment has been minimized.

Copy link

rawatrob commented Oct 8, 2015

wow!!!! Mean I have to learn it...

@valentinstoychev valentinstoychev modified the milestones: 1.5 (Under Review), 1.4.0 Oct 9, 2015

@afortaleza

This comment has been minimized.

Copy link

afortaleza commented Oct 21, 2015

Is it wise to start a new project to go in production in 3 months with Angular 2 and {N}?

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Oct 21, 2015

Hey @afortaleza, the Angular 2.0 framework is still not ready for production and I will advise you to wait at least until from Google announce the first official release of Angular 2.0. For the moment a lot of things are changing and you should use these libraries only for learning purposes and to get a sneak peek at what is coming next.

@afortaleza

This comment has been minimized.

Copy link

afortaleza commented Oct 21, 2015

@valentinstoychev , I'll follow your advice, thank you very much :)

@alexrainman

This comment has been minimized.

Copy link

alexrainman commented Oct 21, 2015

I think AngularJS must be an optional choice, like a plugin. I like the way {N} is right now. Simple and low level!

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Oct 22, 2015

Yes - it is an optional choice. Actually the preview version of the plugin is already available - https://www.npmjs.com/package/nativescript-angular

@valentinstoychev

This comment has been minimized.

Copy link

valentinstoychev commented Oct 22, 2015

You can watch the recording from our NativeScript and Angular 2.0 from the AngularConnect conference here - https://www.youtube.com/watch?v=4SbiiyRSIwo

@atanasovg atanasovg removed this from the 1.5 milestone Nov 26, 2015

@atanasovg

This comment has been minimized.

Copy link
Member

atanasovg commented Nov 26, 2015

Use the https://github.com/NativeScript/nativescript-angular repo for further feedback on the integration.

@atanasovg atanasovg closed this Nov 26, 2015

@atanasovg atanasovg removed the in progress label Nov 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment