BY Simmi Kava26 Aug 2021 Edit
JavaScript/TypeScript Development Guidelines

Coding Guidelines


  • Use module pattern whenever possible. But do you know the reason why? Let me explain it to you.

    -- Modules are executed within their own scope and not in global scope.

    -- Code reusability.

    -- Encapsulation

    -- Load on demand

    -- Easier testing

  • Avoid using namespace if modules is a possibility. Why? As you might end up importing the whole standard namespace into your program which may not be required.

  • Organize single class into a single file.

  • Import only required module and retain naming convention.

  • Use default export for 1 major class and named export for less frequent or related classes

  • Refrain from using underscore (_) anywhere, not in field name or get/set. Why? As such a naming convention indicates a name is meant for internal use. TSLint doesn't respect the underscore pattern naming convention.

  • Do not create async if only last return statement has await. Do not omit async/await when catching exceptions.

Will share another article on async tips soon! Till then happy learning.

BY Simmi Kava
LikeCommentSave
LikeCommentSaveShare
0
Categories
General
YantraJS
Developer Guides
Tutorials
Web Atoms Updates

POPULAR POSTS
17 Mar 2021
LATEST ACTIVITY
Simmi Kava
commented this post.
Simmi Kava
liked this post.
Show more
ARCHIVES
2024
2023
2022
2021
TAGS
javascript (56)
developer (25)
javascriptdeveloper (16)
Xamarin.Forms (16)
Html (14)
typescript (12)
webatoms (12)
xamarin (11)
coding (10)
web-atoms (10)
arrays (9)
android (8)
javascript-developer (8)
csharp (7)
dotnet (7)
css (6)
update (6)
dotnet-standard (5)
function (5)
iOS (5)
methods (4)




Web Atoms: JSX (TSX + TypeScript) for Xamarin.Forms, Hot Reload Your App in Production Environment

PlaygroundSamples Repository