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
- swagger-koa
- swagger2-koa
- write in MD (let docusaurus convert it)
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
Type | Name | WHY |
---|---|---|
Existence | 11 years | But foundation on top of chrome V8 & unix libuv & other c++ tools |
Libraries | huge package system (npm) | single large repo |
Stability | Community LTS vs Current | use LTS stable tested by community |
IDE | Mature IDE | VS Code, Atom, Brackets.. |
Multi threading | High parallelism but for threading change core libuv | Microsoft NapaJS working in it |
Community | OpenJS Foundation (March 12, 2019) | NodeJS +Js foundation merger leaded by Google, IBM, Microsoft announcement |
Antares perspective | Mobility & Trained freshers knows Modern JS | unifies engineering specialties into one team (cross functional) |
Code Maintainability | Similar Class, dependency injection & other standards | |
More Threads | uses event loop | so scalable & doesn't lock up resources. (Also PM2-auto restart) |
Configuring tools | Initial time consuming | |
Code Sharing | Shared code across Javascript stack | client, server, database, automationTesting |
IO & realtime | Handling IO, data streaming, real time programming (socket.io) | faster as non blocking model |
Micro Service | supports micro service architecture, IOT devices |
libaries
Type | Name | WHY |
---|---|---|
Language | ESNext | Modern javascript |
Framework | koa.js | minimal - only REST pipeline (from express people) |
REST API | inbuilt in framework | |
JSON API | inbuilt in NodeJs | |
Mongo driver(1),ODM(2) | Node Mongo(1), Mongoose*(2) | official core(1), type safety(2) |
ORM | sequalize* | popular |
Tools | same as client side | package manager, Transpiler, Bundler, Version control |
Unit testing | same as client side | |
Build management | same as client side | |
WebServer | - | standalone http module |
API Query | Graph QL* | reduces no of APIs |
Note : * denotes to be explored
JAVA
Pros & Cons
Type | Name | WHY |
---|---|---|
Existence | 20+ years | rock-solid foundation |
Libraries | A vast ecosystem | |
Stability | stable JVM | large number of unit tests |
IDE | Mature IDE | Eclipse, Netbeans, IntelliJ.. |
Multi threading | computation efficiency | Default support for multithreading; handles CPU intensive tasks |
Community | large dev community | |
Antares perspective | Technical team Knows Java | its tried & tested with major projects (TW) |
Code Maintainability | Great code maintainability | |
More Threads | If more threads creation/ misuse | if it deadlocks, risk is that the entire server locks up; |
Configuring tools | Initial time consuming | |
Code Sharing | Moving business logic to front end | rewrite that code in JavaScript |
IO & realtime | By default blocking model but can use async | |
Micro Service | supports micro service architecture, IOT devices |
libaries
Type | Name | WHY |
---|---|---|
Language | Java 8+ | Modern java |
Framework | SPRING/BLADE | frameworks section |
REST API | JERSEY | |
JSON API | GSON,JACKSON | |
MongoDB | MJORM, Morphia, MongoJack* | MongoJack(direct mapping from JSON to MongoDB objects) |
ORM | HIBERNATE/ IBATIS | |
Tools | GIT (Version control) | |
Unit testing | JUnit, Mockito/JMock* | |
Build management | Maven* | |
WebServer | Tomcat/ 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