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 Store Apps > Windows Store Startup > โครงสร้าง Windows Store และเครื่องมือที่ใช้สำหรับการเขียน Windows Store App



Clound SSD Virtual Server

โครงสร้าง Windows Store และเครื่องมือที่ใช้สำหรับการเขียน Windows Store App

โครงสร้าง Windows Store และเครื่องมือที่ใช้สำหรับการเขียน Windows Store App ตามที่ได้เขียนเกริ่นไว้ก่อนหน้านี้ตั้งแต่ระบบปฏิบัติการ Windows 8 เป็นต้นไป Windows จะแยกโปรแกรมออกเป็น 2 ส่วนคือ Metro style App (Windows Store) และ Desktop App (โปรแกรมทั่ว ๆ ไป) ซึ่ง App ทั้ง 2 ประเภทจะยังสามารถใช้งานบน Windows 8 ได้อย่างไม่มีปัญหา ลองดูมา Diagram เพิ่มเติม

WinRT Diagram

Windows 8 Platform and Tools


จากภาพในพื้นที่เขตสีฟ้า จะเป็นยุคของการเขียนโปรแกรมแบบเก่าที่เราคุ้นเคยดี เช่น VB.Net / C# , HTML และ JavaScript ซึ่งในมุมมองนี้เราอาจจะใช้การพัฒนาแบบ Native App (เขียน Coding) ทำงานบน Win32 API บน Desktop หรือ Web Browser เป็นต้น

แต่ในเขตพื้นที่สีเขียวคือ Model ใหม่ที่รองรับการทำงานของระบบปฏิบัติการตั้งแต่ Windows 8 เป็นต้นไป ซึ่งจะเห็นว่า ต่อไปนี้ Windows Store App ที่ถูกพัฒนาด้วย API ตัวใหม่ที่ชื่อว่า WinRT API และรูปแบบการเขียนนั้นสามารถแยกย่อยได้เป็น 4 ส่วนด้วยกันคือ
  • JavaScript เป็นภาษาโปรแกรม และ HTML เป็นภาษากำหนด UI (เหมาะสำหรับนักพัฒนาเว็บ)
  • C# หรือ VB.Net เป็นภาษาโปรแกรม และ XAML เป็นภาษากำหนด UI (เหมาะสำหรับนักพัฒนาสาย .NET)
  • C++ เป็นภาษาโปรแกรม และ XAML เป็นภาษากำหนด UI (เหมาะสำหรับนักพัฒนา C/C++)
  • C++ เป็นภาษาโปรแกรม และ DirectX สำหรับการสร้างเกม (สำหรับการสร้างเกมบน Windows 8)

แต่ที่ได้รับความนิยมคือ C# กับ XAML (XAML เป็น Interface ของ XML ถูกใช้งานหลากหลาย เช่น Silverlight หรือ Windows Phone เป็นต้น )








ตัวอย่าง XAML ที่ใช้สร้าง Interface บน Windows Store Apps
<Page
    x:Class="myApp.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:myApp"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <TextBlock HorizontalAlignment="Left" Height="89" Margin="371,288,0,0" TextWrapping="Wrap" Text="ยินดีต้อนรับเข้าสู่ App ของฉัน" VerticalAlignment="Top" Width="637" FontSize="48" TextAlignment="Center"/>

    </Grid>
</Page>


ตัวอย่าง การเขียน Windows Store App ด้วย C#
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace myApp
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();
        }

        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
        }
    }
}


ตัวอย่างการเขียน Windows Store Apps ด้วย HTML และ JavaScript
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>HelloWorld</title>

    <!-- WinJS references -->
    <link href="//Microsoft.WinJS.2.0/css/ui-dark.css" rel="stylesheet" />
    <script src="//Microsoft.WinJS.2.0/js/base.js"></script>
    <script src="//Microsoft.WinJS.2.0/js/ui.js"></script>

    <!-- HelloWorld references -->
    <link href="/css/default.css" rel="stylesheet" />
    <script src="/js/default.js"></script>
</head>
<body>
    <p>Content goes here</p>
</body>
</html>


สิ่งที่จำเป็นจะต้องมีในการเขียน App บน Windows Store App
  • Visual Studio 2012 / 2013 ทุก Version เป็นต้นไป
  • Windows 8 เป็นต้นไป




หน้าจอ Simulator ไว้สำหรับ Run หรือ Debug โปรแกรมที่พัฒนาด้วย Windows Store ซึ่งจะมาพร้อมกับ Visual Studio 2012 / 2013 หรือ Version ถัดจากนี้

ดาวน์โหลดและติดตั้ง Visual Studio Express 2012 for Windows 8




ติดตั้ง Visual Studio 2012 Express ไว้สำหรับเขียน Windows Store App


ดาวน์โหลดและติดตั้ง Visual Studio Express 2013 for Windows



Visual Studio 2013 Express for Windows ไว้สำหรับเขียน Windows Store App


สามารถเลือก Version ไหนก็ได้ หรือจะเลือกเวอร์ชั่นล่าสุด







.

   
Share


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


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


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2014-01-10 22:53:27 / 2017-03-19 14:39:53
  Download : No files
 Sponsored Links / Related

 
รู้จักกับ Windows Store คืออะไร ทำไมจะต้องใช้ Windows Store App ???
Rating :

 
Visual Studio 2012 Express for Windows 8 ไว้เขียน Windows Store App
Rating :

 
Visual Studio 2013 Express for Windows ไว้สำหรับเขียน Windows Store App
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 00
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 อัตราราคา คลิกที่นี่