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
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Strategic choices

This might be the correct forum but since I am currently using "´Webworks" I will put it here

 

Strategic choices.

I am porting an app from OS5 Java. It communicates with the PBX, (DTMF or IP).
It interacts with the phone and the phonebook. I communicates with a website. It works with "Listeners"

This app is developed for the major major platforms, like iPhone, Android, Windows Phone and Blackberry by a
 "distributed" team of developers.

When porting to OS10 was started it was decided that this would also be a pilot project for HTML5/JavaScript
since it might possibly be a future for the other platforms. Currently the development on the other platforms are
not following this strategy so it would be for the future.

So I started out with "WebWorks". So far it has been an uphill struggle so I have decided to take a new look at the alternatives.

It boils down to a choice between 4 alternatives:
 
 - Continue with WebWorks
 - Continue with WebWorks + "Community developed" interface to "Native"
 - Switch to "Native"
 - Switch to "Cordova"

Stay with WebWorks alternative:
 pros:
   - Possible integration over platforms, at least the GUI part
   - "non api" code fairly simple to work with HTML5 and JavaScript. Works fine
 cons:
   -  Not all API:s available. "Some" might be available but not documented in WebWorks documentation
   -  Confusion due to some parts are commom between Playbook and Phone, others are different
       adding to confusion.
   -  Despite a lot of discussion on the community, several attempts coding I have not succeeded to get a
      ordinary file download from a web site to function properly. Just as an example there are 3 variations
      on how to code the call spread on the community website:

       blackberry.io.filetransfer.download
       webworks.io.FileDownloader.download
       webworks.io.filetransfer.download

    - doubts on what can be done programmatically. Someone thought it might not be possible to send
       DTMF-tones.

Go WebWorks + "Native interface"
  pros:
     - sounds like getting the best of two worlds.
  cons:
     -  seems a bit complicated.
     -  being "community developed", What about future development and maintenance
     -  Just the existence of such a project indicates that something is amiss in webworks.

 Go "Native"
   pros:
       - Ought to be the "safest" alternative. Everything available, Cannot get "closer" to functionality
   cons:
       - Forget about cross platform "integration"

 Go "Cordova"
      Just another "Webworks"? Why should it be better?
 

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Strategic choices

[ Edited ]

This doesn't seem to be the first post of this genre. As far as I can answer your questions I will.

 

First you are coming to WebWorks from precisely the correct spot with your comment on cross platform being iOS, Android, BlackBerry. You run your code on all these platforms in a similar webview. Of course, most, if not all of the API calls will have to "change" depending on the platform you use; hence the push for cordova. In Cordova things would be standardized, and only platform specifics like BBM or invocation requests would need special code.

 

WebWorks is designed with the goal of allowing you to develop for the web using cross platform technologies. It supports as much of the BB10 standard as can really be provided through the use of jQuery Mobile, cross cut menus, Dialogs, Toasts etc. But it is by no means complete. If you would like the full Cascades "Native" experience, then this is where you need to go. As you stated, you will lose the cross platform capabilities, but you will gain all the features and "Native Look and Feel" you were speaking of.

 

 

I'd like to speak to the following point: "Just the existence of such a project indicates that something is amiss in webworks". While I agree, if you are a blackberry developer and want all the native wonderfullness you don't get it; you also lose the cross platform reason you went with the web. If you wish to develop for Blackberry only, then use Cascades.

 

As far as download is concerned this topic for some reason has been discussed many times. You can use the download interface defined in blackberry.io or you can use XHR it is up to you. In the future we will support the Cordova standard, which just uses XHR as far as I know, so you can easily work with that yourself in a cross platform way.

 

 

"Confusion due to some parts are commom between Playbook and Phone, others are different adding to confusion."

 

This is a very valid point. The documentation can be slightly confusing. If you make sure you are only looking at the BB10 documentation, you *should* only get BB10 apis. This is the specific index I'm speaking of: https://developer.blackberry.com/html5/apis/bb10_index.html

 

"Despite a lot of discussion on the community, several attempts coding I have not succeeded to get a
      ordinary file download from a web site to function properly. Just as an example there are 3 variations
      on how to code the call spread on the community website:"

 

Send me an email erjohnson@rim.com, let's sort this out.

 

 

"Just another "Webworks"? Why should it be better?"

 

It is not *better* per say, but a move towards more standardization. It speaks to the intial problem you were trying to solve; working across many many platforms. Would you not agree that it would be nice to make an APP using BB WebWorks and it would use as many standardized APIs as possible. This is the move towards Cordova: Standardization. It will still be the web, but the process will soon be even easier to work with other platforms. You will only lose specific platform level integration such as BBM when you move to iOS or Android. If you have another platform app that uses Cordova, we will support it on BB10.

 

 

 

 

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
Developer
ingvar_e
Posts: 551
Registered: ‎10-31-2009
My Device: Torch 9800, Bold 9700
My Carrier: Movistar, Telenor

Re: Strategic choices

Thanks for answer. Will contact you about the download problem.

Just a comment on the link. If someone else tries it, Its got an ending "dot" on the url. Remove that and it works

If everything seems to be under control, you're just not driving fast enough
-Mario Andretti-
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Strategic choices

Updated. Thanks.

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.