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
New Contributor
Posts: 7
Registered: ‎08-16-2012
My Device: Curve 9330
My Carrier: Verizon

What languages can Webworks support?

Hello,
I am as inexperienced as it gets when it comes to programming so forgive me if I come off like an **bleep**. I learned html back in the late 90's on a WebTV (remember those?) so in a way I was delighted when I noticed BB10 doesn't support Java and thus I'm not inclined to learn it, but will lean heavily on html5. So, I've been hitting books and websites trying to catch up on over 10 years of development in html. This all started when a great idea (I think) for an app came to me. It could be very helpful to a certain type of ppl who work in a certain industry (sorry if I'm ambiguous, I don't want my idea stolen Smiley Happy ). I have grand ambitions for this app if I can get it off the ground first. I would eventually like it to utilize the BB-native calendar and gps among other things.

Ok, are you still with me? Lemme get to the point. I want to know what languages will work in the boundaries of Webworks. Ok, there's HTML5 and I'm sure Javascript and CSS, but what about PHP and CGI? I just want to know which ones I should study on to realize the vision in my head. For example, I plan on having forms where the user can enter his/her customer's information (name, phone # as well as details in the service contract they have together) and it be saved within the app in a database that the user can access at anytime in the app. Kinda like facebook, the app loads, you sign in with your user name and password, and can then go through ur list of friends that are saved to your profile and click on them to view their information.
Another feature I want to incorporate, is a database of materials and such that are related to the job in this particular industry. That I can do, but to make it more user-friendly, to have a capability where the user can search the database and refine their search to only include items that meet the specified criteria.
Forgive me for such a long-winded, massive post. I just have a million ideas in my head and not a lotta time to spend learning how to implement them (wife, kids and all that jazz) so I want to make sure I'm not wasting it on a coding language that isn't supported. Whoever made it this far, thanks and please help!! Smiley Happy
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: What languages can Webworks support?

I want to point out some things possible or not to help a little bit on you questions.

 

For the client-side storage of information you can use different solutions directly on the device within your app to store informations:

  • HTML5 Local Storage - stored informations are persistent (size limited as far as I know) across browser session/app startups
  • HTML5 Database - store informations in an SQL like manner - stored informations are persistent (not size limited as far as I know) across browser session/app startups
  • HTML5 Session Storage - stored informations aren't persistent (size limited as far as I know) across browser session/app startups

For your question about PHP/CGI: both are server-side techniques that could be used when connecting to them using XMLHTTPRequest between WebWorks app and a server, but they do not run directly on the device.

 

For your question about BB-native things like accessing the calendar or the GPS you should investigate through the HTML5 WebWorks API documentation. Until now, not all the APIs are implemented in BB10, but in the future you should be able to access calendar (hopefully!). GPS API (HTML5 geolocation) is working but since BB10 is heavily in Beta it seems also to be in Beta at this time, IMHO.

 

If you are familiar with C/C++ you can also follow the BB10 WebWorks Extensions thread here in the forum where I pointed to the example extension to be able to access native features of the device using WebWorks.

 

Hopefully the informations above are a starting point for you.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: What languages can Webworks support?

Great post!  Welcome to the forums.

 

 I want to know what languages will work in the boundaries of Webworks.

 

You can build a webworks application that packages all of its resources inside of the compiled application that is installed on the device.  For this type of application, you can use client Web technologies like HTML, CSS and JavaScript because they are running directly from the device.  Along those lines, there are many (hundreds/thousands?) of great JavaScript/CSS libraries & frameworks that other developers have since written and published.  Many of these can be used in a WebWorks app. Examples: jQuery Mobile, Sencha Touch, backbone.js, bbUI.js, etc.

 

However you can also continue to use server-side web technologies like PHP, ASP.  This content will have to remain on your remote server, but you can access it from a webworks application.  You simply whitelist the domain name you wish to access and then you can load that URL just as you would from a browser.

 

Finally - you can use a combination of both! For example, have a local index.html page in your WebWorks app that uses a local style.css file to provide CSS definitions, and then call some AJAX from your HTML page to download a remote data feed and display that content in the app. 

 

>>Whoever made it this far, thanks and please help!! 

 

You will find the BlackBerry development community is an awesome place to be.  There are many great developers who want to help.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 7
Registered: ‎08-16-2012
My Device: Curve 9330
My Carrier: Verizon

Re: What languages can Webworks support?

Thanks LBP and astanley! That answers another question I had as well, the client/server side. There's nothing that turns me off of an app as bad as it having to load everytime I select something as if I'm on a website, and especially the ones that are just a glorified "launch" for a website. To me, that's the whole beauty of apps, is how seamless and efficient a well-designed one can run. With that said, I want to keep everything on the client-side where possible. So, to do that, I need to stick to strictly html/css/java as far as design and content goes? I understand with a form it needs cgi to process the user submission so I can deal with that. My idea is going to comprise a couple specific parts that combine into a "all-in-one" kit for professionals in the field of work I'm focusing on. For example, one part of it is going to be a huge database that catalogs... umm.. I'm trying to be as non-specific as possible while getting my point across. Let's say, you worked in a pharmancy and had an app that detailed every medicine and pill, their side-effects, uses and every relevant piece of information you would need to carry out your job. Like that, but not in the field of medicine, something else, but if you want info on a certain pill, you bring up a A-Z list that can be narrowed down into certain categories, and select the one you need info on and it all loads instantaneously. If someone wanted to search the database by keywords and categories found in the database they can do that as well. Like they could narrow it down to pills made by tylenol, for arthritis and available over the counter and it would show only ones fitting that criteria. So when I'm talking about forms that's what I'm really getting at.
Also, astanley, about the libraries, thanks for the suggestions! I've seen jQuery throwed around in posts but haven't really researched examples of it and the bbUI is nice but I'm not really looking to emulate a native look. I want something bright and bold that's more befitting the subject matter I'm working on. Thanks for both of you, this community is really well ahead of the norm! I haven't seen a condescending remark anywhere I've looked on the site and that's rare in this day and age
Highlighted
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: What languages can Webworks support?

Hi.

 

IMHO, depending on the amount of data together with the searchability you want to provide on the client-side I would start using HTML5 Database. You can use statements in SQL-like manner to search database and this will be much easier and faster, in terms of search through the data I think, than using persistent HTML5 Local Storage. I worked in a client project we needed to use HTML5 Local Storage with uge amount of data and searchability isn't quite good and also will result in long times for those searches.

 

I think with the HTML5 database you can do much more in less time when using SQL-like search terms supported by it. On the other hand you could also use transactions in HTML5 database what makes error handling a lot easier when working with your persistent data.

 

For a starting point, next to the WebWorks API documentation, have a closer look to this HTML5Rocks tutorial.


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.