å€ãã®Webéçºè ã¯ãã¢ããªã±ãŒã·ã§ã³éçºã®åéãç¡èŠããŠããŸããããã¯ãã¢ãã€ã«éçºãã¯ãããžãŒã®ç 究ã«ã¯å€ãã®æéãããããšããäºå®ã«èšåããŠããŸãã äžéšã«ã¯ãã¢ãã€ã«ãã©ãããã©ãŒã åãã®ãã€ãã£ãã¢ããªã±ãŒã·ã§ã³ã®éçºãæ€èšããããšã¯ãå®éã«ã¯æ°ããããã°ã©ãã³ã°èšèªã®äœ¿çšã ãã§ãªãããã¿ãŒã³ã®äœ¿çšãæå³ããŸãã
ãããã®éçºè ã®1人ã§ããå Žåã¯ãHTML5ãŸãã¯JavaScriptã§ããããšãæ¢ã«ããã£ãŠããèšèªã§äœæ¥ã§ããããããã€ããªããã¢ããªã±ãŒã·ã§ã³ã®éçºã«æ³šæãæãå¿ èŠããããŸãã ããã«ãTwitter BootstrapãjQuery Mobileãªã©ã®äžè¬çãªãã¬ãŒã ã¯ãŒã¯ã䜿çšããŠãã¢ããªã±ãŒã·ã§ã³ãéçºã§ããŸãã
ä»ãèå³ã®ãã人ã®ããã«ããã€ããªããã¢ããªã±ãŒã·ã§ã³ã®éçºããã»ã¹ãéåžžã«ç°¡åã«ãã匷åãªã¯ã©ãŠãéçºç°å¢ã§ããTelerik AppBuilderã«æ²¡é ããããšãææ¡ããŸãã ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãAppBuilderãæäŸã§ãããã®ãåŠç¿ãããäºããç解ããéçšã§ãåçŽãªãã€ããªããã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŸãã
Telerik AppBuilderãéžã¶çç±
AppBuilderã䜿çšããäž»ãªçç±ã®1ã€ã¯ãå®å šãªãªã³ã©ã€ã³IDEã§ãã ããŠã³ããŒãããããšãªããä»»æã®ã³ã³ãã¥ãŒã¿ãŒãŸãã¯ã¢ãã€ã«ããã€ã¹ãããã€ããªããã¢ããªã±ãŒã·ã§ã³ãäœæããã¹ããããã³å ¬éããããšãã§ããŸãã
ãã1ã€ã®å©ç¹ã¯ãWindowsãŸãã¯Linuxã§å®è¡ãããiOSã¢ããªã±ãŒã·ã§ã³ãäœæã§ããããšã§ãã
æåŸã«ãAppBuilderã®Telerikãã©ãããã©ãŒã ãšã®ææºã«ãããåæããããã¢ããéç¥ããŠãŒã¶ãŒèªèšŒãã¯ã©ãŠãã¹ãã¬ãŒãžãªã©ã®æ©èœã䜿çšã§ããããã«ãªããŸãã
ã¢ããªã±ãŒã·ã§ã³ã®äœæãå§ããŸãããïŒ
å§ããã®ã«å¿ èŠãªã®ã¯ãTelerikã¢ã«ãŠã³ãã ãã§ãã ãŸã ãæã¡ã§ãªãå Žåã¯ãç¡æã®30æ¥éããŒãžã§ã³ã䜿çšããŠäœæã§ããŸãã
ãã©ãŠã¶ã§æ°ãããŠã£ã³ããŠãéããTelerikãã©ãããã©ãŒã ã«ç§»åããŸãã æ¿èªåŸããã«ãã¢ããªã±ãŒã·ã§ã³ã®ãªã¹ããå«ãããŒãžã衚瀺ãããŸãã
[ã¢ããªã®äœæ]ãã¯ãªãã¯ãããšãéçºäžã®ã¢ããªã±ãŒã·ã§ã³ã«é¢ããããã€ãã®è³ªåã衚瀺ãããŸãã
ãŸããéçºããã¢ããªã±ãŒã·ã§ã³ã®ã¿ã€ããéžæããå¿ èŠããããŸãããã€ããªããã¢ããªã±ãŒã·ã§ã³ãéçºããããã®äžè¬çãªãã¬ãŒã ã¯ãŒã¯ã§ããApache Cordovaã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ãäœæãããããCordova HybridãéžæããŸãã
ããã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã«ååãšèª¬æãä»ããŸãããã
[ã¢ããªã®äœæ]ãã¯ãªãã¯ããŠãããã©ã«ãã®Kendo UIãã¬ãŒã ã¯ãŒã¯ã䜿çšããã«ã¹ã¿ãã€ãºããããã€ããªããã¢ããªã±ãŒã·ã§ã³ãçæããŸãã
ãã¥ãŒãäœæãã
ã¢ããªã±ãŒã·ã§ã³ãäœæããããšãViewsãµãŒãã¹ã«ç§»åããŸãã ãã®ãµãŒãã¹ã䜿çšãããšãHTMLã³ãŒããªãã§ãã¥ãŒãäœæã§ããŸãã
åçŽãªã³ã³ããŒã¿ãŒã¢ããªã±ãŒã·ã§ã³ãäœæããŸãã 次ã®2ã€ã®ãã¥ãŒããããŸãã
ãŠãŒã¶ãŒãäœéãããã°ã©ã åäœã§å ¥åããã³ã³ããŒã¿ãŒ
ã«ã€ããŠã¯ãã¢ããªã±ãŒã·ã§ã³ã®è©³çŽ°ã衚瀺ãããŸã
ããå§ããŸãããã [ããŒã ãã¥ãŒ]ãéžæãã[ãã¥ãŒã¿ã€ãã®å€æŽ]ãã¯ãªãã¯ããŸãã ããã€ãã®ãã¿ãŒã³ã衚瀺ãããŸãã [ãã³ãã¬ãŒãã«ã€ããŠ]ãã¯ãªãã¯ããŸãã
次ã®ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ã[About]ã®ã¿ã€ãã«ãèšå®ãã[Template]ãã¯ãªãã¯ããŠãã¥ãŒã®ã³ã³ãã³ããã«ã¹ã¿ãã€ãºããŸãã ååãšããŠããaboutãã«ã¯ååãããŒãžã§ã³ã説æããããŸãã ãããã£ãŠããããã®ãã£ãŒã«ãã«é©åã«å ¥åããŠãã ããã ãã³ãã¬ãŒãã«ã¯ããœãŒã·ã£ã«ã¡ãã£ã¢ãã¿ã³ãå«ãŸããŸãã ä»æ¥ã¯ãããã䜿çšããªãããã[ãåãåãã]ã[Facebook]ã[Twitter]ãã¿ã³ã®ãã§ãã¯ãå€ããŸãã
[é©çš]ãã¿ã³ãã¯ãªãã¯ãããšããã«ãäœæãããã¥ãŒã衚瀺ã§ããŸãã
次ã«ã[ãã¥ãŒã®è¿œå ]ãã¿ã³ãã¯ãªãã¯ããŠããã¥ãŒã³ã³ããŒã¿ãŒãäœæããŸãã ãã³ãã¬ãŒããéžæããããã«å床æ±ããããŸãã ãã®ãã¥ãŒã«ã¯2ã€ã®å ¥åãã£ãŒã«ãããããããä»åã¯ãã©ãŒã ãã³ãã¬ãŒããéžæããŸãã
- ããã°ã©ã ã§ééãå ¥åããæåã®ãã£ãŒã«ãã
- 2çªç®ã¯ã³ã¹ãã瀺ããŸãã
次ã®ç»é¢ã§ãã³ã³ããŒã¿ãŒã®[ã¿ã€ãã«ãšåå]ãã£ãŒã«ãã«å ¥åããŸãã å ¥åãã£ãŒã«ããè¿œå ããã«ã¯ã[ãã©ãŒã ãã£ãŒã«ã]ãã¯ãªãã¯ãã[ãã©ãŒã ãã£ãŒã«ãã®è¿œå ]ãã¿ã³ãã¯ãªãã¯ããŸãã ããã§ããã£ãŒã«ãã¿ã€ããéžæããå¿ èŠããããŸãã
ééã¯ããã°ã©ã ã§ããå¿ èŠãããããã[æ°å€å ¥å]ãéžæããŸãã kgsãšåŒã³ãé©åãªã©ãã«ãä»ããŸãã
åæ§ã«ãããã¹ãããã¯ã¹ãäœæãããã®çµæãåŒã³åºããŸãã å¿ ãé©åãªã©ãã«ãä»ããŠãã ããã
ãã£ãŒã«ãã®æºåãã§ããã®ã§ããã¿ã³ãã¯ãªãã¯ããŸãã ãã©ãŒã ãã³ãã¬ãŒãã«ã¯ã確èªãã¿ã³ãšãã£ã³ã»ã«ãã¿ã³ãå«ãŸããŠããŸãã ãã£ã³ã»ã«ãã¿ã³ã¯å¿ èŠãªãããããã§ãã¯ãå€ããŸãã
[é©çš]ãã¯ãªãã¯ããŠãå€æŽãä¿åããŸãã ããã§ããã¥ãŒã¯æ¬¡ã®ããã«ãªããŸãã
ããã²ãŒã·ã§ã³ãã³ãã¬ãŒããã«ã¹ã¿ãã€ãºãã
ãŠã£ã³ããŠãåãæ¿ããæ©èœãäœæããŸãããã®ãããããã²ãŒã·ã§ã³ãã³ãã¬ãŒãã䜿çšããŸãã ããã²ãŒã·ã§ã³ãèšå®ããã«ã¯ãããã²ãŒã·ã§ã³ã»ã¯ã·ã§ã³ã«åãæ¿ããŸãã
ã¢ããªã±ãŒã·ã§ã³ã¯ãããã²ãŒã·ã§ã³ã®ãã³ãã¬ãŒããšããŠã¿ãã¡ãã¥ãŒã䜿çšããŸãã
ããã©ã«ãã§ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ã¡ã€ã³ããŒãžã§ãã ã³ã³ããŒã¿ãŒãã¡ã€ã³ããŒãžãšããŠäœ¿çšããã«ã¯ã[ã¢ããªã±ãŒã·ã§ã³ã®èµ·å]ãã¯ãªãã¯ãã[åæãã¥ãŒ]ãšããŠ[ã³ã³ããŒã¿ãŒ]ãéžæããŸãã
ããã²ãŒã·ã§ã³ã¡ãã¥ãŒã¯æ¬¡ã®ããã«ãªããŸãã
ã¢ããªã±ãŒã·ã§ã³ã®ããžãã¯ãäœæããŸã
ãŠãŒã¶ãŒã€ã³ã¿ãŒãã§ã€ã¹ã®æºåãã§ããã®ã§ãJavaScriptã³ãŒãã䜿çšããŠå€æã¡ã«ããºã ãæ§ç¯ããŸãããã
ãšãã£ã¿ãŒãéãã«ã¯ãã³ãŒããã¯ãªãã¯ããå¿ èŠããããŸãã ããã§ã¯ãview.htmlããã³index.jsãã¡ã€ã«ãå«ãäœæãããåããŒãžã®ãã£ã¬ã¯ããªããããŸãã
index.jsãã¡ã€ã«ã§ããConverterãéããšãAppBuilderãconverterModelãšããååã®kendo.observableãªããžã§ã¯ãããã§ã«äœæããäœæããããã©ãŒã ã管çããŠããããšãããããŸãã äœæãããã©ãŒã ã®ååãå«ããã£ãŒã«ãããããŸãã ãŸãã確èªãã¿ã³ãã¯ãªãã¯ãããšåŒã³åºãããéä¿¡æ©èœããããŸãã ãæ³åã®ãšããããã¹ãŠã®ã³ãŒããéä¿¡é¢æ°ã«é 眮ããå¿ èŠããããŸãã
ããã§å¿ èŠãªã®ã¯ãfields.kgså€ãååŸãã2.2046ãä¹ç®ããŠãfields.resultãã£ãŒã«ãã®å€ãæŽæ°ããããšã§ãã converterModelå€ãååŸããã³èšå®ããã«ã¯ãgetããã³setã¡ãœããã䜿çšããå¿ èŠããããŸãã 次ã®ã³ãŒããindex.jsãã¡ã€ã«ã«è¿œå ããŸãã
// START_CUSTOM_CODE_converterModel var model = app.converter.converterModel; model.set("submit", function() { var lbs = model.get("fields.kgs") * 2.2046; model.set("fields.result", lbs + " lbs"); }); // END_CUSTOM_CODE_converterModel
èªåçæãããã³ã¡ã³ãSTART_CUSTOM_CODEãšEND_CUSTOM_CODEã®éã«ã³ãŒããèšè¿°ããå¿ èŠãããããšã«æ³šæããŠãã ããã
ãã¹ãäž
ã¢ããªã±ãŒã·ã§ã³ã®æºåãã§ããŸããã ãã¹ãããããã«ãAppBuilderã«çµã¿èŸŒãŸããã·ãã¥ã¬ãŒã¿ãŒã䜿çšã§ããŸãã Control + F6ãæŒããŠãiPhoneã·ãã¥ã¬ãŒã¿ãŒãèµ·åããŸãã ã¢ããªã±ãŒã·ã§ã³ãèµ·åããåŸãå€æãæ©èœãããã©ããã確èªããŸãã
AppBuilderã§ã¯ãiOSã®ããŸããŸãªããŒãžã§ã³ã§ã¢ããªã±ãŒã·ã§ã³ããã¹ãããããšãã§ããŸãã
ã¢ããªã±ãŒã·ã§ã³ãiPhoneã§æ£ããåäœããããšã確èªããã®ã§ãä»ã®ããã€ã¹ã§ã©ã®ããã«åäœããããèŠãŠã¿ãŸãããã
ã¢ããªã±ãŒã·ã§ã³ã¯ãAndroidã·ãã¥ã¬ãŒã¿ãŒã§æ£åžžã«åäœããŸãã ãã ããAndroidã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠã¯ç°åžžã«èŠããŸãã ããã¯ãã¢ããªã±ãŒã·ã§ã³ããã©ãããšåŒã°ããã¹ãã³ã䜿çšããŠããããã§ãã ãããªã¢ã«ãã¶ã€ã³ã®å€èŠ³ãäžããã«ã¯ãapp.jsãéããã¹ãã³å€ãmaterialã«å€æŽããŸãã
ã¢ããªã±ãŒã·ã§ã³ã¯æ¬¡ã®ããã«ãªããŸãã
AppBuilder Companionã¢ããªã®äœ¿çš
ã·ãã¥ã¬ãŒã¿ã¯ãéçºããã»ã¹äžã«éåžžã«åœ¹ç«ã¡ãŸãã ããã«ãããããããå®éã®ããã€ã¹ã§ãã¹ãããããšã¯æ±ºããŠçãããšã¯ãããŸããã AppBuilderã®ã³ã³ãããªã³ã¢ããªã䜿çšãããšãããããã°ããç°¡åã«è¡ãããšãã§ããŸãã
ã³ã³ãããªã³ã¢ããªãããã€ã¹ã«ããŠã³ããŒããããããšãã£ã¿ãŒãéããCtrl + BããŒãæŒããŸãã次ã«ãã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããã©ãããã©ãŒã ãéžæããããã«æ±ããããŸãã 次ã«ãAppBuilderã³ã³ãããªã³ã¢ããªãªãã·ã§ã³ãéžæãã[次ãž]ãã¿ã³ãã¯ãªãã¯ããŸãã
ãã«ããå®äºãããšã次ã衚瀺ãããŸãã
ããã§ãããã€ã¹ã§AppBuilderã³ã³ãããªã³ã¢ããªãéããQRã³ãŒããã¹ãã£ã³ããŠã¢ããªã±ãŒã·ã§ã³ãèµ·åã§ããŸãã
AppBuilderã®CLIã䜿çšãã
ã³ãã³ãã©ã€ã³ããããŒã«ã«ã§äœæ¥ããå Žåã¯ãAppBuilderã®CLIïŒã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ã€ã¹ïŒã䜿çšã§ããŸãã CLIã¯Node.jsããã±ãŒãžã§ãããnpmïŒNode Package ManagerïŒã䜿çšããŠç°¡åã«ããŠã³ããŒãã§ããŸãã
sudo npm install -g appbuilder
CLIã®ã»ãšãã©ã®æ©èœã¯ãTelerikã§ã®æ¿èªåŸã«å©çšå¯èœã«ãªããŸãã ãããã£ãŠãã¢ã¯ã·ã§ã³ãå®è¡ããåã«æ¬¡ã®ã³ãã³ãã䜿çšããŸãã
appbuilder login
ãã°ã€ã³ãããã-hãªãã·ã§ã³ã䜿çšããŠãappbuilderãæäŸããã³ãã³ãã«æ £ããããšãã§ããŸãã
appbuilder -h
ãããã«
ãã®ã¬ã€ãã§ã¯ããã€ããªããã¢ããªã±ãŒã·ã§ã³ãéçºããããã®Telerik AppBuilderã®åºæ¬æ©èœã«ç²Ÿéããã¢ããªã±ãŒã·ã§ã³ããã¹ãããããã®AppBuilderã®ã³ã³ãããªã³ã¢ããªãšããã€ã¹ã·ãã¥ã¬ãŒã¿ãŒã®äœ¿çšæ¹æ³ãåŠã³ãŸããã ãªã³ã©ã€ã³ãšãã£ã¿ãŒã§ã®éçºã«éç¹ã眮ããŠããŸãããIDEã®äœ¿çšã奜ã人ã®ããã«ãAppBuilderã¯Windowsã¯ã©ã€ã¢ã³ããšVisual Studioæ¡åŒµæ©èœãæäŸããŠããŸãã
以äžã®ãªã³ã¯ãããTelerik AppBuilderãã©ãããã©ãŒã ãšäž»ãªæ©èœã®æŠèŠã«ã€ããŠèª¬æãããããªãèŠã€ããããšãã§ããŸãã