Archive for the ‘Java’ Category

Comments Off

This is kind of how I feel about JavaScript, but…


2008
05.10


SMBC 2008-05-06

…the times are changing, and with all the buzz about “Web 2.0 rich client applications”, JavaScript cannot be avoided, even though the language and run-time are not as powerful as standalone languages like Java, Ruby, or Python. And there is always Adobe Flexmebeli for GUIs….
mebeli

Comments Off

Fatality, Part 1


2008
02.23

AOL Netscape Logo

As Yoda might say, “Ended, the browser wars have…”

AOL has end-of-life’d the Netscape browser.

Here’s a little background on why this is significant.

Netscape was the first company during the Internet era to challenge the desktop computing paradigm that made Bill Gates and the denizens of Microsoft so incredibly wealthy during the 80′s and early 90′s.

Of course, it’s 2008 folks and folks have short memories.

For example, how many of you remember that, before 9/11, the scariest threat we were facing was a potential conflict with China, which seemed incredibly likely after they “escorted” one of our spy planes down and returned it to us chopped up in little pieces?

So the public tends to have a short memory, and details are often lost when the collective consciousness is gorged on big, life-changing events like 9/11.

So let’s start at the beginning…

The world wide web, as you know it, is the creation of Tim Berners-Lee, not Al Gore.

To be more precise, the magic that occurs when you type in a web address, like http://www.neobeans.com/blog and see a website appear is what Sir Berners-Lee is responsible for.

The web is actually a combination of four things:

  1. A standard for how documents are formatted called HTML. When you look at a web page, I hazard a guess that 99.999% of the time, it’s HTML. You can learn more about what HTML looks like at w3schools.com.

    That said, I still argue with friends about whether we accidentally created the hyperlink when we created a “disk-based news magazine for Atari ST owners” that allowed folks to click on icons or text to link to articles.
  2. A client application, called a browser. This is where you’re probably using Internet Explorer, Firefox, Safari, or Opera. These programs know how to render HTML, and also know how to make requests to…
  3. A server program, called a web server, which runs on a computer and allows documents to be requested from that machine via a URL. When you surf to http://www.neobeans.com/index.html, there is an instance of the Apache web server running on a machine whose name is www.neobeans.com, and your browser is asking for a document named /index.html.
  4. Finally, to choreograph the dance between the browser and the server, and to describe all of the ways the browser can make a request and the server may respond to it, Berners-Lee created a protocol called HTTP.

That said, circa 1993 or so, the web itself was pretty minimal, but folks realized early on that there was not a lot of value to serving up static documents. The big shift came when folks figured out how to run small applications on the server in response to client requests.

For example, when you log in to your favorite social networking sites, like Facebook, MySpace, and OKCupid, you’re sending requests for “documents” that happen to kick off small “programs” that typically go out to some database, do a search for information that you care about, and then they create an HTML page on the fly to show you the results. Looking at a list of products when you do a search for big screen TVs on Amazon.com is no different than getting a list of hotties on Match.com based the fact that you’re looking for a single, female, non-smoker who likes long walks on the beach and margaritas.

Netscape’s claim to fame was the Netscape browser, which was regarded the “best” game in town until Microsoft began flexing their monopolistic muscle and began actively improving Internet Explorer. Microsoft’s interest in making a “better browser” was likely not just about building a better browser, but about controlling the client experience. They were likely more concerned about the fact that folks were beginning to think that the web browser might usher in a new paradigm that could replace the desktop computing paradigm that had made Microsoft rich.

Even more importantly, with the advent of more advanced client-side technologies, such as Java and JavaScript, and Flash, clients could also be treated to a user experience that was rich enough to cause folks to wonder if they would ultimately care about what sort of computer they had on their desktop, which could threaten Microsoft’s monopoly on operating systems. Interestingly enough, Microsoft’s behavior at this time to squelch the Netscape browser and Sun’s Java technology wound up getting them scrutinized in anti-trust court, where the penalties could have led to the splitting up of the company in to smaller entities, the same way AT&T was once split up in to the Baby Bells.

So what happened next? Well, I’ll write more about that in Part 2… :-)

WebLogic 9.0 on Mac OS X for Intel


2006
02.24

Okay, I know everyone with a Mac who does J2EE wants to know… how long does it take to start up WebLogic Server 9.0 on a MacBook Pro (2.0Ghz, 120GB 5400RPM HD, 1GB of RAM).

The answer? About 13 seconds.

Comments Off

Demo Daze: A Post-Mortem On A Successful Demo


2006
01.19

I’ve been working pretty hard the past two weeks or so, cobbling together a demo for a customer based on a healthy chunk of the BEA product line-up: WebLogic Portal (WLP), WebLogic Integration (WLI), AquaLogic Data Services (ALDS), and AquaLogic Service Bus (ALSB) — all built using our IDE, WebLogic Workshop.

Oh, and we threw in a partner’s product — CollabraSuite.

I list the products because:

  1. The sheer number of products involved will give you a sense of the complexity involved. I’m going to make a point about this in a moment…
  2. I’ve written some really shitty software under duress in the past. My friends from my last job and I often talk about some of the “interesting bits” they’ve found in code I wrote before I left after working on the software equivalent of The Bataan Death March.
  3. And, yes, I am a sales engineer, so I’m (sub)consciously always trying to make sure folks appreciate my employer’s warez.

Okay, so here goes…

The big epiphany I’ve had while building out this demo is that there are specific “best practices” that tend to get tossed out o the window when writing demo code, or even writing simple test harnesses, and “throwaway, one-time use” code.

Obviously, it’s a fallacy to believe that any code is only used once and then thrown away. Someone will ultimately stumble across your work and attempt to extend it or customize it. Of course, before it even gets that far, when developing a sufficiently large and complex application, you’ll find that taking a measured, systematic approach to developing an application pays dividends because, as you look at your own code, you won’t have a WTF moment.

So, here’s a brain dump of what worked to make writing this demo fly…

  1. The first step? Whittle down the requirements and come up with a coherent plan. In the case of a demo, the plan is turned into this:
    • Determine which products are a good fit for the demo.
    • See if I can reuse some existing demo code from other sales engineers (SE) and product specialists.
    • Scope the problem to fit the timeline. A demo’s timeline can’t slip.

    The first week was spent doing those steps in parallel — I had thoroughly investigate the pre-existing demo code I had chosen to “extend”. This took about a week. I resisted my typical urge to dive in, ego first, and begin coding. I also spent that week making sure I knew what each product could do in the context of the final application. I had been given a list of features to show off (re: requirements). The folks driving the demo were flexible enough to give me room to wiggle. For example, some products were left out of the demo because I am not familiar with them. So, on an aggressive timeline, there simply wasn’t going to be time for me to learn a product well enough to build out a demo that leverages it in a substantial way.

  2. The first week wrapped up with me making a decision: I was going to follow the “best practices” I pitch to my clients all the time — even though I’d be running on a single server. At the time, I was donating my Sun W1100z box to the effort, since my demo architecture involved running three separate WebLogic domains: one for portal, one for the service bus, anid another one that contained data services and workflow. Of course, as any good sales engineer will tell you, it isn’t common for customers to poke around in the source code of a demo, so there can be a lot of MacGyver‘d stuff in a demo — lots of wire, duct tape, and pre-chewed bubblegum holding it all together… all possible because folks aren’t going to kick the tires and look under the hood.

    That said, this demo was complex enough to merit splitting things up for three reasons:

    1. I was planning to enlist some co-workers to pitch in and help out… So keeping things compartmentalized would make splitting up the work even easier.
    2. I could then build & test components (data services, web services, and the UI) using a WebLogic application that was laser-focused on just that type of component. Case in point — we had a set of data services built out using ALDS. I layered web services on top of those data services. While I could simply test the data services from the IDE directly, it was extremely handy in debugging later to have test harnesses based on the web services that would front those data services already in place. I also could create a set of test cases that would pull double-duty later in the project — because once I put the service bus in front of those web services, the same SOAP message bodies could be sent to the proxy services to be routed to the data web services. This meant one test case could actually be re-used to test both the data web service and again to exercise the routing of the service bus.
    3. It reflected reality. I always tell my customers to build their applications this way — why shouldn’t my demo code reflect that philosophy? This is called “eating your own cooking”. If you do it poorly, it’s called “eating your own dog food”. :-)
  3. The second week began with me digging deeper in to the pre-existing demo code which was really focused on AquaLogic Data Services (ALDS), a product that I am admittedly not an expert in. I’d rate myself (well, when I started this project) as being “conversant” with it, but not an adept by any stretch of the imagination. I was fortunate enough to have a product specialist in my office who I could leverage, but my time with him would be limited, and I was told up front not to expect him to provide direct code support… so any major changes would probably be my responsibility.

    So, as I dug into the demo, I found that it was fundamentally very solid… very data-driven. However, what we lacked was a lot of test data. And given the complexity of the underlying data sources (hey, it has to be complex — our product shows how we take a bunch of data sources and do a mash-up on them to create a more holistic view of the data — which is especially useful for systems-of-record). So we really had enough data to show one use of the application, with a workflow involving two different users so that we can show off data redaction (which is the ability to remove specific bits of data from data returned from our services if the requester is not authorized to view it).

    That meant test data was a possible limiting factor. I figured that the amount of time we had to present the demo meant that we really did not need a lot of test data unless we wanted to make the screens look a bit busier… which of course, makes it look more polished, like a real-world application.

    The big surprise was that the user interface contained a lot of hard-coded ties to the test data… nothing too evil, but it presented some minor headaches sorting out how to do the decoupling of the web application (portlet) from the data services. In the original demo, because they lived in a single application running in a single domain, they were tightly coupled. This demo would mirror a more common scenario in a Service Oriented Architecture — the two would be running in separate domains.

  4. The lion’s share of the work was ripping apart the UI of the original demo to do that refactoring, and making the HTML consistent with the look of the new demo. While the original web application was very colorful and could go crazy with screen real estate, I had to not only change the look, but change the “flow” of the web application so that parts of it could be split out in to separate portlets (such as a worklist).
  5. Add eye candy. The sexiest feature? Well, I stumbled across a cool extension to WordPress (my blogging software), called GeoPress. A link from the author’s page led to a site with tutorials on how to leverage Yahoo! Maps from your own website. Watch out, Google Maps… Yahoo! is in your rear-view!

Now… the painful part: the pain, and the reason for my disappearance from the world since last Friday has been because the HTML coding became really tedious because I had to manually cull what was needed from pages created using tools (and no, it wasn’t Workshop for your haters out there :-) ). As a result, I had to do a lot of tedious ripping & pasting, while trying not to offend the CSS and HTML gods by committing atrocities in my web application.

I also experienced a hard disk failure (!) courtesy of a new Seagate 200GB drive, the effects of which were mitigated by the fact that I kept backups of EVERYTHING on a CD-ROM (because yes, I am that paranoid). As disappointing (and embarassing) as it was to not be able to walk in the door on Monday morning with everything chugging along — it was still pretty sweet to pull the backup from CD and get evertyhing up and running with about two hours of effort on my laptop. Ultimately, we ran the demo on Wednesday using just the laptop, and it performed admirably.

(I am still lobbying my boss to get us some new, sleek laptops… although I already have one of my own on the way!)

The reward? Well… as I was walking alone down the hallway to leave the area, one of the customer’s employees told me it was a fantastic demo and that I did a great job.

That makes it all worthwhile…

How to Install BEA WebLogic Server 9.0 on Mac OS X


2005
12.15

Disclaimer: I work for BEA Federal as a sales engineer, and this “hack” is not supported nor endorsed in any way by BEA Systems. I just use Mac OS X and thought it may be useful to other OS X Java developers to be able to install WebLogic Server (and some of our other products :-) ) on Mac OS X for evaluation or development.

I’ve had several folks ask me about how to install WebLogic Server 9.0 on Mac OS X.

First of all, you no longer need to follow the instructions that were used for Insalling WebLogic 8.1 on Mac OS X provided by Rod Chavez… the installer is actually fairly agnostic about platforms. There is one piece of code in the installer that is very particular about the name of the operating system, and it will only recognize (as Unix) any OS that starts with:

  • unix
  • sunos
  • hp-ux
  • linux
  • aix
  • osf1

The trick to making it all work is to specify an attribute for the os.name property that meets those criteria — I successfully kicked off the GUI installer by using this command:

java -Dos.name=unix -jar server900_generic.jar

…which causes it to use the proper checks to sort out how much disk space is available so you won’t get errors like this one (courtesy of my friend Kelby Zorgdrager).

Not Good

as opposed to this wonderful message, indicating success:

Good