Sunday, October 30, 2011

Android Sri Lanka : Delivery Ordering System


One of the best apps promises to attract the food lovers of Sri Lanka. Now Delivery More Simplified

Android Operating System Versions


Recent Releases

  • 2.3 Gingerbread refined the user interface, improved the soft keyboard and copy/paste features, improved gaming performance, added SIP support (VoIP calls), and added support for Near Field Communication. Android 2.3 Gingerbread is the latest Android version that is available to phones.
  • 3.0 Honeycomb was a tablet-oriented release which supports larger screen devices and introduces many new user interface features, and supports multicore processors and hardware acceleration for graphics. The first device featuring this version, the Motorola Xoom tablet, went on sale in February 2011
  • 3.1 Honeycomb, released in May 2011, added support for extra input devices, USB host mode for transferring information directly from cameras and other devices, and the Google Movies and Books apps.
  • 3.2 Honeycomb, released in July 2011, added optimization for a broader range of screen sizes, new "zoom-to-fill" screen compatibility mode, loading media files directly from SD card, and an extended screen support API. Huawei MediaPad is the first 7 inch tablet to use this version 
  • 4.0 Ice Cream Sandwich, announced on October 19, 2011, brought Honeycomb features to smartphones and added new features including facial recognition unlock, network data usage monitoring and control, unified social networking contacts, photography enhancements, offline email searching, and information sharing using NFC.

Saturday, October 15, 2011

Introduction to Spring Framework

Spring framework is a java platform which provides comprehensive infrastructure to develop enterprise java applications. Spring handles the infrastructure for you so that you can focus on your application. 

Spring allows you to build applications from POJO (Pure Old Java Objects) and apply enterprise services to them. 

Tuesday, October 11, 2011

JTable KeyListener

First create a JFrame and add JTable with data. Create the following class. Below the JFrame's class
class jTableController implements KeyListener {

JTable table1;

public jTableController(JTable table) {
table1 = table;
}

//if you want to get selected data
private int[] getSelectedCell() {
int[] xy = new int[2];
xy[0] = table1.getSelectedRow();
xy[1] = table1.getSelectedColumn();
return xy;
}

@Override
public void keyPressed(KeyEvent e) {
System.out.println("keyPressed");
}

public void keyTyped(KeyEvent e) {
System.out.println("keyTyped");
}

public void keyReleased(KeyEvent e) {
System.out.println("keyReleased");
}
}
Inside JFrame's constructor add the following code.
       
tblMaterialSupplierDetails.addKeyListener(new jTableController(tblMaterialSupplierDetails));

That's it run the project and see.

Things to know about JTable

You might already be using JTables comes with Swing in Java but sometimes may not know theses facts, Here's an some facts about JTables.



  • JTable does not contain or cache data; it is simply a view of your data.
  • There are two JTable constructors that directly accept data (SimpleTableDemo uses the first):
    • JTable(Object[][] rowData, Object[] columnNames)
    • JTable(Vector rowData, Vector columnNames)
  • However, these constructors also have disadvantages: 
    • They automatically make every cell editable.
    • They treat all data types the same (as strings).
    • They require that you put all of the table's data in an array or vector, which may not be appropriate for some data. 
  • When adding a JTable use a JScrollpane
    • JScrollPane scrollPane = new JScrollPane(table);
      table.setFillsViewportHeight(true);
  • JTable uses a very simple concept of selection, managed as an intersection of rows and columns. It was not designed to handle fully independent cell selections.

Monday, October 10, 2011

NHibernate for .NET




Introduction to NHibernate 
When it comes to object relation mapping, writing your own code is a nightmare and not worth doing. This is because there are many frameworks written to do the same thing that you're going to do from scratch. These technologies are matured by time therefore there is no risk using them in real world applications than deploying them with your own buggy code.

NHibernate is one of the widely used Object Relational Mapping framework. You can easily use it in your projects and you can find many resources in internet about using this.


NHibernate with LINQ to SQL
LINQ to SQL is another way you can do Object relation mapping but in an easier way than NHibernate. But the problem with LINQ to SQL is that it forces you to use Class per Table kind of pattern. If you're into a small application which do not involve complex table updates and other things you can give LINQ to SQL a shot because it's fairly very easy to begin with. But when it comes to developing a complex enterprise level application, don't go with LINQ to SQL. Get start with LINQ to SQL Here.


Get Started with NHibernate
You can visit the official web site http://nhforge.org/ download the framework and deploy it in your applications. This is a starter tutorial I found on the same site http://nhforge.org/wikis/howtonh/your-first-nhibernate-based-application.aspx. use it and see the difference.


Sunday, October 9, 2011

Introducing USB 3.0




Difference between Public and Private Clouds


SAAS vs PAAS vs IAAS

This is a good explanation video i found on youtube detailing out about




Data Synchronization : Microsoft Sync

From Wikipedia, Data Synchronization is "the process of establishing consistency among data from a source to a target data storage and vice versa and the continuous harmonization of the data over time".


Here's some useful videos I find out about Microsoft Sync. The Microsoft's effort to building a sync framework. you can get more information from msdn.microsoft.com/sync.


Here's good introduction http://msdn.microsoft.com/en-us/sync/bb821992


Some of the useful Videos







Friday, October 7, 2011

MongoDB a noSQL solution



Have you ever heard about noSQL or MongoDB. Actually few days ago i stumbled upon on MongoDB and did some searching through the internet. Even though these are not widely used as it's counterpart Relational DB it has nice features in it which you should take a look on.

MongoDB is a good implementiation of noSQL. It is very simple but very effective technology. MongoDB website http://www.mongodb.org/ offers many great details and you can even download MongoDB and give it a try.

You can access the online shell in the website which gives you some nice background about how it works. It is just like JavaScript. Also when I searching through Google : MongDB Sri Lanka, I came across this video from Refresh Colombo Sri Lanka. which gives a introduction about MongoDB. I was happy to see such a video from Sri Lanka.