Monday, November 30, 2009

Will JavaFX die?

Will JavaFX die? I really hope so because it will teach the next RIA wannabe to not dump another scripting language to the masses and hope, with the sincerest of hope, that GUI designers will become coders over night. How on God blue Earth does an RIA does not have a visual editor? (And BTW, no matter how good you are,... wishing that a text editor somehow, through the magic of Christmas, becomes a "visual editor" will not make it so .. you hear me Exadel!) . JavaFX need 2 concrete things to survive: 1) An Android runtime 2) A visual (you know, like Flex Builder visual, not XEmacs visual) editor

Sunday, November 22, 2009

Upgrading (kids and adults)

It was a fine weekend to do a seminar + upgrading. Kids upgrading was load of fun. Most of them work hard for the upgrading and it shows. It's quite a revelation to see how much these kids grow over the years.

The seminar was a success. So many people attend that we had to work with limited space but it was worth it.

Congratulations to all!
Posted by Picasa

Tuesday, November 17, 2009

Adempiere references in Plain Old Java

Right now, I'm learning Adempiere and finding ways on how to hack it apart (and put it together again). I'll be "reporting" my findings on this blog on how things are done and how some of these concepts can actually be used in Java in general.

One thing that interests me in Adempiere is the Rapid Application Development feature, especially when building rich CRUD based stuff. Adempiere has this concept of "everything must have metadata". By manipulating this metadata, CRUD based application can easily be done.

In the general Java world, metadata manipulation used to create CRUD based apps is not new. Frameworks such as OpenXava (who claim to have beaten RoR development record time - apparently that article is not accessible anymore) is attracting much attention. One thing Adempiere does differently is by qualifiying relationships between Domain Objects (of course in Adempiere, the Domain Objects are Relational Database Tables since Adempiere uses direct / semi-direct SQL access). Disclaimer - I'm not an OpenXava expert, so if OpenXava does these stuff too, please do tell.

Imagine if we can port this to the Java world in general

[If you are not familiar with the concept of Reference in Adempiere, I would like to redirect you to my good friend, Red1's, tutorial ]

In Adempiere you can qualify a reference (a link from one table to another table). For example you can say that a reference is "Searchable". When the reference is rendered, you would see a "search box" that is linked to data from the reference table. You can type away a search term and the reference table will be searched.

How can we do this in Java in general?

To demonstrate this, we'll look at an example: Imagine that I have 3 entities, User (plain old User - ok, maybe not so old :) ) , PurchaseRecord (a record of a purchase made by the user) and Product (the actual product the user purchase)

Using JPA or Hibernate I could have codes representing the entities as:

public class User{
private Set purchaseRecords;

public class PurchaseRecord{
private Product product;
private int number;
private Date purchaseDate;

public class Product{
private String name;
private String unitPrice;

If I'm using plain old CRUD generator , I would create a User list. Clicking on a User from the list would give me the details of that particular user and a list of PurchaseRecords. That list is presented as is. If I'm lucky, the CRUD generator will allow me to page or sort the data. One thing I do not have is a quick access to a particular record and the subsequent Product attached to that Record. But, imagine if I can do this:

public class User{
private Set purchaseRecords;


Automatically, when I click on a user, I would still see a list (but this time a list of names of products, which is more palatable) and also a text box, a dropdown list and a button.

The textbox represents a search term box. You can search your PurchaseRecord by its name. Enter your search term and click on the button. The dropdown list represents filters. By default, PurchaseRecord will be filtered by date=TODAY (only today's entry is displayed). The user can always choose any other available filters.

Of course I'm just imagining stuff here and I'm sure there are some gaps that need to be filled in (for example, does having a @Display tag violates MVC) but the concept of Reference in Adempiere is really powerful. Hopefully someone could bring this concept to the JPA/Hibernate world.

Sunday, November 8, 2009

What is wrong with Malaysian IT scene

Before reading this, please see the disclaimers at the bottom.

What is wrong wth the Malaysian IT scene can be dully observed from one of the most significant ICT event here in this country called the MSC Malaysia International Advisory Panel (or IAP) meeting. Here's the website of said event: .Surf the website and you'll see what I mean.

1)It's the the people, stupid

Browsing through the IAP website, we have the impression that it is just a business event. Nothing "techie" about it. In fact, asking around, it seems that the Malaysian tech communities are blissfully unaware of such event is going on right now under our collective hairy noses in PICC this week.

How on earth can the most important part of the tech. industry (i.e. the tech. people) are not even informed, heck, are not even welcomed to the biggest MSC event this year?!

Is it just me or is MSC a place where techies are regarded as second class citizens compared to quote unquote businessmen? How on earth can MDeC justify limiting their allocation for tech. employees under their pre-seed and iconity grant to only RM 1500 per month (irregardless of qualifications or experiences)? BTW, just to put things in perspective, the government of Malaysia recently declared that families earning RM 3000 or less per month and are living in cities are called the urban poor. If two techies, a boy and a gal, working for a preseed or iconity recipient companies decide get married, they superchalafragilisticexpiallodociously become the urban poor. And MDeC lament about the lack of talents in ICT, who wants to work hard during their University days and end up being declared poor!

Have these guys never learn?!

Build a strong community and business will come. That's the lesson of Silicon Valley that has somehow escape the collective brains of our policy makers. Silicon Valley started with the universities in the area. These universities have been building tech communities and when the electronic/transistor revolution came into the picture BAMM!!, the magic happens. But it started with communities. Not businesses.

The MSC brand has been a failure because it was attached to companies. MSC companies are known today as companies that do not pay EPF, do not give salary on time, try to treat their employees as slaves (gee, I wonder where they learn that from) by asking them to do extra hours and not getting paid for it. Companies are soulless money making machines. They would cut corners and take advantage of any loophole just to get another dime on their balance sheet. This can be seen by companies opening up "ghost branches" in MSC status area (such as Cyberjaya) just to escape paying taxes.

Communities on the other hand live and die by the spirit of its people. They rely on people being truthful, honest and willing to sacrifice. And yet, MDeC is blind to these sacrifices. In fact, some of our community leaders are so pissed poor, they can't even afford to buy LRT tickets. Some have to beg for jobs and some got so upset they left the country for good (good for them, bad for Malaysia). Those who bite their lips and stay are riddled with redtapes and unfulfilled promises that its not even funny anymore.

If MDeC would have spent as much on building the soulless MSC companies as they would on building communities, we would have gone further by now!

2) The locals are just as good

Looking at the talks and the programs listed on the website, I was really wondering "Gee, I can do that talk too. Heck, I can even do it better since I know the local context".

I mean gosh!, it says "international" but are the locals too stoopeed to advise MSC and how to go about doing things? Isn't Dr. Mahathir's main message to the world is that we want to be strong, but we will do it OUR WAY! Somehow that message, that twitt, does not reach MDeC.

Are our collective brains still clogged with the imperialist white-men fetish that we can't even see how much our own people have grown over the years?. Somehow, just because you're white, no matter how stupid , incompetent or evil minded you are, you are always correct. "Yes sir Mr. Balmer sir, you can rob my country and kick my butt to boot. It's ok because you're an American and you're the CEO of Microsoft"

Stop this stupid nonsense! I can give more relevant advices to MSC and I'll do it for free (heck, I even said it outloud here and here) and yet, just because my butt is the wrong color, no one gives a crap!

3) So much more

I have so much more to rant but tears are running through my eyes watching how much my beloved country is wasting yet again an oppurtunity to turn things around. I really hope our future leaders would have enough insight to consider my rant. Hopefully, things will get better. We have no other choice, we either get better... or die ...


If you are an MDeC employee, please do not think of my rant as an attack on you personally. I do think that people in MDeC are also individuals (and thus part of the community) who choose to work with MDeC when they can pour their talent somewhere else (and probably get better pay). Heck, I know a few good people in MDeC who were courted by oversea companies and yet they decline the offer for the love of the country. If anything, they are more into it then us developers. I believe that people in MDeC are heroes but some of the policies are real time-wasters.