티스토리 뷰

툴 얻어오기...

It’s assumed you already have Visual Studio, the Windows Phone SDK and (optionally) Zune set up for Windows Phone development. If not, you can obtain the tools for free by downloading Visual Studio 2010 Express for Windows Phone (bit.ly/dTsCH2).
윈도우폰 SDK와 (추가적으로)윈도우폰 개발을 위한 Zune을 설치했다는 것은 당신에게 이미 Visual Studio가 있다는 것입니다. 그러나 만약 그렇지 않다고 하더라도 윈도우폰을 위한 Visual Studio 2010 Express를 무료로 다운로드 받을 수 있습니다(bit.ly/dTsCH2).


You can obtain the latest Cordova developer tools from the PhoneGap Web site (phonegap.com), although future releases will be distributed via Apache (incubator.apache.org/cordova). The download includes the templates, libraries and scripts required to develop Cordova applications across all the supported platforms. You’ll want to use the Windows Phone version, of course.
앞으로는 Apache(incubator.apache.org/cordova)를 통하여 분포되어지겠지만, 현제 최근 Cordova 개발툴은 Phonegap 웹사이트(phonegap.com)에서 얻을 수 있습니다. 다운로드에는 템플릿, 라이브러리 그리고 모든 플랫폼을 다양하게 지원하는 Cordova 응용프로그램을 개발할 때 필요한 스크립트들이 포함되어있습니다. 윈도우폰 버전도 역시 사용할 수 있음은 말할 것도 없구말입니다.


Once you’ve downloaded the Cordova tools, follow the Windows Phone Get Started Guide (phonegap.com/start#wp) and install the Visual Studio template. Creating a “Hello World”-style application is as simple as creating a new project based on the supplied template, as shown in Figure 2.
만약에 Cordova 툴을 다운로드 받았다면 윈도우즈폰 개발 시작 가이드
(phonegap.com/start#wp)에 따라서 Visual Studio 템플릿을 설치하기 바랍니다. Figures 2에서 볼 수있듯이, "Hello World"를 만든는 것은 템플릿의 지원을 기반으로 간단하게 만들 수 있는 스타일 응용프로그램입니다.


Figure 2. Visual Studio에 포함된 윈도우폰용 CordovaFigure 2. Visual Studio에 포함된 윈도우폰용 Cordova


If you build and deploy the project created by the template to your emulator, you should be greeted with the message “Hello Cordova,” as shown in Figure 3.
에뮬레이터에서 프로젝트를 빌드하고 배포했다면, Figure 3에서 보듯이 위대한 메세지 "Hello Cordova"를 만날 수 있을 것입니다(이 말투는 굉장히 장황한 어감의 말투임-해석의 부제로 원저자의 의도가 희석될까 우려하여 코멘트를 남깁니다).


Figure 3. 에뮬레이터에서 Cordova 탬플릿 응용프로그램 구동된 모습Figure 3. 에뮬레이터에서 Cordova 탬플릿 응용프로그램 구동된 모습


윈도우포 Cordova 응용프로그램의 해부...


Although you can develop a Cordova application without much knowledge of how it works under the hood, it’s worthwhile understanding what the various files generated by the template are, as shown in Figure 4.
물론 당신은 Cordova 응용프로그램이 내부적으로 어떤지 몰라도 개발은 할 수 있지만, Figure 4에서 보여주듯 탬플릿에 의해 생성된 각각의 파일들이 무엇인지 이해하는 것은 상당히 가치있는(또는 할 보람이 있는) 것입니다.


Figure 4. Cordova 탬플릿의 폴더 구조Figure 4. Cordova 탬플릿의 폴더 구조


Focusing only on the Cordova files in Figure 4 (from top to bottom), note the following:
다음에 나오는 Figures 4의 Cordova 파일에 대한 이야기에만 주의를 기울여주시기 바랍니다:


GapLib/WP7CordovaClassLib.dll is the Cordova assembly. This contains the Windows Phone native implementation of the Cordova APIs.
GapLib/WP7CordovaClassLib.dll은 Cordova의 직약체입니다. 이 것은 윈도우폰 내부수행에 대한 Cordova API들을 가지고 있습니다.


www is the folder where you place your application assets, HTML5, JavaScript, CSS and images. The template generates a basic index.html file and the master.css stylesheet.
www폴더는 당시의 응용프로그램의 자산인 HTML5, JavaScript, CSS그리고 이미지들이 위치하는 곳입니다. 탬플릿은 기본 index.html을 생성하고 master.css 스타일 시트 파일 또한 생성합니다.


www/cordova-1.5.0.js provides the Windows Phone imple­mentation of the Cordova JavaScript APIs. This interfaces with the native code contained within WP7CordovaClassLib.
www폴더 아래의 cordova-1.5.0.js는 윈도우폰이 수행할 Cordova JavaScript API들을 제공하여 줍니다. 네이티브코드인 이 인터페이스는 WP7CordovaClassLib(.dll)과 함께하고 있습니다.


BuildManifestProcessor.js is a JavaScript file that’s invoked by a post-build step. This file generates the Cordova­SourceDictionary.xml file, ensuring that anything you add to the www folder will be loaded into isolated storage.
BuildMainifastProcessor.js 는 post-build step(뭐라 번역을 해야할지 모르겠음;;;;-내용상 봤을 땐 자동으로 개발자산들을 추가하고 관리하는 듯)에 필요한 JavaScript파일입니다. 이 파일은 Cordova-SourceDictionary.xml 파일에 의해 만들어 졌는데, 뭐든 www폴더에 넣든 독립적인 저장공간에서 읽어드리게 될 것입니다.


CordovaSourceDictionary.xml is a generated XML file that lists all of your application assets. When your application first launches, this XML file indicates the files to be loaded into isolated storage.
CordovaSourceDictionary.xml은 당신의 응용프로그램의 모든 자산리스트로부터(프로젝트내의 모든 파일) XML파일로 만들어졌습니다. 당신이 응용프로그램을 실행시킬 때, 독립저장공간에서 XML파일에서 가리키는 파일들을 읽어드리게 됩니다.


The MainPage.xaml file contains an instance of the CordovaView control, a user control that contains a WebBrowser control:
웹브라우저 콘트롤이 포함하는 사용자 컨트롤를 CordovaView 컨트롤 인스탄스를 MainPage.xaml파일이 포함하고 있습니다:


<Grid x:Name="LayoutRoot">

    <my:CordovaView Name="PGView" />

  </Grid>


When the app starts, the CordovaView control takes care of loading your application assets into local storage and navigating to the www/index.html file, thus launching your application. You can, of course, place other Silverlight controls in the page by editing this XAML, although I wouldn’t recommend it. If you’re writing an HTML5 application, your intention is probably to make this work cross-platform. Any controls you add to MainPage.xaml will of course be specific to your Windows Phone build.
응용프로그램이 시작되면, ControlView는 로컬저장공간내의 응용프로그램 자산을 로딩하고, www/index.html을 가리키고 응용프로그램은 구동되게됩니다. 물론 권하지는 않지만, 다른 실버라이트 컨트롤을 XMAL을 수정하여 페이지에 위치시킬 수(place)있는 것은 당연하고. HTML5응용프로그램을 만들었다면, 당신의 의도대로 다중 플랫폼을 지원하게 될 것입니다. 어느 컨트롤들이라 할지라도 윈도우폰을 빌드하는데 있어서 필요한 것이 있다면  MainPage.xaml에 추가할 수 있습니다.


2장을 마치며...

아...조금 더 어려웠네요;;;;; 전문적인 내용들이 속속있고, 또 이 바닥 문서들이 OOP과 비슷한 애매하고 모호한 하지만 굉장히 이론적인 내용들이 담겨져 있는터라, 그것을 의역할지 직역할지 해석하는데 너무나 어려웠습니다. 뭐 그렇다고 잘 해석했다는 것은 아니구요. 제가봐도 문제가 되는 해석구문들이 있으니 영어좀 하시거나 원서읽으시는 분들은 얘뭐야? 하시겠죠...^^;;;;; 죄송합니다. 저도 제 나름의 노력이라 한계가 있네요....뭐 아무튼 다음에는 이제 구체적으로 개발하는 코드들을 보게 됩니다.


조만간 또 찾아오도록 하겠습니다....^^

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함