Wednesday, September 16, 2015

Aspects of User Interface Framework Design




I like to compare frameworks with multi sided cubes...
Each side of the cube exposes a key aspect of the framework morphology.
The collection of all aspects is often called a Meta Model.
What are the various aspects that come to mind when thinking about User Interface Framework Design?
In this post, you will see the ones that I find important...
You can use it as a check list or reflection board when you plan on writing your own framework.
Feel free to comment on this post if you have remarks or like to share some thoughts of your own.

I. Data Model


Data Representation
  • What Objects does your framework use to represent Data (PODOs, Value Objects, ...)?

Meta Data
  • What is the Meta Data model of your Data Object (field definition, field data types, field default values, ...)?

Data Access
  • How can your framework read / insert / update / delete data and invoke remote view actions (database queries, web services, ...)?

Data Validation
  • Does your framework support Data Validation (definition and enforcement of Validation rules: not null, min / max length, email address, telephone number, ...)?

Data Transformation
  • Does your framework support Data Transformation (definition and enforcement of Transformation rules: lowercase / uppercase / numeric only, ...)?

Calculated Fields
  • Does your framework support Calculated Fields?

Cursors & Pagination
  • How does your framework implement navigation and pagination through small and big data sets?

II. User Interface


Data Binding
  • How does your framework bind Data Objects to UI Components (does it have support for distributing change to multiple observers)?

UI Components
  • How does your framework present Data Object values for editing / visualisation (text fields, combo boxes, checkboxes, date pickers, tables, trees, charts, ...)?

UI Component Configuration
  • Does your framework support configuring UI Components (enabled / disabled / visible / invisible, value format, colours, font...)?

UI Containers
  • Does your framework support creation of UI Component compositions (panels, tabbed pane, split pane, ...)?

UI Screens
  • Does your framework support creation of functional / logical pages of UI Components and Containers?

III. Behaviour


Social Behaviour
  • How does your framework allow UI Components to interact with each other (auto change values / colours / fonts, enabling / disabling / hiding / showing of a UI Component in reaction to a change of a neighbour UI Component)?

Scenarios
  • How does your framework enable UI Component Containers, Screens and Data Access to interact with each other?

View Actions
  • Does your framework allow the User to invoke certain view actions on the server (buttons, popup menus, ...)?

Exception Handling
  • How does your framework handle Exceptions?

IV. Applications


Standard Functionality
  • What standard functionality does your framework support (refresh, insert, update, delete, save, print data, import data, export data, undo, redo, cut, copy, paste, delete, ...)?

Application Security
  • How does your framework implement authentication, authorisation & auditing?

Navigation
  • How does your framework support navigation between Screens (menu of screens, search screen, ...)?

Global State
  • Does your framework support Global Application State (application context)?

External Applications
  • Does your framework (use or) support interaction with other external applications?

V. User Preferences


Look & Feel
  • Does your framework support multiple (configurable) look and feels?

Customisations
  • Does your application support screen customisation per user (dynamically assemble screen UI Components, define a list of favourite screens, show User recent visits, remember sorting and ordering of table columns, user specific default values for search criteria, ...)?

Internationalisation
  • Does your framework have multi language support?

VI. Development


Application Configuration
  • How to implement or configure applications in your framework (define screens, data model, data access, behaviour, ...)?

Custom Implementations
  • Is there support for overriding certain parts of the framework to implement custom behaviour (modular architecture, anchor points, overriding functionality, ...)?

Software Factory
  • How to do Rapid Application Development?


Mind Map




Links


https://en.wikipedia.org/wiki/Metamodeling
https://en.wikipedia.org/wiki/Model-driven_software_development
http://www.w3.org/TR/mbui-intro/


Tuesday, May 26, 2015

Android: One Configuration To Build Them All

In the past, finding an Android build configuration that works on Android Studio, IntelliJ as well as command line has proven to be extremely difficult. On each new SDK-, IDE- or Gradle version, things seemed to be broken again. It wasn't a stable working environment at all, and I'm glad that Google decided to work on that (source: http://tools.android.com/tech-docs/new-build-system/version-compatibility).

Now, I'm using a build configuration that seems to work on all platforms, and I'd like to explain to you what I've done to make it work (and hopefully help you save a lot of time).


1. Install the Android SDK


First, I've downloaded android-sdk_r24.0.2-macosx.zip (Android SDK 24.0.2) from the Android website, and unzipped it (I've used directory /Users/Stefan/android-sdk).  I'm building on Mac, but you can also find the Windows and Linux releases on the website.

After unzipping, you create an environment variable called ANDROID_HOME, that points to the directory of the SDK that you've just unzipped:
export ANDROID_HOME="/Users/Stefan/android-sdk"
(on Mac or Linux, just add it to your ~/.profile file so that it will automatically be set each time you open your terminal)

Next, start the Android SDK manager, using:
$ANDROID_HOME/tools/android
Here, you have to install the following packages (this will take some time):

  • Android SDK Tools v24.0.2
  • Android 5.0.1 (API 21)
  • Android SDK Build-tools v21.1.2

Your SDK is now ready.


2. Install the IDE


Install the IDE of your choosing (Android Studio or IntelliJ).

For testing, I've downloaded both:
  • android-studio-ide-135.1740770-mac.dmg (Android Studio 1.1.0 build 135.1740770)
  • ideaIC-14.0.3.dmg (IntelliJ 14.0.3)


3. Create a new project (Hello World)


Now we're ready to create a new project.

Execute in your terminal:

$ANDROID_HOME/tools/android create project  
-t "Google Inc.:Google APIs:21" 
-p testproject  
-a TestActivity  
-k be.ad.testproject 
-g  
-v 1.1.0

This will create a directory called testproject, in which a Hello World application is generated (under package name be.ad.testproject).  The application will just have one activity, called TestActivity.  It will use Google APIs version 21 and Gradle build tools version 1.1.0.

Next, open testproject/gradle/wrapper/gradle-wrapper.properties and
  • change the Gradle version to gradle-2.2.1-all.zip.

Open testproject/build.gradle and
  • remove runProguard false line
  • replace the Android plugin with "com.android.application"


4. Test the build configuration


Ready to test it?

Execute in your terminal (in the testproject directory):

./gradlew clean assembleDebug

It should compile without any problems.

Next, try to open the build.gradle file using IntelliJ and/or Android Studio (be sure to select Use Default Gradle Wrapper when opening the project.  And when asked, choose to use the Project SDK instead of the IDE SDK).

It should open and build on both IDEs, without ANY problems.

And if you deploy the application on your device or emulator, you will see a nice Hello World application...

I prefer creating my projects command line, not by IDE.  When creating a project using the IDE, a lot of additional files will be generated that you might not need in your project.


5. Links