AngularJS Core vs. Angular JS Nuget packages? - javascript

This should be a stupid question, but I can't for the life of me find any explanation of this.
In Nuget there are two packages that looks like the main-packages: AngularJS Core and Angular JS. The former have The AngularJS Team as authors, just like the rest of the other angular modules, and ~200k downloads. The later have different authors Fitzchak Yizcaki, Dov Landau not seen anywhere else, and the id of the package is not in the same format as the other packages but this has ~350k downloads.
Now, by looking at the dependencies on the other packages, we see that they refer to AngularJS.Core so we now that this is what we want. I assume.
But what is the other package, and why does is almost have twice the downloads?

It turns out that Angular JS package is the original main package, and that all these other modules including AngularJS Core are the result of an initiative to partition the angular framework.
Darn confusing start when one is about to get his hands dirty, some explanation about this in the description of the packages would be nice.

Late to the party here, but I'm sure this will benefit someone in the future:

Related

Should a svelte package be a dependency or a devDependency?

I know that there are already a lot of posts concerning the distinction between dependency and devDependency but I didn't find any that explain it for the case of svelte so lets open this one here.
In most of the svelte package like svelte-material-ui or svelte-routing, the installation guide tell to install the package as a dependency. However since svelte will compile this package during the build time, the new library that will use it doesn't need to install this svelte package. So I don't see why it has to be a dependency.
Maybe this question is opinion based but would be nice to have at least a small idea of what to use.
I believe this is personal opinion. If you're not distributing your code as an NPM package, the distinction should be minimal. See, for example, this related discussion.
In my experience with web projects, it's helpful to distinguish between dependencies that are used for building/testing (devDependencies) vs. those that are "used at runtime" (dependencies). You're right that, with Svelte, none of the literal code is used at runtime, but then everything would be a devDependency, so you don't get a useful separation.
The NPM documentation says that the distinction should be production vs. development/testing.
In SvelteKit (the next version of Sapper) there is one major difference between dependency and devDependency: any module used in a (server-side) endpoint must be a dependency. If not, the project may not work when deployed on a serverless platform, although it will work locally.
Otherwise, I prefer to keep everything as a devDependency. I think it makes sense because Svelte is a compiler, and the packages are only needed at compile-time. However, I don't think it would hurt to just put everything as a dependency.

How to structure a node cli application

I want to write a node cli application and im wondering how i should structure the application. Im fairly new to node and im a confused with all the design patterns used when building such a application.
I want to be able to call the application from the command line, but also use it as a node module for better testing.
Currently i have one file with lots of functions that get called directly from the cli, but i feel this is rather difficult to maintain.
Is there any good writing on how to do such things? i looked at rimraf but it confused me even more. Thanks for your time
I don't know if there is a "right" way to do it but I can tell you how I have dealt with a problem similar to yours. I wanted to create a CLI and a visual studio code plugin so people would be able to use the functionality both from VSC and from the CLI (for those that don't use VSC), so the approach I took was to put all the logic in its own package and then create two other packages that included the first one, one for CLI and one VSC plugin that required the "logic" package.
In the CLI package you would only have code strictly related to command handling and then the real meat happens in the logic package. In my case the VSC plugin package had very few lines of code, just configuration and the calls to the needed functions.
Then regarding the structure of the code some recommendations:
expose only what is strictly necessary
isolate your code in different files/classes based on common functionality (and go to point 1)
test your code
lint your code
But those are common sense and language independent recommendations.
There's no one "standard" way to structure Node.js apps, however you will notice that many authors follow similar patterns. Instead of having one file containing all code, it should be split out into modules, grouped by function. Have a look at this repo on Github, it has some very good suggestions about Node.js best practice https://github.com/i0natan/nodebestpractices#1-project-structure-practices.
A couple more pointers I would add: Ensure you're logging any errors, consider using something like Winston.js for this purpose. Also have some mechanism in place to restart the service if a critical error occurs, e.g. Forever.js.
Ensure likewise you're unit testing, there are some good test frameworks, Jasmine, Mocha, Cucumber.js.

Where is Angular-2-Release on https://code.angularjs.org?

I've heard that angular 2 has finally been released. I'm unfortunately not a fan of using npm and bower to automagically load my components. I like to keep my dependencies ultra-thin and understand them all. I also prefer to reference my frameworks from CDN's wherever possible.
When visiting https://code.angularjs.org/ I see right up to 2.0.0-beta.9 and no further. Where do I find the libs for 2.0.0-release online?
unpkg serves up packages from npm. You can access/download the latest relevant angular libs there. Here are some of them:
https://unpkg.com/#angular/core#2.0.2
https://unpkg.com/#angular/common#2.0.2

AngularJS: Dependency Management

We are currently planning a website which exists out of different AngularJS apps that will make use of common services. Services will be implemented in seperate files; to minimize the filesize of the apps we want to include/concatenate only those service-files that are used in the corresponding app - so we are looking for the best practise in dependency management.
is there something like requireJS in angular or what would you suggest to handle the includes?
thanks in advance .)
I suggest to use the same organization as ng-boilerplate:
https://github.com/joshdmiller/ng-boilerplate
I use an organization close to ng-boilerplat for one project and it allowed us to be modular in our dependency management.
For me, the only build/deployment system that works like a charm for most web apps that have extremely js computation is yeoman.
This quote should describe what it is/does:
Yeoman 1.0 is more than just a tool. It's a workflow; a collection of tools and best practices working in harmony to make developing for the web even better.
So basically, it is a npm that installs all the boilerplate files, dependencies and configures your whole app with the help of generators. It uses bower and gruntalso takes care of the hard part of configuring grunt that is in charge of building/deploying your app.
I highly recommend yeoman as a modern and efficient workflow.
I personally haven't looked at the ng-boilerplate as #Julio mentioned above, but you could easily manage to configure and use RequireJS with angular of you want to. I've done it and it works like a charm.

How to create a custom framework package for WinJS (WinRT)

The project templates for Visual Studio 2012 contain a reference package with javascript, localization files and styles.
What I am wondering is how to build a custom reference package with my code, locales and styles. There is absolutely no information about this on the web, I tried referring to MSDN, but it did not give me any clue as to how I can do this. Please share any useful information that you may have about this.
It turns out Microsoft do have documentation on Extension SDKs.
Update:
I actually managed to get the reference/framework package. It all works really well except when opening Expression Blend with my package referenced. Notice the reference is there and I can actually see all components and their description but I'm still getting an error in the design surface. Here is what the error looks like (I know, it's very descriptive):
Update:
When trying to deploy an app referencing the framework package I have created I being given an error saying that it cannot find my framework but instead finds some framework with trailing symbols that I did not put there while packaging it. It appends the processor architecture as well as the package family name trailing symbols. Here's a screenshot:
The item you are looking at is a "Framework Package". While it is possible for you to generate a package that looks like a framework package (look at the appxmanifest.xml for the WinJS package in \Program Files\WindowsApps), you cannot get that package ingested into the store.
This is something that is not supported in Win8 -- you'll need to include the files you need in each package you build.

Categories