View
576
Download
0
Embed Size (px)
DESCRIPTION
Citation preview
Powerpoint Templates
Powerpoint Templates
JavaScript & EnterpriseJavaScript & EnterpriseJavaScript & EnterpriseJavaScript & EnterpriseAdam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentricAdam Boczek @nativeAgile @codecentric
http://boczek.comhttp://boczek.comhttp://boczek.comhttp://boczek.com http://Codecentric.dehttp://Codecentric.dehttp://Codecentric.dehttp://Codecentric.de
BEDBEDBEDBED----CON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |GermanyCON 2014 | 04.2014 Berlin |Germany
Powerpoint TemplatesEnterprise Applications Are Complex
Powerpoint TemplatesEnterprise Applications Are complex
� large software system platform designed to operate in a corporate environment
� complex, scalable, component-based, distributed and mission critical
� consists of a group of programs with shared business applications
http://www.techopedia.com/definition/24804/enterprise-application-ea
Powerpoint TemplatesEnterprise is Fixed, it…
� has fixed environments
� has fixed processes
� has fixed roles & committees
� has fixed patterns & guidelines
� has fixed technology stacks
� has fixed tools
� has fixed “attitude” (closed minds and antagonists) with strong immune system
Powerpoint TemplatesEnterprise & JavaScript – motivation
� architect’s motivation:
� better, faster, cheaper, in quality
� complexity reduction,
� quest for simplicity
� idea
� one language for all, multi-paradigm
� promise (stakeholder’s motivation)
� faster time-to-market
� cost reduction
� cheaper evaluation of innovation
Powerpoint TemplatesManagement Talk
Mr. Boczek, And you say we should
look at the JavaScript? Do you mean
this trivial language for amateurs
building fancy web pages? This
JavaScript we have almost decided
to switch-off in our intranet
clients due to security issues?
Are you serious?
Powerpoint TemplatesJavaScript IS Really Matured
� one of the world's most popular programming languages
� multi-paradigm: scripting, object-oriented (prototype-based), imperative, functional
� general-purpose, well suited to a large class of Web and non-Web-related applications
� stewardship over the language by ECMA committee
Powerpoint TemplatesJavaScript has “problems”
with “java-” & “-Script”
� JavaScript is not a subset or less capable version of Java
� JS has a syntactic similarity to Java but that’s all
� JS is a different language as Java
� Script doesn’t mean simple, not a real programming language
� Script means compact and interpreted or JIT compiled
Powerpoint TemplatesJavaScript HAS Bad Reputation*
� the first versions of JS were weak e.g. without exception handling
� some of the implementations of JS were buggy embedded in buggy browsers
� poor quality of the language specification caused creation of bad resources (books, tutorials etc.)
� many people writing in JavaScript are not programmers, lacking training and discipline
* the world's most misunderstood programming languagehttp://www.crockford.com/javascript/javascript.html
Powerpoint TemplatesJavaScript needs Professionals
� some concepts need deep dive understanding (e.g. prototypal inheritance, variable scope, …)
� design errors create a potential risks (e.g. ‘with’ statement, ASI)
� reputation of being strictly for the amateurs causes lack of architectural attention and reviews
� “everyone can do programming in JavaScript” is a misunderstanding
Powerpoint TemplatesJavaScript Lives in Version Chaos
� JS 1.0 (March 1996) in Netscape Navigator 2.0 until JS 1.2 (NN 4.05)
� formalized in the ECMAScript specification ECMA-262 and ISO/IEC 16262:
� ES1/ES2 (June 1997/June 1988), JS 1.3
� ES3 (December 1999), JS 1.5
� ES4 (Abandoned)
� ES5 (December 2009)
� ES5.1 (June 2011), JS 1.8.5
� ES6 (Harmony)/ES7 (work in progress)http://ejohn.org/blog/versions-of-javascript/
Powerpoint TemplatesIf you want to be sure, use this…
http://test262.ecmascript.org/
Powerpoint TemplatesGo For JavaScript in Enterprise if…
� you exactly know the advantages and disadvantages of JavaScript
� you can convince stakeholder that JS is a matured programming language, not a toy for amateurs
� you can get professional JS resources for your projects
� you have full control over the versions being used in your enterprise environment
Powerpoint TemplatesManagement Talk
Ok, Mr. Boczek, It looks good, I know
now what JavaScript is and what
are cons and pros. But language is
an only part of the story. We at our
enterprise have an organized
system. We have Frameworks. We
have application profiles. we have
technology stacks. we have
enterprise architecture. we have…
Powerpoint TemplatesEnterprise has Application Profiles
Powerpoint TemplatesJavaScript can be used All Over
� JavaScript is the scripting language for the web, however,
� JS can be used in many application scenarios and layers:
� presentation (frontend)
� business (backend/integration)
� persistence (storage)
� JS is not alone, it has powerful engines, plenty of supporting frameworks and very active community
Powerpoint TemplatesJavaScript runs not only in a Browser
� engines (with JIT), some examples
� Chakra (IE)
� SpiderMonkey (FireFox)
� SquirrelFish (Apple’s WebKit)
� V8 (Chrome, Node)
� Tamarin (Flash)
� Nashorn (Java SDK)
� some older interpreters
� Rhino
� JScript
Powerpoint TemplatesManagement Talk
ok, Mr. Boczek, Understood,
let's start with a common topic. our
software is being used in various
scenarios, inside our offices but
also outside at customer site. We
are using it using various devices in
various environments. What can you
offer AS A SOLUTION FOR OUR UI?
Powerpoint TemplatesJavaScript in Presentation layer
� browser is used as the engine
� browser runs a pure client-side framework (some examples):
� AngularJS
� Ember.js
� Backbone.js
� challenges & issues
� browser compatibility
� many too many, pace of development
� security and intellectual property
Powerpoint TemplatesJavaScript in Browser Compatibility issues
http://kangax.github.io/es5-compat-table/
Powerpoint TemplatesJavaScript Frontend Frameworks
http://todomvc.com/
Powerpoint TemplatesJavaScript frontend Frameworks
security & Intellectual property Issues
� even concatenated and minified the JS code runs in the browser on the client-side, which must be accepted
� everyone have access and can try to misuse the code (change, sell etc.)
� source code must not contain any sensible information
� the whole responsibility for the security and correctness of the data and processes lies at the backend-side
Powerpoint TemplatesGo for JavaScript in the Presentation if…
� you can accept compatibility issues or specify fixed client environment
� you have clarified UX functional requirements to be able to evaluate and choose proper framework (e.g. SPA/multi-page, fat-client-behavior)
� you have clarified non-functional requirements like performance to be able to evaluate and choose proper framework (e.g. size of a page, behavior in slow networks, off-line)
Powerpoint TemplatesManagement Talk
MR. Boczek, Great, I haven’t
expected anything else. JavaScript
equals frontend to me. But our
organization are not build of web-
Clients only. WE do business, lots of
business. And this mean lots of
application servers with backend
functionality. What about this?
Powerpoint TemplatesJavaScript in the Business Layer
� backend JS software platforms already available:
� Node.js
� other like Vert.x, JXCore (Node fork)
� very easy way to build a server that exposes e.g. RESTful services
� challenges & issues
� acceptance still low
� no established ESB/MOM solutions
� pub/sub messaging available (e.g. Faye)
� actually Node.js is the standard
Powerpoint TemplatesNode.js is the Standard
for JavaScript in the Backend
� not a JavaScript framework
� highly customizable server engine based on Google V8 JS engine
� processes in a event loop, ready to accept and respond to requests
� promise in scalability: event-driven asynchronous IO
� supported by excellent frameworks
� Express.js, Restify.js, Hapi.js.
� supported by the cloud providers
Powerpoint TemplatesGo for JavaScript in the Backend Layer If…
� your application has a web-profile with REST/JSON client-server communication
� your application scenario does not define complex non-functional requirements (e.g. dist. transact.)
� your application does not require complex integration scenarios
� you can accept Node.js as the backend server for your solution
Powerpoint TemplatesManagement Talk
It’s going to be more interesting
as I thought, Mr. Boczek.
So we can use JavaScript in
Frontend and our backend systems.
But I’m pretty sure the persistence
won’t be an easy case for you. We
have our sql & DBMS. What about
this?
Powerpoint TemplatesJavaScript in the Persistence layer
� native support for JSON in the relational DBs is not only a wish:
� PostgreSQL 9.2 contains JSON_datatype
� planned for Oracle Database 12c
� JSON-oriented queries in DB2
� some of the DBMS use JSON native already (NoSQL)
� MongoDB (BSON), CouchDB
� important to support not only JSON type but also queries over it
Powerpoint TemplatesGo for JavaScript in the persistence Layer
if…
� you can introduce new type of DBMS e.g. a document oriented database like MongoDB in your organization
� your data is strong non-structured e.g. CMS
� your existing DBMS supports JSON types and queries natively (parsing or storing as text is not an option)
Powerpoint TemplatesManagement Talk
Very nice Mr. Boczek but
all the stuff to evaluate will
be very expensive. I can’t just
simply order a an environment with
servers for your node.js, Mongodb
and angular & co. It’s a dream, I
won’t get Budget for this and even
so we would have to wait weeks!
Powerpoint TemplatesFast evaluation with Mean Stack
M E A N
Powerpoint TemplatesYou build your POC with Mean
Powerpoint Templatesyou pack your Mean in the Cloud
Powerpoint TemplatesManagement Talk
Not bad, MR. Boczek, Not Bad.
SO you are able to develop our
functional requirements using
JavaScript-based frameworks.
interesting… however what about
quality requirements? what about
performance, scalability, security,
evolution etc., Etc…?
Powerpoint TemplatesQuality attributes have enormous
influence on the architecture
� Performance and Scalability
� Availability and Resilience
� Evolution
� Security
� Accessibility
� Internationalization
� Location
� Regulation
� Usability
Common for all
software
projects
however some of
them might be
quite specific in
case of
JavaScript-based
solutions
e.g. regulation
Powerpoint TemplatesManagement Talk
Mr. Boczek, ok, it might be that
JavaScript and the frameworks
around it are matured and can
deliver the business value we need,
but what about our Development?
You do not expect we will use a
Notepad, do you?
Our enterprise is big an has big
focus on quality, code quality!
Powerpoint TemplatesJavaScript And the Development Process
� matured development environments
� IntelliJ, Eclipse, VisualStudio
� development tools in browser (F12)
� quality assurance tools
� JSLint, JSHint
� project structure, modules
� CommonJS (Node.js), AMD (RequireJS)
� testing frameworks & environments
� jasmine (BDD), qunit (TDD), mocha, sinon.js, chaijs, phantomJS, slimerJS,casperJS, karma, nock etc.
Powerpoint TemplatesManagement Talk
MR. Boczek, oK, Ok,
So we can develop, we can test,
But what about our deployment
pipeline? we have bunch of
processes we have to carry out.
And we plan to go for continuous
delivery, can you support this? And
What about process automation?
Powerpoint TemplatesJavaScript in the deployment process
� you can automate everything
� push, unit test, build & artifact, integration test, deploy
� very good toolbox
� package management (npm, bower)
� task runners (grunt with 2.5k plugins)
� quality assurance & testing
� building and optimizing
� concatenating and minifing
� documentation
� easy integration with the existing tools and processes
Powerpoint Templatesgo for JavaScript in the
development und deployment processes if…
� you can accept quite big numbers of different tools/plugins you have to configure and maintain
� but actually there is not “if”
� development and deployment processes are very good supported by the JavaScript tools
Powerpoint TemplatesManagement Talk
Wow, Mr. Boczek,
I see that JavaScript and its eco-
System can be a big thing for our
enterprise.
Let’s include it into our new
it-strategy for the Upcoming years!
Thank you!