Tuesday, August 28, 2012

Math quiz mobile app

As you all know Android is the current, up and coming OS in the world mobile devices scenario. For the people who are still kind of new to Android, it is an operating system (Linux based) for mobile devices which has been developed in C, C++, Python and Java. It is quite the rage these days due to the look and feel of android developed devices and the ease of development and of course because it is a product led by Google.
Actually Google had financed the guys who started Android initially and later on they have purchased it. And that was good too cuz voila Google had  released ANDROID as open source software under the Apache License so that world wide developers can test their developing skills with Android and produce more varied apps and extensions.

I have been meddling with Android too not because i`m a hardcore Android fan but because we had to study the OS for our mobile application development module of the degree i`m following. What we first had as an assignment was to develop a Math Quiz for mobile devices. We had guidelines as to how we should implement the applications such as having different levels for players to play the game (Easy, Medium , Hard, Guru).
In each level of this app the user will be presented by Mathematical Expression to be solved in a given time frame and once the user has answered the questions his score will be calculated and displayed. In the Easy level the user was given a mathematical expression with one operator, in Medium level two operators, in Hard level three and in the Guru level four operators. (I of course only excelled in the easy and Medium levels ;) )
We used Java to develop the game and the output looked like below.


 

 











Tuesday, November 15, 2011

SQL Loader

SQL loader as some of you might have heard is a high performance data loader where it is used to load a large amount of data in no time in to SQL databases.This utility is provided by ORACLE and is one of the ORACLE DATABASE UTILITIES  along with other utilities such as Oracle Data Pump.
The data can be loaded from any text file and inserted in to the database. There are several types of files within the process of the SQL loader. There are three types of important files which are used prior to the process of SQL loader and those files are:
  • The DATA file
  • The CONTROL file
  • The parameter file
The  other files are used within the process of the Data being inserted in to the database.Those files are
  • The LOG file
  • The DISCARD file
  • The BAD file
The SQL loader reads a data file and a description of the data which is defined in the CONTROL file. Using this information and any added specified parameters , the SQL loader loads the data into the database.

 The Control File

The SQL Loader Control file contains information that describes how the data will be loaded. It contains the
  • Table name
  • Column Data types
  • Field Delimiters etc.
The Control file is the backbone of the whole process.
Manually creating a control file is an error prone process although when purchasing oracle, 
(i assume) the control file comes with it along with the sql loader utility. 
(That is why they call it ORACLE`s SQL loader utility.No point of creating a control file if you paid money to ORACLE).
The control file can also  specify that records are in a a fixed format. (A file is in fixed format when all records in a DATA file are of the same length).


Below is an image of the SQL loader Architecture










Thursday, November 3, 2011

Web Deployment with WAR files..

Deployments tend to be easy.
But when it comes to web deployments, a Deployer faces a diversion from the usual routine.The below post is about web deployments regarding a WAR file.

What is a WAR file???

A WAR file , also known as a Web application ARchive file, is a JAR file used to distribute a collection of JavaServer Pages, Java Servlets, Java classes, XML files, tag libraries and static Web pages (HTML and related files) that together constitute a web application.

When you take a WAR file, it is usually large in size and you find various files and directories within.
The WEB-INF directory in the WAR file contains a file names web.xml which defines the structure of the web application. If the web application is only serving JSP files, the web.xml is not strictly necessary.
If the web application uses servlets, then the servlet container uses web.xml to ascertain to which servlet  a URL request is t be routed.
web.xml is also used to define context variables which can be referenced within the servlets and it is used to define environmental dependencies which the Deployer is expected to set up.

Advantages of a WAR file :
  • SECURITY - No one can modify the deployment , once the war file is signed and deployed.
  • Easy development, testing and deployment.
  • The version of the deployed application is easily identified.
  • All J2EE container support .WAR files.
Now let us peek in to a very informative video on how to create a simple JSF application .WAR file for deployment.
(This task is usually done by the developer)