SlideShare a Scribd company logo
1 of 38
Enterprise JavaScript…
what the heck?
Nedelcho Delchev [SAP]
2016-10-25
Who am I?
I am Development Architect in HANA
Cloud Platform Core team in the area
of extensions for large enterprises in
the cloud.
Project lead of Eclipse Dirigible – a Cloud
Development Platform project that provides full-
fledged capabilities for developing, running and
operating cloud applications –
http://www.dirigible.io
What the Enterprise JavaScript is?
• A JavaScript for Enterprises?
• A script for Java-focused Enterprises?
• Enterprise ready JavaScript?
The Problem
We wanted
The Perfect
Development Platform
We wanted it …
• … to be instantly accessible
• … to give the shortest development turn-around
time
• … to provide all the needed features
• … to fully cover the DevOps cycles
• … to be highly adaptable and flexible
• … to be turbo- mega- super- scalable
• … must be Open Source
• … to be beloved by the developers
The Solution
Instantly accessible
• http://trial.dirigible.io
• You can deploy on any Cloud
• Complex landscapes can be easily organized
The shortest development turn-
around time
• Leveraging the In-System Programming
paradigm
• Avoid the side-effects of the sandbox systems
Providing all the features you may
need
• Database modeling
• Scripting Services
• User Interfaces
• Flows and Jobs
• Mobile Apps
• Debugging
• Git Integration
• Project & Artifacts
Templates
• Shell Access via Terminal
• Log Console & Raw Logs
• Content Transport
• Security Management
• Access Management
• Browse the Content
• Discover Endpoints
• Monitoring Basic Metrics
• …
Beloved by the Developers
• RAD technics – wizards, modeling tools
• Multiple templates producing ready to use
RESTful services, CRUD User Interfaces, Mobile
Apps, etc.
• Configurable and customizable
• Extension Points and Extensions
• Injected Services – Built-in and Platform services
• Powerful source code editing by Orion …
You have to code – yeah!
What do you want to code today?
We Chose the Default
JavaScript
Hello World!
var response = require('net/http/response');
response.println("Hello World!");
response.flush();
response.close();
Hello World!
var response = require('net/http/response');
response.println("Hello World!");
response.flush();
response.close();
Hello World!
var response = require('net/http/response');
response.println("Hello World!");
response.flush();
response.close();
Hello World!
var response = require('net/http/response');
response.println("Hello World!");
response.flush();
response.close();
HTTP Request & Response
var request = require('net/http/request');
var response = require('net/http/response');
var parameter = request.getParameter("name");
response.println("[Parameter]: " + parameter);
response.flush();
response.close();
HTTP Upload
if (request.getMethod() === "POST") {
if (upload.isMultipartContent()) {
var files = upload.parseRequest();
files.forEach(function(file) {
response.println("[File Name] " +
file.name);
});
} else {
response.println("The request must be
'multipart'");
}
}
HTTP Client
var options = {
method: 'GET', // default
host: 'http://services.odata.org',
port: 80,
path: '/V4/Northwind/Northwind.svc/',
binary: false
};
var httpResponse = http.request(options);
response.println(httpResponse.statusMessage);
response.println(httpResponse.data);
More about HTTP
• Session
• Cookies
• Headers
• Attributes
• Roles
Is it all about HTTP only?
What about WebSockets?
var websocket = require("net/websocket");
…
var websocketSession = websocket.getSession();
…
websocketSession.sendText("Welcome!”);
‘Enterprise’ without SOAP?
var soap = require("net/soap");
...
var requestMessage = soap.createMessage();
var part = requestMessage.getPart();
var envelope = part.getEnvelope();
envelope.addNamespaceDeclaration("ws", "http://ws.cdyne.com/");
var body = envelope.getBody();
var resolveIPElement = body.addChildElement("ResolveIP", "ws");
...
var mimeHeaders = requestMessage.getMimeHeaders();
mimeHeaders.addHeader("SOAPAction", "http://ws.cdyne.com/ResolveIP");
...
var responseMessage = soap.call(requestMessage,
"http://ws.cdyne.com/ip2geo/ip2geo.asmx");
response.println("Response: " + responseMessage.getText());
Relational Databases?
var datasource = database.getDatasource();
var connection = datasource.getConnection();
try {
var statement = connection.prepareStatement("select * from ...");
...
var resultSet = statement.executeQuery();
while (resultSet.next()) {
response.println("[path]: " + resultSet.getString("..."));
}
resultSet.close();
statement.close();
} catch(e) {
…
} finally {
connection.close();
}
Files?
var files = require('io/files');
var response = require('net/http/response');
files.createFile(”sample.txt");
var file = files.get(”sample.txt");
response.println("[File Exists?]: " + file.exists());
response.println("[File Is File?]: " + file.isFile());
files.writeText("sample.txt", "Some content");
var content = files.readText(”sample.txt");
response.println("[File Content]: " + content);
Even Streams?!
…
var outputStream = streams.createByteArrayOutputStream();
streams.writeText(outputStream, "Some text content");
var bytes = outputStream.getBytes();
response.println("[Stream Content as Bytes]: " + bytes);
var inputStream = streams.createByteArrayInputStream(bytes);
var outputStreamCopy = streams.createByteArrayOutputStream();
streams.copy(inputStream, outputStreamCopy);
…
… and Threads?!
var threads = require('core/threads');
var response = require('net/http/response');
// Define a JavaScript function
function runnable() {
response.println("Hello World from a Thread!");
};
// Pass the JavaScript function to a thread
var worker = threads.create(runnable, "I am a thread");
response.println(worker.getName());
worker.start();
worker.join(); // to be able to print to the response
…
Services like Mail, Messaging,
Indexing?
var mail = require('service/mail');
var response = require('net/http/response');
var from = "dirigible@eclipse.org";
var to = "example@gmail.com";
var subject = "Subject";
var content = "Content";
mail.send(from, to, subject, content);
Internal Services
• Exec
• Generator
• Lifecycle
• Repository
• Workspaces
Does it look familiar?
…
var workspace = workspaces.getWorkspace();
var workspaceRoot = workspace.getRoot();
var project =
workspaceRoot.getProject(“project1");
project.create();
project.open();
var folder = project.getFolder(”folder1");
folder.create();
…
Plenty of Utilities
• Assert
• Config
• Context
• Console
• Env
• Globals
• Extensions
• Base64
• Digest
• Error
• Hex
• Uuid
• Xml
• Xss
Finally – the mission statement?
The ultimate goal of the “Enterprise JavaScript”
is to provide a set of a standard APIs, which can
be used by the business applications
developers.
Benefits - Completeness
• Rich, but still standardized APIs;
• Expose legacy components and frameworks
to the new environment;
Benefits - Portability
• No tight vendor lock-in to the currently
chosen underlying JavaScript platform;
• OS, platform and database agnostic;
• Developers can stick to native JavaScript
objects and primitives only in their source
code;
Benefits - Lifecycle
• The API itself is a standard Eclipse Dirigible
project, hence can have the same lifecycle
as the rest of the projects;
You already know…
• … what the Enterprise JavaScript really is.
• … how to continue to rely on your knowledge
& experience in Java frameworks and APIs.
• … that this effort is just the beginning and you
can join in the definition and implementation
work
• … the reference implementation in the Cloud
Development Platform project called Eclipse
Dirigible: http://www.dirigible.io
Thank You!
References
• http://api.dirigible.io
• http://samples.dirigible.io
• http://www.dirigible.io/blogs/2016/08/01/blo
gs_why_enterprise_js.html

More Related Content

What's hot

The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling RewriterJustin Edelson
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slideselliando dias
 
Groovy on Grails by Ziya Askerov
Groovy on Grails by Ziya AskerovGroovy on Grails by Ziya Askerov
Groovy on Grails by Ziya AskerovVuqar Suleymanov
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Librarieselliando dias
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsScala Italy
 
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)Chris Richardson
 
When Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźWhen Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźAEM HUB
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricksGarethHeyes
 
2011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 52011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 5Daniel Fisher
 
Writing usableap isinpractice
Writing usableap isinpracticeWriting usableap isinpractice
Writing usableap isinpracticeGiovanni Asproni
 
Modernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesModernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesiMasters
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshopAdam Culp
 
Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applicationsLuciano Colosio
 
Testing swagger contracts without contract based testing
Testing swagger contracts without contract based testingTesting swagger contracts without contract based testing
Testing swagger contracts without contract based testingАлексей Стягайло
 

What's hot (19)

The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Mastering the Sling Rewriter
Mastering the Sling RewriterMastering the Sling Rewriter
Mastering the Sling Rewriter
 
Clojurescript slides
Clojurescript slidesClojurescript slides
Clojurescript slides
 
Groovy on Grails by Ziya Askerov
Groovy on Grails by Ziya AskerovGroovy on Grails by Ziya Askerov
Groovy on Grails by Ziya Askerov
 
Polyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better AgilityPolyglot and Poly-paradigm Programming for Better Agility
Polyglot and Poly-paradigm Programming for Better Agility
 
Javascript Libraries
Javascript LibrariesJavascript Libraries
Javascript Libraries
 
Alberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.jsAlberto Paro - Hands on Scala.js
Alberto Paro - Hands on Scala.js
 
遇見 Ruby on Rails
遇見 Ruby on Rails遇見 Ruby on Rails
遇見 Ruby on Rails
 
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
NodeJS: the good parts? A skeptic’s view (oredev, oredev2013)
 
TDD with PhpSpec
TDD with PhpSpecTDD with PhpSpec
TDD with PhpSpec
 
When Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz NiedźwiedźWhen Sightly Meets Slice by Tomasz Niedźwiedź
When Sightly Meets Slice by Tomasz Niedźwiedź
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
 
2011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 52011 NetUG HH: ASP.NET MVC & HTML 5
2011 NetUG HH: ASP.NET MVC & HTML 5
 
Writing usableap isinpractice
Writing usableap isinpracticeWriting usableap isinpractice
Writing usableap isinpractice
 
Modernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul JonesModernizing Legacy Applications in PHP, por Paul Jones
Modernizing Legacy Applications in PHP, por Paul Jones
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
 
Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applications
 
Testing swagger contracts without contract based testing
Testing swagger contracts without contract based testingTesting swagger contracts without contract based testing
Testing swagger contracts without contract based testing
 
Selenium bootcamp slides
Selenium bootcamp slides   Selenium bootcamp slides
Selenium bootcamp slides
 

Similar to Enterprise JavaScript...what the heck

Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaKazuhiro Sera
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scalascalaconfjp
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScriptDan Phiffer
 
All a flutter about Flutter.io
All a flutter about Flutter.ioAll a flutter about Flutter.io
All a flutter about Flutter.ioSteven Cooper
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyDavid Padbury
 
Ran Mizrahi - Symfony2 meets Drupal8
Ran Mizrahi - Symfony2 meets Drupal8Ran Mizrahi - Symfony2 meets Drupal8
Ran Mizrahi - Symfony2 meets Drupal8Ran Mizrahi
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsRichard Lee
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsRan Mizrahi
 
Polyglot Adventures for the Modern Java Developer #javaone2017
Polyglot Adventures for the Modern Java Developer #javaone2017Polyglot Adventures for the Modern Java Developer #javaone2017
Polyglot Adventures for the Modern Java Developer #javaone2017Mario-Leander Reimer
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Codemotion
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.QAware GmbH
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Java - A broad introduction
Java - A broad introductionJava - A broad introduction
Java - A broad introductionBirol Efe
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksJuho Vepsäläinen
 
Everything-as-code – Polyglotte Entwicklung in der Praxis
Everything-as-code – Polyglotte Entwicklung in der PraxisEverything-as-code – Polyglotte Entwicklung in der Praxis
Everything-as-code – Polyglotte Entwicklung in der PraxisQAware GmbH
 

Similar to Enterprise JavaScript...what the heck (20)

Solid And Sustainable Development in Scala
Solid And Sustainable Development in ScalaSolid And Sustainable Development in Scala
Solid And Sustainable Development in Scala
 
Solid and Sustainable Development in Scala
Solid and Sustainable Development in ScalaSolid and Sustainable Development in Scala
Solid and Sustainable Development in Scala
 
Intro to JavaScript
Intro to JavaScriptIntro to JavaScript
Intro to JavaScript
 
About Clack
About ClackAbout Clack
About Clack
 
All a flutter about Flutter.io
All a flutter about Flutter.ioAll a flutter about Flutter.io
All a flutter about Flutter.io
 
HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
Ran Mizrahi - Symfony2 meets Drupal8
Ran Mizrahi - Symfony2 meets Drupal8Ran Mizrahi - Symfony2 meets Drupal8
Ran Mizrahi - Symfony2 meets Drupal8
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
 
Polyglot Adventures for the Modern Java Developer #javaone2017
Polyglot Adventures for the Modern Java Developer #javaone2017Polyglot Adventures for the Modern Java Developer #javaone2017
Polyglot Adventures for the Modern Java Developer #javaone2017
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
Alberto Maria Angelo Paro - Isomorphic programming in Scala and WebDevelopmen...
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.Everything-as-code - a polyglot journey.
Everything-as-code - a polyglot journey.
 
Avatar 2.0
Avatar 2.0Avatar 2.0
Avatar 2.0
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Java - A broad introduction
Java - A broad introductionJava - A broad introduction
Java - A broad introduction
 
Survive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and TricksSurvive JavaScript - Strategies and Tricks
Survive JavaScript - Strategies and Tricks
 
Everything-as-code – Polyglotte Entwicklung in der Praxis
Everything-as-code – Polyglotte Entwicklung in der PraxisEverything-as-code – Polyglotte Entwicklung in der Praxis
Everything-as-code – Polyglotte Entwicklung in der Praxis
 

Recently uploaded

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Enterprise JavaScript...what the heck

  • 1. Enterprise JavaScript… what the heck? Nedelcho Delchev [SAP] 2016-10-25
  • 2. Who am I? I am Development Architect in HANA Cloud Platform Core team in the area of extensions for large enterprises in the cloud. Project lead of Eclipse Dirigible – a Cloud Development Platform project that provides full- fledged capabilities for developing, running and operating cloud applications – http://www.dirigible.io
  • 3. What the Enterprise JavaScript is? • A JavaScript for Enterprises? • A script for Java-focused Enterprises? • Enterprise ready JavaScript?
  • 4. The Problem We wanted The Perfect Development Platform
  • 5. We wanted it … • … to be instantly accessible • … to give the shortest development turn-around time • … to provide all the needed features • … to fully cover the DevOps cycles • … to be highly adaptable and flexible • … to be turbo- mega- super- scalable • … must be Open Source • … to be beloved by the developers
  • 6.
  • 8. Instantly accessible • http://trial.dirigible.io • You can deploy on any Cloud • Complex landscapes can be easily organized
  • 9. The shortest development turn- around time • Leveraging the In-System Programming paradigm • Avoid the side-effects of the sandbox systems
  • 10. Providing all the features you may need • Database modeling • Scripting Services • User Interfaces • Flows and Jobs • Mobile Apps • Debugging • Git Integration • Project & Artifacts Templates • Shell Access via Terminal • Log Console & Raw Logs • Content Transport • Security Management • Access Management • Browse the Content • Discover Endpoints • Monitoring Basic Metrics • …
  • 11. Beloved by the Developers • RAD technics – wizards, modeling tools • Multiple templates producing ready to use RESTful services, CRUD User Interfaces, Mobile Apps, etc. • Configurable and customizable • Extension Points and Extensions • Injected Services – Built-in and Platform services • Powerful source code editing by Orion …
  • 12. You have to code – yeah! What do you want to code today?
  • 13. We Chose the Default JavaScript
  • 14. Hello World! var response = require('net/http/response'); response.println("Hello World!"); response.flush(); response.close();
  • 15. Hello World! var response = require('net/http/response'); response.println("Hello World!"); response.flush(); response.close();
  • 16. Hello World! var response = require('net/http/response'); response.println("Hello World!"); response.flush(); response.close();
  • 17. Hello World! var response = require('net/http/response'); response.println("Hello World!"); response.flush(); response.close();
  • 18. HTTP Request & Response var request = require('net/http/request'); var response = require('net/http/response'); var parameter = request.getParameter("name"); response.println("[Parameter]: " + parameter); response.flush(); response.close();
  • 19. HTTP Upload if (request.getMethod() === "POST") { if (upload.isMultipartContent()) { var files = upload.parseRequest(); files.forEach(function(file) { response.println("[File Name] " + file.name); }); } else { response.println("The request must be 'multipart'"); } }
  • 20. HTTP Client var options = { method: 'GET', // default host: 'http://services.odata.org', port: 80, path: '/V4/Northwind/Northwind.svc/', binary: false }; var httpResponse = http.request(options); response.println(httpResponse.statusMessage); response.println(httpResponse.data);
  • 21. More about HTTP • Session • Cookies • Headers • Attributes • Roles Is it all about HTTP only?
  • 22. What about WebSockets? var websocket = require("net/websocket"); … var websocketSession = websocket.getSession(); … websocketSession.sendText("Welcome!”);
  • 23. ‘Enterprise’ without SOAP? var soap = require("net/soap"); ... var requestMessage = soap.createMessage(); var part = requestMessage.getPart(); var envelope = part.getEnvelope(); envelope.addNamespaceDeclaration("ws", "http://ws.cdyne.com/"); var body = envelope.getBody(); var resolveIPElement = body.addChildElement("ResolveIP", "ws"); ... var mimeHeaders = requestMessage.getMimeHeaders(); mimeHeaders.addHeader("SOAPAction", "http://ws.cdyne.com/ResolveIP"); ... var responseMessage = soap.call(requestMessage, "http://ws.cdyne.com/ip2geo/ip2geo.asmx"); response.println("Response: " + responseMessage.getText());
  • 24. Relational Databases? var datasource = database.getDatasource(); var connection = datasource.getConnection(); try { var statement = connection.prepareStatement("select * from ..."); ... var resultSet = statement.executeQuery(); while (resultSet.next()) { response.println("[path]: " + resultSet.getString("...")); } resultSet.close(); statement.close(); } catch(e) { … } finally { connection.close(); }
  • 25. Files? var files = require('io/files'); var response = require('net/http/response'); files.createFile(”sample.txt"); var file = files.get(”sample.txt"); response.println("[File Exists?]: " + file.exists()); response.println("[File Is File?]: " + file.isFile()); files.writeText("sample.txt", "Some content"); var content = files.readText(”sample.txt"); response.println("[File Content]: " + content);
  • 26. Even Streams?! … var outputStream = streams.createByteArrayOutputStream(); streams.writeText(outputStream, "Some text content"); var bytes = outputStream.getBytes(); response.println("[Stream Content as Bytes]: " + bytes); var inputStream = streams.createByteArrayInputStream(bytes); var outputStreamCopy = streams.createByteArrayOutputStream(); streams.copy(inputStream, outputStreamCopy); …
  • 27. … and Threads?! var threads = require('core/threads'); var response = require('net/http/response'); // Define a JavaScript function function runnable() { response.println("Hello World from a Thread!"); }; // Pass the JavaScript function to a thread var worker = threads.create(runnable, "I am a thread"); response.println(worker.getName()); worker.start(); worker.join(); // to be able to print to the response …
  • 28. Services like Mail, Messaging, Indexing? var mail = require('service/mail'); var response = require('net/http/response'); var from = "dirigible@eclipse.org"; var to = "example@gmail.com"; var subject = "Subject"; var content = "Content"; mail.send(from, to, subject, content);
  • 29. Internal Services • Exec • Generator • Lifecycle • Repository • Workspaces
  • 30. Does it look familiar? … var workspace = workspaces.getWorkspace(); var workspaceRoot = workspace.getRoot(); var project = workspaceRoot.getProject(“project1"); project.create(); project.open(); var folder = project.getFolder(”folder1"); folder.create(); …
  • 31. Plenty of Utilities • Assert • Config • Context • Console • Env • Globals • Extensions • Base64 • Digest • Error • Hex • Uuid • Xml • Xss
  • 32. Finally – the mission statement? The ultimate goal of the “Enterprise JavaScript” is to provide a set of a standard APIs, which can be used by the business applications developers.
  • 33. Benefits - Completeness • Rich, but still standardized APIs; • Expose legacy components and frameworks to the new environment;
  • 34. Benefits - Portability • No tight vendor lock-in to the currently chosen underlying JavaScript platform; • OS, platform and database agnostic; • Developers can stick to native JavaScript objects and primitives only in their source code;
  • 35. Benefits - Lifecycle • The API itself is a standard Eclipse Dirigible project, hence can have the same lifecycle as the rest of the projects;
  • 36. You already know… • … what the Enterprise JavaScript really is. • … how to continue to rely on your knowledge & experience in Java frameworks and APIs. • … that this effort is just the beginning and you can join in the definition and implementation work • … the reference implementation in the Cloud Development Platform project called Eclipse Dirigible: http://www.dirigible.io
  • 38. References • http://api.dirigible.io • http://samples.dirigible.io • http://www.dirigible.io/blogs/2016/08/01/blo gs_why_enterprise_js.html