ãã®ã¢ãããŒãã«åŸã£ãŠäœæ¥ãããã¹ãŠã®äººã¯ãã»ãšãã©ã®XAPãã¡ã€ã«ã«éè€ããã¢ã»ã³ããªãå«ãŸããŠããããšã«æ°ä»ããŸãã ããšãã°ã Prismã©ã€ãã©ãªã䜿çšããå Žåãã»ãŒãã¹ãŠã®XAPãã¡ã€ã«ã«ãã®ã©ã€ãã©ãªã®ãã¹ãŠã®ã¢ã»ã³ããªãå«ãŸããŸãã Prismã¯åXAPãã¡ã€ã«ã«çŽ300 Kbãè¿œå ããŸããããã«ãããã¢ããªã±ãŒã·ã§ã³ãµã€ãºã1 Mb以äžå¢å ããŸãïŒ4ã5åã®XAPãã¡ã€ã«ãããå ŽåïŒã ããã«ãè¿œå ã®ã©ã€ãã©ãªïŒäž»ã«UIèŠçŽ ïŒã«ãããã¢ããªã±ãŒã·ã§ã³ã®ãµã€ãºãããã«å¢å ããå¯èœæ§ããããŸãã
ããããã¹ãŠã®äºå®ã«ãããXAPãã¡ã€ã«ã®ãµã€ãºãåæžããæ¹æ³ãæ¢ãå§ããŸããã
ã¢ã€ãã¢
Jeff Prosiseã«é¢ããããã°æçš¿ã«åºãããããšããç§ã¯1ã€ã®åé¡ã«åãçµãã§ããŸããã 圌ã¯ãã¢ã»ã³ããªãã¢ããªã±ãŒã·ã§ã³ã«è¿œå ã§ããããXAPãã¡ã€ã«ã«ã¯è¿œå ã§ããªããšè¿°ã¹ãŸããã ãããè¡ãã«ã¯ããã©ã¡ãŒã¿ãèšå®ããã ãã§ã
CopyLocal=false
åç §ãªã¹ãã«ããå¿ èŠãªã¢ã»ã³ããªããšã«ã ãã®å Žåããããžã§ã¯ãã¯ç®çã®ã¢ã»ã³ããªãåç §ããŸãããã³ã³ãã€ã«äžã«binãã©ã«ããŒã«è¿œå ããŸããã
ããã«ãããã¢ããªã±ãŒã·ã§ã³å ã®ãã¹ãŠã®éè€ããã¢ã»ã³ããªãæ·»ä»ã§ãããšããèããåŸãããŸããã
CopyLocal=false
ã¡ã€ã³XAPãã¡ã€ã«ã®ã¢ã»ã³ããªãã©ã¡ãŒã¿ãŒã®ã¿ãå€æŽããããšãªãã ããã¯ã ã¢ããªã±ãŒã·ã§ã³ãã¡ã€ã³ã«èªåçã«ããŒãããããã¹ãŠã®éè€ã¢ã»ã³ããªãå«ãå¿ èŠãããã¡ã€ã³XAPãã¡ã€ã«ã§ãããXAPãã¡ã€ã«ã®æ®ãã®ãã¹ãŠã®ã¢ã»ã³ããªã§äœ¿çšã§ããŸãã
äžèšã®å³ã¯ãäžèšã®ã«ãŒã«ã«åŸã£ãŠãœãªã¥ãŒã·ã§ã³ãå€æŽãããå Žåã«ãœãªã¥ãŒã·ã§ã³ãã©ã®ããã«æŽæ°ããããã瀺ããŠããŸãã åãããžã§ã¯ããåå¥ã®XAPãã¡ã€ã«ã§ãããšæ³åããŠãã ããã ãã®å Žåã ãããžã§ã¯ã1ãšãããžã§ã¯ã2ã«ã¯åããã¢ã®ã¢ã»ã³ããªïŒ ã¢ã»ã³ããª1ãšã¢ã»ã³ããª2 ïŒãå«ãŸããŠããããããã«Project1.xapãšProject2.xapããé€å€ããããã«
CopyLocal=false
ãèšå®ããŸãã
ã¢ã»ã³ããª1ã¯æ¢ã«ã¡ã€ã³ãããžã§ã¯ãã«ããããã ã¡ã€ã³ãããžã§ã¯ãã«è¿œå ããå¿ èŠã¯ãããŸããã å¯Ÿç §çã«ãã¢ã»ã³ããª2ïŒ ã¢ã»ã³ããª2 ïŒãã¡ã€ã³ãããžã§ã¯ãã«è¿œå ããŠãæåãš2çªç®ã®ãããžã§ã¯ãã®æäœæ§ã確ä¿ããå¿ èŠããããŸãã
ãããžã§ã¯ã2ïŒ ãããžã§ã¯ã2 ïŒã«ã¯ã¢ã»ã³ããª4ïŒã¢ã»ã³ããª4ïŒãå«ãŸããŠããŸããããã¯ã¡ã€ã³ãããžã§ã¯ãã«æ¢ã«ååšããŸã-ãã®ã¢ã»ã³ããªããããžã§ã¯ã2ããé€å€ããŸãã
ãããžã§ã¯ã3ïŒ ãããžã§ã¯ã3 ïŒã¯å€æŽã§ããªãããã äžæã®ã¢ã»ã³ããªã®ã¿ãå«ãŸããŸãã
æé©åããããã®ãèŠçŽããŸãããïŒ
ãããžã§ã¯ã | æé©ååã®XAPã®ã¢ã»ã³ããªã®æ° | æé©ååŸã®XAPã®ã¢ã»ã³ããªã®æ° |
ãããžã§ã¯ã1 | 4 | 2 |
ãããžã§ã¯ã2 | 4 | 1 |
ãããžã§ã¯ã3 | 3 | 3 |
äž»ãªãããžã§ã¯ã | 3 | 4 |
åèš | 14 | 10 |
ã芧ã®ãšããã1ã€ã®ã¢ã»ã³ããªã«ããã¡ã€ã³ãããžã§ã¯ãã®å¢å ã«ãããããããã¢ããªã±ãŒã·ã§ã³å ã®ãã¡ã€ã«ã®ç·æ°ã¯æžå°ããŠããŸãã
åœç¶ããããã®å€æŽãæåã§è¡ããšåŠçãé ããªãããšã©ãŒãçºçããå¯èœæ§ããããŸãã ãã®ããããããã®æäœãèªååããVisual Studioã®ã¢ããªã³ãäœæããããšã«ããŸããã
ã¢ããªã³ã®å®è£
XAPãã¡ã€ã«ã®æé©åãè¡ãããäžè¬çãªã¢ã«ãŽãªãºã ã®ã¿ã説æããŸãã
- ãã¹ãŠã®Silverlightãããžã§ã¯ããååŸãã ã æ€çŽ¢ã¯ããããžã§ã¯ããã¡ã€ã«ã«ãã©ã¡ãŒã¿ãå«ãŸããŠãããšããäºå®ã«åºã¥ããŠããŸã
ProjectTypeGuids
ãããžã§ã¯ãã®çš®é¡ïŒã³ã³ãœãŒã«ã¢ããªã±ãŒã·ã§ã³ãasp.netã¢ããªã±ãŒã·ã§ã³ãªã©ïŒã瀺ãGUIDãå«ãŸããŠããŸãã - ã¡ã€ã³ãããžã§ã¯ããæ€çŽ¢ããŸãã ãã®ãããžã§ã¯ãããéå§ããŠãã¢ããªã±ãŒã·ã§ã³ãèµ·åããããã«ä»ã®ãããžã§ã¯ãããã®éè€ããã¢ã»ã³ããªãè¿œå ããå¿
èŠããããŸãã ãããžã§ã¯ããã©ã¡ãŒã¿å€ã«åºã¥ãæ€çŽ¢
SilverlightAppEntry
ãã®ãã©ã¡ãŒã¿ãŒãæå¹ãªïŒãããžã§ã¯ãã«ååšããïŒã¯ã©ã¹ã®ååã§åæåãããŠããå Žåããã®ãããªãããžã§ã¯ãã¯ã¢ããªã±ãŒã·ã§ã³ã®ã¡ã€ã³ã§ãã
- éè€ããã¢ã»ã³ããªã®ãªã¹ããååŸããŸãã ãã¹ãŠã®Silverlightã¢ããªã±ãŒã·ã§ã³ãããžã§ã¯ãããã€ãã¹ããã2å以äžçºçãããã¹ãŠã®ã¢ã»ã³ããªãèšæ¶ãããŸã
- ã¡ã€ã³ãããžã§ã¯ãã«è€è£œã¢ã»ã³ããªãè¿œå ããŸãïŒååšããªãå ŽåïŒã
- ã¢ã»ã³ããªã®ãã©ã¡ãŒã¿ãŒãèšå®ããŸã
CopyLocal=False
ã¡ã€ã³ãããžã§ã¯ããé€ãããã¹ãŠã®ãããžã§ã¯ãã§çºçããŸãã
ãã®ã¢ã«ãŽãªãºã ã®çµæãšããŠãVisual Studioã®çŸåšã®ã¢ããªã±ãŒã·ã§ã³ãæŽæ°ãããŸãã ããã«ã³ã³ãã€ã«ããŠãXAPãã¡ã€ã«ã®ãµã€ãºã®éãã確èªã§ããŸãã
ä»äºã®å¯èŠå
Visual Studioã§ã¯ãããŸããŸãªçµã¿èŸŒã¿ã¡ã«ããºã ã䜿çšããŠãå®è¡äžã®ã¢ããªã³ã®çŸåšã®ç¶æ ã衚瀺ã§ããŸãã
4ã€ã®ãªãã·ã§ã³ãéžæããŸããã
- ã¢ãã¡ãŒã·ã§ã³ ã ã¢ãã¡ãŒã·ã§ã³ã¢ã€ã³ã³ã¯ãã¢ããªã³ã®æäœå
šäœãéããŠã¹ããŒã¿ã¹ããŒã«è¡šç€ºãããŸã
- é²æç¶æ³ã®ã€ã³ãžã±ãŒã¿ ã ã¹ããŒã¿ã¹ããŒã«ã¯ãéè€ããåã¢ã»ã³ããªã«å¯Ÿããæé©åã®å²åã衚瀺ãããŸã
- ããã¹ãã¡ãã»ãŒãž ã¹ããŒã¿ã¹ããŒã«ã¯ãçŸåšã®å®äºæé ã«é¢ããããã¹ãã¡ãã»ãŒãžã衚瀺ãããŸã
- OutputWindowã§ã®ã¢ã¯ã·ã§ã³ã®ãã®ã³ã° ã ã¢ããªã³äžã«å¥ã®ãŠã£ã³ããŠã«ãã¹ãŠã®ã¡ãã»ãŒãžã衚瀺ãããŸãã
ã¢ããªã³ãå ¬é
Visual Studio Galleryã§ã¢ããªã³ãå ¬éããã«ã¯ã Liveã¢ã«ãŠã³ããæã¡ãã®ã£ã©ãªãŒã®Webãµã€ãã«ã¢ã¯ã»ã¹ãã[ ã¢ããããŒã ]ãã¯ãªãã¯ããŠã¢ããªã³å ¬éãŠã£ã¶ãŒãã«åŸã£ãŠãã ããã
ã¢ããªã³ã®ã€ã³ã¹ããŒã«
ã¢ããªã³ãã€ã³ã¹ããŒã«ããããã®æéãã€æã䟿å©ãªãªãã·ã§ã³ã¯ã Visual Studio Galleryã䜿çšããããšã§ãã ãããè¡ãã«ã¯ãVisual Studio 2010ã§ã Visual Studio Extension Manager ïŒã¡ã€ã³ã¡ãã¥ãŒ-[ããŒã«]-[Extension Manager]ïŒãéãã[ãªã³ã©ã€ã³ã®ã£ã©ãªãŒ]ãéžæããŠã[ãªã³ã©ã€ã³ã®ã£ã©ãªãŒã®æ€çŽ¢]ãã£ãŒã«ãã«ãxapããšå ¥åããŸãã ãã®åŸãXaps MinifierãéžæããŠ[ããŠã³ããŒã]ãã¯ãªãã¯ããŸããã¢ããªã³ã®ããŠã³ããŒããšã€ã³ã¹ããŒã«ãéå§ãããŸãã
ã¢ããªã³ã䜿çšãã
Visual Studioãã€ã³ã¹ããŒã«ããŠåèµ·åããããSilverlightãããžã§ã¯ããèªã¿èŸŒã¿ããœãªã¥ãŒã·ã§ã³ã®ã³ã³ããã¹ãã¡ãã¥ãŒãåŒã³åºããŠãXapã®æå°åã¢ã€ãã ãéžæããå¿ èŠããããŸãã
ã¢ããªã±ãŒã·ã§ã³ã®åæãšæé©åã®ããã»ã¹ãéå§ãããé²è¡ç¶æ³ãVisual Studioã®ã¹ããŒã¿ã¹ããŒã«è¡šç€ºãããŸãã æé©åããã»ã¹ãå®äºãããšãã¢ããªã±ãŒã·ã§ã³ããé€å€ã§ããã¢ã»ã³ããªã®æ°ãã¡ã€ã³ãããžã§ã¯ãã§å¢å ããã¢ã»ã³ããªã®æ°ãå€æŽããããããžã§ã¯ãã®æ°ã«é¢ããæ å ±ã瀺ããã€ã¢ãã°ããã¯ã¹ã衚瀺ãããŸãã
å®éã®ãããžã§ã¯ãã®æé©å
æåã®ãã¹ãããã°ã©ã ã¯ãã¢ã¢ããªã±ãŒã·ã§ã³ã§ãRemix10ã«ã³ãã¡ã¬ã³ã¹ã§çºè¡šããŸããã ãã®ã¢ããªã±ãŒã·ã§ã³ã«ã¯ã5ã€ã®Silverlightãããžã§ã¯ããš4ã€ã®XAPãã¡ã€ã«ãå«ãŸããŠããŸããã æé©åãããŠããªãã¢ããªã±ãŒã·ã§ã³ã®ãµã€ãºã¯1.2 Mbã§ããããæé©ååŸã¯500 Kbã«æžå°ããŸããã åæã«ãã¡ã€ã³ãããžã§ã¯ãã®ãµã€ãºã¯120 Kbãã400 Kbã«å¢å ããŸããã
2çªç®ã®ã¢ããªã±ãŒã·ã§ã³ã¯ã PDC09㧠John Papaãçºè¡šããPrism Demoã¢ããªã±ãŒã·ã§ã³ã§ã ã ãã®ã¢ããªã±ãŒã·ã§ã³ã«ã¯ã7ã€ã®Silverlightãããžã§ã¯ããš4ã€ã®XAPãã¡ã€ã«ãå«ãŸããXAPãã¡ã€ã«ã®åèšãµã€ãºã¯5.7 MBã§ããã æé©ååŸããã®ã¢ããªã±ãŒã·ã§ã³ã¯1.6 Mb ïŒ!!!ïŒã«æžå°ããŸããã
æ¢ç¥ã®é¡äŒŒäœ
Visual Studioã¢ããªã³ã®å®è£ ã®çŽæ¥ã®é¡äŒŒç©ãç¥ããŸããã ããããSilverlightã¢ããªã±ãŒã·ã§ã³ã®ãµã€ãºãæé©åãããšãããããã¯ã¯é¢é£æ§ãããããã Component OneãTelerikãªã©ã®äŒæ¥ãããŒã«ãæäŸããŠããŸãã ç§ã®èããšã¯ç°ãªãã圌ãã¯å®å šã«ç°ãªãã¢ãããŒãã䜿çšããŸãã 圌ãã®ããŒã«ã¯ãå®æããXAPãã¡ã€ã«ãåæããæªäœ¿çšã®ã³ãŒãïŒã¯ã©ã¹ãXAMLã³ãŒãïŒãèŠã€ããŠãã¢ã»ã³ããªããåé€ããŸãã
ç§ã®æèŠã§ã¯ãããã¯ããç©è°ãéžã決å®ã§ãã ç§ã®äž»åŒµã¯æ¬¡ã®ãšããã§ãã
- ã¯ã©ã¹ãåçã«ããŒãã§ããŸãããããã远跡ããããšã¯ã§ããŸããã ãã®å Žåãåé€ãã¹ãã§ã¯ãªããã¹ãŠã®ã¯ã©ã¹/ã³ã³ãããŒã«ãèŠããŠããå¿
èŠããããŸãã ããã«ãããã¢ããªã±ãŒã·ã§ã³ã®å®å®æ§ã倧å¹
ã«äœäžãããããã¹ãéšéã®è² è·ãå¢å ãããããå¯èœæ§ããããŸããç§ã®ã¢ããªã³ã¯ã¢ã»ã³ããªãå€æŽããªããããã¯ããã«å®å
šã§ãã
- ææã©ã€ãã©ãªã®ãµãŒãããŒãã£ãããã€ããŒã¯ãã©ã€ã»ã³ã¹å¥çŽã«ã©ã€ãã©ãªã®å€æŽã«é¢ããåæãå«ãããšã¯æããªãã ããã¯ããŸãã«ã³ã³ããŒãã³ã1ã§èµ·ãã£ãŠããããšã§ãã ããã¯åã«éæ³ã§ããããã«æããŸãã
- ååã®ã¢ã¬ã¯ã»ã€ãšç§ã¯ããã®ãããžã§ã¯ãã«çŽ1é±éãè²»ãããŸããã äžèšã®äŒæ¥ã¯ãã¯ããã«å€ãã®æéãšåŽåãè²»ãããŸããã
- ç§ã®ã¢ããªã³ã¯ãã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšãããŠããã©ã€ãã©ãªã«äŸåããŸããã åæã«ã Telerik Assembly Minifierã¯Telerikã©ã€ãã©ãªã®ã¿ãæé©åã§ããŸãã
- ã¢ããªã³ã䜿çšããå Žåãéçºè
ã¯ã©ã€ãã©ãªã®æ°ããããŒãžã§ã³ã衚瀺ããããšãã«ã¢ããªã±ãŒã·ã§ã³ãåæé©åããå¿
èŠã¯ãããŸãã
ãããã«ãããç§ã®ã¢ããªã³ã¯ã Component One XapOptimizerããã³Telerik Assembly MinifierããŒã«ãšçµã¿åãããŠäœ¿çšââã§ããŸã ã
çŸåšã®å¶é
ã¢ããªã³ã¯çŸåšã次ã®ãã®ã§ã¯æ©èœããŸããã
- Silverlight for Windows Phone 7;
- Windows Phone 7ã®XNAã
- Symbianã®Silverlightã
GUIDã®ã¿ãç°ãªããããã®ã¿ã€ãã®ãããžã§ã¯ãã®ãµããŒããè¿œå ããã®ã«æè¡çãªå°é£ã¯ãããŸããã è¿ãå°æ¥ã«å®è£ ãããŸãã
ãŸããã¢ããªã³ã§ã¯ãXAPãã¡ã€ã«ã«åçã«è¿œå ãããã¢ã»ã³ããªãåé€ããããšã¯ã§ããŸããã ããã¯ãè¿œå ãããã¢ã»ã³ããªãä»ã®ã¢ã»ã³ããªã«äŸåããåŸè ãæ瀺çã«ãããžã§ã¯ãã«è¿œå ãããŠããªãå Žåã«çºçããŸãã ãã®å Žåããããã®ã¢ã»ã³ããªãXAPãã¡ã€ã«ã«å«ãŸãããã¹ãŠã®ãããžã§ã¯ãã«æåã§è¿œå ããã¢ããªã±ãŒã·ã§ã³ãåæé©åããããšããå§ãããŸãã
è¿œå ã¢ã«ãŽãªãºã ã«äŒŽãæåŸã®å¶éã¯ã1ã€ã®XAPãã¡ã€ã«ã§æ§æãããã¢ããªã±ãŒã·ã§ã³ãæé©åã§ããªãããšã§ãã
è¬èŸ
XAPãã¡ã€ã«ãæé©åããããã®ãããã¿ã€ãã¢ã«ãŽãªãºã ã®å®è£ ã«ã€ããŠãå人ã§ååã®Alexey Gladkikhã«æè¬ããŸãã
ãœãŒã¹ã³ãŒã
ææ°ã®ãœãŒã¹ã¯ããããããŠã³ããŒãã§ããŸã ã ã¢ããªã³ã®ã€ã³ã¹ããŒã«ã¯ãVisual Studio Gallery Webãµã€ãã®å ¬åŒã¢ããªã³ããŒãžããããŠã³ããŒãããããVisual Studio Extension Managerãä»ããŠã€ã³ã¹ããŒã«ã§ããŸãïŒäžèšãåç §ïŒã
ããªãã®çµéšãå ±æããŠãã ãã
ã¢ããªã³ã®å®éã®ãŠãŒã¶ãŒããå¿çãåŸãããšãéåžžã«éèŠã§ãã ç§ããã§ã«åãåã£ãåžæã¯ãXAPs Minifierããã䟿å©ã§é«éã«ããŸããã ããªãã®ã³ã¡ã³ãã¯ãããæ°ããã¬ãã«ã«åŒãäžããããšãã§ããŸãã
ãã®ããŒã«ããã¹ãŠã®Silverlightéçºè ã«å¿ èŠäžå¯æ¬ ã§ããããšãé¡ã£ãŠããŸãã