Showing posts with label JavaFx. Show all posts
Showing posts with label JavaFx. Show all posts

Thursday, September 02, 2010

Creating a Simple Database Client in JavaFX Composer

If you think that a database application is a 2 buttons 2 values 1 screen plate: this tutorial is for you...

http://netbeans.org/kb/docs/javafx/database-client.html

WE NEED A DECENT FRAMEWORK FOR BUSINESS APPLICATIONS !


- Text editor, spreadsheet - Even basic stuff
- Reports engine
- Client Server or Web with Plain Ajax
- Easy DB Access and GUI
- i18n really built-in not just a few labels translations...
- Application Framework - GUI / DB / Login / Permissions
- Application Module
- Integrated with IDE support
- Short and soft learning curve !

Thursday, July 08, 2010

Java RIA... getting impressed by... Apache Pivot

More than a year ago, I wrote a few articles on Apache Pivot. Well, my enthusiasm was very limited.


We are now in the process of re-writting a Delphi based application. Ideally using Java...

We could use simply Swing. But note, that the Swing application framework went back to life before to re-die again...

We checked OpenSwing. It is a good library, which adds a lot of good things on top of Swing. Useful but the look & feel... and a lot of code for just a little app.

To ease things, I looked at Netbeans as a platform. Overkill in many cases and it solved many problem we don't have and ignore those we have... Including we need a short learning curve and  among the big issue dynamic localization - language switching http://netbeans.dzone.com/multilingual-netbeans-platform-applications.


Also I spent a bit of time reading about JavaFX. Nice little language, but I cannot find anything that looks like an enterprise feature. Again the old Sun syndrom, we found a nice idea, lets market it against inacessible competition and consider our installed based as supreme idiots... bringing them features they never asked.


So I checked again Pivot - now version 1.5 and I AM IMPRESSED.

Documentation is very much improved, so that makes the purpose very much understandable.  Plus you have a bunch of very good examples.

The graphical glitches are gone ! Performance looks pretty good.

Most of the things are there and well designed, Web services, binding, event handling, scripting in the UI definition (any JVM language...).

And yes, a good looking mechanism for static localization.

The design is clean and nice (not very fancy but it is good loooking). It is designed to be skinnable, so we can expect much more funny things sooner or later.

You can build GUI using a straightforward XML based language (the layout can then get transferred to the client and transformed into GUI -> yes in fact this what Open ERP Python APP does...) .

So it is a cool toolkit and it appears much more oriented towards enterprise apps than FX. So my new acronym Rich Enterprise Internet Application that fits for Pivot but no go for FX.

The unfortunate thing... it is not compatible with Swing (I can live with that) but I need a minimal kind of word processor for my app (that I have with Swing and EditorKit stuff). Too bad, nothing is perfect... But keep going Apache Pivot you are heading to the right direction. At least I am getting convinced!

Just a link so you can check (you need Java plugin to get the examples running): http://pivot.apache.org

Sunday, February 07, 2010

Back from the Java Roadshow 2010

Here is a quick, incomplete summary of what I saw, heard with a touch of personnal  feeling...

Remark number 0: there was a limited audience that day (compared to previous venues). Lack of 'announcements' or economic crisis ? Probably a bit of both...

Sales of SUN clothes and gadgets have soared as they will not be available anymore.No hope to get a mug with the SUN logo... So the merge with Oracle was at least good at that...

The acquisition by Oracle is being finalized now.

JDK 7
There has been a short review of JDK 7. Not Java 7 yet because that would require to go through the JCP - it seems there are currently some conflicts/problems on the process itself. Ultimately this will become Java 7 when these 'political' issues are solved.

Here are a few things:

- more annotations (now also on base type).
- modularity - JSR-294. This will help specifying dependencies to module. With range of version etc. Compile will typically check against the lowest version of each version and runtime linking will take the highest (most recent one).
- various language extensions (switches on String - got great welcome).
- simpler resources cleanup (object that inplement a closable interface will get closed when exception occur) thus simplifying resource protection code.
- improvement for dynamic language support
- compressed 64 bits pointers.

JavaFx
- Ok, nice idea. Variable binding looks great. Demos was ok but not that simple to write.
- Where can it be used ? Well on any phone Java enabled etc - sorry I missed the reference (Java ME 2?). So forget IPhone (?) and Android (more or less sure) - but should be ok on Windows Mobile (ah great).

JEE 6
- Improvement, and new concept of 'profile'. So you can be compliant by implementing a subset of it.
- Single WAR file.
- New servlet API - and yes possiblity to upload file in a standard way !
- New JPA.
- EJB 3.1 (Light = can be used outside a container).
- Dependancy injection (very, very good point - lets get away for the JNDI horrible stuff).

Glassfish V3 

GlassFish continues to be the reference implementation of JEE6 and looks like a geat product that will continue to be the reference implemenation and is announced as 'production ready'. It seems fast and easy to embedd. Session preservation (accross restart of the container) is great (for end-users) and truly good for developpers (simplify testing your changes)

Glassfish incorporate Apache Felix and so is OSGi compliant !


Java tip & tricks

Well I learn that there are 480  (-XX) options on the Sun JVM. Don't ask me them all. We had a good presentation on the garbage collector. A nice peace of software that tries to adapt memory allocation to various circumstances... With some option again for tuning - for example if you have many threads and performance problem related to contention...

Note that there is a new Garbage Collector (G1) since JRE 6u14 (so a motivation to upgrade to the latest JVM).

For info http://java.sun.com/performance/reference/.

Profiling with visual VM http://visualvm.dev.java.net/

Note that the Garbage Collection was there when the language started (in 1996). So making it a hot topic for the yearly roadshow...


Java for Business
Basically support proposal for the JVM with 3 level of services. Please call for prices...

Embedded Java
Basically Java SE but tailored by modules to get a smaller footprint. Good if you are in the appliance business.

Real Time Java
On realtime Linux or realtime Solaris, Java real time extensions enables to control the throughput and / or predictability of your application (a new range of business for sure).

The last tree points means IMHO : lets try to find a way to get finally a bit of money from it.

But it is not so simple. See for example the way Google used the language for Android without using the runtime to get away the licensing fee...

One more for the road. I will post the link to the presentation slides when they are available.

My final, last point... Walking dinners with hot lunches are not compatible...

Friday, June 05, 2009

JavaFx 1.2 is out

I still don't believe in the JavaFx stuff - too bad, too late and not relying on the Java strong use in enterprise. Anyway the vesion 1.2 is out. Clearly they don't care that much of compatibility and you will recompile your code:

"The JavaFX 1.2 SDK release is not binary compatible with the JavaFX 1.1 SDK. This means that your application and all libraries that it depends on must be recompiled with the JavaFX 1.2 SDK."

Things like that, happens. But this confirm my opinion that SUN push out this product (as they did for Java) without finishing it.

My humble advise: wait for JavaFx 3.0 - if it exists.

Otherwise it seems to move to the right direction -- but at senator speed -- they now support text controls (hard to call it an innovation) and seems to support Linux (not sure what it means in this context).

There are obviously many other changes. Mostly in the graphical area, so they seems to continue competing with Flash...

What has not changed however is a clarification about why one would really desire using it.

http://java.sun.com/javafx/1.2

Friday, April 17, 2009

About Java, market, technology and attitude

I read this morning a small article from Timothy M. O'Brien
http://broadcast.oreilly.com/2009/04/an-up-and-down-week-for-java.html
The article highlights the relation between Sun open/not so open behavior and its current market situation. Also, I agree entirely on the desperate JavaFX approach.
Would buying Sun be good to IBM ? If stock continues to drop, probably. Would it be good for Java: I think yes. IBM has been a fair player in the open-source community since several year and is good to listen to market and make money with services.

Yesterday, I saw a smart and interesting article "Meet Sun Software Engineering Manager Masood Mortazavi, Part 2: Java DB, Project Models, and More".
This is plenty of smart thinking, and I am sure Sun is full of these very talented people. Considering the situation, I will pardon the self-congratulating style of the article. However I was damned shocked by the following paragraph :

"SC: What are the biggest issues that companies have getting the most out of Java technology-based applications?

Mortazavi: I would point to problems related to a mishmash of technologies, the lack of ability to select properly, and a relative increase in nonstandard, de-facto programming platforms."

Well. I cannot agree. First, what is the sense of choosing and "open" solution to stick to a single vendor ?

Second, Sun pushed developers to these so called 'mishmash' by regularly delivering technologies not matching business expectations. Remember the first releases without JDBC, crappy AWT, poor Swing performance, have you saw there was no reporting solutions built-in, still no clean integration with desktop under Windows... In fact, Java has been saved by these 'mismatch' like (to cite a few) Eclipse, Tomcat, Spring, Hibernate,JasperReports, Struts etc

We must understand that a lot of mishmashers just tried to fill the gaps... and they continue and continue. Why is Sun then endorsing Ruby , Groovy... Why are web applications more often built with PHP than Java...

I will one more quote this article "Don't forget that billions of dollars of revenue have been generated and millions of people have been employed because someone at Sun Microsystems invented Java,..."

That's correct, but I am sure we could have done much more money if Sun started to listen more to the market and the developers needs. The Java platform remains a very attractive but not so productive platform with a difficult learning stage (again the mentioned article is worth reading). Look at how much shrink wrapped software are written in Java... How much solutions for small business... well we missed a lot of business opportunities because of blind smart people...


Wednesday, April 15, 2009

JavaFX ... Sun did it again

I am currently reviewing various architectures / frameworks etc for building (more – if possible) easily database backed applications.

Ideally we would like to leverage or Java knowledge (we did a lot with Java but little WEB/GUI stuff).

The idea of being able to deploy within a browser or outside is of course appealing.
So I had a look at JavaFX.

I quickly spotted the next link… http://blogs.sun.com/tor/entry/javafx_text_component . Waouw the next generation bablabla will not use text right now ! Cool ! “Forget about any business apps” for now could be on the web site banner. Know a business database apps without a single text edit?

So announcing so much, and providing so little, that reminds me how Java itself was launched (without proper GUI, no database API, even writing a file was an issue). Yes they did it again.

This is not only a technical exasperation, I cannot catch this strange blind marketing attitude !

Java is relatively standard for business software but the client side has to rely on a crappy mix of HTML/JavaScript to look a bit more responsive and stay easy to deploy?

Wouldn’t it be smart from SUN to capitalize on this market needs instead of trying to compete with Adobe Flash with an under capable product?

The latest Java runtime is much less deployed than Flash, the platform seems less capable and imply learning from scratch a new (said to be easy to learn) language.

Why would Flash developers move to this FX stuff ?
Why would Java developers move to this FX stuff ?

Well no clear replies and at this stage I give up on that one…