i-Framework


Introduction

This is a set of utilities and classes that I have found useful over the years. In my career spanning over a decade, I have time and again written the same code or some part of the code over and over again. I never found the time to collate the details in a reusable library. This project will be a collection of such files. The work that I have been doing is more than 5 years old, however the project has been conceived in 2011.

 

Features

  • Improved Loggers: This is built on top of the Log4j and Apache Commons Logging and provides some basic and additional capabilities like
    • Logging String
    • Logging Objects
    • Logging only if a specific type of logger is enabled, thus improving performance
  • Database Setup: During unit testing, there are times when we have to setup test data. In those cases, we are dependent on external tools like MySQL scripts or Maven builds to setup data. And, then in many cases after running a set of tests, we find the need of resetting the data to its original state. These helper classes allow us to manage such data appropriately.
  • Exception Handling: This simple yet powerful implementation provides some of the most desirable features in any Exception Handling framework:
    • Unchecked Exceptions for Business and System errors
    • Message Externalization
    • Message Localization
    • Configurable Message Data Sources
  • Message Readers: This package provides factory to fetch various types of Message Readers. The current implementation supports
    • Resource Bundle based message stores – Messages can be read based on various locales
    • File based XML files – messages are read only for a specific locale
  • Concurrent Handling: This package provides base classes that allow you to run your functions in a producer and consumer fashion. By using this framework you have to worry about writing your business logic for a Producer and a Consumer and not about multi-threading and how these two entities interact. This framework currently has only one implementation of a Broker i.e AsyncQueueBroker but more will be added in coming months.
  • Cryptography/Secure: This package provides utility classes to secure Strings that you may want to use as Passwords or Unique Tokens. This package provides three variants of the secure digest that you can generate:
    • Secure Hash: Computes a text digest using the Secure Hash Algorithm (SHA-1) which produces a 160-bit one-way digest of the text. The digest is said to be one-way since the original text cannot be recovered from it. This is ideal to use for securing passwords.
    • Salted Secure Hash: Computes a text digest using the Salted Secure Hash Algorithm (SSHA) which adds extra security to the digest produced by SHA-1 by adding a random string salt to it. Since the salt is generated using another sufficiently random algorithm, the resultant digest is more secure than the original SHA-1 digest.
    • Unique Token Generator: Generates text strings that can be used as unique tokens in an application. It uses the randomness of the SSHA  algorithm to generate the tokens.

 

Project Details

This project is developed as an Open Source technologies using Google Hosting and other other open source frameworks like Spring, Maven, Apache, MySQL so that anyone can make use of it as they find fit. Project information has been hosted here (http://projects.scratchpad101.com/iframework/1.1.x/index.html).

 

Use / Download

The project is hosted on Maven Central Repository. You can use it in your project if built via Maven by adding the following depdendency:


com.kapilvirenahuja
iframework
1.1.0
jar

 

Advertisements

Initiate your idea here...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s