Friday 30 January 2015

Android application key components

This tutorial explains some of the basic key components of an Android application, which will be helpful in creating an Android project.

Activities: An activity is a single screen in which a user interacts in an android application. An application can have more than one activity. When an application starts it calls the default activity mentioned in AndroidManifest.xml (Refer HelloWorld example in the previous blog) as highlighted below, this can be changed at any point of design time.
<activity
            android:name=".MainActivity"
            android:label="@string/app_name" >

An activity can call / start another activity when required.

Services: Service is the component that is used to perform action in the background for an application without any user interaction. It can used for logging or to perform work for remote process.  

Content Provider: It’s the standard interface to share data between processes and provide mechanism for defining data security. Used to store data in the file system or use SQL Lite. For example using the content provider the app can read and modify the contact details using the Android provided content provider.

Broadcast Services: It’s a way to listen to system wide even happening in your Android device which is accessible to all apps. Some of the Android provided broadcast services are Screen turned on, battery is low, call/SMS is received, phone is booted etc.

Intents: It’s a messaging object you can use to request an action from another component. An Intent is the key component to call one activity from another activity. For example from our app we can request camera app to take a picture.
Explicit Intent: Specify the component to start by name like call another activity in the same app.
Implicit Intent: Does not specify the component to start instead declare a general action to perform which allows a component from another app to handle that.

Fragments: Fragment is the section of the activity which represents the behavior or a portion of user interface in an activity. An activity can have more than one fragment. A fragment has its own life cycle which can be removed or added at any point when an activity is running.

Views: It’s the place where all the UI elements are being placed in the android application.

Layouts: Layout in Android describes how the UI should look in an activity. This can be declared in the UI XML and/or instantiate the layout at runtime. This can be customized as per required. There are various types of layouts like Linear, Relative, List, Grid etc.


Resources: Resource is a component of the Android application which is used to keep track of all the non-code assets of the application. Resources can be a XML file, images, audio files, etc. 

Please provide your comments below the blog.



Sunday 4 January 2015

Install Oracle 11g on Windows 64bit server


This tutorial explains how to install Oracle 11g database server in a windows 64 bit server. You can download the software for free only for personal use from this link Oracle Download  Microsoft Windows (x64). This link has two files where both the files are mandatory for Oracle installation.

Note: In downloads.oracle.com you can either download Enterprise edition or Express studio. Where Express studio has many limitations of the Oracle features and also size limit of 11GB of the total database.

Once download please extract both the files and click on the setup.exe, the installation with start after the basic checks.

1)      Skip the first step which asks to enter your email id as we won’t require as we are going to use the software only for learning purpose.
2)      In Installation Option select “Create and configure a database”


3)      In System Class option select “Server Class”


4)      In the next step select Single Instance database Installation, click Next
5)      In the next step select Advanced install, click Next
6)      Click Next, In the Database Edition selection screen Enterprise Edition will be selected keep it as it is and click Next



7)      In the next step select the path where you need the software and the database to reside and click Next


8)      In the next step select General Purpose / Transaction Processing, click Next


9)      Enter the name of the database, click next


10)   In the next step in Configuration Options go to the tab Sample Schemas and select “Create database with sample schemas”


11)   Click next, next and next. Then in the Schema password section select use same password for these accounts and enter the password.
12)   Once you click on next Oracle Installer will automatically check for space and prerequisite and if it passed will go to the summary page with the list of items that will be installed. Click Finish to start the installation.


Once the installation is completed it will show the result screen as above. We have now successfully installed Oracle in our machine.


Let us know your reviews about the post to improve the blog, also let us know if you face any issues in accomplishing the above. 

Please provide your comments below the blog.

Thursday 1 January 2015

How does Oracle Works

In this tutorial we are going to see how does Oracle actually works, I read this post in one of the Oracle document and found this should be helpful for others so I have reproduced the same. (To checkout the original link Click Here )
The following example describes the most basic level of operations that Oracle performs. This illustrates an Oracle configuration where the user and associated server process are on separate computers (connected through a network).
  1. An instance has started on the computer running Oracle (often called the host or database server).
  2. A computer running an application (a local computer or client workstation) runs the application in a user process. The client application attempts to establish a connection to the server using the proper Oracle Net Services driver.
  3. The server is running the proper Oracle Net Services driver. The server detects the connection request from the application and creates a dedicated server process on behalf of the user process.
  4. The user runs a SQL statement and commits the transaction. For example, the user changes a name in a row of a table.
  5. The server process receives the statement and checks the shared pool for any shared SQL area that contains a similar SQL statement. If a shared SQL area is found, then the server process checks the user's access privileges to the requested data, and the previously existing shared SQL area is used to process the statement. If not, then a new shared SQL area is allocated for the statement, so it can be parsed and processed.
  6. The server process retrieves any necessary data values from the actual datafile (table) or those stored in the SGA.
  7. The server process modifies data in the system global area. The DBWn process writes modified blocks permanently to disk when doing so is efficient. Because the transaction is committed, the LGWR process immediately records the transaction in the redo log file.
  8. If the transaction is successful, then the server process sends a message across the network to the application. If it is not successful, then an error message is transmitted.
  9. Throughout this entire procedure, the other background processes run, watching for conditions that require intervention. In addition, the database server manages other users' transactions and prevents contention between transactions that request the same data.
Please provide your comments below the blog.