Server

DENO(Not available Temporarily)

TypeScript(Not available Temporarily)

Standards & Others

  • open id & oAUTH standards for API (API authentication & authorization like JWT)
  • REST API Design
  • /api/method/docs -> should return docs url (Swagger : auto API documentation)
  • API testing + Perf & load testing
  • maintain api pattern (less learning curve for front end integration)
  • Encrypt/ Decrypt API data + query params (initial runtime pub-private key handshake)
  • API versioning : "Content-Type: application/vnd.myname.v2+json" (for breaking changes) (optional)
  • https://openapis.org/, https://jsonapi.org/

API Docs

Third party libs/ tools used

Schema

  • till graphQL implementation, expose mongoDB crud operations by JSON schema style.

    getData(projectSchema, filterSchema)

//projection schema
{
type: "object",
properties: {
tenderId: {
title:'TenderNumber' //as alias name
},
tenderNotificationNumber: {
default : 'NA'
},
submissionDate: {
type: "string",
format: "DD/MM/YYYY"
},
tenderStatus: {
},
EMDDetails: {
type: "object",
properties: {
Amount: {
},
FeeType: {
}
}
},
tenderDocuments: {
type: "array",
items: {
type: "object",
properties: {
fileName: {
},
fileExtension: {
}
}
}
}
}
}

Note : filterSchema is typical validation schema, check for dependent validation standards
Follow graphQL & Prisma

Tools/ libs

  • nexe : create a single executable out of your node.js apps
  • pandora //check other node telemetry app
  • Node red (IOT)

OLD comparison

NODEJS

Currently used version: 12.X (12.15.0)

Pros & Cons

TypeNameWHY
Existence11 yearsBut foundation on top of chrome V8 & unix libuv & other c++ tools
Librarieshuge package system (npm)single large repo
StabilityCommunity LTS vs Currentuse LTS stable tested by community
IDEMature IDEVS Code, Atom, Brackets..
Multi threading
High parallelism but for threading change core libuvMicrosoft NapaJS working in it
CommunityOpenJS Foundation (March 12, 2019)NodeJS +Js foundation merger leaded by Google, IBM, Microsoft announcement
Antares perspectiveMobility & Trained freshers knows Modern JSunifies engineering specialties into one team (cross functional)
Code MaintainabilitySimilar Class, dependency injection & other standards
More Threadsuses event loopso scalable & doesn't lock up resources. (Also PM2-auto restart)
Configuring tools
Initial time consuming
Code SharingShared code across Javascript stackclient, server, database, automationTesting
IO & realtimeHandling IO, data streaming, real time programming (socket.io)faster as non blocking model
Micro Servicesupports micro service architecture, IOT devices

libaries

TypeNameWHY
LanguageESNextModern javascript
Frameworkkoa.jsminimal - only REST pipeline (from express people)
REST APIinbuilt in framework
JSON APIinbuilt in NodeJs
Mongo driver(1),ODM(2)Node Mongo(1), Mongoose*(2)official core(1), type safety(2)
ORMsequalize*popular
Toolssame as client sidepackage manager, Transpiler, Bundler, Version control
Unit testingsame as client side
Build managementsame as client side
WebServer-standalone http module
API QueryGraph QL*reduces no of APIs

Note : * denotes to be explored

JAVA

Pros & Cons

TypeNameWHY
Existence20+ yearsrock-solid foundation

LibrariesA vast ecosystem
Stabilitystable JVMlarge number of unit tests
IDEMature IDEEclipse, Netbeans, IntelliJ..
Multi threadingcomputation efficiencyDefault support for multithreading; handles CPU intensive tasks
Communitylarge dev community

Antares perspectiveTechnical team Knows Javaits tried & tested with major projects (TW)
Code MaintainabilityGreat code maintainability
More ThreadsIf more threads creation/ misuseif it deadlocks, risk is that the entire server locks up;
Configuring tools
Initial time consuming
Code Sharing
Moving business logic to front endrewrite that code in JavaScript
IO & realtime
By default blocking model but can use async
Micro Servicesupports micro service architecture, IOT devices

libaries

TypeNameWHY
LanguageJava 8+Modern java
Framework

SPRING/BLADEframeworks section
REST APIJERSEY
JSON APIGSON,JACKSON
MongoDB

MJORM, Morphia, MongoJack*MongoJack(direct mapping from JSON to MongoDB objects)
ORMHIBERNATE/ IBATIS
Tools

GIT (Version control)
Unit testingJUnit, Mockito/JMock*
Build managementMaven*
WebServerTomcat/ Jetty/ TC*

Note : * denotes to be explored

Frameworks Comparisons

SPRING 5 (MVC,REST & BOOT)

(WHY)

  • Trusted framework, has very large user community
  • Web (spring-mvc)
  • Security: Oauth, Single Sign On, CAS, Social Sign On, Open ID (spring-security, spring-oauth, spring-social)
  • Batch processing (spring-batch)
  • Scheduling
  • Support traditional database RDBMS as well as new NoSQL
  • Supports development of microservices

Cons:

  • Steep learning curve
  • Versions keep updating so developers have to keep themselves updated with the latest change.
  • Although dependency injection is one of its strengths, it makes the project dependent on Spring framework
BLADE

(WHY)

  • Simple, small (smaller than 500KB) and clear coding structure
  • Multiple components to choose from
  • Multiple configuration files support
  • CSRF (Cross-Site Request Forgery) and XSS (Cross-site scripting) defense support
  • Embedded jetty server and template engine support

Cons:

  • Relatively new framework, small user community