Friday, August 17, 2012
Mobile Computing - evolution and current status
When people talk about mobile devices, what immediately comes up to memory is the mobile phone. The mobile phone appeared after a sequence of about 100 years of inventions, which aim was to be able to communicate from a long distance.
The first successfull telephone transmission was accomplished by Alexander Graham Bell in 1876. He and Thomas Edisson competed in the race that lead to the invention of the first telephone.
Immediately in 1877 the first commercial telephone line entered into operation.
The mobile phone only appeared nearly 100 years after the first phone, adding mobility to the initial goal of speaking at a long distance.
The first (analog) mobile phone appeared in 1960. It was too big to be transported personally, so it had to be installed in vehicles.
In 1973 appeared the first handheld mobile phone (analog).
Only in 1977 appeared the first digital cellular networks.
Currently, mobile devices, including most mobile phones have processing power, having added the goal of mobile computing to the previous goals of distance communication and mobility.
Today, in a confluence of different lines and different research goals, we have IP phones (VoIP), cellular packet switching networks (3G, 4G), mobile devices of various sizes, manufacturers, and with different operating systems, incorporating sensors, GPS , electronic compass, accelerometer, etc..
The number of mobile subscriptions rose from just over 1 billion in 2002 to almost 5 billion in 2008. We currently have 6.8 billion people worldwide, and more than 5 billion mobile subscriptions, of which 50% are prepaid.
Monday, May 7, 2012
First Windows Phone App
In this article we make a first approach to software development for Windows Phone.
To start, we need to install the Windows Phone SDK 7.1, wich comes with a free IDE (Visual Studio Express) and with a Windows Phone Emulator, which allows you to test your apps before deploying them to a Windows Phone-based mobile device.
In this example app, the Visual Studio 2010 has been used, but, of-course, Windows Phone SDK 7.1 must allways be installed.
Windows Phone execution model
Before starting the development of our first app, just some words about the Windows Phone execution model:- Just one App may run in foreground at a given moment in time;
- Other Apps in execution are put into a dormant state;
- When the device's memory isn't enough, the operating system (OS) starts terminating Apps in the dormant state.
- Through their programming framework, Apps can manage their state when they are activated or deactivated. This can be used to give the user the impression that an app has always been running, even when it is stopped and later reactivated.
Create the Windows Phone Project
In Visual Studio (or Visual Studio Express), create a new project with the template for "Silverlight for Windows Phone", and type Windows Phone Application:Tuesday, April 17, 2012
Using Hibernate for Java - 2
In the previous article we saw how to use Hibernate as a middleware layer between the class structure of our Java program and the representation of instances of these classes in a database.
The previous article illustrated the mapping between a Java class and a database table, namelly the class Book and the table with the same name.
Let us now see how to map the class relationships, of type 1-to-N and N-to-N, to the database.
Let's start by adding to our model, which only had one class, two new classes:
- BookCopy (A Book contains the information of a book, and is related to several BookCopy, which correspond to the book copies a library has of that book) --> 1-N relationship.
- Author (A Book has several Author and vice-versa) --> relação N-N relationship.
In the Java project, developed in the previous post, let's start by adding class BookCopy and the respective Hibernate mapping file BookCopy.hbm.xml.
The previous article illustrated the mapping between a Java class and a database table, namelly the class Book and the table with the same name.
Let us now see how to map the class relationships, of type 1-to-N and N-to-N, to the database.
Let's start by adding to our model, which only had one class, two new classes:
- BookCopy (A Book contains the information of a book, and is related to several BookCopy, which correspond to the book copies a library has of that book) --> 1-N relationship.
- Author (A Book has several Author and vice-versa) --> relação N-N relationship.
In the Java project, developed in the previous post, let's start by adding class BookCopy and the respective Hibernate mapping file BookCopy.hbm.xml.
Sunday, April 15, 2012
Using Hibernate for Java - 1
Hibernate is a framework for object-relational mapping with Java language. It facilitates mapping classes, attributes and class relationships between an application class model and its implementation in a relational database. For defining the mappings, XML files or Java anotations can be used.
Hibernate works as a middleware layer between the Java objects and the relational database.
In this article, and in the next one, we will use Hibernate version 3 to ilustrate, through a small example, the utilization of Hibernate in a Java program.
As database system we will be using Oracle 10g.
To start with, we need to crate the database tables. In the article Example of Java Swing Application with Oracle Database - 1 this process is explained.
In this article, we will only be mapping class BOOK.
We create a package for the classes corresponding to database tables, and create class Book:
Saturday, March 3, 2012
Example of Java Swing desktop application without the JSR - 2
In this article we are going to create a Java Swing-based GUI project to complement the ones we previously made, and whose developments are addressed in:
- Example of Java Swing Application with Oracle Database – 1
- Example of Java Swing Application with Oracle Database – 2
- Example of Java Swing Application with Oracle Database – 3
- Example of Java Swing desktop application without the JSR - 1
In NetBeans 7.1, we need to create a Java Application Project:
A Java Application Project automatically creates a class with method main().
We really don't need that class, because we are going to create a JFrame, which automatically creates a main() method that launches it and makes the frame visible.
Anyway, and before creating the JFrame, let's add the needed references to our new project. We need to add, in the project libraries, references to projects HelperDB and librarySystemBLL. References to "ojdbc" jars that come with Oracle XE also need to be added, just like we did before in the other two projects.
Now, let's create the JFrame, that will be the application's main window:
- Example of Java Swing Application with Oracle Database – 1
- Example of Java Swing Application with Oracle Database – 2
- Example of Java Swing Application with Oracle Database – 3
- Example of Java Swing desktop application without the JSR - 1
In NetBeans 7.1, we need to create a Java Application Project:
A Java Application Project automatically creates a class with method main().
We really don't need that class, because we are going to create a JFrame, which automatically creates a main() method that launches it and makes the frame visible.
Anyway, and before creating the JFrame, let's add the needed references to our new project. We need to add, in the project libraries, references to projects HelperDB and librarySystemBLL. References to "ojdbc" jars that come with Oracle XE also need to be added, just like we did before in the other two projects.
Now, let's create the JFrame, that will be the application's main window:
Subscribe to:
Posts (Atom)