Today is a good day to code

What Does a Sun Bankruptcy do to Enterprise?

Posted: December 29th, 2008 | Author: | Filed under: Companies, java, Programming, Sun Microsystems, Uncategorized | Tags: , | No Comments »

What Does a Sun Bankruptcy do to Enterprise?

Picture of IrvinFor more than a few weeks now, I have been pondering some broad implications of companies that we all rely upon failing. Probably the grand-daddy of these is Sun Microsystems.

Normally I wouldn’t be concerned about tech companies going away. It is part of the normal advancement of the art, but in Sun’s case, it does concern me. While I don’t share many developers’ blind love of Java, or Solaris, or any product really. I do feel that Sun has given a tremendous amount to the software engineering community and would be sorely missed if they were to go belly up. At the time of my writing this, Sun’s stock is at $3.41 per share, and their market capitalization is 2.52 Billion, less than Sun has on hand in cash.

I don’t necessarily think that Sun is in financial trouble, but it does seem that there are a bunch of products that they release that are mostly not for pay. Not to mention that their financial performance may / should, be giving some corporate IT departments pause as to their dependence on their technologies. Many companies rely on support from Sun, and if that were to transition to the community, the level of response may not be sufficient. The question I would ask is, “Will a Sun Bankruptcy Drive Corporations Back to Microsoft?”

Unfortunately, I can’t see any other alternative at the moment. There are millions of lines of code out there written against the Sun JVM, and while the JVM is now mostly open source, and so is Solaris, the companies that count on those lines of code typically are not interested in maintaining that code as well. Without Sun, you could have JVM forking, Solaris forking, etc… where a particular application written against Java or Solaris may not run in a given company. Corporations would have none of these problems if they used the .net stack for application development.

Now, I am not advocating that all corporations out there should drop their Sun implementations and run to Microsoft, but what I am saying is that they should prepare themselves for a little instability. I tend to use Ruby and the Rails framework for most everything anymore, but I have come to be somewhat skeptical of the gems that I am using. I am also aware that there is currently no support beyond community support for most of these items, and the developers working on them could get bored and go away. So for functionality that is more than a nice-to-have, I tend to write it myself.

Hopefully this will go away when we start to see professional gem houses, but in the near term, I would hope that companies would begin to diversify their stack a bit so as to mitigate the cost, such as re-engineering their non-core systems to be less dependent on core software from a particular vendor. The last thing you would want would be to find a showstopper bug in something you were about to release that was based on a technology from a shaky vendor, that holds up your business process.

Most good IT shops already support a variety of technologies so as to not be locked in to any one particular implementation from any given vendor, but enterprise developers should not continue to believe that Sun or Java will be around forever in its current enterprise-blessed, no-brainer form. I think serious unbiased evaluation of technologies to be included in future products should gradually become the norm. If Microsoft wins, so-be it, there is some good stuff in .net, but I would hope that Ruby and PHP would benefit from this situation.

Setting Up VirtualBox Headless on Ubuntu 8.10

Posted: December 28th, 2008 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

Setting Up VirtualBox Headless on Ubuntu 8.10

Picture of IrvinOver the weekend I have been setting up a RoR rig with MySQL replication. The problem I have is that I only have one machine that I can use of all of this. My solution is VirtualBox Headless.

The first step is naturally to install Ubuntu Server 8.10. There is no UI. The next step changed what should have been a 5 minute task into a 3 hour task. Pay close attention… If you use apt-get install virtualbox, you will get virtualbox 2.0.4 OSE version. The open source version does not have the built-in RDP server. So when you try to issue the command sudo VBoxManage modifyvm “vmName” -vrdpport 4389 or whatever, you will get an error back. My solution was to download the non OSE version from Sun’s VirtualBox site. After that, just issue the normal Debian dpkg command to install VirtualBox 2.0.4 non-OSE. There is an issue with the kernel driver not being updated with the kernel that may cause problems later, but I didn’t do anything with that.

After you get it installed, follow the instructions here : for getting VRDP up and running. You have to create a new PAM authentication file.

After that things work as advertised. Remember, if you want to run headless over VRDP, you *must* install the non-OSE version directly from Sun’s VirtualBox site. Follow the instructions there if you want for the kernel driver to automatically update and recompile if the kernel changes.

Microsoft’s Back Alley Deals

Posted: December 31st, 1969 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

Microsoft's Back Alley Deals

Picture of Irv Owens Web DeveloperIt is normal for Microsoft to be afraid. I mean Google recently announced an alliance with Sun. My question is why are they making deals with Yahoo and Real. Let's take a look at both.

The deal with Real is clearly a stab at Apple. In order for Microsoft to fight its way back, they have to work their way back into the user's PC space. Right now Apple has that. They have the first thing people do when they get back to their PC and the last thing they do before they leave their PC. This is something that must be difficult for Microsoft to accept. So the partnership with Real is supposed to make this better. Now, I want to understand this properly. Microsoft initially is considering a partnership with Gator, known for their unscrupulous behavior, placing adware and spyware on users' computers unaware. Fortunately they decided against this suicidal path.

Now they are interested in partnering with a company that “reverse engineered” Apple's algorithm to prevent their death. Real still has large contracts with education who would much rather be using Apple's QuickTime algorithm. Apple has accused them of adopting the ethics of hackers. Real is claiming that they are forced to use these tactics because Apple has an unfair hammer lock on the industry. This is bull, do you steal from your neighbor because they have a better house than you do? Would that justify stealing from them? Why would Microsoft want to partner with a company like this then? Microsoft knows how short their time is. They know that Google is dictating to them. They are desperate.

Now, for the second part of its dealings. The partnership with Yahoo for sharing IM solves a need for both companies. Microsoft can begin a strategic alliance with Yahoo to challenge Google on their level, and Yahoo gets a wider audience and possible cooperation with its software on the OS level. It could also mean breaks on their licensing of the windows media codec. So what is wrong with Micrsoft doing this? Well, nothing. In fact this is one of the best strategic moves that Microsoft has done in years. It will help them punish AOL for refusing them, and it will hopefully force Google to do something rash, which is what Microsoft desperately wants. They need an opportunity to take the lead on Google. The question is whether or not Google will take the bait and waste a bunch of money on AOL. Indeed the battle for the future of computing is actively moving out of the cold war era and into the active armed conflict stage. Things could get strange for a while with interoperability, but ultimately it will benefit consumers.

Do You Own the Software You Buy?

Posted: December 31st, 1969 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

Do You Own the Software You Buy?

Picture of Irv Owens Web DeveloperTecmo recently announced that it has sued some of its customers over posting modifications to its games on the internet. Perhaps the most parental paranoia inspiring fact is that they have modified the game DOA volleyball, which features incredibly buoyant, unrealistically gorgeous, women playing volleyball. Some industrious individuals who are interested in sexy pixels have figured out how to modify the textures that comprise these digital vixen's bikinis in order to render them non-existant. That's right, nude volleyball. Most of us probably don't think that kids seeing nudity is all that bad, especially when completely out of context as far as sex goes. I don't think that is all that bad either, especially when they can freely see people cutting other people's heads off with lightsabers on Sunday night prime-time TV.

The larger issue is, however that these people have modified software. Most X-Box users can't enjoy these modifications unless they have modified their X-Boxes to do so. These kits are available all over the internet, and have made the X-Box a great cheap linux workstation. The thing about software though that most people don't get is that even though you go to the store, pay money, get a box, and take it home, you don't own that software. The company that made it still owns it, even though you have installed it onto your computer. What you have purchased is the right to use the software in accordance to the terms and conditions that the company has stipulated. Usually by installing the software you have agreed to these conditions whether you have read them or not.

Most of the conditions in the software contract have to do with modifications and re-distribution of the software. It is these clauses that have inspired Tecmo to sue these people. There is a minor difference with this case that the Judge in the case wisely caught on to. The software, distributed on a DVD-ROM is not modifyable, meaning that no one can permanently modify the code on the disc. The modifications are made by putting the software on the X-Box's hard drive and calling it through the X-Box hardware modification, therefore the party in question did not violate their software agreement as far as modification goes, also, they are not distributing any of the company's propriatary code. The Judge also seemed to think that the disc, belonged to the purchaser. I find that to be extremely interesting.

If the disc belongs to the purchaser, but the code contained within the disc does not, it seems that there could be a potentially ambiguous understanding of the EULA, or end-user licensing agreement. Technically, no matter what happens I can not modify that company's code, however once it is off the disc and onto my computer, if I have never installed it and therefore not agreed to the EULA, I should be able to do whatever I want to it right? Wrong, courts up until this recent case have almost always sided on the side of the software company. The reason is obvious, how could anyone stop the reverse engineering of software if a company could install and steal that code. The truly interesting thing is that most software development companies engage in reverse engineering all the time and get away with it, just take a look at Microsoft's MSN search. It seems just like Google, doesn't it?

I think the larger issue here is what it means to buy something. No one ever has had the understanding that when they pay rent every month for their apartment, they are buying it. If someone were to freely allow the tennants to believe that they were buying the apartment by paying every month, the tennant's lawyers would have a field day, citing fraud. The competing apartment's lawyers would also go into frenzy, citing an unfair advantage due to fraud. The landlord of the fraudlent apartment building would be forced to pay damages to the tennants who thought they were buying property. The same should go for software. Most people think they are buying the software, that they own it. That is another reason why piracy is so difficult to stop. If I think that I own a piece of software, then there is nothing wrong with my copying it off the original disc and onto my own disc to give to my friend.

Bill Gates has even said that software patents are useless. There are too many ways to write code. The only way to protect software is to either make it impossible to copy off the disc, which is owned by the buyer and therefore unacceptable, or to make the software unusable once copied off the disc. Tecmo should have known better. You can't sue someone for modifying their own property. The buyers own the X-Box. There is no EULA saying that the X-Box is still property of Microsoft, therefore there is no case. It doesn't make sense to try to litigate to keep your software from falling into the wrong hands, either just admit that when someone buys software it is theirs to do what the want with, and bring litigation only if they start selling your intellectual property. People think its theirs anyway, and unless you can sue millions of people, you won't win. The RIAA is learning that the hard way, all of the money spent litigating and people are still downloading music illegally. They haven't stopped anything, they have just made it harder to track.

(Read More abut this at CNET.)

Windows 2000

Posted: December 31st, 1969 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

Windows 2000

Picture of Irv Owens Web DeveloperIt is very suprising that in the light of the stupendous failure of Windows XP to lure businesses away from Windows 2000, due to its awful mangling of a resonably solid code base, Microsoft would persist in attempting to bring Windows to a unified code base.

I understand that for them it is much cheaper to have a single team working on Windows, than to maintain different versions for their professional audience as well as their consumer space, but they really should look at some real-world use cases. In almost all of the corporate environments where Windows XP Professional is used, the individuals using those workstations almost always change the interface back to the old Windows 2000 look. They are doing this because the visual clutter associated with Windows XP is apalling. I remember the first time I installed XP and showed it to some friends, they told me that it looked like a circus and they weren't interested in it. I eventually found myself changing XP back to the old look, before switching completely to the Macintosh platform.

Microsoft would be well served to rethink their position on the combining of their “professional” and “home” code. I know that there is a “Home” version of XP that is awful, and there is a “Professional” version that is just bad. For the remaining PCs that I own, and I own many, I have reverted all of them to Windows 2000 because I am a developer. I want my software to work and I don't need a bunch of visual garbage.

Most people would then ask, “Why did you switch to OS X then?” Apple's visual garbage is not in my way. There aren't wizards to attempt to do every little thing for me and it doesn't hide icons or settings in little acordians making things hard for me as a user. Everything is where I need it or where I expect for it to be, and they don't change that. Windows 2000 was the same way. It is rock solid, I have maybe half of the crashes with 2000 that I have with XP, and I think much of that is due to Microsoft still trying to support software that ran on Windows 95. Microsoft should go back to peddling their buggy user-friendly code to consumers for $79.99, and give the solid consistent no-nonsense code to businesses for $299.99. Its more expensive, but which is better saving 2 million dollars on revenues of 3 million, or spending 17 million dollars on revenues of 100 million, and re-establishing your reputation. I think any businessperson with half a head on their shoulders would figure out that the latter is the way to go.

Perhaps the Department of Justice had something when they suggested that Microsoft split up. I think it would have made the company a lot stronger, and that Microsoft should pursue this course of action of its own volition. They should spin off their search, home OS, professional OS, and office divisions into their own pseudo-corporations with budgets and little to no interference from the top. These modules should be able to come up with their own software and product agendas, and be able to act more independently. Then perhaps Microsoft would get back the innovative scrappy spirit that made it what it is. The home group could develop a killer version of Windows that worked with the XBox in some previously unimagined configuration that would revolutionize home entertainment, and it would work with everything under the sun. Maybe for kicks it could even be stable and in true Microsoft style have a strange bulbous UI that would appeal to characters who might make cameos on the saturday morning cartoon Tokyo Pig.

Then on the other hand, they could release a slick sexy OS for business that used the 3D performance of nVidia and ATi's graphics cards for purpose and not for eye candy. The OS wouldn't be based on 10 year old technology, and it would use biometrics for security. The business OS would be focused on speed, security, and efficiency, and would be a perfect platform for software development. It would bundle IIS and the standard version of the visual studio tools. The business release would create new avenues of developemnt for Microsoft, since with these tools it would be more work to badly code interface elements and other interactions with the underlying OS. It would continue in the true Windows 2000 fashion.

While all this is a dream, the reality is that “Longhorn” has too much visual garbage. The 3D, in the most recent betas, seems tacked on and is not used to any particular effect. The look of the betas is much better than Windows XP, but it is still not really dialed in. Apple did the brushed metal thing, and I am hoping that Microsoft can get a little more original than that. Apple has some three different interface looks going on in “Tiger” which is ridiculous. I have to commend the “Longhorn” UI designers on their consistency of the interface.

There is no reason for businesses to upgrade to “Longhorn” since the hardware requirements to get it to be any different from Windows XP will not be worth it. Microsoft can try to release Office to require users to upgrade, but they haven't really innovated in this space since Office 2000 anyway so that won't work. What they really need to do is to get the OS figured out in tandem with some new really cool way for their customers to work. If they can not do this they'll figure out the hard way that business users are pretty happy with what they've got and Redmond isn't releasing anything that makes them want to change. This is the core problem, and it has a lot to do with the compatability garbage built into Windows XP Pro and Home. On paper, Microsoft is way out front, but in reality Bill Gates is right, any kid anywhere in their garage can put Microsoft out of business. At least he still has the sense to know that. Hopefully he can inspire that same level of paranoia in his team, or it will be a long ugly decay for Microsoft, and all those little companies they stepped on heading up will have fun picking at their bones on the way down.

The Microsoft Trinity

Posted: December 31st, 1969 | Author: | Filed under: Apple, Companies, Google, Microsoft, Sun Microsystems, Uncategorized | Tags: , , , | No Comments »

The Microsoft Trinity

Picture of Irv Owens Web DeveloperThis maneuver makes sense in the business world, but it has yet to be seen if Microsoft can truly let these vast entities they have created within the company function independently enough to behave like companies. I think that Microsoft didn't go far enough with the reorganization. It may have been better if they had broken the company up further.

The MSN group should remain on its own, however it should have the full backing and cooperation of the other units. They should focus on adding more web functionality to their applications, like automatic backups for Word, Excel, and PowerPoint to a virtual drive so that you could work on things on the road and away from your personal computer.

What Microsoft has done may improve their ability to react to Google, but that is the operative word, “react.” They will not gain a greater ability to innovate. Their organization won't allow it. They are too tied to their established business cash cow. What will happen however is that Google will see this as throwing down the gauntlet, and they will accellerate their pace for world domination.

In a nutshell, here's how I see things shaping up. Google will launch their nationwide Wi-Fi service that will be free, mostly secure, high-speed internet for everyone. This will be followed by a huge surge in advertising revenue, anticipating the expansion of their market. Microsoft will launch something that is vaguely the same, several months to a year later. Then Apple will release Mac Mini's with Intel CPUs first. This will prompt many PC users to buy a mini just so that they can get their hands on OS X for intel, which will by some amazing feat be cracked at launch to run on any PC. This will do two things for Apple. The first is that it will undermine sales of Windows Vista, second it will increase their Mac sales numbers because they will be moving product. Google will follow with more business oriented applications based entirely on the web, using their desktop application as a vehicle. They will start building widgets for the macintosh that mirror those available through the dashboard. This dual-attack on Microsoft will prove to be too much. Microsoft will remain around, constantly behind Google and Apple and will end up like Sun supplying products to the top 1% of the market while enjoying none of the fame of Google and Apple. Apple will be back where it should have been all along; as the dominant computer manufacturer. Microsoft will remain a close second, but they will continue to slip away until they perform another reorganization.

That is the future. Put it in your pocket right next to your iPod nano!

The Security Question

Posted: December 31st, 1969 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

The Security Question

Picture of Irv Owens Web DeveloperIt seems that something like three in every ten tech articles is about some virus, exploit, or other security warning. They are starting to sound like the local news, predicting doom and gloom because clicking on this email, or that link can wipe out your computer. I think they are being particularly unfair to Apple, being the largest company with a reputation for security. It wouldn't suprise me too much to see them pay someone to write a Mac virus so that they would have something to talk about. I guess dual-core processors isn't a juicy enough topic, they need something more scary so they go for the “flaws” in Mac OS that Apple patched. Give me a break! Any developer that has written a stitch of code knows that whenever you release any piece of that software to the public things come up that you didn't, and probably couldn't forsee. Mainly surrounding users, and they way they use the applications. Much of the more egregious user problems can be ironed out by getting complete specs and building proper functionality into software, but 90% of this stuff comes down to education.

Now they are harping on Dashboard in Mac OS X 10.4 “Tiger.” They are trying to make it out to be the next ActiveX as far as bad security goes, or bad development decisions. Dashboard is an incredibly useful feature for legitimate development. No software developer should allow malware writers to determine what features or software goes into their products. That would be kind of like allowing terrorists to dictate your country's foreign policy wouldn't it? Those types of decisions should be made by the users and the software developer. Security should be thought of after the features are included. Dashboard is relatively safe. You would have to be root, or be able to execute a perl script that would gain you root access to be able to destroy someone's computer. Since you have to jump through some hoops on a Mac to enable root user access, and for most applications you don't need to be root anyway, the effects of this will be minimal.

If you download a widget from what appears to be a legitimate site that turns out to be porn, just delete it and if it offends you, let Apple and the BBB know what the details are and how you feel you have been wronged. If you download a widget from a sketchy website and it asks you to authenticate and you do it, then it deletes all your files, you probably deserve to have it happen. No one would get into a car and drive it without learning how to not drive off into a ravine, computers are the same way, there are some simple rules about how to operate it safely, and it is up to the media and users to learn about how to do this.

Instead of just reporting on the bad stuff, giving hackers and malware writers more reason to write malicious code, how about educating Ma and Pa computer user about how to spot nasty code, or malware. I'll start.

  • If you open something from the web and the OS prompts you to enter your password, don't do it until you are absolutely sure about what you are doing. If a password is needed, the company that sent you the object should give a good explanation as to why.
  • In the case of Dashboard, I agree with a poster on macrumors; In your preferences, turn off “Open Safe Files after Download.” Make sure you have to explicitly execute the file to run it. This will prevent widgets from installing themselves
  • Think about where you are when you are downloading. Do you know these people? Is it a friend's site? What is their reputation? I don't download anything from a site of which I know nothing. If your pop-up blocker is saying that it has blocked ten pop-ups from this site, then you probably don't want to download anything from them.
  • Make sure you have a valid email address or phone number for anyone whose software you install. Chances are that if they don't respond to email or phone calls, then their software isn't any good. Unless of course you know personally the programmer.
  • Don't use Windows 98, Windows 95, or Windows 3.1 anymore. Go ahead, treat yourself to an update. Last time I checked Windows XP ran decently on a PIII 1 GHz computer with 256 MB of RAM. You probably shouldn't be running a pre-security era operating system if you plan to use the internet. If you are on a Mac, OS X 10.4 will run on a circa 2001 iMac G3, or an old PowerMac blue and white just fine. I am currently running “Tiger” on the iMac 500 and it is reasonable, but better yet, it is way more secure than Mac OS 9
  • Don't open email from people that you don't know personally, or who have a phone number that you have called. If you are unsure, just click new and send an email back to that person and see if you get a decent response. Better yet, delete anything that looks suspicious. I have friends ask me whether I got the email they sent, and I say no becuase I follow an aggresive policy regarding email. Usually we can catch up over IM anyway. Its that simple, just delete, delete, delete.
  • If you are on the web and you see that you have just won a new iPod, or that you have just won a trip, or you have just won a new laptop! Just remember that in this world nothing is given for free, and most of the time these are just hoaxes to get you to give up your personal information so the companies can spam you in various and sundry ways. If you get an email to that effect, or these silly refinancing emails, don't trust them. You have to ask yourself, how did they get my email address in the first place? They probably bought it from some spam outfit looking for a quick buck. They probably aren't reputable.

Probably the most important thing is to upgrade. Don't be afraid of updates from Apple and Microsoft. The short term pain of applying the patch and possibly having some buggy behavior is worth keeping the mountains of files you have on your computer and not losing them to some virus. Whether or not you like Windows XP / 2000 or Mac OS X, they are much more secure than their predecessors.

On the server side, admins should go ahead and update their IIS, JRun, Apache, Tomcat, JBoss, or whatever HTTP server they are using, it is a pain in the behind, I know because I just had to do it, but the more recent versions are way more secure. In most environments you might see some improvement in performance too, of course you should test it thoroughly before deploying the upgrade, and I know that most admins are way overburdened as it is, but isn't it better to have a updated server than to have to keep fixing the same old issues?

What Does Google Want With Weak AOL?

Posted: December 31st, 1969 | Author: | Filed under: Companies, Google, Microsoft, Sun Microsystems, Uncategorized | Tags: , , | No Comments »

What Does Google Want With Weak AOL?

Picture of Irv Owens Web DeveloperI'm sorry, but Google buying AOL would be a huge waste of money. First off AOL has nothing that Google doesn't have, and buying it to compete with Microsoft would be stupid. The analysts still don't get it, Google isn't afraid of Microsoft, or anyone for that matter, nor should they be. They are the 500lb gorilla of search. You could take MSN search, multiply it by two, add AOL search, then add the traffic of all the other search engines sans Yahoo and it wouldn't add up to half of Google's search traffic.

The reason Time Warner is of course considering selling AOL to Microsoft is because it is lame. There are only two good things that have come out of AOL in the last decade. The first is AIM, the second is Winamp which does indeed whip the llama's ass. Still, the success of Winamp has not lead to a decent music service, and AIM has not lead to anything except a great platform with an annoying client. They just launched an email service for non-AOL members a little over 6 months ago. They are cash rich and bloated.

For that matter, two sagging fat companies like Microsoft and AOL does not a Google killer make. Why can't they see this? If they read more Sun Tsu – The Art of War, which should still be required reading for any executive in corporate America. Everyone needs to write off broad-based search. Google has won, there is no catching them. Instead they should focus on what they do that Google doesn't in an effort to contain them to search. By trying to follow them in whatever they do, they are following their plan. That is one of the over-riding concepts to the Art of War, if your enemy is larger and more powerful than you are, you have to annoy them into making a mistake. Having them follow you all over creation will weaken them, and allow you to destroy them at home. In this instance Microsoft will follow Google on everything they try to do, while taking their focus more and more off their operating system only for Google to release the Goffice and the GoogleOS. Effectively destroying Microsoft. What Microsoft should do is focus on making Office more available on the web, meaning web based Word, Excel, and PowerPoint for enterprises. They should be focusing on making Vista more than Windows XP service pack 3, it should be robust and provide new and amazing features.

AOL should focus on getting its large base of rural customers onto broadband even if it means losing money. That is the only way to push in the TV over IP that the TimeWarner partnership was supposed to bring. The fact that the majority of their users are on dial-up should signal a problem for them, in addition to the growing impatience of their parent corporation. If they weren't so fat, they would wake up and realize they need to do something right now other than looking for another sugar daddy to keep them providing the same stale services they have been serving up for the past decade.

Other than Yahoo, no one has been able to change their business model to fit Google. Obviously both of them have been reading the abovementioned book. They are playing each other perfectly. Watch that space as the battle between Yahoo and Google will be the future of computing. Short of a miracle of clarity, which Microsoft is capable of, they are going to go the way of IBM. Rich, but not important to the cutting edge of information technology.

How the JSTL Could Save My Life

Posted: December 31st, 1969 | Author: | Filed under: Companies, Sun Microsystems, Uncategorized | Tags: | No Comments »

How the JSTL Could Save My Life

Picture of Irv Owens Web DeveloperThe JSTL is short for Java Standard Tag Library. What it does is to take common tasks done by web developers and make them easily callable by using a standard xml style tag within a HTML / XHTML / XML page. This is great because using JSP at and before 1.0 was often difficult because developers had to embed entire classes in web pages, or create external classes and link to them. JSP 1.1 introduced the JSTL and made some other improvements like being able to write code fragments, or Java without having to follow all of the usual rigors of writing Java.

One could create a function or method without having to wrap it in a class. Perhaps some of you are thinking, “Why would anyone want to pervert Java in this fasion, all this would lead to is a bunch of unmaintainable code.” The people who are thinking this probably already have a good library of Java classes laying around that they can call on to do simple tasks.

The first time I wrote “Hello World” as a JSP page the old fashioned way I immediately went back to PHP and ColdFusion. It just didn't make any sense to write all that code simply to print one fragment of a sentence “Hello World.” If I remember correctly, it took something like four to seven properly formatted lines to get a single line of output. To a developer that has been doing ColdFusion or PHP, this is ludicrous. So, let's compare the JSTL with ColdFusion and PHP and you'll see why I am so pumped about it!

To begin, I downloaded the netBeans 4.0 IDE from Sun. This is probably the best Java IDE around. It allows for visual J2SE development, for desktops, making creating interfaces a breeze, admittedly a tough point for me, it also assists in JSP development. A development copy of Jakarta Tomcat is installed inside the environment so you don't have to have a JSP wrapper installed. In addition to the usual help documents there are sample applications included in the download. You simply have to create a new project of the type sample, and select the JSTLSample project. This will create a plethora of code and examples for you to browse at your leisure.

One of the tough points was that initially I couldn't get my JSP to work. The reason I found was because I didn't have the JSTL class files in the right place, and I didn't really know where to look. Fortunately, I had the samples as an example, and I was able to figure it out. I got everything to work by downloading the proper files for the JSTL from the jakarta website.

At first, I didn't know where to put them, but after some poking around I discovered that you had to put them in a folder called “lib” under the “WEB-INF” subfolder in the project. There were a bunch of files in there after I unpacked the downloaded archive, and I didn't really like that, so I kept looking and found out that all those jar files could be archived into one massive jar file. I got that out of one of the tomcat “ROOT” folders that were part of another intallation. Anyway, once I got that in place, I was ready to go. All JSP pages that are going to use the JSTL need to call it out by pulling in a taglib.

There are several taglibs that provide the funcationality for the ever expanding JSTL standard library, and there are custom taglibs created by some very intrepid JSP developers of which I hope to be someday. The way you call out the most basic JSP taglib is as follows:

<@taglib prefix="c" uri="" />

This initializes the core JSTL library which gives you commands to iterate over a dataset, set variables, and evaluating expressions. The other libraries include a functions library that does things like localization and finding and replacing substring elements with other values. It also includes a sql library that has everything a developer would need for setting up a data connection to a database using a JDBC driver. You can set the datasouce, then you can pass SQL to the server and handle the returning dataset. There is a formatting library that will allow you to do date and number formatting. The functionality is very good for such a young technology.

There is some overhead in processing the tags vs raw Java, but it is negligable, and with the great increases in code readibility I am sure we all can agree it is worth it. Now, a code example of JSP using JSTL. This is the first JSP page I ever wrote.


That's it. This code will, in a HTML body, count from 1 to 100. To compare that to ColdFusion:


Kinda looks the same doesn't it. It is pretty obvious that the developers working on JSP are going for the same ease of use and readibility that ColdFusion provides as well as allowing for complex Java coding in the back end. Of course as with ColdFusion, you can make your own Java tags that perform whatever task you can dream up.

With some community support, the JSTL could become every bit as functional as ColdFusion, and remain pretty much open source. The great thing here is that on can maintain more control over their source as they are distributing compiled files that have their Java code inside of it instead of ColdFusion templates that can be opened in any text editor revealing all the juicy proprietary code inside.

The reason the JSTL will save my career is that I have not seen any public statement from Adobe about what they intend to do with ColdFusion, and with the JSTL I am less concerned, because I know that I can ramp up on it quickly since I have been working on Java for the better part of a year, and I can produce clean readable code. The ability to extend the JSTL with ease is also very appealing especially for custom server functions for web applications. I'd say that JSP's future looks very bright indeed, and we'll all continue to hope for the best for ColdFusion

Here are some links for more info on JSP

Jakarta's Taglibs
Good Article from Sun Microsystems on the JSTL
A good article from JavaWorld on the JSTL

The Future of Scripting

Posted: December 31st, 1969 | Author: | Filed under: ColdFusion, Companies, Microsoft, Programming, Sun Microsystems, Uncategorized | Tags: , , , | 1 Comment »

The Future of Scripting

Picture of Irv Owens Web DeveloperInitially I wanted to stay away from scripting languages as a developer due to the fact that they weren't really programming languages at all. For some time I was reluctant to even call myself a programmer until I built my first Java desktop application. In CNET's open source blog today, they ask the question has scripting peaked?

Scripting hasn't peaked out yet. The reason is clear. Building a web site with C++ or Java is like driving an armored tank to your mailbox. It is that ridiculous. The funny thing is that even Microsoft realizes this, giving their developers two languages to choose from when developing web applications. There are many reasons for enterprises to choose C# over Visual Basic when building a web application, especially if they already have desktop and client-server applications built using the technology. It would be possible to completely reuse many of the methods used in the desktop application for the web application. The frameworks built into J2EE as well as C# allow for robust development making it less likely that a developer will lose control of their code. Still, using these technologies and frameworks where a scripting language and a light framework would do adds un-necessary overhead to a project and can push deadlines out unreasonably.

Here's what I see. PHP is a fantastic scripting language that has no real back end and therefore is suitable for light to moderate customer facing websites and some intranet applications. Use of PHP in this regard will only continue to grow. I think some of the 25% decline in worldwide use is a reactive measure to PHP's early security vulnerability. PHP is losing ground quickly to and VB scripting as Microsoft's Server 2003 is more widely adopted. Personally I think that LAMP is superior for many tasks, but is almost ubiquitous now, hosting and maintenance are cheap. I'll continue to use PHP for light jobs, but at the same time I realize that this is just a preference and performance-wise is better. Talking about Java… Sun needs to buy ColdFusion from Macromedia / Adobe. It should be THE Java application server. There is no cleaner and easier scripting language, and it has nearly unlimited flexibility and is design-pattern friendly. Why this move hasn't occured yet is beyond me. It would have made sense for Macromedia to sell it, but I think the issue is that Sun has many proud engineers who love to over develop products. The thought of supporting something as business friendly as ColdFusion probably makes them sick. The business case for this is probably that Macromedia probably sees the big picture and that there are big bucks in ColdFusion, especially now that enterprises are seeing it as a way to get around JSP's notoriously long development cycles.

I see scripting as having a bright future, and I'll tend to side with Zend's guys as saying that regardless of how the Evans study got its numbers, PHP is increasing in use not decreasing. I'm not sure if it is true, but if the next version of IIS is going to have PHP support built-in, I'll be seriously considering going with a Microsoft server in the near future and running it alongside ColdFusion. I like PHP, but I just like ColdFusion better. – Scripting's demise