For Native, you can use languages like C#, VB, C++ for building Universal Apps and Games. But, you can also use JavaScript for building Universal Apps so that the audience of this article will know all about WinJS library which is used for UWP JS apps.
WinJS is a framework that has many libraries within that lets you do everything a native app can do. But as you well know, real life is sometimes different than building apps as a hobbyist: There are rules, coding standards, and code reviews.
The point of writing article is to get you used to OOP in WinJS.
I am planning on a 6-series article:
- OOP in WinJS #1 : Namespaces
- OOP in WinJS #2 : Nested Namespaces
- OOP in WinJS #3 : Classes
- OOP in WinJS #4 : Inheritance
- OOP in WinJS #5 : Encapsulation
- OOP in WinJS #6 : Asynchronous Programming
Namespaces
Namespaces are blocks of code grouped together for easy readability primarily very useful for code reviewers and developers.
We'll be using Universal Apps, but you can also use same knowledge in Windows or Windows Phone specific projects that use WinJS library.
Let us start with creating our WinJS application!
Building Application
Run your Visual Studio 2015 (I use Community Edition here).
Click New Project, JavaScript, Windows, then click Universal.

The project will be created and default.js file opened up, but I have a better idea. Why don't we create a new JavaScript file?
Click on your js folder and Add new Item. Name it as you like (for instance, I named it "app.js").

We're going to define several namespaces to do specific jobs. Generally, these namespaces will only write some output.
- // Namespaces
- WinJS.Namespace.define("SensorJob");
- WinJS.Namespace.define("ShareJob");
- WinJS.Namespace.define("ServiceJob");
- WinJS.Namespace.define("UIJob");


Kumaresh RajalingamPosted Mar 23, 2016, 9:13 PM
Nice one
Debasis SahaPosted Mar 23, 2016, 1:25 PM
Nice one..
Humayun Kabir MamunPosted Mar 23, 2016, 2:55 AM
Nice...
Vignesh ManiPosted Mar 22, 2016, 9:12 AM
good
Joginder BangerPosted Mar 22, 2016, 4:43 AM
good job sir
Sibeesh VenuPosted Mar 22, 2016, 4:42 AM
Nice Share
Mohammed IbrahimPosted Mar 22, 2016, 4:25 AM
nice