Create first simple angular js 2 project

Good Day !

Create first simple angular js 2 project

1) getting the tools – prerequisites:

a) node.js :- https://nodejs.org/en/download/

1.1. Test the node – open your Command Prompt in windows : node -v   ( node.js is runtime environment and Javascript library)

1.2. Test the npm – Command Prompt : npm -v
1.3. getting the typescript
npm install -g typescript

image1

then after finish program typescript make sure to compile the typescript to convert to javascript. ( Browser cannot read typescript)

1.4. run the compile the typeScript :
npm install -g typings

– if the  results command are error – such example:

npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.

– Solutions : add your company proxy , by run the command script :
run:
>npm config set proxy http://IP.IP.IP.IP:proxy

1.6. Then we need to install Angular-CLI Global  (make sure to go to your directory project): 
> npm install -g angular-cli

angularjs

1.7. Create new project for the first angularjs2:
> ng new RegisterUserApp

angularjs2

Create a Provider Web Service and Web Service Client (JAX-WS) + Apache Tomcat

Create a Provider Web Service and Web Service Client (JAX-WS) + Apache Tomcat

1). Open Eclipse, Create Dynamic Project ( WebServiceWSDL ), choose server tomcat, Next and Finish.

4webServices.jpg

2). Set the package – com.fndong.ws – in the /src. Create java Class – CalculateAdditional.java

package com.fndong.ws;

public class CalculateAdditional {
    public double addtheValues(double firstnumber, double secondnumber ) {
       double plus = firstnumber + secondnumber;
       return plus;

    }
 
}

3). Right Click on file CalculateAdditional.java -> Web Services -> Create Web Service

6webServices.jpg

  • First configuration : select start service
  • Second Configuration : select Test Client
  • Tick the Checkbox true (Publish the Web Service & Monitor the web Service)

Click Finish.

4). Then it will created the sub project folder for web service client testing “WebServicesWSDLClient“.

calculate.jpg

5). Run on Tomcat – for run web service client test .

webserviceclienttest.jpg

SELAMAT MENCUBA!

Create Simple Java Adapter for MobileFirst Foundation 8.0 IBM – Eclipse

Create Simple Java Adapter for MobileFirst Foundation 8.0 IBM – Eclipse

1.) Open Eclipse ( I used Eclipse Mars) , Create New Maven Project in Eclipse.

mavenproj_adapter.jpg

2.) Add the Archetype (using – adapter-maven-archetype-java) :

mavenproj_adapter2.jpg

3.) Add the Group Artifact.

Group id : (is your domain) com.fndong.mfp

Artifact id:(Your Project name) AdapterMfp

mavenproj_adapter3.jpg

  • Click Finnish button.

mavenproj_adapter4.jpg

  • It will generate the structure of java project with pom.xml

4.) Building an adapter. – Using cmd windows with mfp -mobilefirst CLI.

  • Go to Root project , type this command : mfpdev adapter build

mavenproj_adapter5.jpg

5.) Run the MobileFirst Foundation Server 8.0, so you can deploy the adapter to console.

  • Run Mobilefirst CLI command : mfpdev adapter deploy -x

mavenproj_adapter6.jpg

6.) Check the mobilefirst console :

console_adapter.jpg

7.) Testing the AdapterMfp application, Click Adapter application and click tab Resources > Click button View Swagger Docs.

7.1.) test the Restful GET

test_get_rest.jpg

 

Adding the IBM MobilFirst SDK to Android Application – Hello World

Good Day! & Happy New Year 2017 Gregorian Calendar

1.) Create New Project in Android Studio. Select File > New Project.

2.) Enter new Project, add the name for the project with the name of the package, example:

New Project name : MyApp

company domain : com.fndong.myApp

3.) Then After created, adding the SDK into android MyApp Application.

3.1) Add the sdk plugin mobilefirst android in build.gradle (Module:App).

apply plugin: 'com.android.application'
repositories{
    jcenter()
}
android {
    compileSdkVersion 23
    buildToolsVersion "25.0.2"

    packagingOptions {
        pickFirst 'META-INF/ASL2.0'
        pickFirst 'META-INF/LICENSE'
        pickFirst 'META-INF/NOTICE'
    }

    defaultConfig {
        applicationId "myapp.com.fndong.myapp"
        minSdkVersion 22
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.ibm.mobile.foundation:ibmmobilefirstplatformfoundation:8.0.+'
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
}

4.) Add the Permission and the Mobilefist UI activity in the AndroidManifest.xml.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  • add inside tag <application…>
<activity android:name="com.worklight.wlclient.ui.UIActivity" />

5.) Running emulator – just go here android_page

6.) Go to Run – app / (Shift+ F10) – then it will show your first Mobile App with Mobilefist SDK for Android.

android_mobilefist.jpg

7. Add the registration of the application with mobilefirst server – and add the mfpclient.properties

  • using node.js prompt – set this command : mfpdev app register (must run the mobilefirst Foundation server 8.0 – for console first)

Android App – android studio – Create my Hello World!

Good Day!

Android App – android studio – Create my Hello World!

Today – 21/12/2016, after a long time doing web development , its time to learn new thing , here is my experience starting create Hello World Android App using Android studio.

1). Download the Android studio bundle

2) Installed it, and please follow the right prerequisites.

3). Open Android studio, select File > New Project.

  • application name: MyFirstAndroid
  • company domain: com.fndong.myapp

1.jpg

4.) Click Next > In the Target Android Devices screen, i Choose SDK “API 22: Android 5.1(lolipop)” and click Next.

2.jpg

5) create the activity, choose Empty Activity and Next.

6). Then , just leave as default MainActivity (Class Name), Click Finnish

4

7) Run the Application. Run on Emulator.

  • Just selecting Tools > Android > AVD Manager , In the Your Virtual Devices screen, click Create Virtual Device. Then you can choose any hardware you want. I choose Nexus 6.
  • On the Run image, click and select deployment target, then click Ok.

5.jpg

Create the adapter application for MobileFirst Project

Create the adapter application for MobileFirst Project :

1.) For my Testing purpose, I’ll using example Helloworld Adapter from localhost console.

adapter1.jpg

3.) Then get the zip file and unzip it to your project workspace. To build it using Maven command:  mvn install

4) To deploy on Console Mobilefirst just upload using Console mobileFirst. ( Select the adapter from /target , and get file *.adapter)

deployadapter1.jpg

5.) Testing Adapter

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/testing-and-debugging-adapters/

6) using Swagger for testing adapter.

swagger.jpg

swagger2.jpg

 

7) Using Existing Source Code Adapter, To import the source code using Eclipse Mars 2, inside eclipse , right click > import > Maven > Existing Maven Projects > Root directory > Browse your location project.

eclipse_adapter1.jpg

eclipse_adapter2.jpg

 

 

Create Cordova Application Project (Client) using MobileFirst CLI

Create Cordova Project using MobileFirst CLI (IBM Site)

1.) First , open node.js command prompt ( for windows OS), in the workspace Start create Project > (cmd) – cordova create myFirstCordova com.fndong.HelloWorld –template cordova-template-mfp

cordovaCL1.jpg

2.) After Created, add the Android platform, I’ll using android version android@5.1.1. Go to directory project myFirstCordova > run command : cordova platform add android@5.1.1.

cordovaCL2.jpg

3) set the config.xml which will added elements such as mfp, server, locale and Extensions. Command : mfpdev app config

cordovaCL3.jpg

4.) Register Project Cordova to MobileFirst Console Server. command : mfpdev app register.

run the cordova prepare:

cordova prepare

 5) To run the App in IBM Simulator. command : mfpdev app preview.

7) Creating Adapter

The middle class work to earn, the rich work to learn

Below Article its really good to improve my credibility and process of career Development. from lifehack.org

When you are young, work to learn, not to earn.
-Robert Kiyosaki

       The middle class are easily persuaded to change jobs when someone offers more money. The rich understand that working isn’t about the money, especially in the early years. It’s about developing the skills and traits you need to develop to become rich. That may mean working a sales job to better understand the world of selling. Or it could mean you work at a bank to better understand accounting. If you want to be rich, you should be working to learn the skills you need to become rich. Most rich people didn’t get there by earning a high salary.

Best info from lifehacks:

  1. 8 Ways to Train Your Brain to Learn Faster and Remember More – by Maria Brilaki – lifehack.org.

 

 

Create a Cordova mobileFirst Project in Eclipse Mars 2

 Create a Cordova mobileFirst Project in Eclipse Mars 2.

1.) Create new Project Cordova ,  Right Click > New > Hybrid Mobile(Cordova) Application Project > Next > (and add the Project Name: , Name:, ID:)

cordova1.jpg

2.) (Get the mobile Engine – download android sdk 5.1.1) Next > Download .. choose option SDK Android 5.1.1

cordova2.jpg

3.) Add the Cordova Plugin – mfp* , select – cordova-plugin-mfp.

cordova3.jpg

4.) Select to confirm plugins to be downloaded from registry.

cordova4.jpg

5.) Finish.

6.) Deploy and Start your application on MobileFirst Console Foundation 8.0

6.1.) Start the Server MobileFirst Console Foundation 8.0.

  • Here I’m using cygwin (linux in windows) terminal to run MobileFirst.

cordova5.jpg

  • //MobileFirst-8.0.0.0
  • $ sh run.sh

7.) Make sure your console up like below image:

cordova6.jpg

8.)Edit your index.html to change the view of your first page App mobile.

cordova10

  • change the html code ( I just added the blue lines) :
 <body>
        <h1>This your First Application</h1>
        <h2>Welcome to cordova mobileFirst</h2>
        http://cordova.js
        http://js/index.js
    </body>

9.) In Eclipse , Right Click Project > IBM MobileFirst Platform Foundation > Register App.

cordova8.jpg

10.) To run Application to Emulator IBM, Right Click Project > IBM MobileFirst Platform Foundation > Preview App. Automatically will load to the browser – emulator.

cordova9.jpg

Selamat Berjaya….2016 – Donald Trump Won USA Presidency