Software Engineering Tech Trends (SETT) is a regular publication featuring emerging trends in software engineering.
In this series, Object Computing IoT experts evaluate three leading cloud vendors' IoT platforms, AWS, Azure, and Google Cloud Platform, with a focus on how they support the development of a complete IoT application.
Over time, they will explore each platform's capabilities in relation to each of the IoT platform functional categories outlined by the Industrial Internet Consortium (IIC). In this installment, they discuss the Process Management category, which is primarily focused on communication with IoT devices and processing the data from these devices in support of the application that's leveraging them.
In this article, Mark Volkmann presents a brief tutorial covering the most useful features of TypeScript, so you can get started using it right away.
The task of designing integrated solutions is frequently met with challenges when unusual architectural constraints from system and non-system sources are introduced into the equation. Normal integration patterns are desirable, but what happens when actors in your deployment introduce unique requirements?
In this article, Object Computing Solutions Architect, Marc Neeley, explores how today's industry standards are addressing complex integration challenges and provides a detailed review of the OMG specification, DDS for eXtremely Resource Constrained Environments (DDS-XRCE), which plays a significant role in extending solutions into environments with unique requirements.
sed is a Unix text processing utility. The name is short for "stream editor." Like other filters in the Unix paradigm, the input to sed is a stream of text, and the output is an edited version of that text.
sed has been branded a "power tool" and "Swiss Army Knife." While most developers don't need a stream editor on a daily basis, sed is a great tool for your automated text manipulation toolbox.
Memorizing all the capabilities and syntax details of sed can be a daunting task. But after reading this article by Mark Volkmann, you will know enough to recognize when using sed is appropriate, and you'll be familiar with the features of sed that are used most often in practice.
Svelte is an alternative to web frameworks like React, Vue, and Angular. Like its counterparts, Svelte can be used to build entire web apps. It can also be used to create custom elements that can be used in existing web apps implemented with other frameworks. Svelte makes many tasks easier, including defining components, managing component state, managing application state, and adding animation.
In this article, Mark Volkmann provides a thorough introduction to Svelte and walks you through the fundamentals necessary to start building web applications with it.
Historically, visual inspection has been necessary to obtain readings from analog gauges. This has meant that a human operator had to travel to the gauge's location, read its value, and manually record that value before the data could be evaluated and acted upon.
In this article, Object Computing Director of Machine Learning, Dr. Xiao Yang, explains how today's deep learning technology can be used to access and log analog gauge data remotely, opening up opportunities for organizations to optimize equipment effectiveness and reduce operating and maintenance expenses.
The tools available to front-end developers for creating aesthetically pleasing dialogs have always been woefully inadequate.
Go is an open-source programming language that runs on Unix-based operating systems (including Linux and macOS) and Windows. The language is particularly easy to read and simple to use, which makes it an ideal choice for beginners.
In this article, Mark Volkmann continues a multi-part series on Go that provides both novice and seasoned programmers the knowledge and skills they need to become proficient with the language. In Part 3, Mark provides an in-depth exploration of the Go Standard Library.
In today's technology landscape, the ability to build applications that communicate effectively in the cloud is critical, but we face certain challenges running OMG's Data Distribution Specification (DDS) and OpenDDS in that environment because the cloud does not support multicast.
In this article, Object Computing technologist, Justin Wilson, addresses these challenges by presenting an innovative solution that supports discovery without using multicast. Following a brief explanation, Justin includes three step-by-step tutorials, demonstrating how to run a simple OpenDDS application that uses RTPS for discovery on Google Cloud Platform (GCP), Azure, and Amazon Web Services (AWS).
In Part 1 and Part 2 of this series, Zachary Klein introduced the fundamentals of the Vue.js library and demonstrated how to put them in action with a simple app.
In this concluding article, Zak compares Vue.js to its primary rivals, Angular (2 and above) and React, and evaluates how this relative newcomer to the front-end development scene stacks up.
Go is an open-source programming language that runs on Unix-based operating systems (including Linux and macOS) and Windows. The language is particularly easy to read and simple to use, which makes it an ideal choice for beginners.
In this article, Mark Volkmann continues a multi-part series on Go that provides both novice and seasoned programmers the knowledge and skills they need to become proficient with the language. In Part 2, Mark covers Go syntax.
The first article in the series is available here.
Hooks are a new React feature that allows developers to implement stateful components with functions instead of classes. Their addition to React makes it easier to work with component state and context and to reuse state logic between multiple components.
In this article, Mark Volkmann explores the benefits of using hooks and explains how to use the hooks currently available in the React package.
Go is an open-source programming language that runs on Unix-based operating systems (including Linux and macOS) and Windows. The language is particularly easy to read and simple to use, which makes it an ideal choice for beginners.
In this article, Mark Volkmann begins a multi-part series on Go that will provide both novice and seasoned programmers the knowledge and skills they need to become proficient with the language. In Part I, Mark provides an overview of the language and a quick-start guide.
To broaden the applicability of its Data Distribution Service (DDS) for real-time systems, the Object Management Group (OMG) recently released a new DDS Security specification.
In this article, Adam Mitz explores the new security specification and its impact on OCI's open source implementation of the DDS standard, OpenDDS. He then provides a detailed demonstration of the steps required to add security to your OpenDDS distributed applications.
“Serverless computing” is an interesting phrase. After all, if computing is to occur, there must be a place where it happens. With no central server to rely upon, developers must understand how a number of technologies work together in the cloud to deliver a stable, scalable, secure, and efficient serverless application.
In this article, a team of OCI software engineers explores the development tools available to programmers under the Amazon Web Services (AWS) umbrella. They introduce the five pillars of the AWS Well-Architected Framework and explain how they leveraged the AWS suite of services to architect and build an open-data framework that maximized scalability and value.
In May of this year, a team of developers at OCI released the first milestone of a new open source framework: Micronaut. This new application framework for the JVM is designed to improve both coding efficiency and app functionality, particularly for microservices and cloud-native applications. In this article by Zachary Klein, you'll get an introduction to Micronaut's powerful features and learn the fundamentals necessary to start developing apps with the framework.
In Part 1 in this series, OCI Software Engineer, Zachary Klein, covered the basic concepts and features of the Vue.js library. In the second installment, he shows you how to put that knowledge to use by providing a thorough, step-by-step tutorial on building a simple book library app. You'll learn to build the app from the ground up using Vue.js, Vuex (for state management), Vue Router (for client-side routing), and a RESTful backend.
There are many approaches to managing state (data) in web applications. Redux allows you to store state in a "store" that can be shared by all components, allowing for state changes to be reflected by re-rendering all components that care about particular pieces of data. In this article, Mark Volkmann provides an introduction to the basic functionality of Redux, then explores ways in which redux-easy significantly simplifies use of the Redux library.
With all of the available cloud platforms and the great tools and documentation they provide, creating a cloud-based microservices system should be easy. Each platform has a number of separate components that can be put together to make nearly any system you can think of.
How to put the parts together, however, is not always clear. The documentation is all there to read, but it's not always in the same place. This article pulls together some of those parts to present a simple cloud-based system that might be used as a foundation for a more complex system.
Emmet is an editor plugin for quickly entering HTML, XML, and CSS. It also supports many "actions" that operate on HTML and XML elements. The most commonly used action is to expand an abbreviation or snippet.
In this article, OCI Partner and Principal Software Engineer, Mark Volkmann, provides an in-depth exploration of the Emmet plugin, from installation to snippet customization. Discover how Emmet can help you enjoy enhanced programming productivity.
EOS.IO is a new approach to executing decentralized smart contracts on a blockchain. It uses some of the same concepts that shaped earlier blockchains such as Graphene, the engine that powers popular sites such as SteemIt and Bitshares. Like Graphene, EOS.IO is Free Open Source Software (FOSS) and released under the MIT License.
This article explores the ways in which EOS.IO improves upon other blockchain-based technologies and helps make blockchain more accessible with a real-world example.
Positioning itself between React's focus and simplicity and Angular's developer-empowering feature set (and arguably erring towards the latter), Vue attempts to build off of the good ideas in both of its more established competitors.
Read this thorough introductory overview by OCI Software Engineer, Zachary Klein, to learn the fundamentals you need to confidently start working with the Vue.js library today.
Many software developers know a little bit about Vim and grudgingly use it when nothing else is available. This article aims to quickly make you more productive when using Vim and perhaps even convince you that there are reasons to prefer it over other editors. Even if you don't adopt Vim as your primary editor, you may wish to enable a Vim mode in your editor/IDE of choice.
This article explains the fish shell in enough detail for you to determine whether you might prefer it over other shells. Really learning a shell is similar to learning a new programming language. Similar topics are covered here such as variables, functions, string operations, and so on. If writing scripts in other shells has felt tedious in the past, this is your chance to learn a shell that makes scripting easier!
Geb is often used as a functional/web/acceptance testing solution via integration with testing frameworks such as Spock, JUnit & TestNG. In this article, we are going to show how Geb can be used to Screen Scraping.
In this guide, you are going to learn how to create a Grails application to host a Google Action for your Google Home device to interact with. We will build, deploy, and setup everything necessary to facilitate this on Google App Engine Flexible and Google APIs.
In this article, we will visit Elm from a high level and explore what makes it such a great language. My hope is that reading this will encourage you to explore Elm and consider it for your next project.
In the April 2017 issue of SETT, my colleague, Mark Volkmann, laid out a detailed blueprint for developing a modern web application, from beginning to end. In this article, we will demonstrate how to develop the same web app, using the Grails framework.
Qt (pronounced "cute") is a cross-plaform framework for creating applications. It was originally conceived in 1990, with its first public release in 1995 for Linux. Over time, it developed support for embedded devices such as cell phones through desktop platforms such as Windows and Mac OS X. Using Qt, this article will describe the basics of creating a basic calculator application that can run on multiple devices.
For developers that have primarily worked in dynamic programming languages, it is natural to suspect that the benefits be derived from types might not justify the extra work required to specify them. In my experience with Flow, I have been surprised at how often adding types uncovered issues in existing code. Start simple, perhaps just adding types for function parameters and return types. Over time I believe you will notice that your confidence in the quality of the code will increase and the number of errors you discover at runtime will decrease!
Many people talk about how easy it is to build web applications using Node.js. However, it's difficult to find resources that cover all the steps. We will do that here. Some details will be omitted. We want to focus on the primary steps.
This article makes specific technology/tool choices. Obviously, the steps may differ if different choices are made. The primary choices made here include Node.js, PostgreSQL, and React. This article was inspired by the Frontend Masters workshop "Zero to Production Node.js on Amazon Web Services", by Kevin Whinnery, where he made different tooling choices.
By now, you have likely heard words like "bitcoin" and "blockchain," perhaps even "Ethereum," and wondered what they all mean. Do they refer to something useful, and if so, how would you go about using it? This article is intended to put meaning behind these words and others, by highlighting one instance of the technology behind the concepts.
February: Capabilities of Google's Prediction API for Building Practical Machine-Learning Based Applications
Application development has continued to evolve over the last several decades. We have come so far from building applications on a single machine in a single location to a stage where we are building applications on infrastructure which might be very remote to us.
In this article, we focus on how to optimize performance through SIMD. SIMD processing exploits data-level parallelism. Data-level parallelism means that the operations required to transform a set of vector elements can be performed on all elements of the vector at the same time. That is, a single instruction can be applied to multiple data elements in parallel.
In this article, I will show you what a DSL is, how it works, and how you can create your own DSL to improve your productivity. DSL stands for Domain Specific Language. It is not a new concept; people have been creating DSLs for a long time now. The reason I am writing this article is to hopefully show you a couple tricks that you may not be aware of.
Grails leverages the “Convention Over Configuration” design paradigm, which functions to decrease the number of decisions that a developer using the framework is required to make without losing flexibility. This is one of the ways Grails significantly increases developer productivity!
If current trends continue, the number of IoT (Internet of Things) devices in circulation may triple to 38.5 billion by 2020, far outpacing the number of PCs. However, programming an IoT device still remains difficult. Often in-depth knowledge of both hardware specifications and difficult low-level concepts are required to get even the simplest of examples to work. With Pronghorn IoT, we provide an easy-to-use, declarative, and low garbage API that teaches the maker (even one with no applicable experience) how to create a working example in as little as 15 minutes. In doing so, we also provide a top-down approach to teaching students Java.
Creating a single page application has never been easier than it is with the new Grails Angular Scaffolding Plugin! This post will give you a short tutorial on how to use the plugin.
Recently I gave a talk at GR8Conf.eu about building applications for the Amazon Alexa platform. I talked about using Groovy with Lambdas to demonstrate Skills (Alexa Apps) as well as using Grails. I’ll give this talk again at GR8Conf.us at the end of July and have even more good stuff to show. On top of that, after working on this for months I have the material to have an Alexa workshop at GR8Conf.us(Thanks to Collin Harrington for helping with the idea). Good Times!
The focus of this article is setting up Boost.Log in a similar manner as log4cxx. Specifically we want to be able to initialize the logging via a config file so that it can be modified without having to recompile and redeploy our application. Boost.Log is very flexible and provides numerous logging capabilities. Please see the Boost.Log documentation for all the various features. Although this is not an exhaustive overview of Boost.Log, it should be sufficient for you to add logging to your…
While binary data protocols have been around for decades, so have text-based ones as well. The popularity of functional languages such as Scala lead to applications that need to parse these protocols. In part I of this article, scodec, parser library for Scala to parse binary data was discussed, and this article describes the Scala Standard Parser Combinator Library which is useful for parsing text. These libraries allow a protocol grammar to be translated almost exactly into executable code,…
Data protocols have been around for decades, and now, with the emergence of the Internet of Things, are more ubiquitous than ever. Functional programming is also becoming mainstream, with Scala a leading language in that arena. This article discusses the scodec parser library for Scala to parse binary data, and part II of this article will demonstrate the Scala Standard Parser Combinator Library which is useful for parsing text. The use of libraries such as these allow the protocol definition to…
The OpenStack Foundation released the 12th version of its cloud operating system named “Liberty” in October 2015. Wanting to gain a deeper understanding of cloud computing and DevOps principles, we setup an OpenStack cluster in November. This is what we learned.
This article compares two popular web app frameworks, Angular 2 (beta.0) and React (0.14). It does not provide detailed explanations on how to use them. There are many other web tutorials that provide that level of detail. The focus of this article is to show side-by-side comparisons of the corresponding pieces in a sample application.
Grails provides a powerful view layer with GSPs (Groovy Server Pages). At their most basic, GSPs are HTML pages with embedded executable code. At runtime, the code is executed and replaced by the results of the execution, and the resulting HTML is rendered.
In this article, we present a model of how Big Data analytics works with an Industrial Internet of Things (IIoT) application. Our analysis revolves around a fictional gas station and convenience store chain, which we call Carmageddon. Carmageddon represents a business that generates annual revenue (from gasoline sales) of $2B. The business is made up of 700 gas stations in 20 cities, with a total of 7,000 gas pumps and 2,000 fuel tanks that have been acquired over time. Our model simulates…
Grails 3 is a major step forward in the evolution of the framework. One noteable feature of Grails 3 is Grails interceptors (as a replacement to filters). In previous versions, Grails uses filters much like servlet filters (though better integrated into the Grails runtime and its conventions). Filters are simply a way to implement logic, which might relate to any number of controllers, and a powerful and flexible tool to address many such concerns. Grails 3 replaces filters with…
There are many explanations of annotations. The basic meaning of annotation from Webster dictionary is a note added to a text, book, drawing, etc., as a comment or explanation. A more concise definition of annotations is the word metadata, i.e., data that contains information about itself. In programming language, annotations are metadata for code, which contain information related to the code itselfq. Actually annotations in Java is a metadata facility that enables you to embed supplemental…
Test-driven development (TDD) is a software development principle and practice, a way of developing valuable software. Test-driven development is closely tied to the test-first programming method of eXtreme Programming (XP). Kent Beck rediscovered and popularized this practice in his book, "Test Driven Development by Example." (1) Most people agree that TDD is very valuable in software development, though problems still exist. Developers need to know where to start, what to test and what not…
C++ has been updated with two (2) recent ISO specifications (published in 2011 and 2014) and today's compilers support many of the new features. This article demonstrates some of those features in a way that's approachable to software developers who aren't familiar with any version C++ (or haven't used it for a long time).
In this article, we briefly introduce two VM and container management tools, Vagrant and Docker, with a focus on their concepts and workflow. By comparing major features of both technologies, we advocate for combining both technologies, as opposed to using them exclusively. Also, we use two real-world examples to demonstrate how to integrate the two technologies to build a better development environment.
This article provides a brief overview of machine learning. I will concentrate on aspects of machine learning that apply to almost all strategies for learning - selecting training and validation data and metrics for estimating the suitability of the trained model. And I hope to give you a quick taste of what some of the issues are that you will encounter if you use machine learning as a tool.
Git is a fully distributed revision control system (RCS), like Mecurial, Bazaar, and Darcs. Git was created by Linus Torvalds, the creator of the Linux operating system to help support the development of the Linux kernel. The purpose of all revision control systems is to manage sequences of changes over time to a collection of text documents in an orderly and meaningful way, granting the ability examine the documents at any point in time, moving forward and backward through file histories.
Test-driven development (TDD) is a software development principle and practice; a way of developing valuable software. Test-driven development is closely tied to the test-first programming method of eXtreme Programming (XP). Kent Beck rediscovered and popularized this practice in his book "Test Driven Development by Example."
AngularJS is an open-source framework for building single page web applications. It utilizes two-way data binding to dynamically keep information synchronized between the model and view layers of the application and directives as a way to extend HTML to allow developers to express views in a declarative fashion. It is primarily developed and maintained by Google. For the remainder of this article, a general working knowledge of AngularJS is helpful, but not required.
A number of algorithms exist for finding paths in graphs, and a venerable one from 1968, useful in applications such as game development and robotics, is A*. This article describes the A* algorithm and graphically demonstrates paths that it finds.
Vert.x is a platform for running HTTP and TCP services. These services are normally implemented using callbacks that handle the results of otherwise blocking operations such as communicating with a database or file I/O. This if often referred to as "event-driven" processing and has been popularized by Node/JS. Use of event-driven services allows for greater scalability due to greater efficiency using threads. A single thread can be used by many services.
"Do more with less" is a frequent mantra when supporting legacy applications. After years of accumulating cruft these same applications are now expected to support the "big data" workloads of today. In order to achieve these performance levels, it is often necessary to run profilers to find and remove the bottlenecks. Before doing any optimization however, it is very helpful if the code is easy to understand.
JUnit 4 was released Feb 16, 2006. With its release came annotations and the ability to write JUnit tests in a more flexible fashion than the setUp, test, and tearDown of 3.8. JUnit 4 took three and a half years to show up after the 3.8.1 release but since then there have been ten more releases -- 4.11 came out in December, 2012 and 4.12 is in the works. So here we are ten releases and eight years later. And I wonder, how much has changed in the way you use JUnit?
The Play Framework is framework for developing web applications in Java or Scala. This article will show how easy it can be to write a secured, dynamic, Ajax-enabled site, with this framework. The code associated with this article is available here.
When calling SQL Server stored procedures from ADO.NET, all columns of the table type used by a table-valued parameter must be provided by the calling code. Thus, adding a nullable column to the table type breaks code that doesn't know about the new column. This limitation is part of ADO.NET, and this article provides a work-around.
In the financial domain, FAST (FIX Adapted for STreaming) is a data compression technology used to meet the challenge of transferring huge volumes of market data between financial institutions with low latency. It is a standard developed by FIX Protocol Ltd., specifically aimed at optimizing data representation on the network. Although it was initially designed for the financial industry, the application of it is not specific to market data.
The NetBeans Platform allows rapid construction of an application that has some advanced capabilities, including templates, undo/redo, auto update, and more. It is an alternative to Eclipse Platform for those that wish to use standard Java Swing user interface instead of the Eclipse SWT user interface. The NetBeans Platform grew organically from the lessons learned about application architecture learned by the NetBeans IDE development team.
The financial industry relies heavily on systems to disseminate and interpret market data. Both trading decisions and analytics are based on the current state of the market for a particular security.
The new C++11 regular expression library brings the power of regular expressions to the C++ standard library. Previously part of TR1 (C++ Standards Committee Technical Report 1) and also available via Boost, the library is now under namespace std in C++11. Bjarnew Stroustrup said: "Surprisingly, C++0x [C++11] feels like a new language...". As such, it is important, even for experienced C++ developers, to study the new features.
Visual Studio is a great tool for developing web applications, but your site might end up being rather sluggish if you don't design it to avoid large data transfers (postbacks) when pages are updated. Often, a developer will be tasked with solving this problem on an existing site and will not have the option of a major rewrite.
Puppet is an open source cross-platform software package for declarative configuration management. Puppet configuration files use the .pp extension and define the desired final state for each node. Platform specific package management tools are used by Puppet to ensure compliance with the configuration files. These declarative configuration files permit a single operations person to manage many hundreds of servers.
You have just completed an enhancement to your application to allow it to retrieve data from a service either hosted within the enterprise or hosted by a vendor. Since there was only one service to call you were able to extend your application by writing some code that would gather the data required for the request, transform it into the format required by the service, send the request to the service over its' supported transport protocol, and then map the results back to your…
In this article we discuss the new language features coming in Java 8, as well as the most important enhancements to the standard libraries. These enhancements will enable us to write better Java code, using a more "fluent," functional, and declarative style, with less boilerplate code for many common use cases.
This article provides an overview of tmux. tmux is short for "terminal multiplexer." It dramatically expands what can be done with terminal windows. It is highly configurable and scriptable. tmux is an alternative to an older, similar program named "screen". It was created by Nicholas Marriott. The first version was released in 2007. One benefit of both tmux and screen is realized when working on remote machines where network communication can fail.
java.lang.Enum was added to Java™ in Java SE 5 in order to provide a type-safe restricted list of constants. Java's enums are more flexible than the enumeration constructs in many other languages in that each enum instance is a full-blown Object, with the ability to implement properties and logic. However, there are some areas in which Java's enums are restricted - enum instances implicitly extend java.lang.Enum, are implicitly final, and cannot be defined using generics.
This article provides an overview of Node.js. It also explores a particular Node module, Socket.IO, and demonstrates using it to build a simple chat application. You'll be amazed by how little code it takes to do this!
This is the second installment in a four part series on building an elegant application for the web. In the previous article we looked at designing our application's user interface for mobile devices first and scaling up to larger, more capable devices. In this article we will be looking at how CSS Animations can augment our application's user interface, making our application more pleasant to use and intuitive.
This is the first in a series of articles, published by SETT in the coming months, on creating a compelling web application interfaces. This installment will present the web development landscape, introduce the Mobile First Design methodology, and provide a simple example of applying Mobile First Design to an existing web application.
In this short article, I will explore JavaFX 3D scenes. I will show you JavaFX 3D scenes in action through a series of simple examples. And along the way I will explain some of the other JavaFX features I employed in the examples, including the use of the JavaFX 2.x builders, properties and bindings, and animations.
In the course of developing systems, it is often necessary to integrate components that are built using different communication mechanisms. There are many reasons why this situation can arise: differing requirements, constraints imposed by the associated subsystems that must be integrated, different skillsets within the organization, legacy systems that were developed prior to emerging new standards, etc.
The release of JUnit more than a decade ago revolutionized testing on the Java platform. Since then there have been many advances in testing. Test driven development (TDD) and lately behavior driven development (BDD) have been gaining in popularity. Mocking became ubiquitous with the release of EasyMock and JMock. JUnit theories make tests more concise and maintainable.
Suppose you work for a software company that asks you to help identify ways to achieve process improvement throughout the various units in the company. Your first step is to identify what the existing processes are. As you do so you may see that while there is a lot in common among processes for the various units, there are numerous differences too.
This article discusses the impending production release of Spring 3.1, which will bring many new framework features as well as extend the XML-free configuration capabilities that were introduced in Spring 3.0. The goal expressed by the Spring developers is to make this newer Java-based style of configuration a first-class alternative to the traditional XML or annotation-based configuration styles.
At the Strange Loop conference in St. Louis last month, Allen Wirfs-Brock gave an insightful presentation on the future of computing called "Post-PC Computing" is not a Vision. To Wirfs-Brock, the history of computing can be divided into different eras.
As technology has progressed, the need to view large images and data sets has become commonplace. Consumer-grade cameras take single images that are ten megapixels or more, and can be stiched together to produce mosaics in the gigapixel range.
Design by Contract™ is an approach to designing robust yet simple software. It provides methodological guidelines to achieve these goals without resorting to defensive programming. Instead, Design by Contract builds class invariants and pre/post validation of methods arguments and return values into the code itself.
MongoDB is a popular open source document-oriented NoSQL solution from 10gen. It is known for having excellent performance and scalability. The most frequent criticism of MongoDB has been its purported lack of single server durability. As of this writing the server is at version 1.8.2 and the Java driver is at 2.6.3.
In the past, processor vendors have increased performance by increasing CPU clock rates, but an upper limit is being reached due to factors such as the settling time of CPU circuitry and the dissipation of waste heat. Performance can still be improved by adding additional processors — dual and quad core machines are now becoming commonplace, but adding more than a handful of cores is cost-prohibitive on commodity hardware.
In our last SETT article on Clojure we introduced the immutable style of programming favored by Clojure: Immutability in Clojure - Part 1, Programming Without Variables. We showed how recursion can be used to do things like looping over a collection that would ordinarily require setting mutable variables. Traditionally, the functional programming languages Scheme and LISP that Clojure inherits from relied heavily on recursion.
Calling it a mobile phone is like the blind man finding the elephant's tail and thinking he's found a snake. Sure it fits in your shirt pocket, and it will let you talk to you grandmother. But that just the beginning of what this device knows how to do. It knows which way is up. It knows which way is north. It knows where it is on the planet. It knows how high it is above sea level.
The Problem with Objects - Mutability If you are a "programmer of a certain age" you will remember some of the initial hype surrounding OOP and objects: objects would rescue us from the maze of procedural spaghetti code through encapsulation. They would provide us with reusable building blocks, easy to reason about and reuse - just like Lego blocks, or bricks in a house.
Ever since the dot-com days of the late 1990s and early 2000s when it was first realized that the internet could be a source of massive revenue we have been awash in waves of recurrent hype and marketing. Often the hype turns out to be just that, as seen most dramatically in the bursting of the dot-com bubble.
The idea of learning by starting with very basic concepts and building on them is not new. In the 1960s and 70s, the state-of-the-art in computer programming was defined by two predominant programming paradigms: procedural (imperative) style (of which Fortran was the most widely used) and functional (declarative) style (of which LISP was the most common).
For over ten years, the OCI Java News Brief series has been bringing noteworthy new developments in the Java space to its loyal readers. Simply by following this series alone, you would have learned eight scripting languages for the JVM, ten web frameworks, seven ways to mock your tests, and countless cool open source libraries to make your job easier.
The concept of Representational State Transfer (REST) and its application to writing Web services has gained popularity in recent years as an alternative to SOAP-based Web services. Unlike SOAP, REST is an architecture and not a protocol. A RESTful Web service can be built using existing Web standards such as HTTP, URL, and XML.
Interest in mobile application development has increased significantly in recent years. This young industry has generated a tremendous amount of activity in both open and closed source projects. Many developers see an opportunity to reap the benefits of their efforts more directly than they have previously. Making the leap into mobile development can seem daunting, as it often involves learning new languages and technologies.
It could be argued that full testing of applications is just as important as the application itself. So any tool that makes testing easier and more natural is highly beneficial. Previously, there have been many Java News Briefs (here and here) that address testing functionality in isolation without requiring expensive resource setup/execution/teardown or when resources are not available.
Hudson is the excellent continuous integration server written by Kohsuke Kawaguchi and others. Integral to Hudson is a plugin mechanism that allows third-parties to extend Hudson in several ways, including reporting test failures, results of automated code inspections, notification of broken builds and publication of build artifacts.
TestNG is a Java testing framework that is particularly well-suited for use on large projects. It provides especially strong support for writing functional and integration tests as well as unit tests. TestNG key features include: test groups: test methods can belong to any number of groups test dependencies: tests can be skipped based on the results of other tests parameterized test methods and data providers: allows data to be supplied to a test or configuration method from…
JBehave provides a framework for doing Behavior-Driven Development (BDD) on the Java platform. Behavior-Driven Development is an extension of Test-Driven Development (TDD) that focuses on facets of behavior rather verifying 'units' whether they be methods, classes or other. The emphasis is on specification rather the verification.
In February 2009, Sun made an open call for small language changes that the Java™ development community would want to see in JDK 7. This set of changes is called Project Coin (based on the pun that coin means both "a piece of small change" and "to create a new language"). The idea was to solicit input for "5 or so" changes to the Java language from developers who will be involved in the implementation.
Google recently announced the public availability of Guava, a Java utility library previously available only internally at Google. Guava provides building blocks that build on the existing Java libraries and result in productivity aids for Java programmers. Guava also serves as an example of good Java coding idioms. Guava subsumes the Google Collections library and adds additional packages covering general-purpose utilities, input/output, primitives, and concurrency.
A very important aspect of writing software is trying to write a domain that focuses on the actual domain concepts as much as possible. That is, we want our domain logic to only deal in terms of the domain rather than dealing in fancy enterprise terms like SOAP, JMS, or REST.
Apache Maven is a "software project management and comprehension tool". It uses commands that may be orchestrated into a flow to perform actions against a software project. In this article we will use Maven to create, build, test, and share Java code. Our setting is within com.company. We will start in deptX, which is developing and distributing the Engine project.
"Boilerplate" is a term used to describe code that is repeated in many parts of an application with little alteration. One of the most frequently voiced criticisms of the Java language is the volume of this type of code that is found in most projects. This problem is frequently a result of design decisions in various libraries, but is exacerbated by limitations in the language itself.
In this article we will build the simplest possible "enterprise" application with the Spring Framework, using the Test-Driven Development practice. Our purpose is to demonstrate best practices and patterns in software development, showing each step from the first unit test to the final operation of the program and integration testing.
Many tasks in software engineering provide unique opportunities to fail. Persistence is a very good example, because we, the application engineers, have to live with the decisions we make for an extended period of time, and decisions made based on initial information might be the incorrect decision when more information is known.
The Apache Commons libraries are among the most popular third-party libraries for Java applications. Commons Lang is the library within the suite which adds many helper methods for the core of Java SE. Many developers are familiar with parts of the library, but are likely not familiar with the breadth of useful components in the library. This article is not a comprehensive review of all of the methods of the library; the Javadocs provide that level of detail
Writing software applications in which parts of the application run in concurrent threads introduces many challenges not present in single-threaded applications. Since the order of operations isn't fixed, failures can be difficult to repeat. Also, thoroughly testing the software requires more effort. There are two general categories of multithreaded software.
If you aren't already involved in building RESTful web services, you may not be aware of JSR 311. JSR 311 is "JAX-RS: The JavaTM API for RESTful Web Services". Its goal is to "develop an API for providing support for REST-ful (REpresentational State Transfer) Web Services in the Java Platform". If you aren't familiar with REST, you may want to read the Wikipedia page that describes REST. That page also has good links to other online resources regarding REST.
The Apache Commons libraries are a rich set of Java libraries. Commons Lang is the library within the suite which adds many helper methods for the core of Java SE. Many developers are familiar with parts of the library, but are likely not familiar with the breadth of useful components in the library. This article is not a comprehensive review of all of the methods of the library; the Javadocs provide that level of detail.
Thrift is a framework for creating interoperable and scalable services. Thrift was originally developed at Facebook, and contributed to Apache in order to foster greater use. Thrift is released under the Apache 2.0 license. Through a simple and straight-forward Interface Definition Language (IDL), Thrift allows you to define and create services that are both consumable by and serviceable by numerous languages.
Writing complex GUI layouts for Swing applications has always been a somewhat tedious and painful process. Sun provides several layout managers in the JDK, but they are either limited by their simplicity, or they sacrifice ease of use and maintenance for power and flexibility. Other third-party solutions have been created to address these issues, such as the popular JGoodies FormLayout, which was explored in the March 2005 JNB article: Intro to JGoodies Forms.
Over the last 20 years the human interaction with the computer has evolved from simple text or form based terminals to a much richer format with graphics, animation and other aids to improve the user experience. Human factors engineers have spent considerable time understanding user-base needs and tailoring both the look and the flow amongst screens to ensure optimal behavior.
The goal of this article is to provide a fairly comprehensive introduction to the Clojure programming language. A large number of features are covered, each in a fairly brief manner. Feel free to skip around to the sections of most interest. The section names in the table of contents are hyperlinks to make this easier when reading on-line.
Data Structures are fundamental to computer software. They allow the efficient storage, manipulation, and retrieval of data. Java's implementation of the canonical Data Structures is called Java Collections Framework. Google Collections, an open source contribution from Google extends the Java Collections Framework.
By now, you probably know what Google Android is: an open source operating system, virtual machine, and SDK for mobile devices. In 2008, T-Mobile released the first Android phone, the G1. 2009 will bring many different phones from a variety of carriers. Android presents an exciting opportunity for programmers. Millions of people will purchase Android phones in 2009, each including a link to the Android Market.
JavaFX was unveiled at JavaOne 2007 as a new initiative for consumer-oriented Java applications. The strategy includes a new programming language called JavaFX Script that is geared towards developing Java-based GUIs, as well as libraries and tools for developing desktop, browser and mobile applications. The rest of the year 2007 saw a JavaFX Script compiler being developed as the openjfx-compiler project on java.net.
As the undisputed Web search leader, there's no question that Google scales to meet increasing demand. I've been intrigued by the architecture that makes this possible since first reading of it in The Anatomy of a Large-Scale Hypertextual Web Search Engine published several years ago at Stanford University by Google's founders.
Automated analysis of real-time data plays an increasingly important role in our society. Real-time or near real-time systems in a variety of domains demand the ability to extract meaning from potentially disparate events from a variety of sources. The financial domain requires such processing in the areas of fraud detection, algorithmic trading, and risk management. Network management requires intelligent system monitoring to detect intrusions and error conditions.
Writing API for XML (WAX) is a free, open-source library for writing XML documents. I created it because I got an OutOfMemoryError while trying to output a large XML document from an application I wrote using JDOM, another Java-based XML library. I searched for other libraries that could write large XML documents but couldn't find any that were as simple to use as I thought they should be.
Homeschooling parents, computer science instructors and tutors continually seek new and engaging ways to teach children computer skills. One very popular platform for teaching the basics of programming logic is Scratch from the Lifelong Kindergarten group at the MIT Media Lab. It's a great environment that requires only basic reading and math skills; anyone six and up would have a blast with it. Scratch distills programming down to a series of drag and drop operations.
Calculating, storing, manipulating, and recording time is vital for many types of applications: banking applications use time to calculate interest; supply-chain forecasting applications use time to analyze the past and predict the future; etc. Unfortunately, it is difficult to meet these requirements.
ANTLR is a free, open source parser generator tool that is used to implement "real" programming languages and domain-specific languages (DSLs). The name stands for ANother Tool for Language Recognition.
"How soon can you have it done?" Sound all too familiar? Managers over the years have been faced with ever increasing demands to produce more software over shorter delivery cycles. As the economic landscape has gone global, these pressures to deliver have increased dramatically. For software developers this results in a responsibility to achieve the highest levels of productivity.
Google Collections is a free, open source library of Java classes that extend and enhance Java's version of the canonical data structures, collectively called the Java Collections Framework. The goal of the project is to extend the Java Collections Framework and make working with it more convenient. The most significant extensions of the Java Collections Framework are the new collections interfaces and their supporting implementations: BiMap, MultiMap, and MultiSet.
March: The Importance of Contextual Design in Reducing Project Costs and Increasing Customer Satisfaction
What is Contextual Design? Contextual Design is a scientific method for determining how software should be developed based on the users' actions and not their words Contextual Design (C.D.) utilizes three distinct steps to help determine and prioritize software requirements.
The book Extreme Programming Explained, by Kent Beck, suggests that the architecture of an application is better documented using automated tests rather than detailed specifications. The book briefly describes an example of documenting the required processing capacity of an application using tests. Improvements to the architecture of the application are made by updating the software to pass the tests.
Music software enables expressing musical ideas that must be both human-readable and computer-readable. Modern sheet music notation is extremely expressive, with the ability to communicate rhythm, melody, harmony, and a variety of performance instructions in a compact space. Unfortunately, as a graphical, human-readable notation, sheet music doesn't translate to computers well.
Scala is a programming language that integrates features of object-oriented and functional programming languages. It is statically typed and compiles to JVM bytecode. A scripting interpreter is also part of the Scala language distribution. At the time of this writing, the current release of Scala for the JVM is version 2.6 with a significantly less mature .NET version beginning to get more attention.
Someone hands you a file containing information - data or metadata - and instructs you to implement the facility to read it into a program for processing. As a Java developer, what do you do? In the past, using Java 1.1 or 1.2, parsing involved using general purpose classes and language facilities like String, StringBuffer, StringTokenizer, array traversal, and so on
There is no question we live in a distributed world today. In fact the Internet has become ubiquitous within our homes and organizations. In this brave new "networked" world IT professionals have a challenge to create systems with higher reliability and availability. Technologies which help provide business continuity, fault tolerance, and competitive service level agreements are needed to support these requirements.
Unlike in other systems, failures in collaborative systems are the norm rather than the exception. Any viable collaborative system must have fault tolerance mechanisms that allow for both the detection and mitigation of individual node failures. These mechanisms can be complicated and very expensive to build. The JGroups API gives developers easy access to reliable group communication capabilities.
Migrate the JUnit 3.8.1 tests to 4.4... There are a lot of JUnit 3 tests out there. The emphasis on unit testing and test driven development has resulted in developers creating a significant corpus of JUnit tests using the JUnit 3 test framework. The migration of these unit tests to JUnit 4, though, has been fairly slow. Some of the reason for this is the less than rapid move from JDK 1.4.x to Java 5 (or later).
Allowing users to enter data is a vital part of almost every application. However, making sure that the data makes sense is a challenge in many different cases. This article provides an overview of JGoodies, which allows validation at several points (at key change, at focus loss, etc.), presents several different ways to indicate an error condition (text fields, icons, color, etc.), and can give the user hints on what input is valid.
Historically, web services in Java have vexed developers with myriad specifications and complex solutions. Surrounded by legions of W3C specs, JSRs, and XML descriptors, these developers endured complexity while other Java communities (such as EJB3, Seam and Guice) celebrate the elegance of Java 5 and beyond. Moreover, with the success of the sleek REST school of web architecture, there is a fitting rallying cry: "hear our Java Simplification Request for web services!
In the past few years, the Java community has embraced the principles of Dependency Injection (DI). DI frameworks such as Spring are in widespread use. Recently, a new DI framework called Guice (pronounced “juice”) has drawn attention. As opposed to more comprehensive frameworks like Spring, Guice functionality is limited almost exclusively to Dependency Injection (some AOP support representing the “almost”).
This article provides an introduction to JRuby, an implementation of Ruby on the Java Virtual Machine (JVM).
Grails is a framework for agile web development using Groovy and Java. There are already a lot of frameworks for building web applications in Java so one may ask "Why another web framework for the Java platform?" or "What really sets Grails apart from all of the other choices?". This article aims to help answer those questions and others by demonstrating how simple it can be to build web applications with Grails.
Code coverage improves software quality by illumination: it shines light on executed code, and reveals dark corners that are untested or never used. This software metric can enhance many projects, from standard business apps to those with ultra-low tolerance for error (e.g. a medical device).
Software in the hands of a knowledgeable user should be empowering. Applications can act as the very extension of their user's will; performing tasks, solving problems, and generally being helpful. However, no matter how well-intentioned a program may be, the user interaction can either be fluid and intuitive or haphazard and clumsy. The best user interfaces are the simple ones, where the user is neither constrained nor overwhelmed by the choices to be made to properly express a need.
Nearly any software project will have its share of build problems. As a project grows larger, errors that "break the build" tend to increase — and unfortunately tend to have a greater impact on the project's quality. Finding the source of integration problems becomes harder as time elapses between when developers commit code and that code is built as a single entity.
Berkeley DB Java Edition is an embedded database written in pure Java. It allows efficient persistence of data into local disks. It provides full ACID transaction semantics for data storage. It uses an in-memory cache to speed up data reads when the working set can fit into memory. And its log-based storage system makes data writes very fast.
Concurrent or multi-threaded software is not a new technology but its importance has been accelerating. This is primarily due to the low cost of multi-core CPUs that are becoming common in even the most basic machines. This trend is expected to continue as hardware manufacturers, following Moore's law, cram greater numbers of cores onto a single die at ever lower costs.
JSR-168: Portlet Specification was constructed "to enable interoperability between Portlets and Portals." This article will focus on the Portlet side of things, by showing how to create a simple Portlet and deploying that into a Portal. We will then refactor and extend the Portlet to see how some of the patterns of Servlet development might be used.
QuickFIX/J is an open-source implementation of the Financial Information eXchange (FIX) protocol. FIX is a messaging standard for real-time electronic security exchange transactions. FIX defines application level messages for creating, canceling, and replacing orders for stocks, options, futures, etc., as well as messages for reporting the status of an order request.
Many applications have a need for defining units and measures. Engineering and scientific applications need to support length, mass, volume, velocity, and many more types of units. Financial applications require currencies, perhaps of several different countries. Mathematical applications need functions and complex numbers. By default, Java does not provide support for application developers to add these concepts to their application.
The Real-Time Specification for Java (RTSJ) is designed to enhance the Java platform with capabilities required by real-time applications. The RTSJ team members believe that RTSJ for Java will be the first real-time programming language to be both technologically and commercially successful. That's a very strong statement which will undoubtedly provoke debate, but it also indicates the scope of the capabilities and enhancements in RTSJ.
The EJB 3.0 specification is being defined by JSR-220. Part of that specification is the new EJB 3 Persistence API. This persistence API is the new standard for object-relational mapping solutions in Java. This article will explore the fundamentals of the new API and provide practical code samples to serve as a tool to help developers quickly get started with the API.
Speech synthesis, also known as text-to-speech (TTS) conversion, is the process of converting text into human recognizable speech based on language and other vocal requirements. Speech synthesis can be used to enhance the user experience in many situations but care must be taken to ensure the user is comfortable with its use. Speech synthesis has proven to be a great benefit in many ways.
The upcoming JDK 6.0 (Mustang) release does not approach the magnitude of enhancements in JDK 5.0, but does offer several interesting updates. Among these updates is the incorporation of JSR 223 Scripting for the JavaTM Platform. Essentially, this introduces a standard framework to allow scripting language programs to be executed from and have access to the Java platform. It provides many of the capabilities of BSF (Bean Scripting Framework)
SWIG generates wrapper code from C/C++ header files that allows C/C++ functions to be invoked from other languages. This includes compiled languages such as C#, Java, Lua, Modula-3 and Ocaml "scripting languages" such as Perl, PHP, Pike, Python, Ruby and TCL LISP variants such as Allegro CL, CLISP Scheme variants such as CHICKEN, Guile and MzScheme Why would you want to do such a thing?
This article provides an introduction to Fit (Framework for Integrated Tests), a tool for expressing application acceptance tests using tables, and one that solves a fundamental need in software development: capturing business rules in an easily accessible and executable form.
A proxy provides a surrogate or place holder for the target object to control access to it. It introduces a level of indirection when accessing an object. The JDK dynamic proxy, which has been available since JDK 1.3, is often used to create proxies dynamically. The JDK dynamic proxy is simple to use, but the JDK dynamic proxy approach requires the target objects implement one or more interfaces. What if you want to proxy legacy classes that do not have interfaces?
Last month I wrote an introduction to the NetBeans platform that explained what the platform is, as well as its advantages and disadvantages. This month, I'll show you how to create several modules that together form a complete application. My goal is to give you a concise but complete overview of what's required and point you to existing documentation that explains things in greater detail.
When developers think of NetBeans, they typically think of the popular open-source IDE. I want to be clear from the beginning: this is not an article about how to use the IDE. Instead, I'll explain how to get a head start towards creating desktop applications by reusing the infrastructure on which the IDE itself is built. This will allow you to spend more time on the business logic and less time on the infrastructure development common to any GUI application.
In recent years, the development community has found unit testing (especially automated unit testing), invaluable in building reliable software. Mock objects have been a key technique for enabling automated unit testing of object-oriented software. However, when we expand the scope of testing into the realm of distributed systems, unique problems arise from the increased complexity.
JavaServer Faces (JSF) is Sun's latest technology intent on making web development easier. It was first released March 3, 2004 and was rolled into the fold of J2EE technologies. JSF is a framework built upon Java Servlets and JavaServer Pages (JSPs) technologies to provide a better Model-View-Controller (MVC) architecture. It makes extensive use of user interface components, JavaBeans, and events such that user interface development is more similar to frameworks like Swing.
JGoodies Binding is an open-source framework for binding Java Beans to UI components. The JGoodies Binding API: Simplifies binding Java Bean properties to UI components Reduces the lines of code needed to build Java UIs Encourages separation of domain and presentation layers.
The JDesktop Integration Components (JDIC) project lets portable JavaTM applications access native desktop features. JDIC is a Sun-sponsored open source project currently at release 0.9. When complete, portions of JDIC may eventually become part of J2SE. This article examines the Tray Icon portion of JDIC version 0.9, which lets you create "tray icons" on the native desktop with just a few lines of code.
Web services have become all the rage. With the promise to ease interoperability and allow for large scale software collaboration over the internet by offering services through a language and platform independent XML-based interface. Web Services were discussed in a previous SETT article, "SOAP and Web Services" by Mark Volkmann.
Sun provided many Layout Managers by default with Swing. Some are simple to use, like FlowLayout, BorderLayout, CardLayout, and GridLayout. Unfortunately, these Layout Managers are limited in the layouts and interfaces they can produce. Other Layout Managers, like SpringLayout and GridBagLayout, are powerful enough to create virtually any desired interface. Unfortunately, they are not very easy to use.
You've heard about generics. You've heard about autoboxing. You've even heard us talking about "Other New Features" of Java 2 Standard Edition (J2SE) 5.0 a few months ago. Yet there are still features of the latest JDK that are under covered. The new monitoring and management features fall into this category.
Developing Swing components while staying on the path of test-driven development has no doubt challenged many seasoned Swing developers. Many aspects of GUI testing are indeed not that complicated, as long as one adopts the simplicity principle. Moreover, there are quite a few Swing testing frameworks that make it easier to test Swing applications – Abbot and Jemmy being among the most popular.
JAMES is short for the Java Apache Mail Enterprise Server. It is an easy to use Email based application platform implemented in 100% pure Java. With very little setup and configuration it can be used to meet any basic POP3, SMTP and NNTP needs one might have but it is capable of doing much more. Using customized components called Mailets and Matchers JAMES can host complex Email based applications. As of this writing the latest release from apache is version 2.2.0.
REST is an architectural style, not a standard or API. It was conceived by Roy Fielding in his dissertation in 2000 (see references at end). However, existing standards including URLs, HTTP and XML can be used to implement REST applications. REST is used to build distributed applications such as Web apps. and Web services. REST servers are any pieces of software that respond to REST requests. They can be implemented in many ways, including Java servlets.
The Spring framework (www.springframework.org) has recently gained popularity as an alternative to current J2EE programming practices. In fact, Spring provides general functionality which is useful outside of J2EE, serving to promote good programming practices such as designing to interfaces, unit testing, and flexibility (e.g. avoiding dependencies, configurability). At its core, Spring is a system for assembling components via configuration files (typically XML).
For the last several years, OCI has published a series of articles describing the basic features of the Java 2 Micro Edition (J2ME) including the Connnected Limited Device Configuration (CLDC) and Mobile Information Device Profile (MIDP). At the time, J2ME and CLDC/MIDP were, for all practical purposes, synonymous.
As this article goes to press, the release of Java 2 Standard Edition version 1.5 (J2SE 1.5) is approaching quickly, and is currently in its second public prerelease (beta 2). This new version of Java represents a significant upgrade, and may possibly have as big an impact to developers and users as the transition from Java 1 to Java 2 back in the late 1990s. A simple Google search reveals considerable information about the major feature enhancements.
What do IntelliJ Idea, Eclipse, and SmartCVS all have in common? If you said Java, you would be correct. But if you said that they all include a native launcher, you'd also be correct! They all include a native launcher for Windows. Why?
Writing and maintaining complicated software is a difficult task and every programmer inadvertently makes mistakes. Usually these are minor typographical errors that will be caught at compile time, but others may remain undetected until the system is in production. In the most extreme cases, the bug will cause system failure as was the case in the massive blackout in the Northeast last summer.
Jakarta Tapestry is an open-source framework for creating Java web applications. At this point you're probably saying, "Not another framework!" And, in most cases I would agree with you. However, if you spend a little time looking at it you might find Tapestry differentiates itself from other frameworks and is worth a serious look. Tapestry is a component-based framework that makes developing web applications very similar to developing traditional GUI applications.
Java Remote Method Invocation (RMI) is a popular mechanism for constructing distributed, object-oriented computing systems using the Java programming language. Utilizing RMI, a distributed application can be developed completely with Java. RMI has the advantage of making distributed computing available to a large number of Java programmers without a significant learning curve. RMI's underlying wire protocol is the Java Remote Messaging Protocol (JRMP).
The Jakarta POI project consists of APIs for manipulating various file formats based upon Microsoft's OLE 2 Compound Document format using pure Java. OLE 2 Compound Document Format based files include most Microsoft Office files such as XLS and DOC as well as MFC serialization API based file formats. The POI File System POIFS can be used to read a document written in OLE 2 Compound Document Format using Java as well as write such documents.
Groovy is an open-source scripting language that is implemented in Java and is tightly integrated with it. It requires Java's JDK 1.4. Groovy adds some features of the Ruby and Python scripting languages to Java. Features of Groovy include dynamic typing, closures, easy object navigation and more compact syntax for working with Lists and Maps. These features and more are described in detail in this article. Here's a quote from the Groovy web site.
XQuery is a strongly typed functional language for processing real or virtual XML data. Its rich data model and ergonomic expressions provide an environment where most programmers would feel at home taking apart and piecing together XML. The XQuery specifications are prepared by the W3C XML Query Working Group, and are in the Last Call Working Draft stage. Hopefully they will achieve recommendation status in 2004.
The Java Cryptography Extension (JCE) provides APIs for performing cryptographic operations in Java code. To understand what this means, it is useful to define what we mean by cryptography. cryp·tog·ra·phy n. 1) The process or skill of communicating in or deciphering secret writings or ciphers. 2) Secret writing.
There are a variety of open source tools available today for constructing a data access API, which simplify what has been in the past a complicated and error prone mechanism. Before these tools became available, applications resorted to calling JDBC APIs and passing SQL strings to Statement objects to execute data lookup queries. The lookup calls returned ResultSets that an application would use by calling accessor methods matching the data types of the returned columns.
Distributed and enterprise computing presents many challenges to software architects. One fairly typical problem revolves around the fact that many of today's large scale systems integrate newer object-oriented components with legacy systems, resulting in the problem of designing and implementing reliable inter-application communication.
Java web development has come a long way. We have been introduced to applets, servlets, JavaServer Pages, WAR files, servlet filters, JSTL, JavaServer Faces (see last month's Java News Brief), and the list goes on. These technologies have aimed to make web development easier, more portable, more powerful, and more maintainable. The coming release of JSP 2.0 and Servlet 2.4 continues that tradition.
Web application development in Java has come a long way. We have matured from our yester year implementations using Java Servlets to render HTML code, to Element Construction Set (ECS) to modularize HTML rendering and representation, to using JavaServer Pages (JSP) technology to provide clean separation of business logic and presentation. Lately Model View Controller (MVC) frameworks like STRUTS have gained wide acceptance to rapidly develop complex web applications.
Java Specification Request (JSR) 14 proposes to introduce generic types and methods to the Java programming language. Since the advent of Java, developers have been begging for the addition of generics to the language. It is the number one requested Request for Enhancement (RFE) on the Java Developer Bug Parade. Generics have been used in other programming languages for years and now they will be part of the Java 1.5 "Tiger" release due out some time at the end of 2003.
Unit testing is a critical aspect of software development. Many development processes, including extreme programming (XP), list unit test writing as a critical step in software development. The JUnit testing framework has revolutionized the ease with which Java developers can write and automate the running of unit tests.
Messaging has become an important piece of the wireless technology landscape. Simple text messages are relatively easy to send from a mobile device and vendors have discovered that messaging provides a consistent source of revenue from teenagers and business users. Although many wireless service plans are now providing unlimited text messaging, some vendors may still charge per message.
The combination of XML and Java has been advertised as the ideal fusion of technologies - Java providing a portable executable (bytecode) format and XML providing a portable data format. Since the introduction of JDK 1.4, Java has natively supported low-level XML APIs such as DOM and SAX. JDK 1.4 also introduced serialization and deserialization of JavaBeans via the XMLEncoder and XMLDecoder classes.
The Jakarta Struts framework is based on the well-known Model-View-Controller (MVC) architecture. When Java servlets came into existence, there was great excitement about developing lightweight web applications that spawned a new thread for each request as opposed to the heavyweight CGI methodology of starting a new process for each request.
Sun introduced dynamic proxies in JDK 1.3 greatly simplifying applications of the proxy design pattern. Dynamic proxies make light work of decorating and overriding method invocations at runtime and even completely fabricating implementations from scratch. We no longer need to abuse ourselves, manually coding proxy classes or fighting with code generators in our build scripts. Dynamic proxies take the sting out of these rote processes.
GCJ, a radically traditional(*) Free Software implementation of the Java language, has been part of GCC since the 3.0 release in June 2001. Currently at version 3.2.1, it is supported on GNU/Linux on Pentium, Itanium, Alpha, PowerPC and AMD Hammer, FreeBSD on Pentium, Solaris on SPARC and more. Support for Windows using MinGW is also available. It can compile Java source code to either Java bytecode (class files) or native machine code.
The final release of Java Specification Request (JSR) #51 introduces APIs for scaleable I/O, fast buffered binary and character I/O, regular expressions, and charset conversion. These new APIs introduce four new abstractions: Buffers, Character sets, Channels, and Selectors. This article will look at each of these abstractions, discuss the motivation for using the New I/O (NIO) APIs, and examine the performance characteristics of a NIO enhanced log parsing application.
Ever tried to get a group of software developers to agree on a coding standard? We're all reasonable people, right? Certainly we're mature enough to come to an agreement on decisions that are based on personal preference. Well after 20 years of working in the software business I've never seen a team of developers successfully do this. Sure, some dissenting team members can be beaten down until they conform, but they're not happy about it.
XML and its supporting technologies XML Schema and XSL Transformation provide very powerful mechanisms to describe, validate, and transform data. Using these technologies, applications can be made to communicate and share data with other systems, regardless of platform incompatibilies.
For some time now web application developers have utilized Sun's Java Servlet APIs for processing HTTP query and submission requests from client browsers, and generating dynamic HTML (or XHTML) content as a response. Put plainly, Servlets are services, implemented in the Java programming language, that run inside a J2EE-compliant "container," typically a web or application server.
The Java 2 Micro Edition is designed to target devices that have fewer capabilities than standard desktop computers. To take advantage of the wide variety of capabilities in different devices, J2ME provides many different configuration and profile specifications. Until now, the only available configuration has been the Connected Limited Device Configuration (CLDC) 1.0 and the only available profile has been the Mobile Information Device Profile (MIDP) 1.0.
Securing access to enterprise resources is critical to any Java 2 Platform Enterprise Edition (J2EE) application. Any project that has security requirements (and what project doesn't) should immediately begin to design the security infrastructure and prepare to refactor as the project matures. This article will help shine some light on some of the most important aspects of developing and implementing an enterprise security framework.
Java Data Objects (JDO) is a specification to enable transparent persistence of Java objects. The JDO specification exists as Java Specification Request 12 (JSR 12) from the Java Community Process (JCP). The first version of the specification made available for public review was posted on July 6, 2000 and version 1.0 of the specification was posted on April 30, 2002.
As a required element of the Java 2 Enterprise Edition (J2EE), the Java Connector Architecture (JCA) provides a standardized means to integrate with Enterprise Integration Systems (EIS). Such systems include: Enterprise Resource Planning Systems - SAP, PeopleSoft, Baan Transaction Monitors - CICS, Tuxedo Database Management Systems - Oracle, Sybase Prior to the introduction of JCA, each EIS provided a proprietary solution for EIS/J2EE integration.
With the recent release of J2SE 1.4, the Java language now includes a simple assertion facility. What is an assertion? Simply put, an assertion is a boolean expression that a developer declares to be true during program execution. The new assertion facility is simple to use and can greatly increase software reliability by allowing developers to easily declare acceptable program behavior to help detect bugs early in the development process.
The focus of this article is on how pooling resources can be used to gain efficiencies when using sharable objects such as sockets, CORBA objects, database connections, files and the like. The architecture of a simple, re-usable pooling framework will be presented along with a sample implementation. Today, many free pooling implementations are available and major software vendors incorporate pooling capabilities in their products.
IntelliJ IDEA is a remarkable Java Integrated Development Environment (IDE) from IntelliJ Software. IDEA is clearly designed and built for efficient coding. It features an unobtrusive user interface with minimal screen clutter, 100% of its functionality is accessible via keyboard shortcuts, and it is highly configurable.
Common Object Request Broker Architecture (CORBA) is an open specification for the design and implementation of distributed, object-oriented computing systems. The CORBA specification is a product of the Object Management Group (OMG), an international consortium of over 800 companies. The OMG was founded in 1989 with the goal of providing open standards to enable the development of extensible, reusable and less costly computing systems.
Using Java Web Start, developers can deploy full-featured Java 2 applications over a network. As easy to use as accessing a web page, Java Web Start provides one click activation and guarantees that users are always running the latest, centrally controlled version of the application all made possible using the new Java Network Launch Protocol (JNLP).
In a previous article, Java 2 Micro Edition - Java for Small and Embedded Systems, we explored how Java 2 Micro Edition (J2ME) can be used to program Palm devices. A lot has changed on the J2ME landscape since then. In this article, I will give you an update on the current state of J2ME. We will then explore how J2ME can be used to extend your enterprise applications to wireless devices.
Regular Expressions (regexs or REs) are strings that describe patterns of characters in other strings. They are effective tools for searching and manipulating text and are built-in features of Perl, Python and many other scripting languages. They are a ubiquitous aspect of programming and computer science, but have been absent from the standard Java API before now. This article discusses the java.util.regex package, which is a new feature of the J2SE 1.4.
Starting with J2SE 1.4, the standard set of APIs will include the Preferences API made up of classes and interfaces in the java.util.prefs package. The Preferences API has been designed to provide a platform independent interface for storing preferences data. This article explores the Preferences API as it is implemented in the J2SE 1.4 Beta 2. Note that some details of the implementation may change in the final release of J2SE 1.4.
SOAP and web services are emerging technologies that are getting a lot of press. What problems do they solve? What does their use mean for other distributed architectures (DAs) such as CORBA, DCOM and EJB?
The JDBC API is Java's way of accessing any tabular data source, typically a relational database. The API presents an object-oriented interface to the data and is made up of classes and interfaces in the java.sql package, with standard extensions in javax.sql. Since JDBC 1.0, a lot of functionality has been added to the API. JDBC 2.0 introduced scrollable ResultSets, updateable ResultSets, batch update capability and support for new SQL3 data types.
The first beta release of JDK 1.4 came out just a few weeks ago, and included with it is a new logging API. This API was first described in JSR 47. Essentially the same description is also available in the documentation of logging for the beta of JDK 1.4 . In addition to the implementation provided in JDK 1.4, there is an open source implementation of the API for JDKs 1.2 and 1.3 called Lumberjack available on SourceForge.
Java Servlets have been around for several years now and have proven themselves in delivering robust and portable web applications. Since their introduction, the Java web development front hasn't slowed down. Along came JSPs introducing an easier way to generate HTML. XML and XSLT entered the picture making it easier to separate presentation from data, among many other benefits. The Servlet API hasn't stood still either.
The Enterprise Java Beans implementation allows the programmer to manage EntityBeans with either container-managed persistence (the EJB container manages the data of the EntityBean) or bean-managed persistence (the developer manages the data explicitly). Many times developers are dealing with legacy applications that do not map to container-managed persistence and must use bean-managed persistence.
This month's Java Technical Insight brings you to the world of scripting languages. In this article, we focus on two scripting language implementations that interact nicely with Java: Rhino and Jython.
Introduction to Java Security Security is perhaps one the most visible, yet least understood, aspects of Java. Starting with the first version, every logical and physical component of the Java platform has been designed and implemented with security a chief concern.
For several years, Java has been a strong tool for desktop and enterprise application development. But where do you turn when the software you want to develop runs on a computer that fits in the palm of your hand? The answer is to turn to the new Java 2 Micro Edition (J2ME). J2ME is a subset of the familiar Java 2 Standard Edition (J2SE) designed specifically for programming small and embedded devices where memory footprint and performance issues due to limited resources are key concerns.
Ant was developed as part of the Apache Jakarta project. It is used to build many Open Source software packages such as Tomcat and JDOM. It can also be used to build your software.
One of the new additions to the Java 2 Standard Edition (J2SE) version 1.3 release earlier this year is the Dynamic Proxy API. This mechanism allows programs to dynamically create bytecode that represents classes and create new instances of those classes. A dynamic proxy class is a class that implements a list of interfaces specified at runtime.
The tag extension mechanism in Java Server Pages (JSP) version 1.1 allows programmers to extend the capability of JSP by creating custom tags. These custom tags, which utilize an XML-style syntax, remove the need to embed Java code directly into JSP pages. Non-programmers can focus on GUI layout, using a set of custom tags which were created by a separate team of programmers or else purchased from a vendor.
This month we examine an approach to creating a dynamic web site using Java servlets, XML and XSLT. The application selected to demonstrate this is a shopping cart. Users can add items to their cart, remove them and purchase the contents of the cart. Click here to view the complete article (245k PDF).
In the dark ages (2-3 years ago!), Java Applets were the primary tool for creating web-enabled Java programs. As we all know, Applets have not lived up to the initial hype. The reasons are numerous: incompatible web browsers buggy browser JVM implementations slow download and startup times security restrictions Servlets were the next big thing, resolving many of the Applet problems.
Java developers are all familiar with the Java garbage collector, which eliminates the need to explicitly deallocate objects. However, few know that there is a package in Java 2[TM] (JDK 1.2 and later) which allows them to coordinate their activities with the garbage collector. This package java.lang.ref, provides a number of classes to allow developers some interaction with garbage collector.
For Java developers, the try-catch block is a way of life. A fundamental part of this mechanism is the "finally" block. As the name suggests, code in a finally block is always executed last, after all code in a corresponding try-catch block has executed.
Java has always included support for multi-threaded programming, in which more than one task executes concurrently. Two basic problems commonly occur in multi-threaded programs... This article focuses on a few simple programming techniques which you can adopt to minimize the possibility of race conditions.
Remote Method Invocation (RMI) is a technology that is used to implement pure Java distributed systems. This article will present a mid to high level overview of what RMI is, how it relates to some other similar technologies, and will touch on some of the technical details involved in implementing a system built using RMI. While some technical coding details will be discussed, they will be discussed for the most part at a high level, and some working sample code will be covered.
The Java Virtual Machine (JVM), is the Sun Microsystems specification of a (emulated) virtual 32 bit processor, that directly supports the Java programming language. The JVM executes operating system and hardware independent binary format bytecodes. JVM's can currently execute 254 different types of "bytecodes" (virtual machine instructions). Each bytecode is exactly one byte (8 bits). (bytecode 186 are unused)
The Java 2 Platform Enterprise Edition (J2EE) is a specification for a collection of software components to enable development of multi-tiered web-based applications. These software components include servlets, Java Server Pages (JSPs), and Enterprise Java Beans (EJBs) – technologies described in earlier Java News Briefs.
The JDBC API is a Java API for accessing relational (tabular) data, especially those stored in a relational database. JDBC has been an integral part of Sun's Java Development Kit since 1.1, and is supported by virtually all relational database vendors.
Virtually any non-trivial program in Java, or any other programming language for that matter, deals with groups of objects organized together within a collecting or containing object. The most familiar container object is the indexed array, which is supported by most, if not all, modern general purpose programming languages.
One of the powerful advantages of Java programming is the ability to easily create robust modern graphical user interfaces (GUI). Sun's first attempt at a GUI toolkit was the Abstract Windowing Toolkit or AWT. Although a powerful concept, the AWT had significant drawbacks in terms of functionality and stability. Recognizing these shortcomings, Sun has superseded the AWT with the Java Foundation Classes' Swing package.
Java Server Pages (JSP) is a technology developed in collaboration between Sun Microsystems and web server industry giants such as BEA, Netscape, IBM and others. JSP documents are server-side documents containing instructions which need to be processed before being transmitted to the client. These instructions could be as simple as displaying the current time, or they could perform complex data retrieval and manipulation.
XML, which stands for Extensible Markup Language, is a markup language that can be used to define custom "tags" similar to HTML tags. It is a subset of another markup language, Standardized General Markup Language (SGML), that is considered to be too complex for wide-spread use. One of the main goals of XML is to separate document content from its formatting.
Enterprise Java Beans (EJB) is a specification provided by Sun Microsystems that defines a framework and development model for server side components in Java. Much like the Java platform itself, EJB is simply a specification; the implementation is provided by vendors who develop their products to conform to the specification. EJB is built on top of existing distributed computing technologies such as CORBA and RMI.
The typical definition says that a Servlet is a Java class that extends the functionality of a web server, offering an alternative to CGI scripts. Specifically, the javax.servlet and javax.servlet.http packages make up a standard extension to the Java platform, which allows developers to create Servlets. Servlets are usually used for the following tasks: Processing HTML Forms; interacting with databases; and dynamically generating HTML.
Tooltips are small windows of text that popup when the user leaves the mouse cursor over a component for a second or two. They are used to explain the functionality of the component. Tooltips are an integral part of Swing components. They can be specified by calling the setToolTipText method.