Java, Node.js, and Swift are three of the most popular and effective programming languages in use today. When presented with an opportunity to choose, it may not be clear which language is best suited for the job. This session will provide a tour of these languages and the use cases for which each is best suited.
A healthy diet for your Java application Devoxx France.pdf
InterConnect: Java, Node.js and Swift - Which, Why and When
1. InterConnect
2017
5118:
Java, Node.js and Swift:
Which, When and Why
Chris Bailey
STSM, Technical Architect
Java, Node.js and Swift
Gary Cernosek,
Offering Manager
Application Runtimes & Frameworks
1 1/17/17
20. 20
Type Safe Type Safe, with InferenceDynamically Typed
Scripting Language Modern Native LanguageRuntime Language
21. 21
Type Safe Type Safe, with InferenceDynamically Typed
Scripting Language Modern Native LanguageRuntime Language
Bytecode and JIT Compiled JIT Compiled Pre-Compiled
22. 22
Type Safe Type Safe, with InferenceDynamically Typed
Garbage Collected
Scripting Language Modern Native LanguageRuntime Language
Garbage Collected Reference Counted
Bytecode and JIT Compiled JIT Compiled Pre-Compiled
23. 23
Type Safe Type Safe, with InferenceDynamically Typed
Concurrent Threaded
Garbage Collected
Scripting Language Modern Native LanguageRuntime Language
Garbage Collected Reference Counted
Single Thread Concurrent Work Pool
Bytecode and JIT Compiled JIT Compiled Pre-Compiled
24. 24
Type Safe Type Safe, with InferenceDynamically Typed
Concurrent Threaded
Garbage Collected
Scripting Language Modern Native LanguageRuntime Language
Garbage Collected Reference Counted
Single Thread Concurrent Work Pool
Bytecode and JIT Compiled JIT Compiled Pre-Compiled
All Platforms All Platforms Apple Platforms and Linux
26. Swift @ IBM
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
Swift Node.js
27. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
Swift Node.js
28. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
Swift Node.js
29. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
Swift Node.js
30. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = 5
let b = 3
Swift Node.js
31. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = 5
let b = 3
add(a, to: b)
Swift Node.js
32. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = 5
let b = 3
add(a, to: b)
> swiftc main.swift
Swift Node.js
33. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = 5
let b = 3
add(a, to: b)
> swiftc main.swift
> main
Swift Node.js
34. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = 5;
var b = 3;
add(a, b);
> node app.js
8
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = 5
let b = 3
add(a, to: b)
> swiftc main.swift
> main
8
Swift Node.js
35. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = '5';
var b = 3;
add(a, b);
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = ”5”
let b = 3
add(a, to: b)
Swift Node.js
36. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = '5';
var b = 3;
add(a, b);
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = ”5”
let b = 3
add(a, to: b)
> swiftc main.swift
Swift Node.js
37. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = '5';
var b = 3;
add(a, b);
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = ”5”
let b = 3
add(a, to: b)
> swiftc main.swift
> Error line 6: Cannot convert value of
type ‘String’ into argument of type ‘Int’
Swift Node.js
38. Swift @ IBM
var add = function (a, b) {
console.log(a + b);
}
var a = '5';
var b = 3;
add(a, b);
> node app.js
> 53
func add(_ a: Int, to b: Int) -> Void {
print(a + b)
}
let a = ”5”
let b = 3
add(a, to: b)
> swiftc main.swift
> Error line 6: Cannot convert value of
type ‘String’ into argument of type ‘Int’
Swift Node.js
56. Check type of
A
StringConcatenate Check type of
B
String NumberNumber
Convert Number
to String
Concatenate
var add = function (a, b) {
return(a + b);
}
57. Check type of
A
StringConcatenate Check type of
B
Check type of
B
String NumberNumber
Convert Number
to String
Concatenate
var add = function (a, b) {
return(a + b);
}
58. Check type of
A
StringConcatenate Check type of
B
Check type of
B
StringString NumberNumber
Convert Number
to String
Concatenate
Convert Number
to String
var add = function (a, b) {
return(a + b);
}
59. Check type of
A
StringConcatenate Check type of
B
Check type of
B
StringString NumberNumber
Convert Number
to String
Concatenate
Convert Number
to String
Concatenate
var add = function (a, b) {
return(a + b);
}
60. Convert Number
to String
Check type of
A
StringConcatenate Check type of
B
Check type of
B
StringString NumberNumber
Convert Number
to String
Concatenate
Concatenate
Number
var add = function (a, b) {
return(a + b);
}
61. Check type of
A
StringConcatenate
Floating
Point or
Normal
Check type of
B
Check type of
B
StringString NumberNumber
Convert Number
to String
Concatenate
Concatenate
Number
Convert Number
to String
var add = function (a, b) {
return(a + b);
}
62. Check type of
A
StringConcatenate
Floating
Point or
Normal
Float Calculation
Check type of
B
Check type of
B
StringString
Float
NumberNumber
Convert Number
to String
Concatenate
Concatenate
Number
Convert Number
to String
var add = function (a, b) {
return(a + b);
}
63. Check type of
A
StringConcatenate
Floating
Point or
Normal
Normal Add InstructionFloat Calculation
Check type of
B
Check type of
B
StringString
Float
NumberNumber
Convert Number
to String
Concatenate
Concatenate
Number
Convert Number
to String
var add = function (a, b) {
return(a + b);
}
84. Memory
Live in-use data
(Retained Set)
Heap Size
Temporary Data
(Garbage)
Temporary Data
(Garbage)
40 to 70%
~2X additional memory for additional performance
95. 95
Unless it is absolutely necessary to run Java in web browsers,
disable it as described below, even after updating to 7u11. This will
help mitigate other Java vulnerabilities that may be discovered in
the future.
This and previous Java vulnerabilities have been widely targeted
by attackers, and new Java vulnerabilities are likely to be
discovered. To defend against this and future Java
vulnerabilities, consider disabling Java in web browsers…
96. 96
Unless it is absolutely necessary to run Java in web browsers,
disable it as described below, even after updating to 7u11. This will
help mitigate other Java vulnerabilities that may be discovered in
the future.
This and previous Java vulnerabilities have been widely targeted
by attackers, and new Java vulnerabilities are likely to be
discovered. To defend against this and future Java
vulnerabilities, consider disabling Java in web browsers…
99. 99
•Reuse of code components
•Write One Run Anywhere
•Sharing of data models
•Less maintenance
•Server-side rendering
•Pre-Initialise UI on the server
•Improves first paint time
•Enables search indexing
113. 113
High Processing Performance High IO Performance
Transaction Processing Frameworks
Node.js SwiftJava
Fullstack Web Development
Type Safety for Calculations Async Programming for Scale
Business Logic
Performance Critical
Batch Processing
114. 114
High Processing Performance High IO Performance
Transaction Processing Frameworks
Node.js SwiftJava
Fullstack Web Development
Type Safety for Calculations Async Programming for Scale
Business Logic
Performance Critical
Batch Processing
Delivery Tier
Enterprise Modernisation
115. 115
High Processing Performance High IO Performance
Transaction Processing Frameworks
Node.js SwiftJava
Fullstack Web Development
Type Safety for Calculations Async Programming for Scale
?
Business Logic
Performance Critical
Batch Processing
Delivery Tier
Enterprise Modernisation
126. 126 1/17/17
GATEWAY
PUBLIC NETWORK CLOUD NETWORK
Client Devices Hosted ServicesDelivery Tier
ROUTING PROXY
Micro-Services
API Team
Web Team
Android Team
iOS Team
127. 127
Server Side Rendering
First Paint Time
Search Engine Optimisation
Network Payload Size
CPU Usage
Request Frequency
Battery Usage
Memory Usage
131. 131 1/17/17
GATEWAY
PUBLIC NETWORK CLOUD NETWORK
Client Devices Hosted ServicesDelivery Tier
ROUTING PROXY
Micro-Services
API Team
Web Team
Android Team
iOS Team
136. 136
Project
Generation Infra
Local
Plugin
BluemixCLI
Bluemix Dashboard
1. Starts with…
Bluemix
Codes …
Check in to…
App
DevOps
Open Toolchains
Github
Kicks off…
Builds & Deploys…
Project
Plugin
Developer
Calls …
Generates …
Source Code
IDE
Orion, VSCode, Atom,
Xcode…
Autoscale Logmet BAM
Integrates
with …
Provisions …
Local Container
Local container generation
and management
Local build and debug
Project scaffolding
SDK gen
Service provisioning
API Model generation
Swagger generation
142. Bluemix Mobile & Omni-Channel!
BMO-6321: Patterns in Omni-Channel
Cloud Application Development
Containers & Microservices!
BMC-2173: Introduction to Docker
Containers and Microservices
Visit the DevZone in the Concourse for open
Hello World labs and Ask Me Anything booths!
Wednesday, 11:15 AM - 12:00 PM | South Pacific C | Session ID: 6321A
Tuesday, 4:45 PM - 5:30 PM | South Pacific A | Session ID: 2173A
Tuesday, 11:00 AM - 12:45 PM | DevZone Ask Me Anything # 2 | Session ID: 7087A
Ask Me Anything: Bluemix Cloud-Native Development
Ask Me Anything: Server-Side Swift Development
Wednesday, 2:30 PM - 5:00 PM | DevZone Ask Me Anything # 6 | Session ID: 7088A
Node.js & LoopBack
BAP-1117: Introduction to LoopBack
Node.js Framework
Liberty & Microservices
BAP - 5081: Microservices with IBM WebSphere Liberty:
What, Why and When?
Wednesday, 11:15 AM - 12:00 PM | Islander F | Session ID: 1117A
Tuesday, 7:00 PM - 7:20 PM | Engagement Theater Booth #319 | Session ID: 5081A
144. 144 1/17/17
Please note
IBM’s statements regarding its plans, directions, and intent
are subject to change or withdrawal without notice at IBM’s
sole discretion.
Information regarding potential future products is intended to
outline our general product direction and it should not be relied
on in making a purchasing decision.
The information mentioned regarding potential future products
is not a commitment, promise, or legal obligation to deliver
any material, code or functionality. Information about potential
future products may not be incorporated into any contract.
The development, release, and timing of any future features
or functionality described for our products remains at our sole
discretion.
Performance is based on measurements and projections
using standard IBM benchmarks in a controlled environment.
The actual throughput or performance that any user will
experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in
the user’s job stream, the I/O configuration, the storage
configuration, and the workload processed. Therefore, no
assurance can be given that an individual user will achieve
results similar to those stated here.
146. 146 1/17/17
Notices and disclaimers
continued
Information concerning non-IBM products was obtained from the suppliers
of those products, their published announcements or other publicly
available sources. IBM has not tested those products in connection with
this publication and cannot confirm the accuracy of performance,
compatibility or any other claims related to non-IBM products. Questions
on the capabilities of non-IBM products should be addressed to the
suppliers of those products. IBM does not warrant the quality of any third-
party products, or the ability of any such third-party products to
interoperate with IBM’s products. IBM expressly disclaims all
warranties, expressed or implied, including but not limited to, the
implied warranties of merchantability and fitness for a particular,
purpose.
The provision of the information contained herein is not intended to, and
does not, grant any right or license under any IBM patents, copyrights,
trademarks or other intellectual property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS,
Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document
Management System™, FASP®, FileNet®, Global Business Services®,
Global Technology Services®, IBM ExperienceOne™, IBM SmartCloud®,
IBM Social Business®, Information on Demand, ILOG, Maximo®,
MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower,
PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®,
PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®,
PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®,
SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli® Trusteer®,
Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and
System z® Z/OS, are trademarks of International Business Machines
Corporation, registered in many jurisdictions worldwide. Other product
and service names might be trademarks of IBM or other companies. A
current list of IBM trademarks is available on the Web at "Copyright and
trademark information" at: www.ibm.com/legal/copytrade.shtml.