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
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

BBUI with Backbone js and jquery

Hi,

 

I have an application designed using the backbone and jquery.

Now, i want to include BBUI in it? Is it possible to integrate BBUI with Backbone.

 

Regards,

 

Annuk

Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: BBUI with Backbone js and jquery

Hi,

 

Has anybody integrated BBUI.js with Backbone.js?

 

Regards,

Annuk

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BBUI with Backbone js and jquery

One of our team members here has created a sample. He's been very busy so he hasn't been able to get it into open source yet. I'll check with him on the timeline.

Tim Windsor
Open Source Technical Lead
Highlighted
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: BBUI with Backbone js and jquery

What features of backbone.js do you want to use with bbUI.js?  are you looking to use views and models, or also routing?  I expect the objects are fully compatible, but since bbUI.js does not use URL hashs for navigation, routing would not be supported.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Developer
Posts: 82
Registered: ‎09-26-2012
My Device: Torch 9800
My Carrier: NA

Re: BBUI with Backbone js and jquery

Hi,

 

Thanks for your replies Tim and Adam.

Adam i want to use the views, model as well as the routing functionality of Backbone.

Currently i am using:

define(["jquery", "backbone"], function($, Backbone) {

	var HomePageView = Backbone.View.extend({
		id : "homepage",

		initialize : function() {
			console.log('Initializing Homepageview....');
			_.bindAll(this, 'render');
			this.render();
		},

		render : function() {
			//$(this.el).html(this.template);
			console.log('Rendering HOMEPAGE');
			return bb.pushScreen('js/views/template/contextMenu.htm','context','{"id":"11","name":"yahoo"}');
		},
		
	});

	return HomePageView;
})

for routing and the pages are getting successfully rendered. Only problem is of passing the data to the html page.

 

Tim if you could post your sample it would be of great help to us.

 

Regards,

Annuk.