Vgo Software

Monday
Aug292011

Another JBO-25030 Problem

Chris Muir has a good article explaining a typical JBO-25030: Failed to find or invalidate owning entity problem.  Recently, however, I came across another atypical reason for the same error.

In this particular instance, converting the logic from an exisitng form to an ADF application, there was a master-detail relationship on the page.  When the user created a new master record and then attempted to create a new detail record, the JBO-25030 exception would be thrown.  What I found when investigating this was that if the user saved the master record first, then added a detail record, everything would work as expected.

Investigating further revealed that there was a primary key on the master record that was not updateable by the user.  It was generated by a trigger on the database table.  Since the primary key could not be validated when the child record was to be created, the exception was thrown.

This type of issue is easily overcome by putting the logic to get the new primary key (in this case from a sequence) in the ADF Code and removing the table's trigger.

Wednesday
Aug172011

Google admits I was right, buys Motorola

Ok, so maybe a little hyperbole in the headline, but Google may have admitted that Apple, at least, had it right.  A lot has been said about the Motorola purchase and it's implications for the bubbling patent wars but could this purchase represent more than that?

My last post in this area was about how Apple beat Oracle and Google, referring to their control over the hardware and the software in their business.  It now appears that Google agrees and decided to do something about the situation by purchasing Motorola.

While some articles have pointed out that Google is both alienating it’s friends, and bolstering it’s enemies, others have pointed out that this gives Google the control it needs to make Android a success.  Hopefully this will give them a hardware platform that can keep up with releases of the software and provide a consistent less bug-prone environment for Android to shine in.  If this alienates some previously Android friendly companies such as Samsung and Sony, so be it, it may just help them keep up with Apple.

Of course the mobile platform is just one industry that Google will now have a hardware presence in.  Motorola does produce a great many cable boxes which means Google TV may have found a new platform to shine on as well.  While I love my Tivo, I am curious to see what Google may do in this arena in the future.

I should mention, in regards to my last article, that though Sun did provide the hardware platform and the software for Java to grow, they never had any kind of pull in the desktop arena, though they did try.  Sun and Java did become a very popular combination for supporting web applications.  Oracle has also pointed out that one of their reasons behind the Sun purchase was to provide a hardware platform to support their database.  The Exadata hardware/software combination is a great example of this ability Oracle now has to control the entire environment.

The trends certainly seem to indicate that while open specifications and standards are great in some areas, it is easier to move forward when both the hardware and software can work together closely.

Thursday
Aug112011

ADF 11g - Using LOV's for Convenience, not Validation

In an existing Oracle Forms application we are modernizing for a customer, the forms in places contain LOV’s that exist on the field for convenience, but not for validation.  That is, a user can select an item from the LOV or they can enter text.  The text they enter will not get added to the table referenced in the LOV, just the current data entry record.

When you create an LOV on an attribute in ADF 11g you can tell ADF what type of control to use.  For this type of control we want an Input Text with List Of Values.  This control will then be placed on the jsp page when you drag and drop the attribute from your Data Controls panel.  When it creates the control, it will also create a validator for the control, JDeveloper actually does this for all controls and it allows for immediate feedback when a mandatory field is not entered or the type of data does not fit the specified format, or in this case, the entered data does not match a value in the LOV list.  In order to allow the user to enter a value not in the list, you need to remove the validator.

In our case, this has the benefit of looking up a description and displaying it in another field when a existing value in entered.  If an existing value is not entered, nothing is displayed in the description field.

Monday
Jun202011

Why Apple has won and Oracle and Google have lost

Working in the field of software modernization and being specifically focused a lot of the time on modernizing client/server applications, that is, bringing native applications to the web, I couldn't help but wonder if we haven't come full circle already.  

Many years ago with Sun's release of Java as the write-once, run anywhere answer to every developer's problems, it looked like Java Applets might be the wave of the future.  That never did quite catch on as Sun had hoped.  It was plagued mainly by the practical problem of having a platform that runs on every operating system in the same if not very similar fashion.  Because of this "feature", the platform could be limiting at times.  I believe that this type of limitation and the advance of dynamic HTML, CSS, and the web platform in general led to a huge number of web-based applications and a very small number of Java client applications.

Fast forward from then to now and Apple has taken a lesson from Java and decided early on to do things the "right" way.  Of course, the "right" way means being in control of the hardware platform as well as the software platform.  Because Apple controls the whole environment, "apps" are less likely to break, testing is simplified quite a bit, and even development to some extent is simplified.  The result is the creation of some truly amazing client applications for consumers.

Google's Android is a player, but it is starting to suffer from what Java suffered from.  I am not an Android user, but I have seen the complaints that some applications are only supported by newer versions of the software but some hardware platforms do not support the newer version.  This comes across as an Android problem, but surely Apple has the same problem with their platforms?

For some reason, when I can't get an App for my iphone 3G because it doesn't sport the right hardware, it feels like MY problem for being 3 years behind the technology.  That's probably because it isn't just a hardware compatibility issue, the device itself feels clunky and dated compared to newer versions of the iPhone.  Android hardware is so varied and different that the same comparison really cannot be made unless it is among one manufacturer.

Anyway, my point is that Apple has created this beautiful sandbox where these great apps can be created that use the web, but are not web applications.  They are client/server applications with the server being multi-tiered now.  Just look at the articles that have come out regarding iCloud and the amount of app traffic vs. web traffic.  iOS is really what Java should have been.

We haven't seen the push at the Enterprise level yet.  Most customers want a web application, a more and more sophisticated web application, but still, not native apps.  More and more, however, companies are looking at iPads as tools for their workforce and once that happens, their new apps are going to be native iOS apps.

Now the big question remaining is what is Oracle going to do about it?  Does Java have a chance or has it's time passed?

 

Wednesday
Dec082010

Things I learned at UKOUG 2010

This year's UKOUG was a really interesting event.  There was a stream dedicated to development and most of the presentations were pretty good.  What I liked most about it was that even in the sessions I sat through that covered subjects I was already familiar with, I found I learned a new tidbit here or there.

In the Dynamic Forms and Tables in ADF presentation I learned that you can create a basically empty ViewObject (by basing in on something as inane as "select 1 from dual", and then in your Application Module you can create whatever query you want by using the createViewObjectFromSQLStatement method and passing in your SQL.  This is a clever idea and I can see some use for it, especially in reporting type screens, but currently the implementation is a little limited.  You can create a Dynamic Table to display the results, but the table cannot have sorting or filtering enabled, which, for a lot of the ADF applications we build, would make those screen noticeably different than other screens.

In a presentation about developing products I learned that Oracle MDS can be used to hold customized information for a specific implementation of an application.  That is a very useful feature for ISVs.

A presentation about Javascript in ADF taught me that if you want to use it, you should manipulate the UI Component Model and not the DOM or the "Peer Objects" that would also be available but may not staty consistent.

Finally, in addition to learning that a new utility for creating custom skins is being developed, I learned that if I put a parameter called "DISABLE_CONTENT_COMPRESSION" in my web.xml and set it's value to "true", Firebug would be much more useful in helping to create skins.

One of the most important things I learned is that some things you just don't find out unless you attend these conferences.  You could spend your entire career with a product like JDeveloper and not know all the tricks, especially the undocumented ones, but one trip to a conference like UKOUG and you could at least pick up a few of them.