Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Contributor
Posts: 5
Registered: ‎05-26-2010
My Device: Curve 8900
My Carrier: Orange

Java vs. Web apps?

Can anyone give me an overview of the differences between what is technically possible when developing an app in Java, versus developing a widget using HTML and Javascript?

 

What can Java do that javascript can't?

 

Phonegap claims an app can be written once in HTML/Javascript and easily compiled for a wide range of phones - is this realistic?

 

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Java vs. Web apps?

I have always found that if you keep 80% of your application in portable web standards (HTML, CSS, JavaScript) you make porting to other platforms easier.  We see our widget APIs and packager as filling this remaining 20% for BlackBerry

 

For integrating with specific smartphone platforms you really have to leverage the APIs provided by that platform.  In my opinion, a write once deploy everywhere solution is every developers dream but the only way I ever see this happening is if there ends up only ever being one mobile OS Smiley Happy  

 

There are too many players in the game to make this come true.  But using web standards makes this porting effort much easier.

 

There are many efforts out there to create a higher level abstraction of APIs and packaging such as PhoneGap, JIL, W3C widgets, BONDI and the list goes on.  In many of these scenarios they are standards based and pick a lowest common denominator and each one has their own desires.  This approach works for some applications, but we feel that the stickiest most used applications are those that are deeply integrated with the BlackBerry experience.  We have been calling this deep integration concept  Super Apps.  Typically higher level abstraction frameworks or lowest common denominators do not address this type of deep platform integration.

 

As far as Web vs Java it really comes down to what you are comfortable with and where your development background lies.  If you are a web developer then pursue building a BlackBerry Widget.  If you are a Java developer then pursue building a BlackBerry Java application.

 

We have really been trying to gear the Widget functionality towards web developers.  There are many conversations around functionality with our internal Java developers that just don't jive in the web world.  This is simply because things are done differently and we want to really stick to what our web developers know and are comfortable with.  Our goal is that we don't want our Widget developers to even have to think about Java.   We want them to concentrate on what they know best... Web technologies

 

There are things like Open GL that are available  in Java and are not available "yet" in the web, although Web GL is gaining steam.  We are continuing to build new JavaScript APIs that will bring all the capabilities that Java has to offer on the BlackBerry operating system.  During this time when we are continuing to build our JavaScript libraries we provide a mechanism for you to build your own JavaScript API to expose any of the underlying Java functionality to your BlackBerry Widget.

 

So when you think about functionality it is hard to go on a apples-to-apples comparison between the two because they accomplish the same desired end result in different ways.

 

Hopefully that helps and doesn't further confuse the topic Smiley Happy

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Contributor
Posts: 12
Registered: ‎05-27-2010
My Device: storm
My Carrier: verizon

Re: Java vs. Web apps?

I'm imagining that  the choice of which technologies to use for your BB dev has a lot to do w/ how familiar the programmer is w/ either the web tech's or Java dev.

 

My question would then be, how well does each technology integrate w/ the Blackberry Enterprise Server ?

 

I'm in the process of selecting a technology to write an app that will interface w/ some internal systems and wanted to get some imput as far as people's experiences when writing apps for business use, specifically if the app will need to do a lot of say database 'seach and reterieval of information'

 

thanks

Highlighted
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Java vs. Web apps?

Integrating in a BlackBerry Enterprise Server environment is the same for both a Widget and a Java application.

 

Both have access to the same internal resources and both would typically be interacting via HTTP requests.

 

Searching and displaying results is actually easier with a web solution as your server can serve up the actual UI to be displayed on the device, where Java must parse an XML response and dynamically generate the UI.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter