Monday, June 26, 2006

Java Virtual Machine
by: Rahim Vindhani

Java is a high level object oriented language. When we compile java code it first gets converted into highly efficient byte code by the java compiler. The generated byte code is then interpreted by a peace of software called java virtual machine.

What is java virtual machine?

Java virtual machine is the software which interprets compiled java byte code and runs the java program. Java virtual machine is also known as JVM.

As Java code is first compiled into byte code and then the java virtual machine interprets and runs the code, java has achieved the platform independence. Java virtual machine is available for almost all the platforms, right from windows to various handheld devices.

How Java Virtual Machine works ?

JVM does not have any information regarding the programming language. It knows only binary format of the byte code. The class file generated by the java compiler contains the byte code in the format which JVM can understand. We can generate the byte code that adhers to this format in any programming language.

Every java program must run within the boundries defined by the JVM. The code run inside the JVM can not go beyond the security constaints defined by the JVM. This is one of the reason why java application are considered as secure applications over internet.

Rahim V.
http://www.javadeveloper.co.in

About The Author

Rahim Vindhani,
IBM Global Services,
Pune, India.
http://www.javadeveloper.co.in

Why Java RDBMS?
by: Naresh Ahuja

It is a well known fact that Java as a programming language set off a new paradigm in the software industry. Suddenly, every software programmer worth his salt was amidst software jargons like 'Platform-Independence', 'Cross-Platform-Deployment' and ‘The Java Virtual Machine’. In fact, it did not take long for Java to usurp the ‘most sought after status’ from many software languages, and become the most preferred tool for creating software; especially software for the web. As the recent trends in the industry show, Java is set to achieve an undeniable position as the most preferred software programming language for a long time to come. It is indeed Java’s credit that many prominent vendors who tried to emulate the capacities of Java, failed miserably in the endeavor.

The importance of Java in the software scenario has led to another major trend. Software vendors are either rewriting their existing products in Java, or are creating new products exclusively or partially in Java. This has led many analysts to question the need to port already existing applications to Java. While the prospects of porting small or medium sized software to Java may not attract concern, it assumes significance when we consider porting existing databases that could be handling millions of sensitive blocks of information. Similarly, experts also have to decide between deploying reputed databases, and new databases that have been entirely developed in Java, in their organizations. Analysts have to answer many pertinent questions like: What are the advantages of a Java RDBMS that would compel my company to switch to it? Would it be cost effective to change to an RDBMS that has all the advantages of Java? Would the costs involved in porting millions of existing records justify the perceived performance and scalability features of the Java RDBMS? How secure would be the new RDBMS? What is the learning curve that has to be tackled by the staff who may be assigned to this database? In fact, there are a host of questions that a concerned technical head may ask himself before taking that all important decision to switch to a Java RDBMS. Let’s try finding out some of the answers.

What are the advantages of a Java RDBMS?

OK, so we all know that Java is set to capture, or has already captured a sizeable chunk of the software market. However, how does that justify the use of a Java Database? After all, is not Java theoretically capable of integrating with any database? What advantages can be afforded by a Java RDBMS?

Well the answer is quite simple. Java RDBMS has, or supports, the much sought after qualities of Java, which is the most important reason to switch to it. Some of the Java RDBMS already available in the markets answers the immediate concerns of the Technical Lead in the most persuasive manner. For example, Daffodil DB (http://www.daffodildb.com/ ), an RDBMS written in Java, considers the following as its core strengths:

  • Multiple Platform Portability
  • Small Size
  • Java Stored Procedures
  • Transparent to End User
  • Zero Administration Efforts

Some of these features are worth a second look.

One RDBMS, multiple avatars

Java RDBMS not only offers the advantages of Java, but also introduces new concepts that can revolutionize database programming techniques. For a start, the much famed portability of Java is the core strength of a Java RDBMS. Now, you don’t have to buy different RDBMS for different platforms within the same enterprise. Other than the cost factors, the biggest advantage such an arrangement can give is that in-house code need not be redesigned for different platforms. By standardizing the database that is used, programs working across platforms can interact transparently and effectively. Project managers would vouch that portability, synchronization and customization effort for software running on different platforms are some of the most time consuming and tension filled activities in the office. Now all these activities can be easily implemented with the Java RDBMS in its rightful place.

Store and use those procedures with abandon

Security buffs within the enterprise would always throw a tantrum when dealing with stored procedures. Traditionally, the implementation of stored procedures had been the responsibility of the specific application vendor, and most of them could crash the whole database due to internal errors, rendering precious time and money waste. Java stored procedures with its inbuilt security features is the new fad of security administrators who are finding it powerful, fast, and very safe. Java does not implement Pointers, and so is a safe bet for developers to write secure code and procedures. In addition, with the JVM overlooking all the activities (the sandbox approach), there is no scope for external access that could jeopardize mission critical enterprise applications.

Transparent to End User

Java technologies have always been in the forefront to give us seamless transparent applications with inbuilt security features being given the utmost importance. In a Java RDBMS, database components can be embedded in applications, and they can perform complex tasks without user intervention. In addition, the user need not know the complexities of the database because the embedded database components will do all the work for him without him even knowing about it. This allows the user to concentrate on his tasks rather than configuring databases, which is an auxiliary requirement. In addition, other routine activities like starting the server and repetitive configuring of the database can also be avoided. Perhaps the biggest advantage that Java RDBMS offers is that the user need not weigh the pros and cons about choosing a database vendor. This is because Java RDBMS being extremely portable can seamlessly integrate with almost all platforms, and the embedded components will handle all the chores of integrating with different vendor software. Java RDBMS can also be seamlessly operated across multiple platforms without the need to configure the database for each and every operating system.

Zero Administration Efforts

Java RDBMS comes in with zero administration efforts, which means that once installed and configured, your clients need not change their settings to suit new changes that you make in your database. Java RDBMS also does away with, or considerably reduces, the role of the Database Administrator because of its self-managed features, and its extremely scalable mode of operation.

If you have not thought of it yet, it is a good time to think about Java RDBMS. The time is not far away when the databases industry will be greatly influenced by the power and functionality of Java RDBMS.

About The Author

Naresh Ahuja
Webmaster
webmaster@daffodildb.com

Wednesday, May 31, 2006

15 Exercises for Learning a new Programming Language


by: Prashant N Mhatre

I've working knowledge of a bunch of programming languages but job demands to learn a new language frequently in a short time. Instead of reading hundreds manual/book pages, I quickly read 10-15 pages of tutorial or primer. (As you know google is the best search engine to look for such stuff). I keep printed copy of the language syntax reference card handy. (There are many reference cards available over internet. Type in 'language to learn' + 'reference card' in google.)

First of all, get familiar with Compiler, compiler option, editor shortcuts or integrated development environment (IDE). Start with a simple 'Hello World' program. Compile it. Use basic functionalities of debugger like setting break points, printing variable values, moving to the next or specific position, stopping debugger etc.

To grasp basics of a new language quickly, here are the exercises I use. Remember some programs may not good for beginners.

(1) Display series of numbers (1,2,3,4, 5....etc) in an infinite loop. The program should quit if someone hits a specific key (Say ESCAPE key).

(2) Fibonacci series, swapping two variables, finding maximum/minimum among a list of numbers.

(3) Accepting series of numbers, strings from keyboard and sorting them ascending, descending order.

(4) Reynolds number is calculated using formula (D*v*rho)/mu Where D = Diameter, V= velocity, rho = density mu = viscosity Write a program that will accept all values in appropriate units (Don't worry about unit conversion) If number is <>

(5) Modify the above program such that it will ask for 'Do you want to calculate again (y/n), if you say 'y', it'll again ask the parameters. If 'n', it'll exit. (Do while loop)

While running the program give value mu = 0. See what happens. Does it give 'DIVIDE BY ZERO' error? Does it give 'Segmentation fault..core dump?'. How to handle this situation. Is there something built in the language itself? (Exception Handling)

(6) Scientific calculator supporting addition, subtraction, multiplication, division, square-root, square, cube, sin, cos, tan, Factorial, inverse, modulus

(7) Printing output in different formats (say rounding up to 5 decimal places, truncating after 4 decimal places, padding zeros to the right and left, right and left justification)(Input output operations)

(8) Open a text file and convert it into HTML file. (File operations/Strings)

(9) Time and Date : Get system time and convert it in different formats 'DD-MON-YYYY', 'mm-dd-yyyy', 'dd/mm/yy' etc.

(10) Create files with date and time stamp appended to the name

(11) Input is HTML table, Remove all tags and put data in a comma/tab separated file.

(12) Extract uppercase words from a file, extract unique words

(13) Implement word wrapping feature (Observe how word wrap works in windows 'notepad')

(14) Adding/removing items in the beginning, middle and end of the array.

(15) Are these features supported by your language: Operator overloading, virtual functions, references, pointers etc.

Is there something called 'namespace / package / module' supported by your language? (Name mangling) - Read More on this

About The Author

Prashant N Mhatre

I mainly developed software for Stock Markets and Chemical Instrustries. To learn more about programming, you could refer to the Programming page I maintain.

http://www.onesmartclick.com/programming/programming.html

Also Engineering page

http://www.onesmartclick.com/engineering/engineering.html

prashant_n_mhatre@yahoo.com

Monday, May 29, 2006

Web Applications vs Desktop Applications

by: Sharon Housley

There has been a long running debate about web applications replacing desktop software applications. While some functions are better suited to web applications. It is my belief that security concerns and legacy systems will prevent desktop software from becoming obsolete.

Some argue that the debate between web applications and desktop applications is pointless; as their is no clear answer. While still others argue that the issue at hand is as much a business and marketing issue, as it is a technological issue.

What Defines a Web Application Vs a Desktop Application?

A web application is an application delivered to users from a web server like the Internet. Some businesses run web applications on an intranet, as well. Web applications are becoming more popular due to the widespread use of the web browser as a client.

Some applications are better suited and more likely to become successful as web applications. Web applications designed specifically for search engine optimization, have become increasingly popular. It is easy to understand why web applications that relate to the Internet would prosper, while business applications may have less appeal in a web environment.

A desktop application is a self-contained program that performs a defined set of tasks under the user control. Desktop applications run from a local drive and do not require a network or connectivity to operate or function properly, though if attached to a network desktop applications might use the resources of the network.

Pros and Cons to Desktop and Web Applications:

Easily Accessible

Web applications can be easily accessed from any computer or location that has Internet access. Travelers especially benefit from the accessibility. This often means that if a traveler has access to a computer, phone or handheld with Internet connectivity they can utilize the web application.

Low Maintenance & Forced Upgrades

Desktop applications need to be individually installed on each computer, while web applications require a single installation.

Many web applications are hosted by a 3rd party and the maintenance fall under the applications hosts responsibility. The ability to update and maintain web applications without distributing and installing software on potentially thousands of client computers is a key reason for the popularity of web based applications. This can be a blessing and a curse as users of web applications on hosted systems are at the mercy of the host, if an upgrade does not go well, or the individual user doesn't want or need the new features the upgrade will still go forward.

Increased Security Risks

There are always risks involved when dealing with working online, regardless of how secure a host might say a web application is, that fact of the matter stands that the security risk of running an application of the Internet is more significant than when running an application on a standalone desktop computer. Some applications require more security than others, playing Sudoku on a web application would cause little concern, but dealing with sensitive corporate formulas or accounting details in a web environment might be determined risky.

Cost

Over the life of the software use, web applications are typically significantly more expensive over time. Desktop applications are purchased outright and rarely is their a recurring fee for the software use. Some desktop applications do have maintenance fees or fee based upgrades associated with them, but rarely is there a subscription fee associated with the software's ongoing use.

Many corporate web applications use a different model, users typically are charged monthly service fee to operate the software. Fees are considered "subscription fees". If you fail to renew your subscription you may be unable to access the data stored in the web application.

Connectivity

Web applications rely on persistent and unmanaged connectivity. If you do not have an Internet connection or if your host does not have Internet connectivity you cannot access the information. Critical applications or businesses that are time sensitive cannot risk denial of service attacks or power outages to interrupt their operations and access data that is sensitive.

Slower

Web applications that rely on the Internet to transfer data rather than a computer's local hard drive, may operate slower. The speed may also vary based on number of users accessing the application.

Backups & Ownership.

Regardless of the platform, companies need to be sure that their data is appropriately backed up. When using a web application that are hosted by a third party, companies should clearly determine who owns the data housed in the application, and be sure that privacy policies prevent that data from being used by the web host.

Ultimately the accessibility of web based applications make them very desirable. Web applications have some fundamental limitations in their functionality, and are better suited for specific tasks. Understanding the pro's and con's to each business model, will help users determine whether a desktop application or web application will better suit their needs.

Discover Mozilla FireFox It's Extensions and how to install them
by: Finley Stew

Discover Mozilla FireFox Extra Features – Extensions and How To Install Them

If you are still not using any other web browser then FireFox (no matter what OS you are using) you are endangering the security of your computer and missing out on a much richer surfing experience.

One of Mozilla FireFox browser most powerful feature is the possibility to install extensions.

Since Firefox browser is a product of the open code community, this results in an active programming distribution of firefox extensions. The extensions are plugins that just like skins will add functionality to the firefox browser.

The number of extensions is countless and any day more of them are being released. They go from telling the weather or controlling you favorite mp3 player from the browser to adding practical functionality to your special surfing needs, like better managing your downloads or designing web pages.

To Enjoy all that you'll have to know how to install them. As an example I'll take a very useful extension named "slime extension list". After installation of the extension, your extension list will be much slimmer and if you are going to install a lot of extensions, it will be much easier to handle.

Slim Extension, could be found at http://v2studio.com/k/moz/. Click on "Install v0.3" link. If your security settings are at default (I recommend to not change them) then at the top of firefox browsing window, a yellow message will appear. Click on the allow button, and a new dialog will appear with the message that firefox has blocked the unknown site from installing a software. Add the site to the list of your trusted sites and click the "Install v0.3" again. This will pop up a window that will follow you throw the easy and fast installation.

After finishing restart your mozilla firefox browser and check in tools extensions.

Doesn't it look much better?

To get the most out of your firefox, search the internet for "firefox extension" + the keyword of your area of interest. You'll be surprised to find out how many extensions are out there that can make your life much easier.

Stop using any other browser. Firefox was developed to work with the world agreed HTML standards. It is faster and safer. The spywares, adawares, keyloggers, Trojans, and all the rests were designed to attack the known security flews of the popular browsers.

So do your self a favor and switch to firefox, it's free and powerful.

Important Linux Directories


There are many variants of Linux used in different computer systems today. Luckily, most Linux developers employ a common naming and utilization scheme that makes different variants of Linux easy to use and maintain. This article will discuss some important and common directories in many popular Linux distributions.

/home

Each user of a Linux system is assigned a special directory, called "home" direectory, that represents their private space on the system. For example, if a user of the system is called tom, the home directory of tom will be /home/tom. Tom has the right to create any files and directories under his home directory. This is also the default location when tom logs into the system.

/root

This is the home directory of the adminstrator or super user.

/tmp

In addition to personal hard disk space in the home directories, users are also given special access to shared temporary space in the /tmp directory. Linux systems often implement quotas on user accounts to prevent anyone from using too much disk space. The /tmp directory allows all users access to additional space to meet short term needs without charging the space against their quota. All files placed in this directory are deleted automatically after a few days.

/etc

This directory stores all the configuration files needed for the operating system. For example, startup configuration scripts are found in /etc/rc.d and network configuration scripts are found in /etc/sysconfig. Normal users cannot modify the files in /etc.

/bin and /usr/bin

Most system commands are stored as binary files only in machine readable format. Commands appropriate for use by ordinary users are either placed in the /bin or /usr/bin directory. Core commands like rm, mv, ls, cd go into /bin while supplementary utilities like compilers, firefox browser and openoffice go into /usr/bin.

/sbin and /usr/sbin

Like /bin and /usr/bin, /sbin and /usr/sbin store commands to be used only by the super user, ie root user. These include commands for attaching and removing hardware, starting and stopping the system...etc.

/var

This directory stores all the frequently changed files in the system. For example, incoming, outgoing mails, system logs, websites, ftp file archives...etc. very

Conlcusion

There are only a few directories to know to really start using Linux. If you understand what the main directories are, then exploring the sub-direectories becomes much easier. If you are lost while navigating the directories, always use "cd /" to return back the the root, "cd .." to go up one level or use "pwd" to find out where you are. Another command "which xxx" tells you where certain commands are located.