WebLogic Server — using WLST commands from Java

bea_logoI have been working with WebLogic Server since 1999 when it was still a BEA Systems product. Though professionally I would characterize myself as an architect/developer, I have been working with WebLogic administrators for more than a decade. In fact, at BEA Systems I was the author of the original BEA WebLogic Administrator Certification exam. As a WebLogic consultant, the primary tools that I use with clients are the WebLogic Scripting Tool (WLST) and the WebLogic Diagnostic Framework (WLDF).

WLST is based on Jython, the all-Java version of Python. Since Jython runs in the JVM it is possible to invoke WLST commands directly form Java code. The possibilities are endless, you could use a Swing Gui front end and a WLST back end to provide automated management and monitoring for WebLogic.

Read the rest of this entry »

7 Comments

How about a FREE set of WebSphere and Spring Eclipse Development Tools?

Lately I’ve been working quite a bit on expanding the classes available in our Spring 3.0 category.  One of the things that has always set our Spring training apart is that we offer options to develop Spring applications for WebSphere (in addition to other classes that use JBoss or Tomcat).  Spring has been a very popular framework and WebSphere a very popular server so it has always been a popular choice for our clients.

In the past, the downside has always been that WebSphere development required Rational Application Developer (RAD).  Doing Spring development in RAD was never a great fit since you couldn’t use the Spring Eclipse plug-ins that were available from SpringSource.  You also had some choices from MyEclipse for WebSphere and Spring tools but those weren’t free.  Now recently, IBM released FREE Eclipse tools so you can control and deploy to a WebSphere server directly from Eclipse, something that used to require RAD.  I’ve blogged about that before but that was without Spring tools.

So while developing our Spring 3.0 classes for WebSphere I wanted to take a fresh look at what would be the best environment for this.  The contenders would be:

  1. RAD without installing Spring tools
  2. MyEclipse Bling (WebSphere “Blue” tools and Spring)
  3. RAD with Spring tools added
  4. Eclipse with WebSphere and Spring tools installed

Read the rest to see the “Winner” and how to set it up!

Read the rest of this entry »

No Comments

Mobile Requirements

http://www.youtube.com/watch?v=Ww09qgqlLYw

This video examines some special considerations necessary in the requirements capture process for mobile applications.

No Comments

WebSphere 9 Coming Soon?

UPDATE:  As it turns out my guess that there would be an “intermediate” release was correct.  WebSphere 8.5.5 was released recently which mostly has updates for the Liberty profile being a certified implementation of the Java EE 6 Web profile.  The Redbooks updates was obviously for this 8.5.5 version.  The other points are still true though and I would be surprised if there is not an announcement of WebSphere 9.0 at or before the Impact 2014 conference next spring.

ORIGINAL POST: I know for those of you out there using WebSphere, the initial reaction to the title of this blog post is probably “But we haven’t even finished migrating to WebSphere 8.0/8.5!”  I myself didn’t think a new WebSphere version could be waiting in the wings but there have been a few interesting data points to consider:

– Java EE 7 should be final by end of May this year (http://java.net/projects/javaee-spec/pages/Home).

– Many Java EE 7 JSRs are already in final review (http://jcp.org/en/jsr/stage?listBy=proposed).

– IBM Developerworks has betas of 9.0 versions of development tools (https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en)

– IBM Redbooks had a residency open to update several core WebSphere Redbooks to “the latest release of WebSphere Application Server”.  This was only open to IBM employees since people who work on the Redbook would obviously get a “sneak peek” at the next WebSphere.

Although thinking about when WebSphere 9 might be released is interesting, I think there is another possibility, that there will be some “intermediate” release that includes updates mainly to the Liberty profile, the lightweight server that IBM is trying to tailor to developers.  Perhaps there will be something like an 8.5.5 release mainly to pick up updates to the Liberty profile.

Read the rest of this entry »

2 Comments

Idempotent Services in SOA

http://youtu.be/xGygRSTn4dY

No Comments

5 Beginning Tips for iOS

So you want to develop an iOS app? What do you need to know? This blog provides you with five useful tips for getting started.

iOS is the name of the operating system that runs in iPhone, iPod Touch, Apple TV, and iPad devices.  The OS is based on Mac OS X.  Both are built on the Darwin kernel, which is a UNIX like system.  It was originally called "iPhone running Mac OS X".  The name changed to "iPhone OS" and finally to iOS.

Tip #1 – Buy a Mac

In order to develop iOS apps, you’ll need a Mac to do so1. Although there are some postings on the Internet that provide you with hacks for developing iOS applications on Windows, it’s advisable to purchase the real deal.

The most affordable Mac you can purchase is a Mac mini (starting at around $600). However, you may want to invest in a MacBook Pro (starting at about $1200), since it’s portable.

http://www.apple.com/mac/

Tip #2 – Download Xcode

The IDE that’s used for iOS development is called Xcode and is only available on the Mac.  It includes a code editor, a debugger, a user interface builder, a simulator, and performance tracing tools.  Xcode is also used for developing Mac OS applications.

To get a copy of Xcode, you’ll also need an Apple ID.  Download Xcode for free from the Mac App Store:

https://developer.apple.com/xcode/

Tip #3 – Learn Objective-C

Writing iOS applications requires that you learn a new language: Objective-C.  Objective-C is an object-oriented superset of ANSI C, developed by Brad Cox in 1980.  The syntax is very different from other object-oriented languages you may be used to, like C++ or Java.  For example, to define a method called setValues that accepts a String called n and an integer called id and returns nothing, you’d have to write the following code:

- (void) setValues: (char*) n id: (int) id {

name = n;

employeeId = id;

}

For a primer on Objective-C programming, see:

https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/Learning_Objective-C_A_Primer/

Tip #4 – Join the iOS Developer Program

iOS apps can only be distributed to the general public on the Apple App Store. In order to test your apps on an actual device, or publish your apps to the App Store, you’ll need to be a member of the iOS Developer Program, which costs $99/year. This membership is good for your entire team. That is, it’s not a per developer membership.

https://developer.apple.com/programs/ios/

There is also an iOS Developer Enterprise Program, which costs $299/year.  The advantage of this program over the iOS Developer Program is that you can distribute proprietary apps in-house instead of on the Apple App Store.  That is, they can be hosted on an internal web server and distributed wirelessly through a link contained inside an email/SMS message.

https://developer.apple.com/programs/ios/enterprise/

For a comparison of the membership programs, including a free iOS Developer University program, see:

https://developer.apple.com/programs/start/ios/

Tip #5 – Take an iOS Programming Course (Like Ours)

To really learn iOS Development, you’re best off taking an intensive course on the subject.  We offer a 5 day class which teaches you how to develop apps that you can deploy to iPhones, iPod Touches, and iPads.  The first two days of the course is spent building a solid foundation in Objective-C and the remainder of the time is spent on iOS development.  Please check it out:

WA1920 Enterprise iPhone and iPad Programming

1Technically, there are several Windows-based, third party solutions for iOS development, including game engines (e.g., Unity, Marmalade SDK), HTML/JavaScript solutions for hybrid application development (e.g., Appcelerator Titanium, Genuitec MobiOne Studio), Flash development (i.e., Flash Professional CS6), and general iPhone/iPad app creators (e.g., Dragonfire SDK). Unlike Xcode, most of these tools cost money.

No Comments

Implementing SOA Governance Using WSO2 Governance Registry

Introduction

In this blog, I’ll briefly describe what SOA Governance is and list the features of a SOA governance toolset. Then, I’ll provide a tutorial on several of the design-time, governance capabilities of WSO2 Governance Registry, a freely available, open source governance toolset.

What is SOA Governance?

SOA governance builds upon IT governance and aims to provide a framework and model to manage SOA applications in relation to managing service lifecycles.

There are three stages of SOA governance:

  • Design-time governance – provides rules and policies for creating, exposing, and consuming services
  • Change-time governance – details how organizations can effect changes in the overall system with the least disruption to the existing business and its policies
  • Run-time governance – governs the behavior of services in production and the performance of the architecture as a whole

Read the rest of this entry »

3 Comments

A Simple jQuery Image Rotater

Recently I was looking to add a collection of rotating images to my website, so I searched for an image rotater using jQuery. I found a number of very sophisticated libraries designed to rotate images, create slideshows and display fancy transitions. Any one of these would have met my needs. What I did not find was a simple bare-bonesjQuery example that I could use on my web site and enhance as I saw fit. So, I decided to build one form scratch. This example is simple enough that anyone with any jQuery experience at all can understand it. Hopefully, the explanation is clear enough that anyone can incorporate it into their own web site or use it as a starting point to learn jQuery.

Because this this blog is built on a framework that already uses jQuery, the image rotater can’t be directly embedded in this post. You can access an example by clicking on the image or at http://www.dchung.com/test/rotate.

Read the rest of this entry »

No Comments

Getting ‘Closure’

I have been a Java developer since 1995, before that I worked in C++. So my language background is primarily statically-typed and object oriented. In the last several years, I’ve been involved in a number of projects that use JavaScript. I’ve come to recognize that JavaScript is a very powerful language in its own right — but it is dramatically different from the languages that I am used to. One of the features of JavaScript that was a mystery to me is closure.

Closure has no direct equivalent in my native language Java so it took a great deal of reading and experimentation for me to come to grips with this concept. The simplest description I can give is this.

In a closure a variable declared in an outer function is visible to an inner function even if the inner function’s lifecycle is longer than that of the outer function.

Here is an example using the Apache Cordova (PhoneGap) API. The phone Cordova API allows you to package HTML5/CSS/JavaScript applications natively for a number of mobile platforms. It also provides a JavaScript API to wrap many of the native device features like the accelerometer. This example shows a closure.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
function startWatch() {

  var previousReading = { x: null, y: null, z: null };

  navigator.accelerometer.watchAcceleration(

    function (acceleration) {
      // use previousReading value here
    },
    onError,
    { frequency: 500 }
 );

}

In this example the startWatch() function declares a variable previousReading and sets its x, y and z members to null. The three values will be used to represent acceleration in meters per second squared. The function then calls navigator.accelerometer.watchAcceleration(), passing in an anonymous callback for success. The anonymous callback defined on line 7 in the source code will be called at a rate of once every 500ms and it will compare the current acceleration with previousReading then update previousReading with the current acceleration.

The code is relatively straightforward except for one important detail previousReading was declared in the scope of the outer function startWatch. But the anonymous inner function (on line 7) will be called repeatedly even after the outer function is out of scope! What happens here is that the inner function keeps a reference to any values in the outer scope that it will need when it is invoked.

For those of you who are Java programmers, don’t think you are immune from this discussion. Closures are on the proposed feature list for JDK 8.

1 Comment

Cordova!

This week Apache Cordova (formerly known as PhoneGap) graduated from the Apache incubator and is now a top level Apache project. Cordova got its start as PhoneGap at a company called Nitobi. Adobe acquired Nitobi in 2011 and donated PhoneGap to the Apache Software Foundation which placed in incubator status. Adobe continues to develop PhoneGap as a release of Cordova but indicates that it may acquire some proprietary features.

The Cordova API allows developers to take applications built in HTML5, CSS3 and JavaScript and deploy them natively on a number of mobile platforms. Cordova sits as an abstraction layer on top of the device OS so that by using a different version of Cordova, the same app can run on Blackberry, iOS, Android, Windows Mobile and a host of other mobile platforms. Cordova includes a rendering engine for HTML and CSS as well as a JavaScript runtime. So Cordova applications run ‘natively’ and do not require a web browser.

I first encountered Cordova while working on an Android application for a defense contractor. The application was map focused and allowed users to see where friendly forces (and others if known) were on the battlefield. The application was built natively in Android using Java (Dalvik). A number of potential customers expressed an interest in the application but wanted it on different platforms like iOS or on a desktop browser.We were struggling with the potential of having to rewrite the application for multiple platforms including some proprietary hardware/software used in our industry.

After attending FOSSGEO in Denver, I decided to try a web-based solution using HTML5, CSS3, JavaScript and Sencha’s extJS JavaScript library. At the time, I built the application targeted to the browser. In doing some research I stumbled upon PhoneGap in a matter of hours I was able to demonstrate our application running on Android, iOS and in a desktop browser. As a strategy we were considering porting PhoneGap ourselves to our proprietary platforms and using it as the framework upon which to build a variety of cross platform apps.

In addition to packaging the web functionality, Cordova exposes many native device features including sensors, the file system and contacts. Since Cordova runs as a native app on the device, Cordova-based apps have been accepted in Apple’s iTunes app store. Here is a sampling of Cordova/PhoneGap based apps currently in production:

  • Wikipedia — Wikipedia Mobile
  • Facebook — Mobile SDK
  • SalesForce.com — Mobile Development SDK
  • IBM — Worklight Platform for Mobile
  • Microsoft — Halo Waypoint

As a mobile developer I think Cordova (I still have trouble not calling it PhoneGap) is a credible cross platform solution that can help organizations manage the growing array of mobile platforms in use by their customers and employees.

No Comments