Worklight Demo Setup – MySQL JDBC driver

Hi…

when installing your IBM Worklight developer machine to use the adapter for SQL databases, you may find it difficult to get the MySQL driver running. At least, I did. The official way is to store the MySQL Connector/J in the lib directory of your server (see here for details).

I was just doing a setup for demo machines that have – as a special trap – to work on the T-Systems managed machines we have here at Telekom. So, if you have the idea that you will setup (and delete) projects rather frequently and do not want to feedle around with the MySQL files, you can do the following:

(1) Find the appropriate MySQL COnnector/J file, best to download it from Oracle. Use the platform independent version as a ZIP file. Open the ZIP and find the jar file in there.

(2) Copy the jar file to a known place, e.g. into the WorklightServerConfig directory in the Eclipse Workspace where Worklight resides.

(3) Under WorklightServerConfigserversworklight you can find the server.xml config file. Within the <library id=”apps-common”>, add the following line:

Make sure the connector version and the path fits.

Now, you don’t need to copy the driver in the lib anymore and build, deploy, and hope it finds it on the first time 😉

CU

0xff

 

Accessing mySQL from within Worklight

Hi…

If you want to access a mySQL database from within Worklight, you can add an SQL adapter. Here is a step by step guide:

(1)    Add a database connector by right clicking on your project and selecting New-Worklight Adapter.

Wizzard

(2)    In the requester choose Project Name. Adapter Type is SQL Adapter. Give it a name. If you choose to Create procedures, it will do Javascript stubs in your project.

(3)    You can find the mySQL adapters here http://dev.mysql.com/downloads/connector/ You want to get the J Connector. Download the platform independent version and store it in the server/lib directory. NOTE: You need to restart the server / Eclipse Worklight Studio for the server to recognize the file.

(4)    In the directory adapters in your project you should find your new adapter. Within it carries its configuration.

SuccessWithin the JS files, you find the stubs provided by the wizzard. You need to change the stubs (SQL and JavaScript) according to your needs. Looks like this:

If you right-click on your adapter, you can choose Run as – Invoke Worklight Procedure and test your stuff.

CU

0xff

From the desk of the CTO: Writing history with MEAP

Hi…

You might have seen it: We launched Yesterday our hosted offering of IBM’s Worklight product. This is a major step for us. I want to give you two reasons…

Number 1: This is a worldwide unique offer. We worked hard with the IBM account team to build such an offer. For IBM, this is a major step as it is a brand new model. You pay as you grow here!! As I learned from many partner discussions I had in the past days, all are interested in Worklight but shy away from the pricing. I think we have a cure here! With our offer you can get your feet wet and make a a step by step entry into the MEAP world. I am convinced that Worklight will soon become a major pillar of your mobile strategy and then you might decide to take it home into your own infrastructure. Fine, it is all prepared to do so. On the other side, I hope that you also see the long term benefit of our solution and keep it hosted from our side. Whatever you decide, you are free to choose. And this is what counts.

Number 2: The role of MEAPs. I thoroughly believe that MEAPs have the same role to play in the mobile world, than ESB played in SOA*. MEAPs have a great future (see here) and for us, it was enormously important to have such an effort within our ranks.

I want to thank and express my utmost respect to the two teams here. You did a great job!!!

CU

0xff

*) MEAP = Mobile Enterprise Application Platform / ESB = Enterprise Service Bus / SOA = Service Oriented Architecture

Conference call with Telekom Tropo and node.js …

Hi..

 

we recently had a support request on Telekom Tropo conferencing and node.js . Our colleague Daniel Roth (you can find his pretty black website here 🙂 ) solved it. He did not use the Tropo package but did it rather from scratch. Well, customer’s wish is our command…

The exact same thing if you are using Telekom Tropo scripting:

The world famous 3 lines of code…

Thanks to Daniel… you: Have fun!!!

CU

0xff

 

From the Desk of the CTO: Native vs Hybrid – See it like MS Access…

Hi…

there is lots of discussion and discussion regarding native apps are a must (since Facebook did switch from hybrid to native) or native are just fine… First, let’s sortout one thing: What is hybrid to start with?

It all boils down to two extremes and the middle layer. On the one side of the box ring is pure web, some call it web app. As matter of fact, it is a web site that uses javascript frameworks to optimize for mobile consumption. Those websites when designed neatly can supply a variety of different mobile device formats and OSes. But obviously they suffer from the typical drawbacks of all web sites. Things like limited local storage, limited to no access of hardware capabilities, performance, you name it. The upside is: It uses HTML5 and Javascript which should be common to all developers nowadays.

On the other side of the boy ring – the other extreme – is the native app. This is what we saw in the beginning as an app. It runs on the device, need to be installed and maintained (aka updated), is specific for the OS or even the device format, but can use all of the wealth of the modern hardware, run in the background and might survive even with no network connections (which depends on the use case of the app). Those apps come with a cost: They are OS specific and sometimes it is hard to find the right guys developing this.

Then there is the idea to mix both and combine the strengths of both worlds. Welcome to hybrid. Some seperate the pure hybrid from a mixed hybrid (when you combine platform specific code with hybrid on top) but this is not really of importance for us here. Critics say that hybrid do not inherit the strengths but more the weaknesses. Performance problems unknown to native, limited abilities due to limitations in the frameworks (because in the end the framework supports somehow only the least common dilimiter), complexity unknown to web, the need for maintainance unknown to web.

My point here is, I simply compare it to Microsoft Access. Some of you from the older ages remember Microsoft Access as admins greatest enemy. When Access came around the corner, it was not seen as an appropriate database (hey, it ran on the client!!). So, it started by being an ok solution to store the recipients of the christmas cards of a division. But it was good enough for A LOT of tasks. It provided a simple data entry and storing mechanism, a quite decent query engine, and – most important – an easy way to print out the stuff. And, bam, nobody imagined how many processes cried for a RDBMS solution. Sure, people started to fiddle around with it, stretching the limits and sometimes overdoing it tremendously. But hey, slowly but steadly it became business critical. In a way, Access and Excel were version 0.1 of the Consumerization of IT because for the first time the users took the initiative. And – as we see it today – IT was not able to cope with it.

I see hybrid in the same position as Access that days. There are so many obviously simple tasks that would tremendiously benefit from being “mobilized”. Most of the times, simple stuff like browsing a table of data and triggering some actions. With the ability to use greater amounts of local storage, doing this in a secure container, being able to work offline for some time etc. Performance is not the real critical factor here. Neither is the 120% UI. Don’t get me wrong: Software needs to serve its users and I am by no means preaching to forget about user experience. But good user experience does not need 3D animated, wobbeling buttons. At least not everywhere.

So, stop this senseless, emotional discussion. Believe me, the world will be a better place, if we could use what we learned with Access (which was a great deal how not to do it) and do more mobile apps.

Just my 2 cents.

CU

0xff

 

Global SMS – Sending SMSes in node.js

Hi…

here is a short intro into how to send a SMS by using Global SMS service of Developer Garden. I already gave a short intro to our OAuth service. You might want to have a look there to find how to resolve the credentials. Also, if you want to extend or play around, have a look at the documentation.

Update: Please be aware that there are different plans available (aka BASIC and Premium). They offer different services, as you can see in the table below.

 

 

As you can see, not all features are available in the BASIC model.

I made basically two files for node.js. The first one takes care on the OAuth part. You can find the source here (please see also update below):

All it does is to provide a functionality to acquire a client access token from the OAuth server. I am using callbacks here since we have to wait for the server to answer.
The rest is pretty straight forward.

What this file does is, first of all to get the OAuth handler described in the source above assigned. We are calling then and using the OAuth client token to build a valid header. We then build the JSON body which is shaped in an interesting fashion but at least GSMA conform (adhere global standards whenever you can). All in all, I think the code is quite self-explanatory.

The answer is something like this:

Some remarks:

  • If you have no validated sender number, use 0191011. You do not need to use the tel: prefix then.
  • In the documentation the environment is called basic. This is a bug, you need to give budget instead (we are currently fixing that).

 Update:

On some Windows implementations, the options of the request need some additional parameters (as marked below):

The first one is to switch off the global HTTPS agent, the second is to accept any SSL certificate which by the way is requested by the last new line.

We made the experience that node.js uses different default protocols. Therefore, by explicitly asking for SSLv3 you make sure it uses the right one. This was necessary on our Windows Vista based test system.

Have fun.

CU

0xff

 

OAuth beim Developer Garden

Hi…

wenn man die Developer Garden APIs nutzen möchte, muss sich per OAuth anmelden. Wie das mit node.js funktioniert, will ich im Folgenden kurz zeigen.

Zunächst braucht man drei Credentials: Die Client ID, Scope und Secret. Die finden sich im Developer Garden->My Account->Application Managent. Dort legt man eine neue Applikation an und wählt DG APIs. Im nächsten Dialog gebe ich dem Kind einen Namen und wähle welche APIs im Rahmen dieser Applikation verwendet werden können. Hier finde ich die drei Credentials:

ManageApplications

Die Credentials in die entsprechenden Lücken hier kopieren und los gehts…

Viel Spaß…

CU

0xff

Installing IBM Worklight 6 the easy way…

Hi…

I had to install IBM Worklight recently and as usual with all Eclipse stuff, it is amazing to puzzle all the different combinations of Eclipse versions, plug-in versions, and their inability to work with each other in exact that setup, you just made.

So, here is my hint of the day:

In the end, I installed Android Developer Tools  v22.0.1 as the bundle comes (do not install into c:programs path because you would need admin rights to run it later). Then go to Help -> Install new software in Eclipse. Add this server:

http://public.dhe.ibm.com/ibmdl/export/pub/software/mobile-solutions/worklight/wdeupdate/

Check what is has for you and go…

Happy Worklighting…

CU

0xff

From the desk of the CTO: Working with Partners

Hi…

I just saw a blog post by our friends of bluevia where they argued that building a brand new thing from the scratch is the best way to go. Well, I have a somewhat different opinion. Let me explain how this comes.

Our product concept is a mixed one: We build own stuff internally and provide it via APIs – such as the Global SMS API. But we also partner with companies large and small to build joined products. Examples are our IVR system or App Monitor.

We established a process for this. It starts by looking into the marketplace and thinking on extensions to our current product line that make sense. For App Monitor, we discovered the problem of an extremely diversified Android marketplace and the hassle developers have to ensure quality. Another observation was that quality already is of some importance but will become of major importance in the near future. Next step was to look around and find a suitable technology to help us and we found an Israel based company that worked in this fields for some years. Exactly for this we have a tech scout. The solution was not exactly what we needed but it was a good starting point. Therefore, we added what we as Deutsche Telekom have: New business model, some missing features, hosting and operations, data privacy, access to a large test pool of devices, and what not. We have specialists here, we have access to partners, we have architects knowing what carrier grade software means. After some months of work, we were able to launch App Monitor and are now working jointly to increase quality, add features, and sell it.

The same comes true for our IVR system. We searched for a partner and found it. But I can point out lots of things we added or changed in conjunction with the partner. We are now about to add some features… well, by adding another partner technology.

The point behind this is twofold: On the one hand, we want to be agile and innovative. Doing this all ourselves would be nice but is simply naïve to expect. There are groups within Deutsche Telekom that have the idea of looking 7+ years into the future – namely T-Labs. Our goal is differently in providing useful products within months.

On the other side, it is not that we are a supply chain in buying products and reselling them. We add goodness by means of what we can do as a large, multi-national corporation. This comes in many forms and shapes. Technically, we know what it means to operate large infrastructures in a reliable manner. We know what security means. We are providing an onboarding platform which enable partners to easily integrate into our current offers. And we can span all kinds of platforms. From an operations perspective, we do customer identity management, invoicing, and support. From a go to market perspective, we do marketing and sales. And last but not least, we have product managers who keep an eye on the market and help to shape and drive the product.

So, if you are using one of our products, you get it all: Innovation, solid technology and operations, and a reliable partner. I think this is a good offer to go for.

CU

0xff

Send SMS via Telekom Tropo

Hi…

 

da ich gerade gefragt wurde zum Thema Send SMS mit Telekom Tropo:

1. Man braucht keine überprüfte Absender-Nummer und man kann aus dem Sandbox-Mode SMS verschicken.

2. Hier ist ein Node.JS Script, das zeigt wie es geht. Es verwendet Express (installieren per npm install express) und Tropo WebAPI (installieren per npm install tropo-webapi). Ich habe in einer seperaten JS-Datei meine Telefonnummern und das App-Secret.

CU

0xff