You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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?
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.
Build the MVC totally separately from NativeScript. A different repository,
everything. If you need to add features the NS to do so, go ahead, but
don't tie the framework into the core. I'd prefer using something like
Riot, or a smaller framework that's less monolithic than Angular.
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.
@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.
@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?
Virtual DOM is the render layer. Lots of frameworks render directly to the
DOM, but those that have a virtual DOM, like React, Riot, etc, render to it
first, and it would be a relatively simple task to rewrite the diffing
algorithm to treat the VDOM as a virtualisation of the NativeScript layer
instead of the DOM.
I think that if there is one thing NativeScript could do that I wouldn't be
opposed to would be creating a Virtual DOM that could be read to and
written from, that would diff and update the view as necessary.
That I could get behind.
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
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.
Activity
ch-weiss commentedon 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 commentedon May 1, 2015
Ewwwwwwww
👎
RangerMauve commentedon 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 commentedon May 1, 2015
ch-weiss commentedon 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 commentedon 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.
NativeScriptfor the more low level bindings to the different components, and thenNativeScript-Angularfor 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 commentedon May 1, 2015
ch-weiss commentedon May 1, 2015
I also support the idea of seperation and keeping this out of the core.
valentinstoychev commentedon 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 commentedon 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 commentedon 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 commentedon May 2, 2015
Sibling10 commentedon May 4, 2015
"... a module that will make the integration between Angular and NativeScript natural.." is perfect!
[-]Angular 2.0 as an application framework for NativeScript apps[/-][+]Angular 2.0 support for NativeScript apps[/+]SynerG commentedon 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
34 remaining items
afortaleza commentedon Oct 21, 2015
Is it wise to start a new project to go in production in 3 months with Angular 2 and {N}?
valentinstoychev commentedon 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 commentedon Oct 21, 2015
@valentinstoychev , I'll follow your advice, thank you very much :)
alexrainman commentedon 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 commentedon 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 commentedon 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 commentedon Nov 26, 2015
Use the https://github.com/NativeScript/nativescript-angular repo for further feedback on the integration.
Merge pull request #103 from NativeScript/image-and-corners
lock commentedon Aug 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.