Can someone check/revise my understanding of Blackberry development options? - blackberry

I'd like my Blackberry devices to get and possibly set data to the server, and am a little confused by all the options:
RIM-Push/Pap-Push. Use any library that is able to compose a HTTP GET request to the MDS-CS service (not MDS-IS). This is a one way operation from the server to the device.
RIM-Push (Push a URL and or shorcut to a device for possible offline viewing)
PAP-Push (Same as above, BUT allows for message confirmation of delivery)
WebServices: Use Visual Studio 2008 to create a Web Services only project. I'm unclear if this is supported anymore, or if MDS-IS is used. This is a 2 way operation.
MDS-IS: Use Eclipse to develop the applications and Java is required, I am unsure of what client libraries are able to do (2 way operation).
Let me know if missing any option, or if I need to revise my understanding of the basics

This is actually quite a broad question - there are a lot of ways for a BlackBerry device to interact with a server, and the ideal way depends heavily on your specific application.
Generally:
MDS Studio: the Visual Studio 2008 method is no longer actively supported. It was a mostly visual forms designer, but not a great solution for a lot of reasons. Basically, don't use it.
Mobile Web: Depending on what you need to do, this might work. Everything server side. The thing to be aware of (and why this doesn't work for a lot of problems) is that prior to BlackBerry 6 the browser wasn't very capable, either in terms of HTML support or JavaScript support. You can, however, create shortcuts to mobile web sites which appear as icons on the BlackBerry homescreen. And you can use BlackBerry Web Signals: http://na.blackberry.com/eng/developers/browserdev/websignals.jsp to push changes to mobile web pages to devices
Widgets: Supported in BlackBerry OS 5 and higher. http://na.blackberry.com/eng/developers/browserdev/widgetsdk.jsp These are packaged much like 'native' BlackBerry apps, but written using HTML and JavaScript. Can be a good option for rapid development if you're ok with just targeting OS 5, and with the limitations of the BlackBerry Browser. Lots of JavaScript hooks to system functions, so they give you more functionality than pure mobile web, and you can distribute them through App World and the like.
Java Apps: Most development work, but you get potentially the best user experience, and the most functionality. Too broad a topic to cover adequately here, but there are a lot of questions related to these on SO and elsewhere. A good starting point is the BlackBerry developer zone: http://www.blackberry.com/developers RIM Push and PAP Push both fall into this category, as they interact with Java apps, though there are other methods that you can use to achieve similar results (client polling, or I've even seen SMS or email used to push info or wake up a client, though this isn't recommended by RIM).
For a deeper overview of the options I'd recommend a book by my friend John Wargo, called BlackBerry Development Fundamentals. He covers the various options pretty well.

Related

hybrid mobile app development features

I am developing one mobile app, the requirement is as follows.
1.The app should work offline and online.
2.It should have database in both local device and in the server.
3.When internet is on data has to be synced between local and server.
4.At any point of time local data and server data should be the same.
I have done lot of research on this but not able to find whether hybrid app development supports or not. Some one says we can do but other link says it's difficult and might not be possible.
Please help to me sort out this issue.Thanks in advance
for sure it is possible to have those features in an hybrid app. All depend what you choose to use to deal with that or how you choose to program it.
Remember than an hybrid app have almost all features that a web application could have as it could use almost all technologies, tricks, frameworks and libraries out there.
I have already developed an hybrid mobile app using cordova, jquery and jquery mobile that meet points 1 to 3. Though I am not saying you need to use jquery, or any of the other tools. I described the solutions I use for that app, however they are maybe not the best but it was the most practical and easiest solutions given the time frame and budget.
Was achieved by mirroring the server "data base" the first time the app is installed with WiFi access. When no internet is available the the app use the local data, when it is available then it take the data from the server and update the local data.
The local database was not a formal one, just JSON data files, very similar to the ones provided by the web service.
You can be checking for an active internet connection with the cordova network functions, once detected try to reach the server to check if the actual connection is working, on success then proceed to request mirroring the data. Just be sure to check if the local data is newer to the server one and instead of overriding you should first update the changes in the server.
I think this point is a bit difficult given the fact that you want to work offline. When you are offline you couldnĀ“t do too much to reflect the server data into the app, as you are offline. Then having an exact mirror at any time is not feasible. However having a mirror when you have connection then that is another story.
Having a perfect data sync should be done carefully and instead of programming you own solution try to use a service or tools for that, like http://www.couchbase.com/mobile.
Hope it helps.
Hybrid applications are, at core, websites packaged into a native wrapper. They look and feel like a native app. Hybrid app have main features are portability (one code base, multiple platforms), Access to various hardware/software capabilties, cheaper orginigation costs, faster speed to market.

Native Windows Phone app vs Jquery Mobile + PhoneGap?

I am new to mobile programming, and I want to build a mobile app to fill few forms, offline, and then sync them later, when internet access is available, with a database on an online server through a VPN connection.
At first, I thought about learning Windows8 Phone App development, but then I heard/read about Phonegap and Jquery Mobile! and I am a bit confused which one would be better to use, considering two things:
1- Which one you think would be good for my app's functionality
2- Which tool would be more beneficial on the long run (in the mobile programming world).
Any advice would be very much appreciated.
With these functionality I don't thing you don't need many mobile dependent features rather you need more web features. For your first question, answer could be that technology in which you are more comfortable. But it also depends how you want to sync your data. In background or when the app is open. If you want to sync data in background that means app is closed, you have some data to send in server, and internet access is there, then you'll need some native windows phone code. In that case if you use phonegap ultimately you will need some native code to deal with it, may be you'll need to write a plugin to communicate between phonegap and native code. And if you don't need background process, if you want to send data to server only when your app is opened,phonegap can work like a charm. It'll be easy to communicate between 2 web technology.
For your second question, ofcourse phonegap is great technology to learn to deal with cross platform. If you need to make apps not only for WP rather for all platforms then phonegap is great. Having said that it's necessary to mention phonegap has it's quirks too. Native code always has it's benefit. Phonegap can't completely overcome native code. But if you are willing to compromise a bit, then it's easy to learn phonegap,a familiar tech than all those platform dependent techs like objective-c, android etc.
(N.B. I'm not an expert, it's just my experience so far)

Can I distribute my BlackBerry 10 WebWorks app via web server (OTA)?

I have a multi-platform mobile app that I am releasing on iOS, Android, Windows Phone 8, and Blackberry 10 (WebWorks). For the other three non-BB platforms, I have a way to distribute the enterprise app via a web server (user installs by clicking a link on a web page inside of a mobile browser). However, for BB10 Webworks, I can't seem to find a documented way to distribute a .bar file in this same manner.
Options:
1) I have seen docs that discuss placing Java-based apps (.jad and .cod files) on a web server for OTA distro, but can't find any documentation on being able to do the same with BB10 .bar files.
2) Blackberry App World - but this is public, which is not what I want for this enterprise app
3) Blackberry App World for Work and BlackBerry Enterprise Service 10 - both of these seem to be overkill for my modest purpose. I only have a single app and simply need a download link, not full app/device management, app catalogs, etc.
Is it possible to do #1 with .bars? Or is there another option I have not considered?
Thanks
I was not aware that sandboxed users could see apps other users couldn't, as mentioned in the one of the answer - something for me to try!
The only other option I am aware of is to "side load" the bar file, you can side load with various tools which you can find if you search, such as:
http://forums.crackberry.com/blackberry-10-os-f269/how-get-bb10-hardware-id-sideload-app-bar-file-into-blackberry-10-a-780773/
http://forums.crackberry.com/android-app-sideloading-f279/how-sideload-apps-bb10-device-easy-way-windows-825656/
I haven't tried out these tools, sorry.
I actually do it using the tools you get with the Android Command line toolset - available from BB web site here:
http://developer.blackberry.com/android/tools/
but this approach are not 'user friendly'. I use it because I have converted a few Android apps to run on BB10 and so got to know the tools.
I can't say that these tools are safe, since I don't actually know them, but what I can say is that I am not aware of any way that a PC based tool sending something over the internet (or USB) to your BB10 could break it, nor am I aware of any way that a side loaded app could break your BB10. The days of bricking your BB devise with a dubious bit of software do seem (thankfully) to be over.
Edit: Just thought I would update this given the options that Nate has found, which I also didn't know about!
Both the sites Nate has found seem to work in the same way as the tools I mentioned above. My understanding of all these tools is that they run a deploy utility, that connects to the BB10 device via a TCP/IP connection (which could be routed over WiFi or USB), and sends the bar file over this connection. The connection is initiated by the deploy utility, which is why it has to be in the same network.
There is likely some BBRY proprietary protocol involved, which includes an exchange of the password, as the password supplied to the deploy utility must match the development password on the device.
Now I strongly suspect that BBRY have not published the specification for this communication. I also strongly suspect that the password is never seen in the clear, so you could not use some tool like Wireshark to reverse engineer this. My suspicions therefore is that the tools, including the two I have pointed you at, all run something like the Android Command line tool under the covers - and they got this from BBRY. So perhaps you can build something like the web sites yourself - assuming you have the time and inclination of course.
Just a thought and just my opinion.
There is probably a better way, but I don't know about it. Anyway: you can deploy an app to the BB World, but not put it up for sale, then add users accounts to your sandbox. They, and only them, will be able to download your application, which will not be shown on the BB World to anyone else.
This isn't natively supported on BlackBerry 10, but it looks like there are a few hacks that people have already figured out to make this work.
Depending on your needs, these may or may not work for you (see especially the security caveats on the FAQ pages).
https://sideswype.me/
https://barinstall.com
These appear to take advantage of a VPN security hole. BlackBerry has previously patched this hole, but according to the BarInstall site, the owner just added support for 10.2, to work around the patch.
Both of these services do charge a modest fee, but it may be easier for you than maintaining a BES server.
Peter Strange's answer is quite comprehensive for the time it was written. I will just add that with the release of BB 10.2 you have the option to distribute your application OTA as an APK. Since you are using HTML5 for development I suspect there will be little performance difference between running the APK and running the BAR. But that is something you can check out if you have, or know someone with a BB10 device. Performance should improve with the release of 10.3.

Is Blackberry WebWorks a good development choice?

This is kind of a dumb question but I've aware of classic style JDE development for Blackberry but I've never tried using WebWorks. BB website says that it's possible to build applications for both smartphones (OS 6.0+) and tablets - sounds fantastic, but what's the price?
Is here anyone using WebWorks on a daily basis and capable of describing pros and cons?
Thanks in advance
I would suggest using it if you build webOS applications before hand. It make porting to the blackberry a breeze.
Use WebWorks if you know html5, Css3 and javascript over Java and C++.
I haven't ran into any issues with the webWorks, ported two applications without running into any issues. Its your standard html5, css3 and javascript you love with blackberry APIs
WebWorks is a good development choice, particularly as it allows easy migration from earlier BB OSes to BB10. It's mostly standard web technologies (HTML5, CSS3, etc.) and the team seems focused on making it perform well (e.g. hardware accelerated WebGL graphics) while at the same time providing BlackBerry-specific APIs to make WebWork apps capable and with good UX (e.g. you can make it look like a native app).
For native apps, you should look into Cascades. This is a modern development environment with good tooling, accelerated graphics, and APIs for building snazzy apps. It's the one that will most be a "BlackBerry app".
AIR remains an option, but I would recommend WebWorks over AIR, as even Adobe is migrating from Flash to web technologies. Likewise, you can develop Android apps on BB10, but unless you are keen on Java programming, you will get more cross-platform support from WebWorks (or even AIR) so there's no particular reason to go the Android route.
WebWorks API is limited, for example it does not have socket, so you cannot port a VNC (UltaVNC, tightVNC ..) to it but you can do it with JDE.
For UI, WebWorks allowed me to write UI of acceptable quality quickly and easily, a thing that I have never succeeded with JDE.
Still on the UI side, I can make use of multi-touch (PlayBook), I don't think this one is possible with JDE.
So depending on your needs you should go either WebWorks or Native, having heard that Java may not be supported in BB10, and Air may not be future proof (Adobe favors HTML5 instead of Flash). Android appli has some lag on start up when it is run on PlayBook, some customers are sensitive to the initial even just one time slow response time.
I'm a huge proponent of Webworks. Ever since I've started using it, it quickly became the default option for my apps going forward. Especially for someone like me who is just writing a few apps on the side, I don't have the time to do it in c++.
The apps I'm writing revolve around home automation. They are client/server based from the get go.
Here's why I like it:
First and foremost, native API support. I can very easily create my own active frames, import invocation from other apps (think camera, stuff like that). I can export portions of my webworks app as an invocation card! Which means I can write say 3 unique apps (in this case home automation, lights, thermostat, security cameras). And I can very easily pull features from each app into the other. Maybe I want to turn my lights on in the living room, I can also import the camera card from my IPcam app and view the results, without having to add that code into my lights app and maintain two separate code lines.
Rapid design. Since I've been dabbling in html since I was a kid, it's now very easy for me to whip up an appealing UI in little time. Because web engines these days offer good performance in terms of graphics capability, I also can make apps that behave very fluid.
Considering the time to make something beautiful, it's hard for me to leave webworks and go for something in c++. Also the big plus is often these apps I'm making are intended for multiple devices, namely an app on my phone and being hosted on my personal website. By maintaining two slightly different css files, most of the time I need no code changes, just load a different css depending on if it's a phone or a pc. (Exactly what you'd do if you were developing a regular old website).
For that matter, I actually don't put my code on the device, I host all of my html and javascript, images etc on my server. The webworks app is just the config.xml pointing it's source to my server, and an icon. A glorified website bookmark on the homescreen, only difference is I can use native API and there's no browser bar in the app.
Also, this way I can still continue to edit the same single codeline on my server, and instantly apply changes to the in-browser app and the on-device app.
This is especially cool if you're designing an app where all of it's data is out in the "cloud", say you work for a publication and you want to write a magazine app which pulls content from your servers on the net.

Anyone ever tried to develop in C or C++ for Blackberry platforms?

Every indication I have, based on my experience in embedded computing is that doing something like this would require expensive equipment to get access to the platform (ICE debuggers, JTAG probes, I2C programmers, etc, etc), but I've always wondered if some ambitious hacker out there has found a way to load native code on a Blackberry device. Anyone?
Edit: I'm aware of the published SDK and it's attendant restrictions. I'm curious if anyone has attempted to get around them, and if so, how far they got.
I've seen this question pop up in a number of different forums over time. The original Blackberries were programmable in C++ but I think that RIM ran up against the problems of trying to implement a secure platform in the C/C++ compile to native paradigm.
The devices do have JTAG ports, but unless one could get hands on the RIM code as a place to start the problem is enormous.
I also have to wonder how useful a Blackberry with a replacement FOSS operating system would be, since it would not likely have the protocols to connect to BES or BIS, send PIN's etc. If one was simply looking for a the power of the hand held computing platform I suspect there are many more likely candidates available.
No, C++ is no longer a supported RIM development tool, as they phased it out a number of years ago. Client applications can be developed in Java (or one of a few 5GL frameworks), and web + sever-side apps can be developed using standard tools.
For those looking for updated information, the new Playbook os, also known as QNX, also known as Blackberry 10 (or it will be when the phones running it come out) is in fact c/c++ based, also using QML and a C++ add on called Cascades.
Unfortunately the official SDK website only seems to mention Java. According to wikipedia, different versions of the BlackBerry use different processors. Combined with the fact that RIM uses a proprietary operating system for the devices, it becomes pretty difficult to develop native code without official tools. There is also a partial API-level security restriction which would further prohibit advanced tinkering.
Just randomly searching for an answer to this and came across http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Native-C-C-SDK/td-p/778009 which mentions that BB intend to release a C/C++ SDK soon, more details will be provided at the 2011 Game Developer Conference.

Resources