Java (EN)

  • Android: Checking whether this is the first run of this app


    You have an application that collects app usage data anonymously, so you are obligated to make users aware of this the first time they run your application.

  • Comparing Java with JavaScript

    Java and JavaScript ComparingAs opposed to Java, JavaScript is relatively easy to learn. One reason for this is the need of explicit type definitions for variables, parameters and return values in Java, which are not needed in JavaScript.

    Both Java and JavaScript are “object-oriented” programming languages, but JavaScript is even more “object-oriented” than Java, which is rather “class-oriented”. There is no explicit class concept in JavaScript. Classes have to be defined in the form of special objects. However, objects can also be created without instantiating a class, and properties as well as methods can be defined for specific objects independently of any class definition.

  • Creating TinyCalculator web application on JSF 2.2

    JSF 2.2 application creation on exampleTinyCalculator is the first and simplest application discussed in this blog. It’s nothing more than a simple calculator for basic arithmetic. But it is useful to show some fundamental concepts of web applications with Java and JSF.

    As a kind of appetizer, and unlike how I’ll handle the other applications, I’ll first show you the whole application, with a little explanation afterwards. Then, as a kind of restart, I talk about the foundations of web applications and explain TinyCalculator and different approaches.

  • Evolution of Java Deployment Platforms & packaging styles

    Java Deployment Platforms & packaging stylesJava has an amazing history, and not many languages that are still relevant today can claim to have been used for over twenty years. Obviously during this time the language has evolved itself, partly to continually drive improvement and developer productivity, and partly to meet the requirements imposed by new hardware and architectural practices. Because of this long history, there are now a multitude of ways to deploy Java applications into production.

  • Introducing Java Data Access Technologies: JDBC, JNDI, JDO, XML APIs

    Java Data Access TechnologiesAs I previously mentioned, the Java platform plays a dominant role in server-side application programming, as demonstrated by the recent increase in J2EE applications. Java succeeds because it has the right combination of tools and technologies that enable developers to create robust and scalable server applications. Corporations now use Java technologies for tasks such as providing the presentation layer for Web sites, the business logic on application servers, as well as creating custom client-server solutions.

    Part of being a successful server-side technology is the ability to interact with data. Fortunately Java has this ability. It provides numerous APIs that help you access the different types of data stores. Figure 1-2 shows the role Java Data Access Technologies (JDATs) play in the enterprise environment.

  • J2EE: poweful web application development

    In recent times, IT organizations have been tasked more and more with charting a course for writing new applications and migrating existing applications to a Java 2 Platform, Enterprise Edition (J2EE) environment. On the surface, this task might seem to be a matter of using predetermined methods, as was the case with the migration to client/server technology. However, one major aspect of J2EE is its variety and breadth. There is no one way to create a J2EE system; in fact, there are probably hundreds of combinations of J2EE technologies that could serve any one purpose. This makes the decision of selecting the proper technology combination daunting, especially if the J2EE environment is new to the organization.

  • Java command-line application: build your first RESTful client

    Java command-line application CREATE on exampleConnecting to a RESTful web service takes no more work than directly connecting to the service through an HTTP connection. For our first RESTful client, we'll use the command line to connect to Twitter's RESTful web service, which returns the last 20 public status updates.

  • Java Persistence Layer: taking data from the user & saving it

    Java Persistence LayerData storage is a very common and basic requirement of enterprise applications. Data storage ensures that the data collected from the user will be saved over time. The mechanism of saving data for the duration so as to make it available later is called persistency.

    In Java, normally the persistency is of an object. Java can save an object state using the following ways:

  • Programming

    Books on programming. Literature and manuals on Java coding first of all, as well as other programming languages. Technologies and methods of programming for databases and data warehouses are also considered.

  • Raspberry Pi Introduction: preparation, installation, first application

    Raspberry Pi first stepsIn this blog I’ll walk you through the process of setting up (or baking, if you will) your Raspberry Pi.

    This article will take you through a first-time installation of Raspbian on a Raspberry Pi with the latest Java version. I will also detail some additional configuration that you may want to change to optimize Java and other visual applications. Finally, I will show you how to create a network between your Raspberry Pi and another machine and run a simple Java application.

  • Requirements of Modern Java Applications

    Modern Java Application Requirements Many Java developers have been practicing continuous integration and some form of continuous delivery for the past decade. Innovative books like “Java Power Tools” by John Smart provided the guidelines and frameworks to make this possible. Technologies have obviously changed within the last ten years, and so have associated programming and architectural styles. In particular, business teams within organisations have increasingly demanded that IT teams become more flexible and be capable of rapidly responding to change in customer preferences and market conditions.

  • Types of JDBC drivers and MySQL database connection example

    JDBC drivers for MySQL databaseJava is a pure object-oriented programming (OOP) language while relational databases use sequential programming language (SQL). Both of them have their own data type, methods and programming techniques. OOP manages objects where SQL manages tables. It is pretty clear that both of them cannot communicate directly with each other due to the unavailability of compatible language support. Direct communication is not possible so the unit is required to make them communicate even though these two are fundamentally different. The Java Database Connectivity (JDBC) architecture will be managed by JDBC APIs from a Java application which helps to manage the incompetency. The one which manages the language and data type difference is DriverManager. The following figure illustrates this:

  • Why is Java a Good Choice for Building Web Apps?

    In 2017, and for many years to come, the enterprise software platform Java Enterprise Edition (Java EE), which bundles the Java language together with a number of libraries for enterprise software systems, is the most important programming platform for enterprise information technologies, including all kinds of business software applications. Its strong points mainly result from the fact that it is very mature: