Monday, March 20, 2006

Java Rules The Enterprise

Java has rocked the world of Enterprise Software Development. Almost all major Enterprise Software is being developed using Java based technologies, at least when it comes to the server side development. BEA, SAP, IBM, Oracle ... and the list goes on.

But what difference does it make to an end user? The end user who uses the system at the end of the day to make Account Entries or manage inventory does not care and does not know the difference between whether he is using a system developed using Java or PHP or C++, especially with the new fast CPUs. What does make a difference is whether the software is well designed and whether all different operations of the company are well-integrated or not.

SAP has been providing a robust, integrated software solution to enterprises to manage their everyday tasks. Their R3 software integrates financial functions, inventory management, accounts, sales and distribution. It also allows additions to the system with customized programming. They have the most mature software in the enterprise software market. Even they jumped on the Java bandwagon.

So why is it that companies are moving to Java based technologies? Why has PHP not been able to penetrate into the enterprise as well? And what was wrong with the old way of doing things with C and C++?

To understand this you first have to understand the requirements of an enterprise, exactly why does it need such over-priced software.

I will continue this in another post ...

Automated Computer Inventory

Recently I came across an open-source project that automatically creates and maintains a very detailed inventory of ALL the computers on your network. The project is called OCS Inventory. Its website states that it "... is an application designed to help a network or system administrator keep track of the computer configuration and software installed on the network..." Actually its does much more than that.

It allows the admin to retrieve any registry key from the client computer, a highly detailed list of hardware installed (even details of the attached devices like monitors), a web interface to search the inventory etc.

There have been some problems that I have been trying to tackle for a long time on my 100 PC network. Number 1 on the list was to disable all USBs so that our propriety data could not be copied onto USB flash disks and carried out of the office by employees; or employees do not bring in and execute software on their PCs (associated problems are with virus contaminated software) which might cause havoc on my network. Using the inventory I was able to clearly identify which PCs on the network had their USBs still active. I also found 2 PCs on my network using ancient 10 MBps network cards.

It has helped me map out an upgrade plan for both software and hardware. I would recommend any network admin to give it a try. Setup is very simple, the server runs on Windows, Linux, Mac OS, UNIX etc.

Tuesday, December 20, 2005

The Problem With Java Client Development

I love Java as a language and as a platform. It is a very clear language to understand and there is a plathora of code available on the web for you to put together a relatively complex application together in no time. It has the support of far too many companies to mention here and it also has the seal of approval from Open Software and Free Software developers.

I recently looked up into decompilers for Java programs and I was horrified to see the results. A Java program can be decompiled back into its original source code with very little work. There are many free and commercial decompilers available. I decompiled one of my older programs that I made for a client (who never paid up) and it was converted back into its original source code within seconds.

This prompted me to look up into how I could make sure that my Java programs would be safer from decompilation. There are 3 techniques to do so:


  1. Obfuscation: This is the process of changing the class / method / variable names so that they are not easy to interpret once decompiled. It does not stop decompilation though, just makes it slightly more irritating for the one who is trying to decompile your code. But keep in mind that it does not change the names of the core Java API packages/methods etc. So your algorithms are pretty much given away to the one hacking your code.


  2. Compilation to Native Code: You can compile your Java code to Windows or Linux native code like for a C/C++ program which can be decompiled but not easy to make sense of the decompiled code. A person like me will not be able to do it. Two programs used by programmers are the commercial Excelsior JET and the open source GCJ. Excelsior JET has licenced the J2SE code from Sun Microsystems so your code will not break at all. GCJ still lacks a lot of J2SE packages and classes (e.g. there still no AWT implementation). So your code will break a lot.


  3. Light-Weight Clients: This is a client / server approach for applications where the actual bulk of the program logic resides on a server and the client is mainly used for display purposes. So if the end user decides to decompile the Java client the most he will get out of it is the code for displaying. He will not be able to alter how the logic of the program actually works. This might be perfect for enterprises that will deploying the application in an intranet environment but it is not sufficient for standalone everyday use applications like editors, mail clients etc.



Come to think of it all those free applets out there can be easily decompiled, code changed, your company logo added and then served on your own webpage without anyone ever finding out.

I think Sun Microsystems should provide a free compile to native code compiler with their SDK for people who want to keep their source code safe from hacking attempts.

Saturday, October 15, 2005

VB6 May Live If...

I have just completed 2 projects recently using VB6. I know that using .NET is the IN thing but the client's required it. A programmer's best friend is Google, to search the net looking for an explanation for why a bug is occuring or trying to find out how to implement a certain feature or maybe find free code lying around on the net to directly embed into their own.

When working on these VB6 projects I realized that a lot of VB6 code is now available for free on the net compared to what was out there just a year back. So many sites are giving away complete VB6 code, its just plain crazy. Work that used to take me months can now be done within days as the code for most of the features that you can think of is available for free downloads.

Maybe I did not notice this because I was lost in the world of Java for a while now. But I believe that there are people out there who are trying to keep VB6 alive. Free code for it being available on so many sites definitely means that there is a demand for it.

I feel that if a company were to invest into creating a VB6 clone, it would definitely sell. Better yet, if it could be made to be cross-platform compatible, it would sell like hotcakes. Cross-platform compatibility would mean that old VB6 programs cannot be compiled for other platforms, but it would mean that VB6 programmers can use their coding skills to develop for other platforms. One Open Source project to note is GAMBAS which is "... a free development environment based on a Basic interpreter with object extensions, like Visual Basic™ (but it is NOT a clone !) ..."

I am not trying to ditch VB.NET. I use it and its a great language. But consider the VB6 programmers all around the world who are being forced to let go of their beloved language to move to a COMPLETELY NEW language. I was able to cope because of my strong background in OOP from Java.

Think about all the programmers who could not update their knowledge to VB.NET and lost their jobs. I can hear the smart remarks of some programmers "that means more money for us". I would simply like to say to them "your time will come as well".

Thursday, May 12, 2005

Make Windows look like MacOS X

I have been using Windows XP on a laptop with 256 MB RAM for a while now and have always thought to myself "Windows XP is killing my RAM, I wish I could have the base OS use less of it". Uptill now I was tweaking XP by minimizing processes running in the system tray and shutting down unwanted services, but the base OS would take upto 170 MB. This was mostly due to Windows Explorer.

Last week I came across LiteStep, an alternative to Explorer that takes far less resources and can do wonders with the way your desktop looks. I have also installed a bunch of other utilities on my laptop and now when my laptop is booting it shows up a Mac OS X logo during the boot up process, the logon screen has been replaced by a nice Firefox logon screen and the desktop looks almost exactly like that of the Mac OS X. When I showed it to a friend, he thought I had installed MacOS X on my laptop. This is the by far one of the geekiest things I have done on Windows.



MacOS on XP 01




MacOSX on Win XP


Best of all I was able to do all this using free and Open-source software, no need to pay for it.

To change your desktop to act like Mac OS X get the following:
1) LiteStep installer (works with both Win 2k and Win XP)
2) MacOS X theme for LiteStep
Browse on ls-universe and WinCustomize.com for other LiteStep themes.

LiteStep changes the desktop but it does not change the window decoration, ie. the window title, minimize, maximize buttons. To set the window decoration to look like Mac OS X get the following:
1) UXTheme Multi-Patcher (Neowin Edition) 2.0.exe
2) Macintosh Theme for Win XP (you can use this without the need for LiteStep)
Browse on belchfire.net for other Win XP Window Styles.

To change the boot screen and logon screen you will need:
1) LogonUI Boot Randomizer
2) Boot file showing Mac OS X
3) Logon screen with Firefox (I have not found a screen to mimic Mac OS X yet)
Browse on belchfire.net for other Boot and Logon screens.

This is not meantto be a tutorial. I am merely providing direct links to the files needed. When you install, most of it will be straighforward. There are some directions also given within the files. Details of installation can be found at belchfire.net and ls-universe.

Wednesday, April 6, 2005

Death of Visual Basic 6

With the arrival of the new Visual Studio, Visual Basic 6, the programming language loved and used by programmers all around the world especially in the Finance Industry, will come to its end. Microsoft will no longer have support for the language in their Software Development IDE Visual Studio. Visual Basic was one of the easiest languages to get used to and allowed its users to build a fairly complex application up and running in no time.

I myself started real programming using ASP which is VB for web development and love dit right away. It was simple to learn and all the tools needed were right there free with my Windows 2000 installation, except for the Visual Studio IDE. Then I moved to application development with VB6 and then also did a whole bunch of VBA work. I have created numerous small utilities using VB6 and MS Office in my time to make repetitive tasks easier for people working on my network.

Microsoft claims that their migration tools can convert old VB6 source code to VB.NET code flawlessly, but if you search the web for what people have to say about that, you will find that its not as simple as Microsoft would like you to think it is. I came accross this article "Microsoft MVPs Say They Want Old VB Back" today and though I would put it up here. Its about a team of companies who are not happy about the death of VB6. They claim that their applications could not be translated to VB.NET using the migration tools that Microsoft has provided and are asking Microsoft to extend their support of VB6.

While I was in London in 2003 I found out from some fellow programmers who were working in the Financial industry that VB6 was very hot. Everyone was using it for financial analysis, reporting, mostly using Excel and VBA. But at that time I also noticed a lot of Java jobs opening up in the Financial sector. There seemed to be a huge move by them towards J2EE solutions.

I guess a lesson to learn from this for me is that when an enterprise decides to develop software for their internal use that they know will become a crucial part of how their business runs, they should make it a point to choose technologies that are universal and ones that will not lock them into a single vendor.

Like in the case of VB6, now that Microsoft has decided to kill it, all enterprises that are dependant on software that has been developed using VB6 are doomed. Their software cannot be updated for future versions of Windows or processors. There are rumours that with the new version of Windows, programs that have been compiled for previous versions of windows might not run at all. This has happened in the past. When Microsoft moved from Windows 3.1 to Windows 95, a lot of software broke down.

Monday, March 7, 2005

What is an Application Server?

A friend recently asked me about the difference between an Application Server and a regular server program that is created using sockets in Java or C/C++. I explained to him that when a developer creates a regular server that locks on to a port listening to client requests, he is in charge of everything that the server program does. This sounds good at first since the developer is free to do whatever he wishes, but when creating an advanced and sophisticated piece of software that has requirements for clustering support, database connection pooling, web services, standards compliance, cross-platform deployment, database abstraction, webpage serving etc., the developer would go crazy trying to implement all of them on his own.

But one could also argue that all these advanced features can also be implemented using bits and pieces from different libraries/packages developed by different vendors and open-source projects. A C/C++ developer could use the Beowulf libraries for clustering, DBStep for database abstraction and so on. A Java developer can use JDBC for database abstraction, use elemenope for scalability and client/server messaging, Apache Axis for web services, Apache Tomcat for serving dynamic webpages etc.

Now using these different libraries does solve the purpose but they create new problems. There is no integration between these various libraries therefore each library has to be managed seperately. If tomorrow Apache Axis decides to make an update to their software and the developer wants to use the updated version as part of his software, the new version might interfere with a part of the elemenope code.

An integrated environment is one where all the sub-parts have been designed specifically to work together and not to interfere with each other's work. An application server gives you just that; an integrated set of libraries that work together to give developers a platform that provides all the functionality they need to create an advanced application.

But what about all the different Application servers out there, for Java, XML, PHP etc. Whats the difference there or why should a developer use one over the other. And why should a company opt for an expensive commercial application server when he can use an open-source alternative. I came across this article on the SYS-CON website which has the highlights of just such a discussion.