Proposals for ConFoo.ca 2017

I’ve added 3 proposals for the ConFoo in Canada:

  • Build Hybrid-Apps with NativeScript
  • Build Apps for the AppleTV with Webpack
  • Responsive Testing with the Galen Framework

I would appreciate if you vote for my proposals:

ConFoo | March 8-10, 2017 | Montreal, Canada

Posted in IT, Talks | Tagged , , , , , | Leave a comment

Cordova and PhoneGap Encryption

Any developer who uses Cordova is aware of this: The source code of a Cordova/Phonegap App can be read in clear text. Just download the app archive (IPA or APK) and unzip it. Now everyone can read your source code. You can tweak or make it harder to read with uglify or minify but still it’s readable.

So there’s some neeed for companies and developers to encrypt your JavaScript code in an hybrid App, too. tkyaji published a plugin on GitHub, which makes this possible: the Cordova Encrypt – a Plugin Cordova und PhoneGap encryption.

The plugin works for iOS and Android. Just add it to your project with  cordova plugin add cordova-plugin-crypt-file. Now a cordova build encrypts all .html.htm.js.css files. Therefore keys are generated in the native containers so that the files aren’t readable anymore. The decrypions is done automatically on app start.

Posted in IT | Tagged , | Leave a comment

Test-Driven Development of Responsive Layouts with Galen

It’s a pain for testers and developers. Running an application with different browsers. Resize the browser window and verify that the web page is working on different screen size. Due to “Responsive Design” there are high efforts on this kind of stuff.

Sure it’s possible to calculate the delta between images to ensure that the layout does not differ between the last checks. But especially when you build up a new application or start a new design this approach doesn’t really work out. Here comes the Galen Framework to the rescue: Describe like in TDD you’re requirements in a DSL and let the framework verify it for you. The Galen DSL uses relations between elements to describe your checks. For test execution the Selenium automation stack is used. So you can even utilize Saucelabs. And the  Galen Framework can be used in Java– und JavaScript projects. Additionally Galen delivers impressive reports for analyzing the failures:

Galen Report

Galen Report

Posted in IT | Tagged , , , | Leave a comment

Hybrid web applications with Cordova and AngularJS

The problem is everywhere for a typical multi-tier architecture. The UI calculation is done at server-side and the browser just displays the data. That was the typical architecture for several years. Every interaction with the user needs the server backend. Especially with lower bandwidth this is a big issue and the server needs to know the client state, which cases additional memory and processing capacity. And on top the user interface feels sluggish. Increasing the server capacity doesn’t really help in the most cases…

With AngularJS there is currently a very solid web framework availably which helps the describe the user interface with HTML/CSS and implement – even for bigger applications – the business logic in JavaScript. In such applications the client itself needs only to remember the state  and the backend can leverage RESTful web service, like JAX-RS within a JEE-area.

By using the approach you get a solid fundament to delivery real business applications for mobile devices. These hybrid applications can run with the same implementation on several platforms and also leverage some platform features, like push notification or background network fetch.

Such a sample application which uses a RESTful backend and WebSockets was made by me for demonstration purposes. You can download it on GitHub. The sample shows that HTML5-based hybrid apps with a native container like Apache Cordova can delivery high quality apps that feel like native apps in most cases.

Posted in IT | Tagged , , , , | Leave a comment

Xtext and Maven

DSL’s are the new buzzword together with Cloud, not only since Groovy or similiar tools. With Xtext you get a really easy to use tool for creating an Eclipse-based editor and code generator. Xtext is a powerfull toolset, which eases the creation of your own DSL. To find out more about Xtext please check my presentation or take a look at the example for building Xtext projects with Maven and Tycho on GitHub.

General Setup

  1. Create new Xtext project see Github-Commit
  2. Create  Folder structure to get relative links working. Therefore the references to the test-projects needs to be adopted to get the build done.
  3. Initial build is done in Eclipse to get the first time generated classes created.
  4. Create projects maven-parent, repository and target. Also change the compile target for Eclipse to target/classes.
  5. Now a first build can be done
  6. Therefore make the target platform module available in the lokal m2 repository via mvn install: Change to the targetplattform project (org.xtext.example.targetplatform) and run mvn install:

    org.xtext.example.targetplatform mare$ mvn install

  7. The something like this should show up:

    [INFO] BUILD SUCCESS

  8. Now change to  the repository project (releng/org.xtext.example.repository) and run  mvn install to get the repository installed.
    This should be lead to the following message:

    [INFO] Computing target platform for MavenProject: org.xtext.example:org.xtext.example.repository:0.5.0-SNAPSHOT @ /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.repository/pom.xml

  9. After that several downloads will start. This can take up to 10 minutes.
  10. Now the desired plugin can be built with maven. Change therefore to the parent project (releng/org.xtext.example.parent) and enter the following command:
    mbpromare:org.xtext.example.parent mare$ mvn install
  11. Now the Xtext build with Tacho is working:
  12. mbpromare:org.xtext.example.maven.mydsl1 mare$ mvn compile
    [INFO] Scanning for projects... 
    [INFO] Computing target platform for MavenProject: org.xtext.example.maven:org.xtext.example.maven.mydsl1:0.5.0-SNAPSHOT @ /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/pom.xml 
    [INFO] Resolving dependencies of MavenProject: org.xtext.example.maven:org.xtext.example.maven.mydsl1:0.5.0-SNAPSHOT @ /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/pom.xml 
    [INFO] Resolving class path of MavenProject: org.xtext.example.maven:org.xtext.example.maven.mydsl1:0.5.0-SNAPSHOT @ /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/pom.xml 
    [INFO] 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Building org.xtext.example.maven.mydsl1 0.5.0-SNAPSHOT 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] 
    [INFO] --- tycho-packaging-plugin:0.15.0:build-qualifier (default-build-qualifier) @ org.xtext.example.maven.mydsl1 ---
    [INFO] 
    [INFO] --- tycho-packaging-plugin:0.15.0:validate-id (default-validate-id) @ org.xtext.example.maven.mydsl1 --- 
    [INFO] 
    [INFO] --- tycho-packaging-plugin:0.15.0:validate-version (default-validate-version) @ org.xtext.example.maven.mydsl1 --- 
    [INFO] 
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ org.xtext.example.maven.mydsl1 --- 
    [debug] execute contextualize 
    [INFO] Using 'ISO-8859-1' encoding to copy filtered resources. 
    [INFO] skip non existing resourceDirectory /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/src/main/resources 
    [INFO] 
    [INFO] --- tycho-compiler-plugin:0.15.0:compile (default-compile) @ org.xtext.example.maven.mydsl1 ---
    [INFO] Nothing to compile - all classes are up to date 
    [WARNING] Source directory /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/src-gen does not exist 
    [WARNING] Source directory /Users/mare/Documents/Programmierung/git/github/xText/Xtext-MavenExample/plugins/org.xtext.example.maven.mydsl1/xtend-gen does not exist 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] BUILD SUCCESS 
    [INFO] ------------------------------------------------------------------------ 
    [INFO] Total time: 48.161s 
    [INFO] Finished at: Tue Oct 02 17:01:34 CEST 2012 
    [INFO] Final Memory: 51M/104M 
    [INFO] ------------------------------------------------------------------------
  13. For completion the update site, product configuration and feature project should be created. Optional a SDK project can be created. Change to releng/org.xtext.example.parent and run mvn install.The result should look like this:
    [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ org.xtext.example.product ---
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/org.xtext.example.product-0.5.0-SNAPSHOT.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/pom.xml to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT.pom
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-win32.win32.x86.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-win32.win32.x86.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-win32.win32.x86_64.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-win32.win32.x86_64.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-macosx.cocoa.x86_64.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-macosx.cocoa.x86_64.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-macosx.cocoa.x86.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-macosx.cocoa.x86.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-linux.gtk.x86.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-linux.gtk.x86.zip
    [INFO] Installing /Users/mare/Documents/Programmierung/git/github/xText/Xtext-Maven-BuildExample/releng/org.xtext.example.product/target/products/org.xtext.example.product-linux.gtk.x86_64.zip to /Users/mare/.m2/repository/org/xtext/example/org.xtext.example.product/0.5.0-SNAPSHOT/org.xtext.example.product-0.5.0-SNAPSHOT-linux.gtk.x86_64.zip
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] org.xtext.example.targetplatform .................. SUCCESS [0.677s]
    [INFO] org.xtext.example.parent .......................... SUCCESS [0.155s]
    [INFO] org.xtext.example.maven.mydsl1 .................... SUCCESS [30.381s]
    [INFO] org.xtext.example.maven.mydsl1.ui ................. SUCCESS [1.910s]
    [INFO] org.xtext.example.maven.mydsl1.tests .............. SUCCESS [3.774s]
    [INFO] org.xtext.example.maven.mydsl2 .................... SUCCESS [18.021s]
    [INFO] org.xtext.example.maven.mydsl2.ui ................. SUCCESS [1.636s]
    [INFO] org.xtext.example.maven.mydsl2.tests .............. SUCCESS [2.695s]
    [INFO] org.xtext.example.feature ......................... SUCCESS [0.310s]
    [INFO] org.xtext.example.updatesite ...................... SUCCESS [5.264s]
    [INFO] org.xtext.example.product ......................... SUCCESS [1:17.585s]
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2:43.112s
    [INFO] Finished at: Fri Oct 19 13:35:45 CEST 2012
    [INFO] Final Memory: 42M/104M
    [INFO] ------------------------------------------------------------------------

You find more about Tycho here:

CI-Integration

Here is a sample Jenkins configuration. Really import is the private maven repository:

Xtext maven jenkins.png

Example in CloudBees

Errors

Versions-Fehler
mbpromare:org.xtext.example.maven.mydsl1 mare$ mvn compile [INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.336s
[INFO] Finished at: Thu Oct 18 16:43:23 CEST 2012
[INFO] Final Memory: 16M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:0.15.0:validate-version (default-validate-version) on project org.xtext.example.maven.mydsl1: Unqualified OSGi version 1.0.0.qualifier must match unqualified Maven version 0.5.0-SNAPSHOT for SNAPSHOT builds -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.xtext.example.maven.mydsl1

The above error comes up if the version number within Maven and Eclipse differ.  0.5.0.qualifier in manifest means 0.5.0.SNAPSHOT to Maven. They need to be adopted, either in the pom.xml or MANIFEST.MF

Posted in IT | Tagged , , , , | Leave a comment

Chrome 24 – Recent closed tabs are gone

After the latest Update of Google Chrome the recent closed tabs are gone and the new homepage  is used. I don’t like the new one and found I trick restore the old homepage again. So I’ll share it here. I’ve taken the steps from the Chrome product forum (http://productforums.google.com/forum/#!topic/chrome/6oFu2gXMGzk):

  1. Open a new tab with the address chrome://flags
  2. Go to the Enable Instant Extended API option
  3. Change the value to disable and it should then looks like this:

    chrome_disable_instant_API

  4. Then restart and the old homepage is gain there 😉

 

Posted in IT | Tagged , | Leave a comment

New version of RoundCube App for OwnCloud

I’ve created a new Version of  my Roundcube App for OwnCloud, which adds a Autologin feature to the app.

Screenshot of Roundcube App for OwnCloud

Screenshot of Roundcube App for OwnCloud

So if you’re using the same user in owncloud and roundcube, you don’t need to save your credentials in roundcube. They will be automatically saved to the app.

The error handling is now much better and helps the user with configuration errors

The code is now more cleaner and the log doesn’t show PHP errors anymore, instead the error handling should help to figure out what’s the problem.

The following issues were fixed:

  • fixed security issues
  • fixing login and logout issues
  • better error handling
  • problems with RoundCube 0.7, 0.8 and 0,8
  • fixed layout issues
  • more meaningfull log debug

This should be the last version before the next major release 1.2 If anyone wants to have a new feature added for 1.2, feel free to to open up an issue, here. For release 1.2 I will add multiple account support.

Posted in IT | Tagged , , | Leave a comment

Mac with SSD freezes after some time

If you experience the problem that your mac freeze after one or two hours of usage, you shouldn’t blame Apple, if you’re using a SSD: I’ve found this entry. The error came up from a firmware error in the Crucial SSD. So I went to the Crucial homepage, burned the ISO-File onto a CD and boot from it (on mac you need to press the ‘alt’-key to get the boot menu).

And voila, after a reboot all was working again…

Posted in IT | Tagged , | Leave a comment

New version of my Roundcube App for OwnCloud available

I’ve recently updated my Roundcube App for OwnCloud, which is now compatible with OwnCloud Version 5:

Screenshot of Roundcube App for OwnCloud

Screenshot of Roundcube App for OwnCloud

The code is now more cleaner and the log doesn’t show PHP errors anymore, instead the error handling should help to figure out what’s the problem.

The following issues were fixed:

  • fixed security issues
  • SSL Proxy issues
  • problems with OC 5
  • fixed layout issues
  • more meaningfull log debug
  • minor code refactoring

This should be the last version before the next major release 1.2 If anyone wants to have a new feature added for 1.2, feel free to to open up an issue, here.

Posted in IT | Tagged , , | 2 Comments

Sign the Software Craftsmanship Manifesto

Good software is important. Everybody should now that…
But how to do that? by sharing the experience and maintain a community. So one very good way is to sign the Software Craftsmanship Manifesto and participate in the community. You can join the germany community share your knowledge and participate in the network

And because christmas will be soon, you can order a nice calendar.

Posted in IT | Tagged , , , | Leave a comment