If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
orz
Contributor
orz
Posts: 10
Registered: ‎02-21-2013
My Device: Playbook

Porting from BB10 to BB 7.0

[ Edited ]

Hi all,

 

I was wondering if anyone here has had experience porting a BB10 app written in cascades to webworks (for BB10) and then back-porting even further to BB 7.0 devices?  If so, do you have any tips?

 

Also, would I have to use a different signing key/debug token combination?  I'm still fairly new at publishing apps to BlackBerry World, so I'm not sure what route people usually take when creating apps for multiple versions of BlackBerry.  I'm assuming it's usually the other way around (going from BB7 to BB10), and not what I'm trying to do right now.  Haha!

 

FYI, language isn't an issue for me.  I find both webworks and cascades fairly easy to understand and use.  Reason I chose cascades was because I found the momentics ide really easy to work with compared to running scripts to build/deploy an app to a device if I'd gone with webworks initially.

 

Thanks!

Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 813
Registered: ‎07-15-2008
My Device: Z10
My Carrier: Bell

Re: Porting from BB10 to BB 7.0

It's fairly rare to go the approach that you are doing, but not unheard of.

 

There's not a lot to say about porting from Cascades to WebWorks - unless you used WebViews in Cascades, you're pretty much going to be rewriting everything in HTML5, CSS and JavaScript. I'd suggest going with a UI framework that will allow you to map closely to the Cascades UI - so you don't have to redesign screens or interaction. bbUI.js is your best bet since you're going back to BB7 as well.

 

When you go from WebWorks on BB10 to BB7, you'll find you may need to reduce the complexity of the content somewhat and you'll need to be careful of memory use as WebWorks apps have a lot less room to work with on BB7. Using bbUI.js, it will automatically scale some things back based on the device it's running on, and will use a look and feel that matches the device - so it's going to look a lot different on BB7.

 

Your debug tokens and keys will be the same for BlackBerry 10 WebWorks, and also for PlayBook WebWorks. BB7 uses a completely different set of keys. You'll need to request them from the signing key form. 

 

You're probably aware of it, but WebWorks apps are debugged using WebInspector, which is different than what you would use in Cascades. And while you said you didn't like scripts for building and deploying, you may find the Ant Build Script useful to integrate with whatever IDE you want to use.

Tim Windsor
Application Development Advisor II
Please use plain text.
orz
Contributor
orz
Posts: 10
Registered: ‎02-21-2013
My Device: Playbook

Re: Porting from BB10 to BB 7.0

Hi,

 

Thanks for the tips!  I was planning to use bbUI.js for webworks, and at the moment, I'm actually planning to just keep using both cascades for bb10 and webworks for bb7 as well (as opposed to using webworks for both bb10 and 7).

 

I don't have too many UI elements in my app, so I don't think it'll be an issue maintaining both versions.  Also, I want to add NFC support for my apps later and I think for BB10, there's no NFC api for webworks, only cascades.

 

Hmm... I'm still a bit confused about the signing keys, but I think I should just ask again in the BB World forum when the time comes.  I guess I'm going to have to bundle the webworks and cascades versions separately anyway.

 

Thanks!

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Porting from BB10 to BB 7.0

Depending on what NFC functionality you need - you might be able to go ahead already. What aspects of NFC are you using?

 

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.
orz
Contributor
orz
Posts: 10
Registered: ‎02-21-2013
My Device: Playbook

Re: Porting from BB10 to BB 7.0

At the very least, I'd like to invoke my app and perform specific task(s) within the app depending on the payload stored inside a tag.  (Although right now, I haven't decided what the actual payload is going to look like yet.)

 

Ideally, though, I'd also like my app to be able to write to an NFC tag directly, so other users can save/store app settings or commands by themselves using their own tags.

 

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Porting from BB10 to BB 7.0

For tag reading and tag writing (via invoke), you can use this code; NDEF tag library

 

That library will let you parse or construct NDEF tags, with byte access to the payload or record structure.

 

The sharing/writing uses invoke - so you do jump out of your app for writing.

 

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.
orz
Contributor
orz
Posts: 10
Registered: ‎02-21-2013
My Device: Playbook

Re: Porting from BB10 to BB 7.0

Oooh thanks!!!!  Didn't realize there was an NDEF tag reader/writer library for webworks already.

 

By the way, when constructing NDEF tags, we'll still need to have a pre-formatted NDEF tag, though, right?  Or will that library be able to write over an NFC tag regardless of the old formatting, assuming of course the tag type is supported by the device.

Please use plain text.
BlackBerry Development Advisor (Retired)
robbieDubya
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Porting from BB10 to BB 7.0

[ Edited ]

Yeah - the tag needs to be supported, and (for the types where it matters) it needs to be pre-formatted. eg: DESFire...

 

But once your tag is formatted to appear as an NDEF tag - it'll happily read and write to and from it...

 

 

 

 

--
Rob is no longer associated with BlackBerry.
Please use plain text.
orz
Contributor
orz
Posts: 10
Registered: ‎02-21-2013
My Device: Playbook

Re: Porting from BB10 to BB 7.0

Yeah, I thought as much.  Anyway, thanks again!!!

Please use plain text.