The need for a programming language began with the invention of the first computer. Since then, the quest for inventing languages has been a continuous research topic that resulted in many great languages. In the past few years many new programming languages were introduced. This has changed the demographic map of the developer population worldwide. Instead of having the population skilled in traditional languages, many new school graduates are more acquainted with the newer programming languages. According to the 2017 StackOverflow Developer Survey, JavaScript and the Java programming language continue to be among the top popular programming languages. One of the newest languages that made it to the list is Swift.
This overview of JavaScript (Node.js), Swift, and the Java language discusses why it makes sense to use them on the enterprise servers. In the scope of this article, "enterprise" is any business that has applications to serve its internal processes, or to provide a service to its external clients. Such enterprises usually have data in a secure platform, either on the cloud (public, dedicated, or private), or on premises (usually mainframe).
Why use modern languages on enterprise servers
Most modern applications follow a common architecture pattern, which is illustrated in Figure 1. The user interacts with the application front end, which might be a mobile app, a web app, or even a sensor connected to some appliance. The application usually needs a back end that provides the real functionality and value to the user. This back end typically accesses/updates the client data and handles transaction processing. A typical platform for the back end would be a public cloud or on-premises servers.
Figure 1. Modern application architecture
The development environment for the architecture illustrated above is challenging because it requires different languages and different skills for developing the front and back ends. For example, the front end can be developed with Swift or JavaScript, while the back end can be developed with C++ or COBOL.
These challenges have created motivations to use modern languages on enterprise servers. These reasons are shown below.
Skills
There is a big demand for COBOL, PL/I, and Assembly programmers on enterprise servers. With a big portion of the current mainframe developers approaching retirement, enterprises are having a hard time hiring graduates familiar with those traditional languages. Providing new modern languages on enterprise servers would enable enterprises to easily hire recent graduates who are familiar with those languages and are already using them on the front end.
API economy
Most of those new languages are designed to fit nicely into the API economy for the enterprise. They are suited to build micro services, which makes them a good fit to run on the back end. Having the modern languages enabled on enterprise servers would enable enterprises to leverage their current investments on CICS and COBOL. This means enterprises can expand current COBOL and CICS applications with modern languages, such as Swift and Node.js.
Close to your data
There are many languages that would satisfy the first two needs, but they are not available on the server platform. They would typically exist in what we might call the mid-tier (a server that is between the front end and the back end, working as a staging station, or a caching server). This means lots of network communication, which would impact your application's performance.
For your application to have a quicker response time, you need to have your application back end as close as possible to your data. If your data exists on a cloud server, your back end should be hosted there. If your data exists in a mainframe, your back end should be hosted there. This raises the need to have modern languages, such as Swift and Node.js, on the cloud and server platforms.
Java programming language
The Java language was introduced more than 20 years ago, and is one of the main platforms that services modern enterprise applications. From the beginning, one of Java’s main appeals was its "Write once, deploy anywhere" mantra; allowing code to be developed, tested and deployed where it makes sense. To achieve this, Java compiles Java source to bytecodes, which are portable. These bytecodes are then interpreted and dynamically optimized on the target platform. Over the years, Java has evolved and matured in terms of frameworks, security, and interoperability with other languages, and has continued improving in performance. In addition to the merits in the language itself, there is a large Java developer population worldwide, making it easy for enterprises to find and hire programmers to build Java applications.
Node.js
Node.js is a server-side JavaScript platform built on Google's V8 JavaScript engine. It was designed to allow developers to efficiently build fast. It's scalable and suitable for real-time network applications. The following paragraphs show the factors that make Node.js appealing to developers.
Productivity
Node.js embraces the open source community and provides a module management system that allows developers to contribute and share different modules via Node Package Manager (NPM). Developers love NPM, which currently hosts more than 400,000 modules. The growth rate of community-contributed modules in NPM is three times the growth rate of other runtimes, as shown in Figure 2.
The large number of available modules in NPM leads to increased developer productivity. If you need to build certain functionality in Node.js, chances are modules that achieve the same functions already exist. By leveraging such community modules as building blocks, developers can leverage and rapidly assemble their application.
Figure 2. Community-contributed modules (Feb. 16, 2017, modulecounts.com)
Scalability
Node.js leverages an event-driven, non-blocking, asynchronous I/O framework as its programming paradigm. As such, for I/O tasks, Node.js leverages the underlying asynchronous I/O support in the operating system. This means you can run thousands of concurrent connections with minimal overhead, allowing your application to react smoothly to high transaction demand in peak hours.
Simple to use
Node.js is a single-threaded event loop framework, and achieves parallelism via the underlying asynchronous I/O capabilities. This approach eliminates the complexity of concurrency and thread-safety issues. Node.js and JavaScript also integrate well with the modern tools needed for web applications, such as JSON APIs.
Swift
Swift was introduced by Apple in 2014 and was given to the open source community in December 2015. Since then, it has been well received by the development community and jumped to number 15 in RedMonk ranking and to number 11 in the 2017 StackOverflow Developer Survey. It has the industry backing of big companies including Apple and IBM. There is an ecosystem of frameworks evolving around Swift with different web frameworks being written in Swift, such as Perfect.org, Kitura, and Vapor. Conferences and meetups are being held by Swift enthusiasts to exchange Swift experiences and best practices, such as try! Swift in New York, and Bangalore.
All these factors indicate that Swift is a language with great potential. But what are the reasons behind all this excitement? There are three factors that make it an interesting language.
Performance
Swift is a statically compiled language, unlike other modern scripting or dynamic languages, such as JavaScript or Ruby. It is more like the C language, in which you get an executable file and run it directly. This results in better performance compared to other modern language in terms of speed and memory consumption.
Figure 3. Swift performance
Modern
Swift is a relatively new language, and it was designed with all the modern features you would expect in a modern language. It is relatively easy to learn because its concepts are similar to other popular languages. Its syntax is concise and straightforward to read, with little verbiage. Though the language is relatively new, its compiler is built on the LLVM compiler infrastructure, which has been around for some time now and have a proven strong performance for other languages such as C and C++. This means we get a good combination of a modern language with a mature optimizing compiler.
Safe
Because Swift is new, it was designed to avoid the mistake that many programmers tend to make in previous languages. Swift is a strongly typed language, with many types of error-detection happening at compile time. Variables are automatically initialized, and memory is automatically allocated and managed. These features would eliminate the issues around bad pointers, uninitialized variables, or values miscalculated due to wrong type-casting.
Conclusion
The Java programming language has been used in enterprise servers for almost 20 years, and we see good adoption with successful mission-critical Java applications running in production. Node.js is relatively new, and we are seeing many enterprise clients moving to Node.js to leverage its fast I/O and high scalability. Swift 3.0 was the first release that was truly built for server-side development including support for x86 Linux and Linux on z Systems. It will be interesting to see what type of workloads will be developed using Swift on the server.
What will really drive the adoption of these modern languages is a fresh and young generation of application developers. The technical merits of a programming language is not enough to make it successful. The main motivation for having these languages on the enterprise server is mainly driven by the available skills. Having a polyglot ecosystem on the server platforms enables the enterprises to have a choice in their investment and modernization efforts. This leads to higher productivity, a faster DevOps cycle, and a better ROI in the IT investment.
Source: IBM Developer
Comentários