CRUD operation using jquery mobile on android – Part 3

Hi, I’m coming back. Unfortunately I’m not writing this tutorial for part 3 because I found a lot of flawless using jquery mobile especially to DOM issue. If you still resist want to learn developing a hybrid app for iOS and android from A-Z, you can go to this tutorial.

http://blog.revivalx.com/2014/07/15/simple-hybrid-mobile-app-using-cordova-and-ratchet-2-complete/

sorry..

sorry..

I’m apologise for my mistake..

Swift – Autolayout tutorial

In this tutorial you will learn how to set autolayout in your iOS application.

swift programming language

swift programming language

Overview

Swift is an innovative new programming language for Cocoa and Cocoa Touch. Writing code is interactive and fun, the syntax is concise yet expressive, and apps run lightning-fast. Swift is ready for your next iOS and OS X project — or for addition into your current app — because Swift code works side-by-side with Objective-C.

Reference: https://developer.apple.com/swift/

Auto Layout is a system that lets you lay out your app’s user interface by creating a mathematical description of the relationships between the elements. You define these relationships in terms of constraints either on individual elements, or between sets of elements. Using Auto Layout, you can create a dynamic and versatile interface that responds appropriately to changes in screen size, device orientation, and localization.

Reference: https://developer.apple.com/library/IOs/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html

Getting started

Open your xcode6 and create a new Xcode project.

xcode6

xcode6

Select Single View Application and click Next.

xcode6 - single view application

xcode6 – single view application

Enter your Product Name, Organization Name and Organization Identifier. We using swift language for this tutorial. Leave device and core data default. We didn’t use any core data feature in this tutorial. After fill out click Next. And Create the project.

xcode6

xcode6

After that you will get this page screen.

xcode6

xcode6

At your left sidebar you will see all the files included Main.storyboard. Click Main.storyboard to view your main storyboard.

Main.storyboard

Main.storyboard

We will create a simple form on this view controller. Drag and drop Text Field and Button inside the view controller. You grab it at bottom area right sidebar. Make sure your form will be like this one and don’t forget to put placeholder in textfield (for decoration purpose only, hehe).

view controller

view controller

Make sure you connect your iphone device and registered apple developer account here, https://developer.apple.com/.

If you not sure how to do it, you can refer here, http://codewithchris.com/deploy-your-app-on-an-iphone/.

For this tutorial I set Deployment Target from 8.0 to 7.1 because my iphone not upgraded with iOS 8 yet. You can change Deployment Target under Deployment Info.

deployment target

deployment target

By the way, don’t forget to migrate launch images to an asset catalog, if not your app will show a black screen. Click Use Asset Catalog under App Icons and Launch Images category. A dialog box will popup and click Migrate. After that click Play button at top left side.

Use Asset Catalog

Use Asset Catalog

But If you notice the form not really nice enough. It suppose to be fit inside the canvas. But don’t worry about it, we will fix it later.

iOS app

iOS app

Go back to Main.storyboard. Select or click on textfield. Now we need to add two constraints for each textfields, Trailing Space to Superview and Leading Space to Superview. Press and hold the control button then drag to the edge of the view controller until blue colour appear. Then release it. A popup menu will show up.

Main.storyboard

Main.storyboard

Choose Trailing Space to Container Margin from the popup.

Trailing Space to Container Margin

Trailing Space to Container Margin

 

Then control drag again from inside texfield to left edge of the view controller.

Main.storyboard

Main.storyboard

Choose Leading Space to Container Margin from the popup.

Leading Space to Container Margin

Leading Space to Container Margin

Then repeat all steps for another each textfields. For buttons, you need Add New Alignment Constraints. Tick Horizontal Center in Container and click Add Constraints.

Add New Alignment Constraints

Add New Alignment Constraints

Then click Play button to see final result. Voila!! All your form attributes fit inside the app. Congrats!!

iOS app

iOS app

Change worklight server IP address for iOS and android

In this tutorial you will configure worklight server IP address in your Worklight application. You will learn how to setup custom worklight server IP address for iOS and android app.

IBM Worklight

IBM Worklight

Overview

IBM® Worklight® Foundation helps you extend your business to mobile devices. It is designed to provide an open, comprehensive platform to build, test, run and manage native, hybrid and mobile web apps. IBM Worklight Foundation can help reduce both app development and maintenance costs, improve time-to-market and enhance mobile app governance and security.

Reference: http://www-03.ibm.com/software/products/en/worklight-foundation

Getting started

Android

Open the application until the start-up connection is established (no more loading wheel). Press your menu button (usually the most left button on your android phones). Click on the “Worklight settings”. As shown in the figure below:

worklight  for android

worklight for android

A new window will be shown as figure below, tick the “Server Address” box then click on the “Server URL”.

worklight for android

worklight for android

You may change the server URL as per needed manually without having to recompile the application.

worklight for android

worklight for android

Click OK then restart the application.

iOS

Go to Setting > xxxxxx (app name).

worklight for iOS

worklight for iOS

Then change to your custom server URL.

worklight for iOS

worklight for iOS

Summary

Now that you know how you setup custom worklight server URL. You no need to build the app again in eclipse anymore.

Deploy droplet in Digital Ocean

In this tutorial, you will learn how to deploy droplet in Digital Ocean.

Overview

DigitalOcean is an American virtual private server provider based in New York City. The company leases capacity from existing datacenters, including sites in New York, Amsterdam, San Francisco, London and Singapore.

http://en.wikipedia.org/wiki/DigitalOcean

Let’s get start

Go to Digital Ocean. You will see this home page on their website. To sign up, enter your email address and password then click create account.

digital ocean homepage

digital ocean homepage

If you already have the account, you can go to login page and enter your account details.

digital ocean login page

digital ocean login page

After you login, you will directly go to dashboard page where all your droplets will be located here. Currently I already 4 droplets inside Digital Ocean. Click Create Droplet to deploy a new one.

digital ocean dashboard

digital ocean dashboard

Enter your Droplet Hostname.

digital ocean droplet hostname

digital ocean droplet hostname

Select your droplet size. It depends how much your budget monthly and requirements.

digital ocean select size

digital ocean select size

Select your nearest region. Leave it for available settings.

digital ocean select region

digital ocean select region

In select image > linux distributions, you can select which OS you want. For this tutorial, I select Centos 7. For new registration, my images, my backups and destroyed droplets are empty. But you have choice to select any applications for your droplet.  After done all steps, click Create Droplet to complete.

digital ocean select image

digital ocean select image

Wait until it’s finish processing.

digital ocean processing

digital ocean processing

Voilà !! Your droplet already done deployed !! Now you can use it for your own project. Enjoy!!

digital ocean droplet

digital ocean droplet

Resources for build HTML5 games

Be sure to check out these websites, all of which provide helpful extra information.

HTML5 game

HTML5 game

All about IAPS

bit.ly/io6BYiv

In-app purchases are more efficient if they are optimised to use the psychology of the player to its advantage. The overwhelming success of some of the titles has led to OFT stepping in with a set of regulations that are well worth checking out.

Documentation of crafty.js 

crafty.js.com/api/Crafty.html

Having a deep understanding of your chosen tolls is paramount to being able to use them efficiently. The manual for Crafty.js provides a great overview of the overview of the various functions that are contained in the framework. For most of them, a small example with further data is also provided.

Gamasutra

www.gamasutra.com

GamaSutra is the online version of the Game Developer magazine. The website provides a smorgasbord of interesting, amusing and inspiring content that can be useful for game developers and designers. Some of the stories also take a helpful look at marketing.

Html5 game engine

Html5 game engine

Html5 game engine

html5gameengine.com

The web is full of game engines. The HTML5 Game Engine list contains an overview of all products that are available. You can list the engines by their feature set, or even analyse them by popularity or specifies such as frequency of update.

Reference: web designer, ISSUE 225