[Thoughts, Review and questions][Typescript,Plain JavaScript & Code Samples] NativeScript Needs to work on these


#1

The NativeScript Team rocks and really amazing @jen.looper @dan.wilson @Pete.K and the NativeScript is an amazing framework. But something should be done about the following if possible or as soon as possible.

TypeScript & Plain JavaScript
First its clearly indicated here https://www.nativescript.org/using-typescript-with-nativescript-when-developing-mobile-apps that “TypeScript is a first-class citizen in NativeScript.” which means developing NativeScript apps in TypeScript is a much better, appropriate and preferred option.

  1. Yet the http://docs.nativescript.org clear dose not create the impression. Why am saying that?
    Ok, on the site we have “Getting started with Javascript” and “Get Started with TypeScript & Angular”. where is the “Get Started with TypeScript” unless you are telling me that “Get Started with TypeScript” is the same as “Get Started with TypeScript & Angular” which I dont think so. Even the Tutorial on the site is Plain old Javscript and Angular.

2.If truly “TypeScript is a first-class citizen in NativeScript.” then why is that all the Code Samples which is really cool and helps a lot to kick start a project is all In Angular with reference to http://docs.nativescript.org/angular/code-samples/overview. Not even a single Plain old JavaScript or TypeScript Sample in that sample codes.
Or am I missing something here.

During the holidays I quite remember exchanging a couple of emails with @dan.wilson on this matter and he assured me of a few samples this year. I am not ignorant of the fact that the Team is doing a lot and that some of these are also community driven but this clearly also gives me an impression and feels like NativeScript was made with Angular as a first-class citizen and not Typescript.

I am an angular developer but when it comes to NativeScript I Prefer using it as is. This is a border to me and becoming quite an issue for as to the future of NativeScript not defaulting to Angular…I am the Lead Mobile app Developer in my company and have successfully geared my company and team into fully adopting NativeScript…As I speak we have already produce 3 commercial apps for two Clients and two are already in the PlayStore being used…So you can understand my concerns my team develops in Plain old JavaScript for all these apps and I have already initiated a complete move to Typescript…and would migrating all apps soon…

Please Kindly update me on these concerns…if am missing something here or am not looking hard enough?


#2

Your observations are mostly correct – there really are two distinct NativeScript camps; with some cross over between the two. You have people like me who prefer it PAN (Plain Awesome NativeScript) who uses JavaScript ES6 and don’t want to use TypeScript or a transpiler because I don’t find that time/speed hit for using one makes any sense. And imho there is very little that TypeScript offers me over ES6, to make it worth it to me to take that large of a hit.

Then you have the NAN (NativeScript ANgular) group who uses Angular (which basically requires TypeScript). These are the two major groups.

The docs really focus on these two groups as they go about developing apps completely differently. Most the stuff in the PAN side is useless in NAN, and vise-versa. There is some cross over; but the docs need to cover someone coming into NativeScript wanting to use one of these two major directions.

Anyone who does work in TypeScript should already be familiar with how to use it. If you aren’t used to using TypeScript than I would think they should do the great TypeScript tutorials on TypeScript’s web site as that will get them up to speed on how to use TypeScript.

So, I’m not sure what NativeScript can provide to help you since following the JS tutorial using TS will work perfectly fine. TypeScript is a first class citizen, you have full NS typings in both NAN & PAN, so you can easily start using TS today in your project. The TNS command line is 100% aware of TS and will automatically transpile it and track changes in the files to do livesync’ing.

Using PAN w/ TS is identical as doing a PAN w/ JS project, other than the file is named .TS rather than .JS. :wink:

Nathanael A.


#3

@NathanaelA first I would like to say thank you for making and taking the time to write such a wonderful response.
Like you I also prefer PAN (Plain Awesome NativeScript). I thought TypeScript sort of helped in making code base easily maintainable. But main concern has usual been the amount of resource made available for using TypeScript or JavaScript citing reference to the even the code samples which I felt was a really cool thing have and I think its only nice and good if that was not one sided which currently is (because they are all for NAN) and not even a single sample code for the other camp. So i was hoping NativeScript could have provided some of these things for both camps, which balances the docs much better.

And I love your work on your site. I follow and read a lot of your text on NativeScript.:wink: cheers


#4

@michaelsowah I have same feelings as you do, the official website/developer events give me an impression that the recommended way of using nativescript is , integration with angular ! My self is a fan of vanilla JavaScript(preferably ES 6 features) with nativescript, no experience on typescript or angular at all , but typescript is acceptable for me, found no big trouble for my little experiments . Though I understand this on-going closer integration with angular , from the perspective of marketing strategy, I hope this strategy will bring more success to nativescriptscript, and eventually benefit PAN users like me , for instance , I would love to see more plugins, larger user community~
P.S. I love nativescript, wonderful project


#5

@jen.looper I was really looking forward to some response or reaction from one of the core team members from the Nativescript team or from Telerik or from someone who can really give some thing about this, since at the moment it doesn’t look like am the only one with such impressions and observations…helllooo…I know you guys are working hard but any one home…


#6

We read all of your posts and responses every single day.

Look forward to an official statement very soon!


#7

I’m reaching out to Dan @dan.wilson in case we can provide a vision statement here


#8

Thank You. Look forward to it. @Pete.K


#9

Great, I look forward to that, the way forward and how we can all make more great @jen.looper


#10

@Pete.K and @jen.looper still patiently waiting for that official statement and response. Thanks


#11

I can add the comments from Dan Wilson, NativeScript’s PMK here:

"Glad you have adopted NativeScript. It’s interesting you are interested in the JavaScript side of it. In fact, 54% of our users prefer using the non-angular versions of NativeScript. It’s where we started our technology and will continue to keep up that line of the product as well.

I know you are seeing some of the samples pages in Angular. Part of this is because we (like most projects) have limited resources and can only do so much. It turns out the team that was available to work on this documentation feature first, had Angular experience. No worries, the samples are scheduled to be as filled out on the JavaScript side soon. The team does take pull requests on the documentation, so if you want to make your own updates, please commit them back to the project and you’ll get credit for them."