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
Trusted Contributor
Posts: 154
Registered: ‎02-15-2011
My Device: Not Specified
Accepted Solution

Starting webworks development

Hi,

 

I have developed blackberry applications using the blackberry java sdk. I've been told that using webworks is much better for displaying graphics in a blackberry app. Can I embed java code within webworks and/or vice versa ? I'd like to use webworks to just handle the graphics and use the java sdk for everything else. Is this possible ? Do webworks apps run within the browser or as a standalone app ?

 

Any help very much appreciated.

 

Thanks

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Starting webworks development

Hi ,

 

You can 100% use webworks in the way you described. The main way to add Java code is through our extnesion framework. You can see how to build an extension here. And there are some great examples here.

 

A webworks app is a standalone app running a BF2.



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Trusted Contributor
Posts: 154
Registered: ‎02-15-2011
My Device: Not Specified

Re: Starting webworks development

Thanks for reply, what is BF2 ?

 

Can I add webworks to code to an existing java application (reverse of adding java code to webworks) ?

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Starting webworks development

BF2 is BrowserField2, sorry about that.

 

As per adding webworks code to an existing Java project, the quick answer is its theoretically possible but I'd reccomend against it. WebWorks code is made up of HTML, JavaScript and WebWorks specific JavaScript . While in theory you can create your own Screen/App that would render it all, you would in essence be re-creating webworks without any gains.

 

Making a Java extension from an existing Java project is not very hard and should you get stuck this community is one of the best resources you can find for help.

 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Trusted Contributor
Posts: 154
Registered: ‎02-15-2011
My Device: Not Specified

Re: Starting webworks development

Ok, can you confirm the following please - 

 

To convert a native java app to webworks I would have to create a new webworks project, write the html/css/js based code for my GUI and then write a series of extensions to invoke java specific functionality.

 

"Making a Java extension from an existing Java project is not very hard and should you get stuck this community is one of the best resources you can find for help." Why would I need to create an extension from an existing java project ? Would I not be creating a java extension from an existing webworks project ?

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: Starting webworks development

Thats the basics. Keep in mind there are already APIs and community extensions that may do what you're looking for. Many people don't need to write a custome extension at all.

adrianeireyahoo wrote:

To convert a native java app to webworks I would have to create a new webworks project, write the html/css/js based code for my GUI and then write a series of extensions to invoke java specific functionality.

 


 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)