'Programming' Category Archive

Posted on May 31st, 2007

Indian software outsourcing industry has grown to become world leader in Offshore Software Development. It has seen many different trends technology wise as well as ups and downs. Test driven Software Development also known as first test programming or first test development, is an approach that hinges on identifying and writing a single test prior to writing just enough functional code to break that test. In other words, it is a way to think through the design before one writes the functional code, although it’s not obvious from the name, in Software Development goal is actually one of specification, not validation.

While popularized Test driven Software Development in extreme programming defines two simple rules. The primary is that one should write new business code only when an automated test has failed. And secondary thing is that, it should eliminate any duplication that one finds. The deep explanation how these two simple rules generate complex individual and group behavior is as follow:

1) The Software Development must provide rapid response to small changes as one needs a fast compiler and regression test suite.
2) The design organically, with the running code providing feedback between certain decisions.
3) Write own tests code because one can’t wait 20 times a day for someone else to write for them.
4) Your Software Development designs must consist of highly cohesive and loosely coupled components to make the testing easier.

First of all, the quickly adding of code is just enough to fail. One can not write new functional code, even a single line unless; it has run a test without failure. The second important step involves running of tests; either all or some, see the new test failure. After that, make a little change to the functional code which is just barely enough to enable code to pass the successive tests. Next, while running the tests and, if one has lined up all ducks in a row, see them all succeeding, if something waddles out of place, one needs to repeat step three once again. In the fifth optional step, there is factorization of the code to remove any duplication in Software Development.

Test driven by Software Development is most significant benefit for efficiency in the real world. With the full suite being run several times a day, although there are larger systems out there, so this Software project makes it clear that test driven can work for nontrivial systems.

Replacement for Traditional Testing: Although test design in Software Development is a programming technique, you also gain 100 percent unit-test coverage for the code if that’s done correctly and perfectly, which is important by product. As with traditional testing, a successful test finds one or more defects, and when a test fails, one can make progress because they now know that it requires resolving the problem.

Replacement for Software Development Modeling: Verbal thinkers learn better from text than from drawings. Keep the team members in mind when one determines their choice of development approach. While the enhanced test design Software Development with modeling to great success, creating models with project stakeholders to help explore their needs and then moving on to a test-driven approach for implementation.

Chet-

Tatvasoft - Offshore Software Development Company from India

http://www.tatvasoft.com

Posted on May 19th, 2007

Chuck, decided to start a bus route, with a brand new bus, so he ordered a bus from the distributors of Volvo. When it was delivered he was dismayed to find that, although it had a chassis, an engine, a driver’s seat and steering wheel, there was little else. All the “soft options” were missing. He called the distributor who advised that that was the way it was. Chuck had to build his own body, install seats and all the rest of it. And, as he didn’t have a license to drive a bus, he would have to employ a driver.

What’s this got to do with computers and software?

A great deal!

You see a computer is a piece of machinery, just like an engine. You can go out and buy the most expensive, most powerful automobile in the world, but without the soft options and a driver it won’t go anywhere. The same with a computer. The world’s most powerful and expensive computers, in business, government or the military are, without the software and the drivers, just

USELESS PIECES OF EXPENSIVE JUNK

It is not by accident that Bill gates is one of the two richest men in the world. As a young man he recognized the future of home computers and realized they would all need user friendly software to make them work. He fill that need with Microsoft’s MS Dos, then Windows and other software programs.

Microsoft software, is not, to be frank, the best software in the world, but it is by far the most popular and usually the most affordable. And because it is used on most PC’s around the world, it is almost obligatory to install it on your own computer, to enable exchange of documents and communicate with others.

Linux is reputed to be a better, more robust operating system than MS Windows, but few people use it because there are relatively few software programs compatible with it, and it takes some time to learn how to use it. And yet there is a free version. There are office suites (similar to MS Office) available on the internet free, there are programs better than MS Powerpoint (IMHO), but MS products are so entrenched in computerland that few people look beyond them unless they can’t get what they need from Microsoft.

Why can’t they get them from Microsoft?

MS only makes popular software that will be used by millions of people. They spend millions of dollars to develop a program, then sell millions of copies of it. A flower breeder wanting specialized software to assist him breed roses, for instance, can forget about Microsoft. They don’t have it and they are not interested in developing it. Not for the price the flower breeder could pay, anyway. There’s just not enough demand for it. No demand, no profit. No profit, no MS.

So, what can you do if you need a specialized program? Don’t give up hope yet. There are many software developers in the world who are developing niche software programs. You may find what you are looking for already available in your local computer store or, more likely, instantly available for download on the internet. If it’s not available, you can design your own. Yes, you can do that.

There are software designers available who will take your instructions concerning what you want your software to do and design your program for you. Designing and producing software can be likened to building a ship. This designer can be likened to the naval architect who takes instructions from the intended owner and draws up the blueprints for the ship. The architect needs to know a lot about the ship, what it will be used for (cruise ship, warship, cargo ship etc) and its size, capacity, functions and a whole lot more. Your software designer will need to get all this from you, exactly what you want the software to do, its functions, its capacity, its foundation (operating system) and every minute detail of what you require it to do.

Once the blueprint is completed to your satisfaction, your “ship” needs to be built, and this will be done by a programmer, who writes the code. Once the programmer has completed building the “ship,” everything needs to be tested, every little function must be tested over and over to make sure “portholes open and close, doors do the same, the engines work” and so on. In most cases, this requires a few trips back to the programmer to get bugs removed, until it is finally done. Now, once this has been satisfied, the ship will go on a “shakedown” cruise to test all the functions under operating conditions. In computer software, this is beta testing, where the software is handed to a number of testers who put it through rigorous testing to make sure that it works, works well and is robust enough to suffer a little over use or misuse.

When that’s all done, your software is ready for your use. You now own the world’s only copy of your special software.

Phew! That has taken a lot of time (several months most likely) and a lot of dollars. It may have taken 6 months to a year and cost you upwards of $50,000.00. Has it been worth the wait and the cost? Could you have gotten an existing program and had it adapted to your use? Was there a suitable program lurking out there that you did not find? Was there a way to cut the waiting time and cost? Is there a way to reduce the overall cost?

If you can join with hundreds, or thousands of others, in purchasing existing software, or sharing the costs of having special software designed and built, you can reduce the costs remarkably. This is called shareware and it is what you buy from Microsoft, Adobe and other software companies.

But can you do this with low demand software? Yes you can. You can buy accounting software, medical practise software, engineering software and many other kinds of software. Talk to people in your line of business and someone will know where to get specialized software that may help you.

If all else fails, send an email to mityoaks@bigpond.com and we’ll link you up with a software designer.

© 2005, Leslie H Sprankling. All Rights Reserved. Leslie H Sprankling is an Australian Business and Marketing Consultant with 30+ years in business. You can see numerous cutting edge business and personal software programs at his website, http://www.better-n-chocolate.com. These software programs are not available anywhere else on the internet. You will also find more timely business publications to help you develop and grow your business. In addition, you can get many free business articles like this one, for your own use or for publication and distribution. This article, and the others at the website,http://www.better-n-chocolate.com may be freely used, published or distributed in ezines, newsletters or websites providing the articles remain unchanged in any way and this resource box is included intact. For more information or inquiries please contact Leslie at mityoaks@bigpond.com.

Posted on May 14th, 2007

The purpose of one of our projects was MS Exchange handler for processing incoming email.

The basic source of knowledge was this article "Developing Managed Event Sinks/Hooks for Exchange Server Store using C#" by Logu Krishnan, published to the address http://www.codeproject.com/csharp/CsManagedEventSinksHooks.asp, and also examples from Microsoft Exchange SDK.

We utilized Synchronous Events and created the handler, which fires on OnSyncSave event. The handler creates activity record in Microsoft CRM and then removes the message in the Exchange database before the commitment:

public void OnSyncSave(IExStoreEventInfo pEventInfo, string bstrURLItem, int IFlags) { try { if (IFlags == ((int)EVT_SINK_FLAGS.EVT_SYNC_COMMITTED + (int)EVT_SINK_FLAGS.EVT_IS_DELIVERED)) {

ProcessMessage(pEventInfo, bstrURLItem, IFlags);

}

}

catch (Exception ex) {

log.Debug(ex.Message + "\n" + ex.StackTrace);

}

finally {

LogManager.Shutdown();

} }

For Exchange handlers debugging - it is the extremely convenient to use system log4net in RollingLogFileAppender or RemoteAppender modes (for multiple instance of COM + objects). You can read more on this subject here http://logging.apache.org/log4net/ To allow the handler incoming mail removal, it is necessary to give proper rights to the user, under which account the COM+ application runs the handler. These are rights on change of the information in user’s boxes for whom it is registered (Windows 2003 Server: Active Directory Users and Computer -> Users -> Properties (for COM+ application account) -> Exchange Advanced -> Mailbox Rights). And now the code:

private void DeleteMessage(string bstrURLItem) { try {

ADODB.Connection oCn = new ADODB.Connection();

oCn.Provider = "exoledb.datasource";

oCn.Open(bstrURLItem, "", "", -1);

if(oCn.State == 1) {

log.Debug("Good Connection");

}

else {

log.Debug("Bad Connection");

}

ADODB.Record rec = new ADODB.Record();

rec.Open(bstrURLItem, oCn,

ADODB.ConnectModeEnum.adModeReadWrite,

ADODB.RecordCreateOptionsEnum.adFailIfNotExists,

ADODB.RecordOpenOptionsEnum.adOpenSource,

"", "");

rec.DeleteRecord(bstrURLItem, false);

rec.Close();

oCn.Close();

rec = null;

oCn = null;

}

catch (Exception ex) {

log.Debug(ex.Message + "\n" + ex.StackTrace);

} }

Happy customizing! Boris Makushkin

Boris Makushkin is Software Engineer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Boston, San Francisco, San Diego, Los Angeles, Houston, Atlanta, New York, and Miami and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, VB/C#.Net, Crystal Reports and Microsoft CRM SDK developer.

Posted on May 2nd, 2007

TCO (Total Cost Ownership) is the buzzword in today’s business world. This metric helps enterprise managers assess direct and indirect costs and benefits derived from their investment on IT components and services. A vital component of overall TCO is database management. All information-centric applications need databases for data storage. Also, the storage demands of small and mid-sized companies are growing rapidly, as more emphasis is given on data backup and long-term archival of data disaster recovery.

Embedded databases have arrived in this scenario as a major cost-cutting tool. They help organizations in managing the growing storage requirements by providing a cost-effective and reliable solution for data backup, file storage and archiving, thereby assuring a lower cost of ownership for small to medium sized business organizations.

The remainder of this article will focus on the database server that I am most familiar with (Daffodil DB) and how it helps in the reduction of TCO. Though the example has some nuances specific to Daffodil DB, I am sure that readers will be able to extrapolate the theme to better understand the role of a database in TCO reduction.

Let’s begin with Development and Deployment Costs. Gone are the days when applications had to be tested extensively for all underlying platforms. Now, one can shrink the cost and time required to develop and setup solutions on multiple platforms by using a Java database. A separate deployment for different platform implementations of a large application is a major expense that an enterprise can do without.

Administration Costs are a major concern for many-a-company. Logically, database administration costs are a significant component of TCO. When embedded with an application, a compact Java database can be made practically invisible to the user, since it (the database) requires no administration and runs on the same Java virtual machine (JVM) as does the application. Its simple performance tuning process helps in optimizing database performance and vastly reduces database administration costs.

Now let’s move on to Compatibility Cost. Java databases, being platform independent, are compatible with all operating systems and application servers. This feature helps developers in choosing their own range of effective and economical solutions. For example, with Daffodil DB the developer can use Open Source tools like JBOSS application server for reducing overall TCO.

Last, but certainly not the least, let’s get to Licensing Costs. Pardon me if I seem to evangelize Daffodil DB, but that’s one area where I can ‘preach’ with confidence. As Daffodil DB can be used / embedded with a wide array of applications, flexible licensing policies have been developed to accommodate the diverse needs of the development community without restricting the same to just one standard license. Each application development organization may pick the right combination of licenses that best meets its needs. The organizations may also acquire additional licenses or upgrade their licenses. Do I hear someone shout ‘What about Open Source?’

This article has been contributed by (Mr.) Parveen Aggarwal, Technical Consultant to DSL India. With more than 6 years of industry experience in Java and allied technologies, he has an in-depth understanding of J2EE, J2ME and database management systems. Parveen is currently working on the concept of data-archiving in embedded databases. He can be contacted at parveenaggarwal@hotmail.com

Posted on Apr 25th, 2007

If you have Microsoft Great Plains and support it for your company and have light or heavy Great Plains customization, written in Dexterity – you need to know your options in upgrading Great Plains or migrating it from ctree/Pervasive to MS SQL/MSDE.

Great Plains Dexterity is proprietary programming language/environment, which was created in early 1990-th to provide platform / database / graphical interface independence for Mac and Windows based Great Plains Dynamics.  Today it is legacy and Microsoft Business Solutions is phasing Dexterity out.

However Great Plains 7.5 and even 8.0 is Dexterity based application, so you have to deal with it and it’s customization.

 

Good news.  Prior to version 7.0 Great Plains had plans on expanding GP functionality and so was changing tables structure – forcing Dexterity customization to be analyzed and partially rewritten with each upgrade.  Not any more – GP structure stays the same – Microsoft is doing new modules acquisition and unifying it’s graphical interface to move all it’s ERP packages: Great Plains, Solomon, Navision and Axapta to web-based Microsoft Business Portal.

 

Still pain.  Dexterity has possibility to customize existing Great Plains screens, so called Alternative Great Plains forms.  This was upgrade problem in the past and it stays now – there is no way to do it in house (until you are willing to pay for full-time internal developer – who is usually in the learning curve).  You got to bring in consultant.

Recommended approach.  You should have the strategy to migrate Dexterity customization to SQL, Crystal Reports, custom web publishing – Visual Studio.net and slowly abandon Dexterity customization

  1. SQL Stored procedures - performance improvement.  Consider replacing dexterity data manipulation with SQL stored procedures.  Dexterity is cursor-driven language and it is not efficient when processing huge datasets.
  2. Crystal Reports.  Take advantage of open and leading technology.  Crystal Reports will eliminate the need in the future for painstaking Dexterity reports upgrade.  Base you Crystal report on the SQL view or stored proc
  3. Do direct web publishing off your GP database.  Use Visual Studio – it is easy to find specialists and have them in staff.  We are in the World when web publishing is very easy.

Good luck and if you have issues or concerns – we are here to help! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Great Plains, Microsoft CRM customization company, based in Chicago, Los Angeles, San Francisco, San Diego, Boston, New York, Houston, Dallas, Miami, Atlanta, Minneapolis, Seattle and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

Posted on Apr 21st, 2007

Java has come along a long way.  Many would agree with this.  I did not until the Java 1.5 “Tiger” hit me.  The tiger had several new features, and more importantly, it has new syntax.  Six major upgrades that the tiger presents are certainly the generics, enhanced for loop, autoboxing (unboxing), improvement on Typesafe enum, Static import and the metadata.  Of course there are many more, which can be found at java’s official site.  Out of these six, at least four would be used in my daily “programming” life.  From java 1.1 to 1.4, it seemed more like new frills were simply added.  It felt like earning more brownie points when you downloaded the newer version.  But should I start using 1.5 immediately, maybe not.

The developers and programmers (if you distinguish between them) are left with one great dilemma (me too).  It certainly is as to which version to use when preparing software in java.  This problem hides itself under the carpet when you are programming for a specific client with a specific system where you can get it upgrade on site, but when the app is going to be used by Mr. Williams from South Africa and Ms. Lee from Japan, you really have to give a thought as to whether your app is going to run on both the systems (that is why java was made in the first place, isn’t it?).  I’ve always had the latest version of the sdk, yet I would try and target compiling in a lower possible version, so that even those people would be able to use the apps, who were, well, frozen in time and didn’t go up the “version ladder”.  For e.g., ordinary applets, by me and my company, in most of the cases would be compiled in java 1.1, so that no user ends up waiting for an hour before the plugin for the latest version is downloaded and installed (get yourself a coffee if your yawning).  For e.g., once on a tour, I happened to visit some site in a cyber café, which said that I needed to install java plugin 1.4 to view the page correctly (apparently, cyber cafes don’t bother much about upgrading java), and when I did, it turned out to be a stupid advertisement (Ahhh! What agony!).  Of course, over a period of time, you expect the users to have gone to a level of higher java plugin courtesy other company’s applets, but just to be sure…

Well, so this “dilemma” is real and has to be looked after (you don’t stand a chance if you don’t).  Many a times in java forums, you’ll find beginners with the problem of “applet not initializing” and when the compiling is targeted for 1.1, it runs.  Preferably, developers should have the latest version (despite the huge bandwidth it’s going to cost you to download it) and they should try and keep their apps designed, if possible, for lower versions for a universal application.   Although, this might not necessarily be imposed for a long time, but certainly try and keep your apps designed by the java 1.4 specifications for a few weeks, till most of the users catch on with the tiger.  This should also give you sufficient time to upgrade your programming ability version also.  A recent survey about java’s versions had about 260 respondents out of which about 15% didn’t know that java had versions, 8% preferred java as the good old java (can’t believe it, me neither), 29% were happy, 32% wanted newer versions but wanted the syntax of older versions to remain and only the bugs being killed and the rest were too confused to have an opinion. 

On this note, its now entirely up to you to decide which is your cup of java.  I’ve just got a book to learn to tame the tiger and I’ll be using java 1.4 till I tame 1.5 good.  So, I think it’ll be around October, when I start using 1.5 hoping (with crossed fingers) that most of the users by then would be roaring with it.

I hope that this small article would help you make a decision about which version of java to use.

Shashank is the founder and administrator of the java apps rating site - thejavahub.com.  To know more about this venture with java, please visit his site at http://www.thejavahub.com

Posted on Apr 20th, 2007

What is Open Source Software?

Open Source Software (OSS) is software that is available under a special license that allows everyone to access the program code as well as the executable program. This means that anyone is able to edit the program code and therefore customise the software for their own needs.

This ability to access the source code is protected by the license under which the software is released. There is a great many Open Source licenses, but they all have one thing in common, they protect the right of the user of the software to access and modify it in any way they desire.

This ability to modify applications is in direct contrast to the Closed Source Software model. In Closed Source only the creator of the application has access to the source code, and therefore, only the creator is able to modify the application.

Being able to change the way an Open Source Software application operates is critical in many business environments. No two businesses are identical and therefore it is unlikely that any one piece of software will satisfy the needs of all potential users. Without the ability to modify their software a company is restricted in its operations by that software.

While it is true that no two businesses are identical, it is also true that there are a great many common business practices that are repeated across organisations. These common practices can be well served by "standard" software. The remaining practices, those that are different from competitors are, typically, the ones that give a business an advantage in the marketplace.

Since these non-standard practices are key to the organisations success it is critical that any software solutions adopted by the company also support these non-standard processes. It is in this need to adapt software to a companies specific needs that makes Open Source Software attractive. Since the company has access to the source, the application can be freely adapted to suit the unique requirements of each user.

Who Pays for Open Source Development?

The ability to customise software is critical to allow an organisation to continue to improve their business processes, but how does a company afford to pay for such customisations?

One of the side effects of allowing any user access to the source code is that the cost of acquiring the software in the first instance is massively reduced. In most cases the source code is available for no cost. This enables the user to divert resources normally allocated to pay software license fees into enhancing the software.

A successful Open Source Software project has a large community of software developers. Many of these developers work as independent contractors and can be employed to customise the software, alternatively, if a company has internal developer resources, they can leverage those skills to perform the customisations.

Does it Really Work?

This all sounds fantastic, but does it really work? Are there Open Source Applications in use in the real world?

Here are a few facts to convince you that it most certainly does work:

- Around 70% of web sites are served by the Open Source Apache HTTPD server.

- In a 2002 survey it was found over 31% of UK and nearly 42% of German companies were using or planning to use OSS.

- In 2001, Debian (an Open Source Operating System), contained over 55 million lines of code and was estimated to have consumed over 14,000 person years in development time. That is a development cost of around 1.89 Billion Dollars (US) yet it is still available with no license fees.

Scott Morris manages the site on satellite code.

Posted on Apr 20th, 2007

1.  Replace Dexterity cursor with SQL Stored Procedure

Dexterity was designed as multiplatform technology (primarily Btrieve, Ctree, SQL Server, potentially Oracle).  Dexterity data retrieving mechanism is based on Range start, Range End, Get First and Get Next clauses.  It  is in fact similar, however a little bit slower to cursors in Transact SQL.  Long ranges in Dexterity are good candidates for replacement by SQL stored procedures with update clause.

For example, consider to replace following Dexterity code:

Range clear SOP_HDR_WORK.

Clear ‘SOP Type’ of table SOP_HDR_WORK.

Clear ‘SOP Number’ of table SOP_HDR_WORK.

Range start table SOP_HDR_WORK.

Get first table SOP_HDR_WORK.

While errEOF do

                If ‘Salesperson ID’ of table SOP_HDR_WORK = “ERIC” then

                                Edit table SOP_HDR_WORK.

Set ‘Salesperson ID’ of table SOP_HDR_WORK to “BILL”.

                Save table SOP_HDR_WORK.

End if.

Get next table SOP_HDR_WORK.

End while.

 

With the following SQL code

 

Update SOP10100 set SLPRSNID=”BILL” where SLPRSNID=”ERIC”

 

Bringing new data into a table in Dexterity is based on change/edit table clauses, in SQL they are equivalent (by performance) to inserting one record at the time.

When having long cycle of change/edit table in Dexterity, consider replacement by SQL stored procedure with Insert Into clause.

 

2.  Use Crystal Reports, call them from via VBA in Modified form

The easy way to call Crystal Report from your VBA code from your modified form:

Const RPT = "D:\Clients\TheClient\Invoice Status.rpt"

Public crwApplication As CRPEAuto.Application

Public crwReport As CRPEAuto.Report

Private Sub Print_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean)

If SalesTransactionInquiryZoo.Type = "Invoice" Then

If crwApplication Is Nothing Then

                                Set crwApplication = CreateObject("Crystal.CRPE.Application")

End If

Set crwReport = crwApplication.OpenReport(RPT)

crwReport.ParameterFields(1).SetCurrentValue (DocumentNo)

crwReport.Preview

End If

3.  Use Direct .Net Web Publishing from Great Plains Database

The easiest and safest way is to use eConnect - SDK with VB samples, created for eCommerce programmers and web designers to call the functionality in Microsoft Great Plains.  If your company can not afford eConnect - create your own set of stored procedures to address Great Plains database and go ahead with Visual Studio.Net to do the web publishing.

Happy upgrading and customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

 

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, California, Texas, New York, Georgia, Arizona, Minnesota, Washington, Colorado and Florida and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

Posted on Apr 18th, 2007

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, 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:

This article has been contributed by (Mr.) Parveen Aggarwal, Technical Consultant to DSL India. With more than 6 years of industry experience in Java and allied technologies, he has an in-depth understanding of J2EE, J2ME and database management systems. Parveen is currently working on the concept of data-archiving in embedded databases. He can be contacted at parveenaggarwal@hotmail.com

Posted on Mar 28th, 2007

Many software and hardware producers take pride in the exponential pace of technology change, but for users and consumers of their products and services the rapid technological obsolescence often means increased costs, frustrations, and unfulfilled promises. Corporate America expects to make capital investments in goods and facilities that should last five, ten, even twenty years, but only an eighteen-month lifetime for computer software and hardware investment is not uncommon.

Lowering the costs to develop new software solutions or extending the lifetime of software applications are two complementary approaches to addressing technological change. These goals can often be met by taking a declarative strategy when designing software systems independent of the programming methodology employed.

Issues with Imperative Programming

Most programming projects today use the imperative style of programming. Developers write sequences of operations in a language, such as C++, Java, Visual Basic, etc., that implement an algorithm, or recipe, for performing tasks. The algorithm for the task mixes logical, or relational, statements about the task to be solved and control statements about how to calculate the solution. The logical statements describe "what-to" calculate while the control statements describe "how-to" calculate. Debugging the algorithm consists of verifying the accuracy of the logical statements and fixing the control statements, if necessary.

There are many problems with the imperative approach. The sequence of operations critically determines the correctness of the algorithm. Unexpected execution sequences through an algorithm caused by user input actions or real-time events in a multitasking environment may result in subtle or catastrophic algorithm failure. Writing the control logic is the programmer’s responsibility and, therefore, subject to implementation errors. Understanding a program’s algorithm is often difficult for other developers without extensive metadata, or comments, on the code and empirical tracing of the program’s execution with sample data. Verifying program correctness consumes a significant portion of the development effort, but also usually fails to discover a significant number of defects.

To address the problems associated with imperative programming, the computer industry has developed and advocated many approaches. Structured programming and campaigns against "go-to" statements address some of the problems discovered with ad hoc control structures and statements. Modularization initiatives stress decomposition techniques on the premise that humans can better comprehend, reason about, and maintain smaller pieces of code. Object-oriented programming advocates program constructions using reusable components, libraries, and frameworks. The pattern programming school stresses analogies to other fields, such as architecture, by constructing programs using well-designed and crafted solutions, or patterns, that recur in many programming contexts.

What is Declarative Programming?

Declarative programming separates the logic, or what, of an algorithm from the control, or how, of an algorithm. The programmer still specifies the logic or equations specifying the problem’s relations, but the programming system is responsible for control, or how the logic is evaluated. The most familiar examples are spreadsheets and query languages for relational databases. The user, or programmer, specifies a mathematical relation as a query, say in SQL, for what to retrieve, while the database engine determines how to execute the query against the database.

There are many advantages to declarative programming over the imperative style. In declarative languages, programmers do not specify sequences of operations, but only definitions or equations specifying relations. Unlike imperative programming, the logic relations in declarative programming are execution order independent, free of side effects of evaluation, and semantically clear to visual inspection.

The declarative family of programming languages has a long history in the academic computer science community and specialized areas of commercial application, such as compiler construction, expert systems, and databases. Declarative languages have two main family trees. The logic declarative languages, such as Prolog, are based on first-order predicate calculus, which generalizes the notions of Aristotelian true or false values to statements, or predicates, involving relations among any entities. The other family branch consists of functional declarative languages, such as Miranda, Haskell, and SML. The functional declarative languages are based on the l-calculus developed by the mathematician, Alonzo Church in the 1930’s. l-calculus formalizes the notions of recursive application of pure functions to computable problems. Although not widely known as such, the latest programming fashion, XSLT, an extensible stylesheet language for transforming XML, is also a functional declarative language.

Despite the theoretical advantages of declarative programming languages, they do not have widespread use in commercial programming practice despite an attempt in the 1980’s by Borland to mass-market a PC version of Prolog along with the highly popular Turbo Pascal. There are many factors contributing to the infrequent use of declarative languages. A large contributor is the paucity of collegiate training in declarative languages, but awkward syntaxes of some languages, inefficient compilers and run-times, and restricted domains of applicability of generalized "how-to" mechanisms are all contributors. Using Declarative Strategies in Commercial Software

While declarative programming languages have not received wide-spread commercial usage, the strategy of separating logic, or what, from control, or how, in an algorithm is a powerful, generalized technique for increasing ease of use and extending the longevity of software. Declarative techniques are particularly powerful in user interfaces and application programming interfaces (APIs) that have a rich, complex set of inputs over a relatively small field of execution behaviors.

Two examples of commercial software that illustrate the applicability of declarative techniques are DriverLINX and ExceLINX in the fields of data acquisition and test instrument control.

Using Declarations for Data Acquisition

DriverLINX is an API for controlling data-acquisition hardware used to measure and generate analog and digital signals interfaced to all types of external transducers. Data-acquisition applications include laboratory research, medical instrumentation, and industrial process control.

Traditionally, APIs for data-acquisition devices modeled the characteristics of the hardware design and had a large number of functions of one or more parameters to setup the hardware and control data flow through the system. The ordering of sequences of operations was often critical to correctly programming and controlling the hardware. Upgrading to new data-acquisition hardware was often costly as hardware-necessitated changes in the order of operation sequences to program the hardware required costly software changes.

To surmount these problems, DriverLINX takes an abstract and declarative approach to data-acquisition programming. Instead of modeling specific board designs, DriverLINX abstracts the functional subsystems of data-acquisition hardware into generalized attributes and capabilities. Programs request the measurement task they want to perform by parameterizing a "service request" declaration. The DriverLINX runtime determines how to satisfy the service request using the available hardware and returns the measurements as a packetized stream to the program. The data-acquisition programmer is relieved of any responsibility for data-acquisition algorithm control.

Besides relieving the programmer of control responsibility, the DriverLINX abstract, declarative approach gives the program syntactic and semantic interchangeability when migrating to equivalent hardware products. The abstract, declarative approach also helps isolate the software vendor from early technological obsolescence of change in the computer industry by focusing on the immutable logic of data-acquisition relations while the control mechanisms vary with software developments. DriverLINX has been a viable approach to data-acquisition programming for more than 12 years despite the market evolution from 16-bit Windows to .NET today.

Using Declarations for Test Instruments

Test instruments, such as digital voltmeters and electrometers, have evolved from simple devices with a front panel knob and display screen to sophisticated measurement processors performing dozens of measurement and control functions. Like data-acquisition devices, typically developers send a carefully ordered sequence of commands to an instrument to setup the measurement and then send additional command sequences to control the data flow of measurements from the instrument. The aforementioned problems for developers using imperative approaches to instrument control significantly limit ease of use and prohibit quick instrumentation solutions to short-term measurement needs.

ExceLINX is an add-in to Microsoft Excel that allows rapid specification of instrument test setups by using worksheet forms. Users specify, or declare, the channels, configurations, sampling rates, triggering, and data locations for the measurements they wish to perform by filling out an Excel worksheet. When the user selects the "start" button on the toolbar, ExceLINX translates the specification into the correct command sequence for the target instrument, initiates the measurement, and flows the data back to the requested worksheet. Users can setup and collect measurements by themselves in minutes using logic specifications compared to days or weeks using programmer’s time for imperative specifications.

Internally, ExceLINX also uses a declarative approach to handling the complex problem of field validation for the worksheet forms. Instruments have hundreds of parameters with complex overlaps among parameters. To validate whether the instrument supports the parameter set the user selected, ExceLINX maintains a dependency tree of allowed, disallowed, and unused parameters for every input cell on the worksheet. Each node in the tree also maintains logical relations among the selected set of parameters that ExceLINX evaluates at runtime to cross validate user input selections. Each supported instrument model has different parameter semantics, but ExceLINX can easily handle this complexity by switching model trees because the model-specific logic in the validation tree is separate from the shared control implementation in the ExceLINX code.

Declarative programming strategies that separate logic from control in algorithms are powerful techniques that can be used with today’s popular imperative languages. These techniques can make software more interchangeable, maintainable, usable, and endurable.

Copyright Roy Furman, M.D, Ph.D. 2005

Roy Furman, M.D., Ph.D. is Director of Research and Development at Scientific Software Tools, Inc. He leads a team of software developers who have developed over 70 commercial software products for customers in the manufacturing, high technology, healthcare and life science industries. Visit their website, http://www.sstnet.com, for articles and information on software development.

- Next »