javascript Tag

I've been programming JavaScript for a few years now, and the one thing that definitely bothered me from the beginning was the lack of built-in support for private object members. The feeling that anyone using your code (including yourself) could by accident or intent mess with the internals of your objects isn't great. Not just can anyone change the value of any property at...

Read More

Part 3: Cross-Widget Scripting The most glaring limitation of ClientScripting since it's inception was that a listener can only manipulate the widget that fired the current event. Consider, for example, an onscreen number keypad like this: The obvious (non-ClientScripting) implementation would be to attach selection listeners to the buttons that insert the given character into the text field. In RAP this would normally cause a slight delay...

Read More

Part 2: How to Pass Data to Your ClientListener A ClientListener is executed in a completely different environment to a traditional SWT listener. The only data it has access to is the event object, which in turn has a reference to the ClientScripting-version of the widget that fired the event. Until now, the almost only way to pass any data to a ClientListener was to hard-code...

Read More

Part 1: RAP 2.1 and Client Scripting The RAP ClientScripting add-on was introduced with RAP 1.5/Juno to enable more responsive input validation on text widgets. The basic idea is that while most components of a RAP application can run exclusively on the server, some surface-level behavior is best implemented to run on the client. ClientScripting allows this by adding support for SWT-style event listeners written in...

Read More

Since RAP 2.0 has fully implemented the JSON-based RAP Protocol I was eager to test it's full potential myself. The Tabris clients for Android and iOS already exist and others may follow, but as I'm mostly at home in the browser that's where I would like to use it. The Vision My idea was to create a highly modular and especially flexible client that supports only a...

Read More

One of the bigger changes in the RAP 2.0 API is the introduction of client services. These are features that interact with the client, but aren't directly related to the widget toolkit. Since there are now multiple types of clients that can be connected (mainly our default WebClient, Tabris for iOS and Tabris for Android), as well as different environments (browser, OS version, hardware), not...

Read More

Along with the release of Windows 8 also came the new Internet Explorer 10. (It has not yet been released for Windows 7.) While IE9 was an impressive (but overdue) technical improvement over IE8, IE10 is - naturally - a much smaller step forward. Significant for RAP are especially the improvements in CSS3 support, and the new touchscreen controls when running IE in its "modern...

Read More

Whatever your project's specific policy on whitespaces is (tabs vs. spaces, etc), the most important rule should always be consistency. Not just to make your code look nice, but also to avoid issues with patches and your version control system. Changes to whitespaces may be more or less invisible to the naked eye, but Git and co. register them anyway. Here are some simple ways to...

Read More

Want to be a developer, but your English is really, really bad? Are you learning some other language and want to practice while doing your job? Or do you just want drive your colleagues insane with code that only you can read - because you happen to know Hindi? If you are a Javascript developer, this internationalization tool fixes all these problems. Instead of writing...

Read More