Database Options for Blackberry - java

Okay, I'm new to blackberry development and I was wondering if anyone could give me a list of database options available for blackberry applications? What do developer's "normally" do when faced with the requirement of utilizing a server for their blackberry applications? Is there any one specific database that is used for a majority of the applications (like Oracle?) out there now for blackberry? I did a Google search, but all I got back was old stuff that I'm sure has improved by now. I'm looking for some tutorial or explanation on how to remote connect to a database. Thanks for any help and advice you can give to a new blackberry developer!

Blackberry OS versions 5 and up include SQLite on the device. All devices have a proprietary storage mechanism called the Persistent Store. (You may have to use it if you need broad device support). There also the old cruddy J2ME 'record store' mechanisms.

I'd direct you to this page. It lists the current storage solutions for the Blackberry, and allows you to choose the best one for you.
Data Storage Overview - BlackBerry
As one previous poster suggested, SQLite is certainly a good option. It will allow you to have the flexability to use the same Database framework for other mobile apps - Android, iOS and Symbian all have the ability to use SQLite.
However, SQLite does come with some drawbacks. Query size, and pre-loading the database into RAM are probably the biggest two (so big queries and databases can be tricky) as well as the fact that your app will not be available to any pre-OS5 phones.
You should refer to this page for more information on that.
SQLite Overview - BlackBerry
Hope this helps,
Stuart

Check out this answer for more database options for devices running an OS version less than 5 (i.e. your friend's 8120).

Related

Play DRM encrypted video stream with "pure" Java

I am investigating whether is it possible (I am sure it is, I mean simple way) to build a Java-based client desktop App to play DRM protected video stream.
DRM: DASH CENC DRM1, PlayReady, Widevine Classic\Modular, FairPlay.
VLCJ supports the input-from-memory feature to implement custom protocols or DRM but it looks like a painful digging into DRM specifications.
There is a Node.js open-source project DOWNstream for Electron which can help with Widevine DRM.
The article describes Java and Electron integration (source) but I guess it is accidental complexity in this case.
Previously I didn't face with video-streaming domain and I wouldn't like to reinvent the wheel so my questions are:
It seems that there are no "pure" Java implementations. Why? Because of format wars? security issues?
Do you happen to know any simple way (DalvikVM supports Widevine out of the box) to create App without involving "browser techs" like JS?
Thank you. I would appreciate hearing your thoughts.
I think looking at how the DRM's are provided on platforms may help you understand the options and let you think about how you want to approach your solution.
The DRM client functionality, i.e. the DRM functionality which resides on a phone or tablet or laptop etc as opposed to the DRM server side functionality, is generally built in by the device or OS vendor when it the device or OS is being produced/manufactured. For some DRM's on some devices it is also possible to add it via a SDK.
Most DRM's are used via 'native' players in mobile devices and tablets and via the browser on PC's, laptops etc so this is the usual default that you can generally rely on to be supported. Smart TV's and games consoles are more varied and can be either via browser or native depending not he device.
Recently, nearly all mobile and tablet browsers have added support for browser based DRM also, but many DRM's on laptops are restricted to the browser, or more specifically the CDM (Content Decryption Module) browser add on which is DRM specific.
There are DRM's which are supported outside the browser on PC's and laptops - for example Windows based devices will generally support PlayReady DRM in a way that can be accessed by applications. Microsoft provide more infomrtaiopn on this here:
https://learn.microsoft.com/en-us/playready/overview/developing-applications
There is a nice diagram which summarises different devices at the above link which I've copied below also as it helps explain:
I am not aware of a similar Widevine or FairPlay support on PC's or laptops although ones may exist or be in development.
So, going back to your problem, the reason that most cross platform applications use Javascript and browser technology for DRM on laptops and PC's is not really a language issue, rather it is because via the browser is the only way to access the DRM functionality on some laptops and PC's.
For Windows you have the option to use the Universal Windows Platform API but this still may not give you want you are looking for and is Windows and PlayReady specific.

designing android app backend

If I need to design an entire android app and host my app on google play, and my users need to get real-time data, how would I go about designing the backend.
I learnt few things about views, view groups, layouts, event listeners in java, programming in latest android studio. But I'm just in the learning phase.
Is there any other better IDE. Can we program in atom, does it has any package that can emulate android phones.
Mainly I'm concerned about the DB choice, frontend-backend communication. Is there any service which is open source for hosting in the cloud that has a great uptime and supporting easy scaling. Of course, I can google each and everything, but those will be on different perspectives. I just wanted some answer which is tailor made and easy to understand.
This question could definitely result in a myriad of answers and approaches. But, in terms of something straightforward to maintain (considering you have Go tagged in the question) I would recommend checking out the following:
For using Go, I have found Echo to be a pretty awesome framework to bootstrap Go web services. It offers a very flexible and performant router that uses a middleware design pattern, as well as a lot of other nice features.
For hosting and maintaining your web services, you should look into using Heroku. They have a pretty amazing platform that officially supports Go deployments. You can start for free, and then scale up your services pretty effortlessly. They also offer myriad of third party integrations for monitoring, logging, emails, sms, and databases.
In terms of databases, that one can't be answered really without a significant amount of knowledge around what you are doing with your data - but using Heroku, you can spin up a PostGres SQL instance, MongoDB, and Redis for free. For what you are doing it sounds like a combination of the above might be useful for your needs.
In terms of Android development - I have not found anything better than Android Studio. It's free, provides all the emulators you could ever need, and in general all the features you would want out of an IDE to do Android right, plus it is maintained by Google.
Good luck!

Connecting to a Cache (InterSystems) Database using Java

I'm currently creating an android application and need to connect to a InterSystems cache (ODBC) database, this is the first time I have developed for android and have never connected to a database in java in the past, any help will be appreciated.
For Android development, I would highly recommend to use web services or Rest instead of ODBC. But there is a standard JDBC Java documentation (not sure if it will work in Android at all though):
http://docs.intersystems.com/cache20131/csp/docbook/DocBook.UI.Page.cls?KEY=ITECHREF_jdbc
You can also have a look at newer Zen Mobile framework designed specially for iOS/Android Cache development, ask for a copy in WRC
Do you really think it's a good idea to connect to the DB right from the user app? Accessing directly from user app to the DB is usually bad for you. I don't say "don't do it". Caché allows you to grant privileges to individual tables in SMP. (But you can't let the user to only access some records of a table.)
I know InterSystems Ensemble can communicate using SOAP, I am not sure about just Caché and REST, you would have to do a research of your own. However, I think it's a better idea than accessing the DB directly from the client. You could also cause problems with database's integrity by doing so.

experience with Vaadin touchkit

I´m soon to start a new mobile app project and I dont have that much experience with either iOS or Android development but I have used Vaadin for presentation tier on different occasions.
The app will most likely be lightweight for the mobile client but more heavy for backend servers(jboss). I feel kinda lost so i´m asking you.
Question: What are the drawbacks of using Vaadin touchkit compared to other frameworks/ build from scratch? Where might a problem occur? Any input and recommendations are welcome!
I am currently developing a small application using Vaadin TouchKit that once it enters production will have some hundreds of users. I haven't been able to locate any publicly available apps in production that have been implemented using Vaadin Touchkit, so what I'm going to list here is based solely on my personal experience with the technology.
Drawbacks compared to native applications:
I'm assuming this is what you refer by "building from scratch".
As this is web techonology, your application performance will always correlate heavily with the quality of the users Internet connection. If you have to render large UI's with a lot of components and details, it will be slower than doing so in a native application. A lot slower if the users connection is poor. Or if a connection is unavailable, then your application pretty much becomes unavailable. There is a way to use HTML5-cache for providing an offline-mode in a Vaadin Touchkit app, but it is not very useful for storing large datasets as the cache has a lot more limitations than for example an Android SQLite database. For simple UI-stuff it might be viable, but storing data for offline-access is in my opinion pretty much out of the question.
Other than the above mentioned points, I have not run into any missing capability, as you can use any Java library at any time on the server-side, and your application will be running safely in a servlet container.
Upsides compared to native applications:
You didn't spesifically ask for the upsides, but I guess this is any input and recommendations.
Your Vaadin Touchkit app can run on basically any mid-high tier mobile device launched after 2010, basically excluding only the ones with Windows Phone OS, since Internet Explorer does not use WebKit for rendering and other browsers are not available as far as I know. And since this is a web application, it does not exclude any other desktop browsers than Internet Explorer. By creating one application, you support roughly 80-95% of your users.
As mentioned, any Java library, any internal API, any authentication method supported by your hosting environment is available to your app, which is not as easy to implement for native mobile applications. This can be overcome with great software engineering, but demands a significantly higher amount of developer resources, not to mention that you are still stuck doing it for each platform separately.
And of course maintenance of a servlet app compared to the maintenance of a native application is considerably more simple: deploy once, all users get the changes without doing anything. No app store, no versioning, no hassle.
Vaadin TouchKit compared to other web development:
I am not familiar, at all, with web application development without using Vaadin, so I am not going to tell you whether or not it is the way to go compared to other modern web application technologies and frameworks. All I'll say is that in my experience Vaadin makes creating UI's and backend functionality relevantly easy and more graspable if you are familiar with Java development and desktop application development in general.
To conclude, don't rush in to create your mission critical application using Vaadin TouchKit before at least prototyping with it, and getting to know the performance and limitations it presents. For certain type of applications, it might be one of the best solutions. For a certain, larger group than the other, it is probably one of the worst. It is not a very mature or generally adopted framework, but it is useful. I'll be happy to hear more about the type of app you're planning and help you figure out if there are any showstoppers for using Vaadin TouchKit.
P.S. You've probably already run into this, but this document opens up the guts of one of the TouchKit demo apps:
http://demo.vaadin.com/vornitologist/VAADIN/tutorial/touchkit-tutorial.html
I just tried out vaadin touchkit examples on my android phones, well now I got affirmation why I prefer native software over html in some cases. Try it out - dont be confused by nice-looking styles, just try to USE it, this is what apps are made for. In my case I cannot withstand non responsive GUI or not smoothly scrolling lists. Again, for a simple gallery - a JavaScript/HTML solution is just perfect :) So the right way is the hybrid way! (imho)
Vaadin Touchkit offers very good user experience and provides wide range of UI components to apps.
Its default iOS theme provide almost iOS like UI and it also offers many other themes too.
But this will not run as smooth as platform specific mobile apps. as ultimately it will not completely leverage the real power of mobile platform features as finally it is going to run in a mobile web browser. as compared to native mobile apps
Find more detail on vaadin touchkit and comparison with similar technogies like ZK Mobile and native platform specific apps. : http://jtechnoprojects.blogspot.in/2012/12/vaadin-touchkit-vs-zk-mobile-vs.html

Using Blackberry to access an Oracle Database?

I really hope would know how to do this cause I'm a total newbie to Blackberry development.
Basically, I was asked to write a brief report on how a blackberry would access a DB server like Oracle, and I don't know how a blackberry works well enough to figure this out. I tried searches for blackberry DB on Google and I always end up with blackberry viewer plus app for $39.99.. which is really annoying.
If anyone has done this or now how to point me to any good articles or tutorials or some code that explains how this would work that'd be awesome!!
In case you need access to an application which backend runs on Oracle, the best thing you can do is access your database through an Application Server (Java, PHP, .NET).
This way, you communicate with your Database through a common application level protocol like HTTP, SOAP/HTTP, or whatever you can use natively on your Blackberry device. You don't need to provide your device with direct communication with the Oracle database which not only is easier but more secure.
Since you code your Blackberry apps in Java, you can be positive that you will have plenty support to do HTTP request and process its responses in your application.
Your Application will communicate with Oracle with its native protocol probably through a driver (JDBC, ADO.NET, PHP's oci wrapper) depending on the technology you pick.
Everything Pablo said and some links ->
blackberry.com/eng/developers - Start to understand Blackberry Development
J2EE on Blackberry - Beginning J2ee on Blackberry
http://wbw-adc.oracle.com/technology/pub/articles/bors-adfmobile.html - Really good overview By Oracle on them and Blackberry.

Categories