//Article TODO
(en) A lebanese Java User Group at Cnam Liban university. Articles in English or French. (fr) Groupe d'utilisateurs Java Liban. Articles en français ou anglais. This blog is the index toward contents (in general) on others sites. It helps the Group to stress on current activities.
lundi 30 décembre 2013
dimanche 29 décembre 2013
11 Reasons why products fail in the market
by Rajaraman Raghuraman on December 29th, 2013 | Filed in: Agile
Source : http://www.javacodegeeks.com/2013/12/11-reasons-why-products-fail-in-the-market.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+JavaCodeGeeks+%28Java+Code+Geeks%29
Source : http://www.javacodegeeks.com/2013/12/11-reasons-why-products-fail-in-the-market.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+JavaCodeGeeks+%28Java+Code+Geeks%29
- Not having a directed product vision
- Not enough investments for the products
- Too late into the market
- Too early in the market
- No real unique features
- Lack of focus
- Management expectations
- Not enough R&D investments
- Lack of adequate technical skills / Product Management skills
- Not enough value for money
- Buggy Product
HTML 5 Server Sent Events on Glassfish 4
SSE (Server Sent Events) is a Web Pushing technology which was developed under HTML 5 technology. So, what is Pushing?
Pushing
It is a transmission of data sets which of them are sent at regular intervals or in any time through the server application, in the direction of server – – – >browser, without need for any request of web browser. Serving Twitter updates currently in the web page at regular intervals, appearance of Facebook shares on screen when a new share is available, serving instant financial data (exchange rate of dollar, parity etc.) immediately to users’ screen can be given as examples for pushing scenerio.
Server Sent Events is not a unique technique used for pushing of http resource, in theprevious article, we mentioned how to provide data transmission to the web browser by LongPolling technique. I think this sequencing about Push technologies would not be wrong generally in this order;
Server Sent Events is not a unique technique used for pushing of http resource, in theprevious article, we mentioned how to provide data transmission to the web browser by LongPolling technique. I think this sequencing about Push technologies would not be wrong generally in this order;
Polling –> LongPolling –> ServerSent Events –> WebSocket
ServerSent Events is a technology that its developments is already continues, such as WebSocket technology. For this reason, I would like to mention that it is not useable in every web browser and that’s for sure it is supported by new generation web browsers.SSE technology has a few additional features unlike other ones, such as automatic connection recovery when the connection is lost, routing the message to an certain function in event/resource broadcasts. For example, you can take a look at to the discussion about the comparison of SSE and WebSocket from the entry in StackOverFlow.
How the SSE works?
The logic of operation of SSE technology can be seen in the picture illustrated below. Ahandshake request is sent to SSE supported server by the web browser and server system returns a handshake response which is “text/event-stream” MIME type. After the handshake committed among web browser and SSE service, SSE service may send any amout of data at any time.
Read full article : http://en.kodcu.com/2013/11/jaxrs-2-html-5-server-sent-events-on-glassfish-4/
lundi 23 décembre 2013
Apache Cordova
Apache Cordova is a platform for building native mobile applications using HTML, CSS and JavaScript
Apache Cordova is a set of device APIs that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript. Combined with a UI framework such as jQuery Mobile or Dojo Mobile or Sencha Touch, this allows a smartphone app to be developed with just HTML, CSS, and JavaScript.
When using the Cordova APIs, an app can be built without any native code (Java, Objective-C, etc) from the app developer. Instead, web technologies are used, and they are hosted in the app itself locally (generally not on a remote http server).
About Apache Cordova™
When using the Cordova APIs, an app can be built without any native code (Java, Objective-C, etc) from the app developer. Instead, web technologies are used, and they are hosted in the app itself locally (generally not on a remote http server).
Read and download : http://cordova.apache.org/
mercredi 18 décembre 2013
The try-with-resources Statement
The try-with-resources Statement
The
The following example reads the first line from a file. It uses an instance of
In this example, the resource declared in the
Prior to Java SE 7, you can use a
However, in this example, if the methods
You may declare one or more resources in a
In this example, the
The following example uses a
The resource
Note: A
try
-with-resources statement is a try
statement that declares one or more resources. A resource is an object that must be closed after the program is finished with it. The try
-with-resources statement ensures that each resource is closed at the end of the statement. Any object that implementsjava.lang.AutoCloseable
, which includes all objects which implement java.io.Closeable
, can be used as a resource.The following example reads the first line from a file. It uses an instance of
BufferedReader
to read data from the file. BufferedReader
is a resource that must be closed after the program is finished with it:static String readFirstLineFromFile(String path) throws IOException { try (BufferedReader br = new BufferedReader(new FileReader(path))) { return br.readLine(); } }
try
-with-resources statement is a BufferedReader
. The declaration statement appears within parentheses immediately after the try
keyword. The class BufferedReader
, in Java SE 7 and later, implements the interface java.lang.AutoCloseable
. Because the BufferedReader
instance is declared in a try
-with-resource statement, it will be closed regardless of whether the try
statement completes normally or abruptly (as a result of the method BufferedReader.readLine
throwing an IOException
).Prior to Java SE 7, you can use a
finally
block to ensure that a resource is closed regardless of whether the try
statement completes normally or abruptly. The following example uses a finally
block instead of a try
-with-resources statement:static String readFirstLineFromFileWithFinallyBlock(String path) throws IOException { BufferedReader br = new BufferedReader(new FileReader(path)); try { return br.readLine(); } finally { if (br != null) br.close(); } }
readLine
and close
both throw exceptions, then the method readFirstLineFromFileWithFinallyBlock
throws the exception thrown from the finally
block; the exception thrown from the try
block is suppressed. In contrast, in the examplereadFirstLineFromFile
, if exceptions are thrown from both the try
block and the try
-with-resources statement, then the methodreadFirstLineFromFile
throws the exception thrown from the try
block; the exception thrown from the try
-with-resources block is suppressed. In Java SE 7 and later, you can retrieve suppressed exceptions; see the section Suppressed Exceptions for more information.You may declare one or more resources in a
try
-with-resources statement. The following example retrieves the names of the files packaged in the zip filezipFileName
and creates a text file that contains the names of these files:public static void writeToFileZipFileContents(String zipFileName, String outputFileName) throws java.io.IOException { java.nio.charset.Charset charset = java.nio.charset.StandardCharsets.US_ASCII; java.nio.file.Path outputFilePath = java.nio.file.Paths.get(outputFileName); // Open zip file and create output file with // try-with-resources statement try ( java.util.zip.ZipFile zf = new java.util.zip.ZipFile(zipFileName); java.io.BufferedWriter writer = java.nio.file.Files.newBufferedWriter(outputFilePath, charset) ) { // Enumerate each entry for (java.util.Enumeration entries = zf.entries(); entries.hasMoreElements();) { // Get the entry name and write it to the output file String newLine = System.getProperty("line.separator"); String zipEntryName = ((java.util.zip.ZipEntry)entries.nextElement()).getName() + newLine; writer.write(zipEntryName, 0, zipEntryName.length()); } } }
try
-with-resources statement contains two declarations that are separated by a semicolon: ZipFile
and BufferedWriter
. When the block of code that directly follows it terminates, either normally or because of an exception, the close
methods of the BufferedWriter
and ZipFile
objects are automatically called in this order. Note that the close
methods of resources are called in the opposite order of their creation.The following example uses a
try
-with-resources statement to automatically close a java.sql.Statement
object:public static void viewTable(Connection con) throws SQLException { String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES"; try (Statement stmt = con.createStatement()) { ResultSet rs = stmt.executeQuery(query); while (rs.next()) { String coffeeName = rs.getString("COF_NAME"); int supplierID = rs.getInt("SUP_ID"); float price = rs.getFloat("PRICE"); int sales = rs.getInt("SALES"); int total = rs.getInt("TOTAL"); System.out.println(coffeeName + ", " + supplierID + ", " + price + ", " + sales + ", " + total); } } catch (SQLException e) { JDBCTutorialUtilities.printSQLException(e); } }
java.sql.Statement
used in this example is part of the JDBC 4.1 and later API.Note: A
try
-with-resources statement can have catch
and finally
blocks just like an ordinary try
statement. In a try
-with-resources statement, anycatch
or finally
block is run after the resources declared have been closed.Suppressed Exceptions
An exception can be thrown from the block of code associated with thetry
-with-resources statement. In the example writeToFileZipFileContents
, an exception can be thrown from the try
block, and up to two exceptions can be thrown from the try
-with-resources statement when it tries to close theZipFile
and BufferedWriter
objects. If an exception is thrown from the try
block and one or more exceptions are thrown from the try
-with-resources statement, then those exceptions thrown from the try
-with-resources statement are suppressed, and the exception thrown by the block is the one that is thrown by the writeToFileZipFileContents
method. You can retrieve these suppressed exceptions by calling the Throwable.getSuppressed
method from the exception thrown by the try
block.Classes That Implement the AutoCloseable or Closeable Interface
See the Javadoc of theAutoCloseable
and Closeable
interfaces for a list of classes that implement either of these interfaces. The Closeable
interface extends the AutoCloseable
interface. The close
method of the Closeable
interface throws exceptions of type IOException
while the close
method of the AutoCloseable
interface throws exceptions of type Exception
. Consequently, subclasses of the AutoCloseable
interface can override this behavior of the close
method to throw specialized exceptions, such as IOException
, or no exception at all.mardi 17 décembre 2013
Physical Keys Could Take Away the Pain of Passwords
New Scientist (12/11/13) Hal Hodson
Facebook, Google, and other technology companies are experimenting with physical keys to take the place of passwords. Google is testing YubiKey, a small cryptographic card that plugs into a USB port and mimics a keyboard entering a single-use password into the authentication field, while Facebook employees are already using such cards for two-factor authentication. Some of the keys will rely on their physical structure to make them unclonable, and could be used not just for computer logins but also to authenticate products that are susceptible to counterfeiting. Meanwhile, California Institute of Technology researchers are developing a system that uses light scattered through liquid crystals, which has the advantage of offering much more scope for randomness than a silicon chip. The researchers say the system is very hard to crack, but also difficult to implement because of the impracticality of storing and exchanging huge keys. Another physical authentication key in development is Verayo's Opal, which contains a microchip with tiny imperfections that arise during manufacturing and are unique to it. The device's battery is activated by shaking it, and the user shakes the device again to have it pair with a nearby computer or tablet via Bluetooth. The system reads the Bluetooth signal and, if it matches a predetermined pattern, accepts the user as a trusted party.
Facebook, Google, and other technology companies are experimenting with physical keys to take the place of passwords. Google is testing YubiKey, a small cryptographic card that plugs into a USB port and mimics a keyboard entering a single-use password into the authentication field, while Facebook employees are already using such cards for two-factor authentication. Some of the keys will rely on their physical structure to make them unclonable, and could be used not just for computer logins but also to authenticate products that are susceptible to counterfeiting. Meanwhile, California Institute of Technology researchers are developing a system that uses light scattered through liquid crystals, which has the advantage of offering much more scope for randomness than a silicon chip. The researchers say the system is very hard to crack, but also difficult to implement because of the impracticality of storing and exchanging huge keys. Another physical authentication key in development is Verayo's Opal, which contains a microchip with tiny imperfections that arise during manufacturing and are unique to it. The device's battery is activated by shaking it, and the user shakes the device again to have it pair with a nearby computer or tablet via Bluetooth. The system reads the Bluetooth signal and, if it matches a predetermined pattern, accepts the user as a trusted party.
JASPERSOFT 5.5 : LES NOUVEAUTÉS
La version 5.5 de la suite décisionnelle, sortie fin octobre, propose de nouvelles fonctionnalités aux utilisateurs, notamment en termes d’analyse, de planification et de prise en main de l’outil.
L’aspect d’analyse a été mis en avant, notamment par l’enrichissement des fonctionnalités de visualisation des données et l’augmentation de sa rapidité.
Le bon déroulement de la planification des rapports est renforcé par la création d’un outil dédié qui permet également de les transférer, puis de les stocker dans un répertoire local ou sur un serveur distant via un FTP. L’ajout d’un système de notification en cas d’échec finalise ce processus de transfert.
La prise en main de l’outil par des utilisateurs non confirmés et la navigation sont désormais plus accessibles, notamment grâce à la page d’accueil du serveur qui affiche directement le contenu, les tutoriels et les différentes fonctionnalités (sources de données, domaines, rapports Ad Hoc, rapports, etc.).
Jaspersoft a également enrichi ses templates de rapports et créé de nouveaux types de graphiques pour le reporting Ah Hoc.
D’autres évolutions sont notables, comme l’architecture du serveur, qui a été optimisée grâce à la prise en compte des charges réseau (clusters) ou encore des outils de filtrage qui permettent de paramétrer au maximum les données et donc des analyses sur d’importantes volumétries (problématiques du Big Data).
Enfin, le renouveau de l’outil iReport, désormais basé sur l’environnement Eclipse, qui reste l’outil de conception de rapports : Jaspersoft Studio.
lundi 9 décembre 2013
Free Technology Academy (FTA) materials
The currently published materials used in FTA modules are listed below. More materials will be added in the future. All of them are under a Free Copyleft license.
Introduction to Free Software
- Authors: Jesús M. González-Barahona, Joaquín Seoane Pascual, Gregorio Robles
- Coordinators: Jordi Mas Hernández, David Megías Jiménez
This material is part of the Module 1: "The concepts of Free Software and Open Standards".
GNU/Linux Advanced Administration
- Authors: Remo Suppi Boldrito, Josep Jorba Esteve
- Coordinator:Josep Jorba Esteve
This material is part of the Module 2: "The GNU/Linux Operating System".
GNU/Linux Basic
- Authors:Joaquín López Sánchez-Montañés, Sofia Belles Ramos, Roger Baig Viñas, Francesc Aulí Llinàs
- Coordinators:Jordi Serra i Ruiz, David Megías Jiménez, Jordi Mas
This material is part of the "GNU/Linux Basic".
Open Networks
- Author: Enric Peig Olivé
This material is part of the Module 3: "Network Technologies".
Introduction to Web applications development
- Author: Carles Mateu
- Coordinator:Jordi Mas Hernández
This material is part of the Module 4: "Web applications development".
Economic aspects and business models of Free Software
- Author: Amadeu Albós Raya, Lluís Bru Martínez and
Irene Fernández Monsalve - Coordinator: David Megías Jiménez
This material is part of the Module 5: "Economic aspects of Free Software".
Legal Aspects of the Information Society
- Author: Malcolm Bain
- Contributions: Manuel Gallego, Manuel Martínez Ribas, Judit Rius
This material is part of the Module 6: "Legal aspects of the Information Society".
Introduction to Software development
- Authors: J. Pérez López and L. Ribas i Xirgo
- Coordinators: Jordi Mas Hernández and David Megías Jiménez
This material is part of the Module 7: "Software development".
Implementation of Free Software Systems
- Authors:
Amadeu Albós Raya, Óscar David Sánchez Jiménez - Coordinator:David Megías Jiménez
- Licenses: GNU Free Documentation License, Creative Commons Attribute ShareAlike License
This material is part of the module "Deployment of Free Software and Case Studies".
Tools and utilities in free software
- Author: Jesús Corrius i Llavina
- Coordinators:David Megías Jiménez, Jordi Mas, Ana-Elena Guerrero Roldán
- Licenses: GNU Free Documentation License, Creative Commons Attribute ShareAlike License
This material is part of the module "Free Software Tools and Utilities".
Software Architecture
- Authors: A. Bijlsma, B.J. Heeren, E.E. Roubtsova, S. Stuurman
- Licenses:Creative Commons Attribute ShareAlike License
This material is part of the module "Software Architecture".
Inscription à :
Articles (Atom)