Monday, June 15, 2015

Wanna study in Portugal?

Everything you need to know to apply for higher education studies in Portugal, may be found in the following links:

http://www.studyinportugal.edu.pt

http://www.studyinportugal.edu.pt/images/guide.pdf

Monday, December 9, 2013

JSP - Enhance the first JSP example with Java Beans

In the previous article, we saw a first example of using JSP, where Java was embedded into the HTML to perform the dynamic part.
In this article, we are going to enhance the structure of the previous example, by making use of a Java Bean.
This structure enhances readability, and separates the code of the user interface from the code to perform computations.

In the case of more complex applications, the structure of the first example would lead to a solution difficult to understand and maintain. The structure of the solution presented in this article is more flexible, readable and so more easy to maintain and evolve.

So, we shall create a Net Beans project, just like in the first example, and make the same modifications to index.jsp. Then, we create the new JSP file (newjsp.jsp):


Contrary to what we saw in the First JSP Example, this file has not embedded the code to obtain the parameters or the calculation of the operation result. It has, instead, a JavaBean component that is no more than a class who are passed the parameters and performs the required calculations.

First JSP example

Java Server Pages (JSP) is a Java technology that allows creating web pages with a mix of static HTML and dynamic HTML. The dynamic part is generated by using Java language scripts that are embbeded in the HTML code through special Tags, recognized by the application server.

In this article we will see a small example that will serve to introduce some of the JSP tags and help in understanding how does Java work in the middle of all the rest.

The example is made with NetBeans IDE 7.2.1, and it consists of a small calculator that will allow to perform the four arithmetic operations on two integer operands.

Let's start by creating a new project in NetBeans, of type Web Application:


As applicational server we will use GlassFish:

 (we don't select any framework, in step 4 of creating a new project)

NetBeans creates a project structure with a file index.jsp, which will generate the initial page of the project:



Initial contents of file index.jsp:



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: