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
Contributor
tazbirs
Posts: 20
Registered: ‎11-22-2011
My Device: blackberry bold- 9700
Accepted Solution

which one to choose? java development or web works?

i am building an application which will take photo and record video and save them in device memory or sd card and email them when i want. will i use java development or webworks develplment.

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

Re: which one to choose? java development or web works?

Hi tazbirs,

 

There are many different reasons to choose which platform to develop on. I generally reccomend people develop in the language they are most comfortable in. Technically anything that can be done in Java can be done in WebWorks so really its up to you.

 

Just to be aware WebWorks does not have a native API to send emails with attachments, but if you know how to code in Java you could build an extension to handle this.



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)
Contributor
tazbirs
Posts: 20
Registered: ‎11-22-2011
My Device: blackberry bold- 9700

Re: which one to choose? java development or web works?

thank you for your reply jeffheifetz. i tried to find out development guideline about webworks. i didn't find any useful resource other then their own. as i am new to blackberry, i am confused about tools and environment setup. i have installed eclipse and downloaded blackberry sdk 6.0. but how can i start developing in webwroks? can you suggest me any guideline?

Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: which one to choose? java development or web works?

You can't use Eclipse for WebWorks development. Start here.

 

You need to download the Ripple emulator and the WebWorks 2.2 SDK. Use your favourite text editor to edit and create the necessary files. Use the Ripple emulator to do basic app testing.

 

Create your first app:

Creating a WebWorks app

 

Check out the sample applications:

Sample Applications

 

Jeff is correct when he says everything is technically possible with WebWorks so it's up to you whether you use native Java or WebWorks depending on what you're comfortable with.

 

However, that's a big technically.

 

The native WebWorks API is useful, but somewhat limited. If you want to do everything a native Java app can do, you'll have to write your own WebWorks extentions -- in Java. So if you're not comfortable with Java, you should use WebWorks. But if you want to be able to use functions and features not included with WebWorks you'll need to know Java, in which case you'd probably just want to write the app in Java anyway to avoid tip-toeing around all the memory issues with WebWorks.

 

[semirant]

I plan on re-writing my app in native Java when time permits. It's a pretty simple app with 1500 lines of Javascript and runs into memory issues too often.

 

I've spent much time optimizing my code, and keeping the DOM as small as possible at any given point. I realize that having "all that" Javascript in memory is what's causing the problem, but seriously it's not that much. JQuery is what, 8000 lines? Don't even think about it. Now I need to spend even more time breaking apart my Javascript into discrete files that are only loaded into memory when needed - a major change, again, to work within the constaints of WebWorks. Unfortunately a lot of the code is utliltiy functions that are always required.

 

A more complex Facebook-like app would never make it in the WebWorks world. I spend most of my time working with and around the constraints of WebWorks rather than creating useful features.

[/semirant]

Contributor
tazbirs
Posts: 20
Registered: ‎11-22-2011
My Device: blackberry bold- 9700

Re: which one to choose? java development or web works?

i am comfortable with java. when i first touched blackberry development, i started building my app in java. but, i was facing problem building UI. it was complex for me. then i looked in to web works. i found out to be easy. and i know there would be some memory problem. can you tell me anything about UI designing in java which will ease my pain?

thank you shnuffy
Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: which one to choose? java development or web works?

I must admit, UI is something WebWorks makes nice and easy. Unfortunately, creating the UI in Java is indeed fairly complex (as most programmatic UI frameworks can be). The only way to get good at it is to practice, read these forums and check out some of the tutorials that come with the BB SDK.

 

WebWorks will make your UI development go very quickly.

Contributor
tazbirs
Posts: 20
Registered: ‎11-22-2011
My Device: blackberry bold- 9700

Re: which one to choose? java development or web works?

[ Edited ]

in that case, i must let go java ui development. as a matter of fact , is there anyway i can use java as logic library in webworks? in that way i can still handle the memory part of the app.

 

thanks again..

Developer
shnuffy
Posts: 268
Registered: ‎08-19-2009
My Device: Bold 9700

Re: which one to choose? java development or web works?

You cannot use native Java in Webworks without creating an extenstion, and then you must use javascript to access it. You can see what and how others have extended here: https://github.com/blackberry/WebWorks-Community-APIs

 

Good luck!

Contributor
tazbirs
Posts: 20
Registered: ‎11-22-2011
My Device: blackberry bold- 9700

Re: which one to choose? java development or web works?

thanks a lot. i'll let u know if anything interesting i can find.
Contributor
peterdeka
Posts: 39
Registered: ‎04-06-2011
My Device: Bold 9780

Re: which one to choose? java development or web works?

but is it woth to start developing in java? i thought that java apps won't run on BBX...and being OS7 the last in the java line i won't feel confident starting out development of a new app on an already dismissed platform...am i wrong?webworks seems to be the only choice...but man performance is a very big issue here