Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > Windows Azure > Windows Azure (Mobile Services) and iOS (iPhone , iPad) > ตอนที่ 3 : การสร้าง iOS / iPhone กับ Mobile Services และการเรียกใช้งานแบบง่าย ๆ



Clound SSD Virtual Server

ตอนที่ 3 : การสร้าง iOS / iPhone กับ Mobile Services และการเรียกใช้งานแบบง่าย ๆ

ตอนที่ 3 : การสร้าง iOS / iPhone กับ Mobile Services และการเรียกใช้งานแบบง่าย ๆ บทความนี้เราจะมาเริ่มต้นการสร้าง iOS Mobile Services ทีอยู่บน Windows Azure และทำความเข้าใจกับส่วนประกอบต่าง ๆ ในหน้าจอ Portal Management รวมทั้งการดาวน์โหลด Project ตัวอย่างที่จะสามารถ Download แล้วนำไปทดสอบบน Xcodeได้ในทันที

ใน Project Sample ที่เป็นตัวอย่างของ Android จะเป็นการสร้าง Table ที่ชื่อว่า TodoItem จากนั้นจะมีการส่งข้อมูลจาก Android แล้วนำข้อมูลที่ได้ไปจัดเก็บไว้ใน Table ของ Mobile Services ที่อยู่บน Windows Azure

ตอนที่ 2 : เตรียมความพร้อมของ iOS / iPhone ก่อนที่จะเขียนบน Mobile Services


iOS Create Mobile Services

ในหน้าจอบน Portal Management ของ Windows Azure ให้เลือก Service ของ Mobile Services เราสามารถคลิกที่ Create a new Mobile Service ได้ในทันที

iOS Create Mobile Services

หรือจะคลิกที่ New

iOS Create Mobile Services

เลือก COMPUTE -> MOBILE SERVICE -> CREATE

iOS Create Mobile Services

บริการ Mobile Services จะต้องมีการกำหนด URL ซึ่งจะอยู่ภายใต้ Subdomain ของ azure-mobile.net และเลือก Create a new SQL database instance

iOS Create Mobile Services

กำหนดชื่อ Database รวมทั้งเลือก New SQL database server พร้อมกับกำหนด Username และ Password ในการ Login

iOS Create Mobile Services

จากนั้นเราจะได้ Mobile Services ขึ้นมา 1 รายการ ให้คลิกเข้าไปในหน้าหลัก








iOS Create Mobile Services

ในหน้าหลักให้เราเลือก Platform เป็นของ iOS และเลือก CREATE A NEW IOS APP

iOS Create Mobile Services

ขั้นตอนนี้จะมีอยู่ 3 Step คือ
  • 1. ติดตั้ง Xcode V4.4+ ซึ่งเราได้ติดตั้งจากบทความก่อนหน้านี้แล้ว
  • 2. ให้คลิกที่ Create TodoItem Table เพื่อทำการสร้างตารางสำหรับเก็บข้อมูลที่มีชื่อว่า TodoItem
  • 3. ให้ดาวน์โหลด Sample Project เพื่อนำไปรันทดสอบบนโปรแกรม Xcode ได้ในทันที


iOS Create Mobile Services\

จะได้ไฟล์ zip ซึ่งจะเป็นชื่อของ Mobile Services ที่เราสร้างขึ้น

iOS Create Mobile Services

หลังจากที่ดาวน์โหลดแล้วให้ทำการแตกไฟล์ zip แล้วจัดเก็บไฟล์ทั้งหมดไว้ในโฟเดอร์ที่เข้าถึงง่าย ๆ

iOS Create Mobile Services

สามารถคลิกที่ไฟล์ของ .xcodeproj เพื่อเปิด Project บนโปรแกรม Xcode

iOS Create Mobile Services

เป็นโครงสร้างไฟล์ที่ Sample Project มีมาให้

iOS Create Mobile Services

ทดสอบการรันโดนเลือก iPhone Simulator และเลือก Start Run

iOS Create Mobile Services

แสดงหน้าจอของโปรแกรมบน iPhone Simulator

iOS Create Mobile Services

ทดสอบการเพิ่มข้อมูล

iOS Create Mobile Services

ข้อมูลจะแสดงใน Table View

iOS Create Mobile Services

ลองทดสอบการเพิ่มข้อมูลอื่น ๆ

กลับมาที่หน้าจอ Portal Management ของ Mobile Services ให้คลิกที่เมนู DATA เราจะเห็นว่าตอนนี้ตารางที่ชื่อว่า TodoItem จะมีข้อมูลอยู่ 3 รายการ

iOS Create Mobile Services

คลิกเข้าไปก็จะพบกับข้อมูล 3 รายการ ซึ่งใช้การจัดเก็บเหมือนกับ Table ทั่ว ๆ ไป ที่ประกอบด้วย Rows และ Column

หลายท่านอาจจะสงสัยว่าเราสร้าง Column ไว้ตอนไหน แล้วทำไมถึงมี 3 Column อันนี้ไม่ยากครับ เพราะการสร้างพวก Column ใน Table สามารถสร้างได้จาก Code ที่เขียนบน App สามารถอ่านและศึกษาได้จากหัวข้อถัดไป








บทความถัดไปที่แนะนำให้อ่าน


บทความที่เกี่ยวข้อง


   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2013-06-15 19:49:40 / 2017-03-24 11:43:39
  Download : Download  ตอนที่ 3 : การสร้าง  iOS / iPhone กับ Mobile Services และการเรียกใช้งานแบบง่าย ๆ
 Sponsored Links / Related

 
ตอนที่ 1 : รู้จัก iOS กับ Mobile Services บน Windows Azure คืออะไร
Rating :

 
ตอนที่ 2 : เตรียมความพร้อมของ iOS / iPhone ก่อนที่จะเขียนบน Mobile Services
Rating :

 
ตอนที่ 4 : สร้าง Project iOS / iPhone และการเชื่อมต่อกับ Library ของ Mobile Services
Rating :

 
ตอนที่ 5 : iOS / iPhone สร้างตาราง Table บน Mobile Services และการ Insert ข้อมูล
Rating :

 
ตอนที่ 6 : iOS / iPhone อ่าน Data จาก Table ของ Mobile Service และแสดงผลบน App
Rating :

 
ตอนที่ 7 : อ่านข้อมูล Mobile Services แบบมีเงื่อนไข Where และแสดงผล iOS / iPhone
Rating :

 
ตอนที่ 8 : การทำ Authentication in Azure Mobile Services ด้วย iOS / iPhone
Rating :

 
ตอนที่ 9 : การทำ Push Notifications in Mobile Services ด้วย iOS / iPhone
Rating :

 
ตอนที่ 10 : การทำ Validate และ Modify data in Mobile Services บน iOS / iPhone
Rating :

 
ตอนที่ 11 : การทำ Refine Mobile Services queries with paging บน iOS / iPhone
Rating :

 
ตอนที่ 12 : การเขียน Scripts to authorize users in Mobile Services บน iOS / iPhone
Rating :

 
ตอนที่ 13 : Show Case 1 : Register Form (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 14 : Show Case 2 : Login User Password (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 15 : Show Case 3 : Update Data (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 16 : Show Case 4 : Delete Data (iOS / iPhone and Mobile Services)
Rating :

 
ตอนที่ 17 : บทความอื่น ๆ เกี่ยวกับ iOS / iPhone Mobile Services บน Windows Azure
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 03
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่