Thursday, February 28, 2013

Browsers: Microsoft has released IE 10 for windows 7.

Working with HTML5 and targeting a specific specification to multiple customers who has different platforms, requires testing this development on all cross browsers vendors from IE, Safari, Chrome, Opera to Firefox as major browsers.

Microsoft IE was the least one supporting the HTML5 standard specification APIs than other browsers, but by releasing the IE10 hope to see more support for HTML5 and CSS3.

Microsoft has released the final version of Internet Explorer 10; with support for Web standards. Officials said "IE10 on all platforms add support for more than 30 new Web standards beyond what IE9 supported, including support for new HTML5, CSS3, DOM, Web Performance, and Web Application specifications".

Microsoft plans to begin auto-updating customers with Windows 7 Service Pack 1 and/or Windows Server 2008 R2 and higher with the IE10 "in the weeks ahead".

But this version is aimed to Support Windows 7 Service Pack 1, Windows Server 2008 R2 SP1 operating systems only. And it is already bundled with windows 8 and RT versions. And it comes in 95 languages flavor. But this means that Windows Vista & XP users will not have this version as auto update or download version.

When you run this version of IE10 on Win7 and 2008 RC2, you will find some differences from its peer running on Win8 & RT.

To download your X64/X86 platform version, with your preferred language, download it from Microsoft Download Center.

Thursday, February 21, 2013

Netbeans: Spice up your development with Netbeans 7.3 final !!!

Ho, Hi Haaaaaaa!!! Finally the most interesting and powerful release version ever of Netbeans is out for developers now ( Netbeans 7.3 ).

Beside the traditional well supported development of Java SE, EE, FX and ME applications, alongside with Ant and Maven ... etc. There are many more.

NetBeans IDE 7.3 empowers developers to create and debug rich web and mobile applications using the latest HTML5, JavaScript, and CSS3 standards from now on.

Developers can expect state of the art rich web development experience with a page inspector and CSS style editor, completely revamped JavaScript editor, new JavaScript debugger, and more.

With additional continued enhancements to the IDE's support for Groovy, PHP, JavaFX and C/C++.

My coming session at JDC JDC 2013 session: JEE7.next(), Reveal the power of WebSocket, JSON APIs & HTML5., developed application will be on this version.

The latest version could be dowenloaded from here.


Sunday, February 17, 2013

JDC 2013 session: JEE7.next(), Reveal the power of WebSocket, JSON APIs & HTML5.

The following (Java Developer Conference) JDC Cairo 2013 sessions has been accepted:



JEE7.next(), Reveal the power of WebSocket, JSON APIs & HTML5.

In this session I will introduce the Websocket API JSR 356 co-operated with JSON Processing API JSR 353 which will be part of the next release of JEE7, with a powerful final project that demonstrate the power of each JSRs and HTML 5 Websocket API. The agenda will be as the following:

1- JEE7.next(), what’s new?
2- Why WebSockets?
3- Exploring the Websocket API JSR 356 features.
4- Coding an example.
5- Explore HTML 5 Websocket API.
6- JSON Processing API JSR 353.
7- Continue coding the example.
8- How to unit testing the API.
9- Completing the final project.
10- Questions.

Date:    9th of March 2013 @ 2:00 P.M to 3:30 P.M
Where: Cairo International Conference Center, Naser City, Cairo, Egypt.
Room:   Room 3

Hope to see you all in my session friends, and enjoy it ;).


Saturday, February 16, 2013

LinkedIn: Top 5% most viewed LinkedIn profile in 2012

Hurray!! Recently I had received an email from LinkedIn as reward, states that I am one of the Top 5% most view profile on LinkedIn.

Thanks LinkedIn.


Mac: How to start any JavaEE servers on MAC

Here I will explain how you can start any JavaEE server on MAC OS X. The example here applies on any server like (IBM websphere, Oracle Weblogic, Tomcat, TomEE and Glassfish …. Etc.) The same steps on MAC, but the difference is that you should be familiar with the starting up files location for each server.

Lets take for the sake of demonstration the glassfish 3.2.1.1 server for our example here, Oh! Let’s starts.
  1. First if you don’t have Glassfish 3.2.1.1 (the .zip version), then go to download it first from here.
  2. Unzip it at your favorite location.
  3. Open new terminal window.
  4. Navigate to your installation folder manually using CD command with TAB for ease of navigation, or jump to step 5.
  5. Open new finder window (Command + N), and navigate to you server location that you have unzipped it at before.
  6. On terminal write cd, then drag and drop the bin folder from finder window into the terminal window, as the following Figure 1.

    Figure 1

  7. Hit enter and you should see the following as Figure 2.

    Figure 2

  8. At the terminal type the following “./asadmin” and hit return, you should notice that the prompt has changed as in Figure 3.
    Don’t forget the “./”, as if you just have typed “asadmin” you will prompted from bash shell that this command is not recognized, because the asadmin is not a bash command.

    Figure 3

  9. At the terminal type the following command “start-domain domain1” and the terminal should output the following if everything goes correct in Figure 4.

    Figure 4

  10. To test your progress, open your favorite browser and type the following in the address bar http://localhost:4848/ and you should see the admin page of glassfish server as Figure 5.

    Figure 5

  11. Finally to stop the server, from the terminal type “stop-domain domain1

Saturday, February 2, 2013

Barcode: Developing advanced Barcode applications using "BarcodeEngine" library.


Learn how to generate and read back any generated barcode using Barcode Engine 1.3 library.

Introduction

Developing Barcode API that decode and encode barcode images (or binary streams) from your application, integration with hardware or even your mobile is a demanding market requirement nowadays.
I will demonstrate my experience in tutorial like steps, to explain how to develop a barcode application to generate and consume back generated barcode to extract the encoded data, also decode any other generated picture that contains barcode, using my developed barcode library BarcodeEngine 1.3L (L for library).
It is useful to read the first article about the barcode (Barcode: Professional java barcode API (reader & writer)), to get the basic idea that will make it easy to understand this article.
Also the required software to install to be able to compile and run my BarcodeEngine 1.3L as it depends on two libraries the core.jar and javase.jar jars.

Software Pre-requisites

The following pieces of software are required to develop your barcode application:
  1. The core.jar, javase.jar jars.
  2. The BarcodeEngine 1.3L and could be downloaded from here.

Prepare the project

After getting the required software libraries as described in previous section. Now we are going to create your first project that will be used to run the barcode engine. I will use the Netbeans IDE (7.x) here, but indeed you are free to develop on your favorite IDE.
The following steps we are going to walk through will guides you to complete the barcode engine application:
  1. Open Netbeans and press (Ctrl + Shift + N) to open create project window, under categories list choose Java then in the other right hand list (Projects) choose Java Application then press next.

  2. In next window Name and Location write the following:


  3. Press Finish button and you should see something like this.


  4. Now we are going to attach the libs which we got earlier from the pre-requisites section, right click on the project and choose properties. In the categories choose libraries and on right hand side under compiler tab choose Add JAR/Folder and navigate to your libs to attach them then click open as the following snapshot.


  5. If all libs are added successfully, you should see something like this.


  6. Now our project is ready for developing barcode application.

Developing the application

Now after everything is setup successfully and ready. Let's explore the BarcodeEngine v1.3 library and do the coding to generate and read the barcodes, using proper configurations.
  1. Open already created class named "BarcodeApplication" which contains the main method.
  2. Inside the main method copy and paste the following code:
  3. Run the code and you should find the generated barcode images created in the specified folder as the following:


  4. In the output console you should see the following output:

How it works

Now after we have created our application, and see the created barcodes and reading back its contents, let's explore the application and see how it works.
First we have declared two files for two different barcode types, qrCodeFile and PDF417File in a specific folder which doesn't exists.
The second step is to create the encoding configuration (instance of EncodeConfig) which used by the barcode engine, encode method as hints for encoding barcode contents to the type we need to generate. The createDirectories(Boolean.TRUE) is responsible for forcing the engine to create the directories if it doesn't exists.
Note: that EncodeConfig and DecodeConfig configuration classes using builder pattern for creating the instances.
Then we have defined the contents to be encoded into QRCode as the following.
Then after configuration we asked the BarcodeEngine to encode the contentto qrCodeFile using encodeConfig encoding configurations. We did the same for the other type PDF417File. I do this to show up how to create the different types of barcodes.
Now it is the time to read back the barcode type's contents which we have generated before, using our BarcodeEngine API to decode and get back the results.
As we did before we need to configure the decoding configuration using a DecodeConfig instance, to be able to read the contents of any image containing barcode.
We pass the created decoding configuration along with the barcode file need to be decoded, to BarcodeEngine decode method, which return the result in form of map of DecodeResult enum as key and object as value.

We get the values from map as the following:


Note: All the BarcodeEngine API methods are static methods, and contain an Utils inner class that has many general useful methods.
Barcode engine also has other methods that extract the barcode from within an image, crop certain portion of the image, and rotate image. Consult the java documentation associated with API for more information.

Explain the API

Consult the java documentation associated with API for more information, about BarcodeEngine class, and its configuration classes (Encode and Decode configurations), alongside with the utility classes.

Finally

The final project source could be downloaded from here.