Webã·ã¹ãã ã®ããã³ãã¨ã³ãé«éåã§æåã«ããã¹ããã¨
ååã®ã¨ã³ããªã¼ã§ãDartã®æ¬¡ã¯ãTypeScriptãæ¤è¨¼ãããã¨æ¸ãããã©ããªããèªåã®PCã§ã¯ãVisualStudio for Webã«TypeScriptã®ãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ã§ããªãã£ãã®ã§ãTypeScriptã使ããã¨ã諦ãã¾ãããã³ãã³ãã©ã¤ã³ã§ã³ã³ãã¤ã«ã¯ã§ãããã©ãããã§ã¯åä»ãè¨èªã®ã¡ãªããã§ããIDEã«ããè£å®ãåç §æ¤ç´¢ããªãã¼ã ãªãã¡ã¯ã¿ãªã³ã°ãå¹ããªãã®ã§ãã¡ãªã¿ã«ããã°ã©ãã®PCã§ã¯ãã£ããã¤ã³ã¹ãã¼ã«ã§ããã¨ã®ãã¨ããã£ããã
ã¨ããããã§ãDartãå®æ¦æå ¥ãããã¨ã決å®ãã¦Dartã§éçºããã¦ãã¾ãã
ããã³ãã¨ã³ãé«éåã®Expiresããã
ãã¦ãä»æ¥ã®æ¬é¡ãWebã·ã¹ãã ã®ããã³ãã¨ã³ãé«éåã®ã話ã§ããWebã·ã¹ãã ã®é度ã®å¤§ããªããã«ããã¯ã¨ãã¦DBè² è·ãããã¾ããããã©ã¦ã¶å´ã®ã¬ã³ããªã³ã°ãé«éåãã話ã¨ãã¦ããã³ãã¨ã³ãé«éåãããã¾ããä¸è¬ã«ã¯ã
- hmtl, css, JavaScriptãªã©ã®ããã¹ããã¼ã¿ã¯gzipå§ç¸®è»¢éãã¾ããã
- htmlããJavaScriptã®ã¤ã³ã¯ã«ã¼ãã¯ãï¼/bodyï¼ã®ç´åã«æ¸ãã¾ããã
- cssããcssãã¤ã³ãã¼ããã@importã¯ä½¿ããªãããã«ãã¾ããã
- htmlããcssã®ã¤ã³ã¯ã«ã¼ãã¯ãï¼headï¼ã¿ã°ã®ä¸ãªã©htmlã®å é è¿ãã«ç½®ãã¾ããã
- JavaScriptãcssã¯htmlã®ä¸ã«ã¤ã³ã©ã¤ã³ã§æ¥µåæ¸ããã«å¥ãã¡ã¤ã«ã«ãã¦ãã©ã¦ã¶ã®ãã£ãã·ã¥ãå¹ããã¾ããã
- éçã³ã³ãã³ãã«ã¯Expiresããããã¤ãã¦ãã©ã¦ã¶ã®ãã£ãã·ã¥ãå¹ããã¾ããã
ãªã©ãããã¾ãããããã£ã¨ãå¹æçãªã®ã¯æå¾ã®Expiresãããã®è¿½å ã§ã¯ãªãããã¨ãç¹ã«ã¹ãããªã©ã®ã¢ãã¤ã«ç«¯æ«ããã®ã¢ã¯ã»ã¹ãªã©åç·ãé
ãå ´åã«ã¯ã絶大ãªå¹æãçºæ®ããã¯ããã¨ã
ã¨ã«ãã俺ã¯é«éåã大好ããªã®ã ï¼ï¼
Expiresãããã¨ã¯
HTTPãµã¼ããã¬ã¹ãã³ã¹ãè¿ãã¨ãã«ã
Expires: Sun, 17 Feb 2014 22:28:04 JST
ã®ãããªæ¥ä»ãè¿ãã¨ããã®æå»ã¾ã§ã¯ãã®ã³ã³ãã³ãã¯å¤æ´ããªãããã¨ãã©ã¦ã¶ã«ä¼ãããã®ã§ãä¸è¨ã ã¨ã2014/2/17ãã¾ã§å¤æ´ããªãããã¨ä¼ãã¦ãã¾ããã¤ã¾ããä»ãã1å¹´å¾ãæå®ãã¦ãã¾ãã
é常ãã©ã¦ã¶ã¯ãExpiresã®æéãæ¥ãã¾ã§ã¯ã³ã³ãã³ããã¹ãã¬ã¼ã¸ã«ãã£ãã·ã¥ããäºåº¦ã¨ãµã¼ãã«åãURLããªã¯ã¨ã¹ããã¾ããï¼ãã£ãã·ã¥ããã£ã±ãã«ãªã£ãã®ã§æ¶ãã¨ãããªããã°ï¼ã
ãã©ã¦ã¶ãHTTPãªã¯ã¨ã¹ããéããªããªãã®ã§ãéä¿¡æéã¯æ¸ãããµã¼ããå¿å¯¾ããå¿
è¦ããªããAWSã®ããã«ãã©ãã£ãã¯æãããããµã¼ãè²»ç¨ãæãããã¾ãã
ã¨ãã訳ã§Expiresãããã®å¨åã¯çµ¶å¤§ã ï¼
Apacheã®å ´å
mod_expiresã追å ãã¦ã
ExpiresDefault "access plus 1 years"
ãæ¸ãã ãã§OKã§ãã
MIME-Typeå¥ã«æå®ããå ´åã¯ã
ExpiresByType text/html "access plus 1 years"
ã®ããã«ExpiresByTypeãå©ç¨ããã°OKã§ãã
ãã ãMIME-Typeã ãã§ã¯éçã³ã³ãã³ãã¨åçã³ã³ãã³ãã®åºå¥ãã¤ããªãã®ã§ãåã¯ãJavaServletå´ã§å¯¾å¿ãã¾ããï¼PHPã¨ãRubyã¨ãã§ãåæ§ã§ãããï¼ã
ã³ã³ãã³ãã®æ´æ°ã«å¯¾å¿
Expiresãããã追å ããå ´åãäºåº¦ã¨ãã©ã¦ã¶ãåãURLãã¢ã¯ã»ã¹ãã¦æ¥ãªããªãå¯è½æ§ãé«ããããéçã³ã³ãã³ããæ´æ°ããã¨ãã«åé¡ã«ãªãã¾ãããã®å ´åã¯ãURLãå¤ããããããã¾ãããé常ã¯ãã¡ã¤ã«ã®ãã¼ã¸ã§ã³çªå·ãå ¥ãããæçµæ´æ°æ¥ãå ¥ãããã§ãã
<img src="hello.png">
ã¨æ¸ã代ããã«
<img src="hello.png?20130217">
ãªã©ã®ããã«æ¸ãã¨ãããã¨ã§ããä¸è¨ã®20130217ã¯ãå½ç¶æçµæ´æ°æ¥ãã2013/02/17ãã¨ããæå³ã§ããhello.pngãæ´æ°ãã度ã«jspã®?20130217ãä¿®æ£ãã¦ããã®ã¯å¤§å¤ãããã®ã§ã
<img src=<%=Resource.get("hello.png")%> >
ã¨ããããã«Resource.get()ãéãããã«ãã¾ãããResourceã¯ã©ã¹ã¯ãèªä½ã®ã¯ã©ã¹ã§éçã³ã³ãã³ãã®URLãå
¥åããã®æçµæ´æ°æ¥ããï½URLï½?lm=YYYYMMddHHmmssãå½¢å¼ã§è¿ããã®ã§ãã
Resource#get()ã¡ã½ãããæçµæ´æ°æ¥ãå¾ãæ¹æ³ã§ããããããã°ã¢ã¼ãã¨ãªãªã¼ã¹ã¢ã¼ãã®2ã¤ãç¨æãã¾ããããããã°ã¢ã¼ãã§ã¯ããªã¯ã¨ã¹ããããURLãåå¨ãããã¼ã«ã«ã®ãã¡ã¤ã«ã®æçµæ´æ°æ¥ãã¿ã¦ãããè¿ãã¾ãã
ãªãªã¼ã¹ã¢ã¼ãã§ã¯ãäºåã«ããããã¡ã¤ã«ã§ä½æããlastModified.propertiesãã¡ã¤ã«ãåç
§ãé«éã«ã¬ã¹ãã³ã¹ãããã®ã§ããlastModified.propertiesãã¡ã¤ã«ã¯ããã¼ãURLãå¤ãYYYYMMddHHmmsså½¢å¼ã®æ´æ°æ¥ã«ãªã£ã¦ãã¾ããæ¬çªç°å¢ã«ãããã¤ããã¨ãã«ããããèµ·åãã¦lastModified.propertiesãæ´æ°ãã¾ããlastModified.propertiesãã¡ã¤ã«ã¯æ´æ°ãããã¨Tomcatãæç¥ãã¦èªåãªãã¼ããã¦ããã¾ãããã以å¤ã®ã¨ãã®propertiesãã¡ã¤ã«ã®åç
§ã§ã¯Javaã®ã©ã¤ãã©ãªå
ã§propertiesãã¡ã¤ã«ããã£ãã·ã¥ãã¦ããã¦ãã¦ã¡ã¢ãªã¢ã¯ã»ã¹ãããªãã®ã§é«éã§ãã
æ¡å¼µå
ã¡ãªã¿ã«åã管çãã¦ããããã¸ã§ã¯ãã§ã¯ãéçã³ã³ãã³ãã¯*.css, *.js, *.pngãªã©ã®ããã«é常ã®æ¡å¼µåã使ããåçã³ã³ãã³ãã¯å®æ
ãServletã§ãJSPã§ãã¬ã¹ãã³ã¹ãtext/htmlã§ãimage/pngã§ãtext/cssã§ãtext/javascriptã§ãæ¡å¼µåã*.jspã¨ãã¦ããã
CDNï¼ã³ã³ãã³ãããªããªãããã¯ã¼ã¯ï¼ãªã©ã®ãã£ãã·ã¥ãå¹ãããæã«ãåçãéçãã§åããã»ããããã®ã§ã
ãã³ããã¼ã¯
é«éåãçµã¿è¾¼ãã çµæã
å 容 | é«éåå | é«éåå¾ |
---|---|---|
3Gã§ã®ãã¼ã¸ã表示ãããã¾ã§ã®æé | 9ç§ | 1ç§ |
LANã§ã®ãã¼ã¸ã表示ãããã¾ã§ã®æé | 700ms | 200ms |
転éé | 1Mbyte | 70kbyte |
ã¨ãã訳ã§åçã«é«éåããã¾ãããã¡ãªã¿ã«è»¢éé70kbyteã¨ããã®ã¯éçã³ã³ãã³ãããã¹ã¦ãã£ãã·ã¥ã«ãããããå ´åï¼ã¤ã¾ãåãã¦ãµã¤ãã«è¨ªããã¨ãã§ã¯ãªã2度ç®ä»¥éï¼ã§ãã転éé70kbyteã¨ããã®ã¯ããã¹ã¦jspãã¬ã¹ãã³ã¹ããHTMLã§ããããgzipå§ç¸®ããã¨9kbyteã«æ¸ãã¾ãããç»åã¬ã¹ãã³ã¹ã¯ã¼ãã«ã
ã¤ã¾ãgzipå§ç¸®ããã¦70kbyteã9kbyteã«ãªã£ã¦ã1Mbyteã®ç»åãæ¸ããªããã°å¹æãªããç»åã¬ã¹ãã³ã¹ã0ã«ããä¸ã§gzipå§ç¸®ã¯å¹æãããã¨ã
ãã¨è»¢ééã®å½±é¿ã¯ãããªããã®ã®cssã®ãã£ãã·ã¥ãããããã¼ã¸ã¬ã³ããªã³ã°ã«å¤§ããå½±é¿ãã¾ãããªã«ãcssãã¡ã¤ã«ãå±ããªããã°ã»ã¼ã¬ã³ããªã³ã°ã¯é²ã¾ãªãã®ã§ã
é«éåï¼é«éåï¼é«éåï¼
Resource.get()ã®ã½ã¼ã¹
Resource.get()ã®å®ä½ã¯ãä¸è¨ã®ãããªæãã
public class Resource { /** * URLãå ¥åãã¦YYYYMMddHHmmsså½¢å¼ã®æ¥ä»ãè¿ã<br> * ä¾) å ¥å css/base.css åºå 201302101415 * * @param uri * @return ã¿ã¤ãããªãã¨ãã¯ã"" */ public static String getDate(String uri) { ResourceBundle settings = ResourceBundle.getBundle("settings"); if ("true".equalsIgnoreCase(settings.getString("debug.mode")) == false) {// ãªãªã¼ã¹ã¢ã¼ãã®ã¨ã ResourceBundle lm = ResourceBundle.getBundle("lastModified"); if (lm.containsKey(uri)) { return lm.getString(uri); } else { ErrorUtil.sendInfo(uri + " is not found in lastModified.properties."); return ""; } } else {// ãããã°ã¢ã¼ãã®ã¨ã try { SimpleDateFormat sdf = new SimpleDateFormat("YYYYMMddHHmmss"); String path = settings.getString("servlet.context") + '/' + uri; Path p = FileSystems.getDefault().getPath(path); FileTime t = Files.getLastModifiedTime(p); Date d = new Date(t.toMillis()); return sdf.format(d); } catch (IOException e) { ErrorUtil.sendInfo(uri + " is not found at Resource#getDate() in debug mode."); return ""; } } } /** * URLãå ¥åãã¦ã "{url}?YYYYMMddHHmmss"ããè¿ãï¼ããã«ã¯ã©ã¼ãããçï¼<br> * ä¾) å ¥å css/base.css åºå "css/base.css?lm=201302101415" * * @param uri * @return */ public static String get(String uri) { String date = getDate(uri); return "\"" + (date.length() > 0 ? uri + "?lm=" + date : uri) + "\""; } }
StaticResourceServlet.java
ã.cssãã.pngãã.jsã®éçã³ã³ãã³ããã¬ã¹ãã³ã¹ããServletã®ã½ã¼ã¹ã¯ä¸è¨ã«ãªãã¾ãã
@WebServlet(urlPatterns = { "*.css", "*.js", "*.png", "*.jpg", "*.jpeg", "*.gif" }) public class StaticResourceServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { doNext(request, response); } catch (Exception e) { ErrorUtil.sendError(e); throw new ServletException(); } } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { doNext(request, response); } catch (Exception e) { ErrorUtil.sendError(e); throw new ServletException(); } } /** * ã¡ã¤ã³å¦ç * * @param request * @param response * @throws Exception */ private void doNext(HttpServletRequest req, HttpServletResponse res) throws Exception { String uri = req.getRequestURI(); String contextPath = req.getServletContext().getContextPath() + '/'; String fname = uri.substring(contextPath.length()); String realPath = req.getServletContext().getRealPath("") + File.separator + fname; if (uri.indexOf("WEB-INF") != -1) {// WEB-INFãå«ã¾ãã¦ããã¨ã throw new Exception("URLã«WEB-INFãå«ã¾ãã¦ãã¾ã"); } if (uri.indexOf("..") != -1) {// ..ãå«ã¾ãã¦ããã¨ã throw new Exception("URLã«..ãå«ã¾ãã¦ãã¾ã"); } if (uri.endsWith(".js")) {// JavaScriptã®ã¨ã res.setCharacterEncoding("UTF-8"); res.setContentType("text/javascript"); } else if (uri.endsWith(".css")) {// CSSã®ã¨ã res.setCharacterEncoding("UTF-8"); res.setContentType("text/css"); } else if (uri.endsWith(".png")) {// pngã®ã¨ã res.setContentType("image/png"); } else if (uri.endsWith(".jpg") || uri.endsWith(".jpeg")) {// jpegã®ã¨ã res.setContentType("image/jpeg"); } else if (uri.endsWith(".gif")) {// gifã®ã¨ã res.setContentType("image/gif"); } else { throw new Exception("ãµãã¼ããã¦ããªãæ¡å¼µå"); } ResponseUtil.setExpiresHeader(res);// Expiresããã if (req.getParameter("lm") == null) {// lmãã©ã¡ã¼ã¿ããªãã¨ã ErrorUtil .sendInfo(uri + "ã®ãªã¯ã¨ã¹ãã§lmãã©ã¡ã¼ã¿ãã¤ãã¦ãã¾ãããExpiresãããé«éåã«å¿ è¦ã§ãã at StaticResourceServlet"); } ByteArrayOutputStream baos = null; BufferedInputStream bis = null; ByteArrayInputStream bais = null; try { baos = new ByteArrayOutputStream(); bis = new BufferedInputStream(new FileInputStream(realPath)); // ãã¡ã¤ã«ããã¡ã¢ãªã¸ã³ãã¼ byte[] buf = new byte[4096]; int size; while ((size = bis.read(buf)) >= 0) { baos.write(buf, 0, size); } // ã¡ã¢ãªããã¬ã¹ãã³ã¹ã¸åºå res.setContentLength(baos.size());// Content-Lengthããã bais = new ByteArrayInputStream(baos.toByteArray()); ServletOutputStream out = res.getOutputStream(); while ((size = bais.read(buf)) >= 0) { out.write(buf, 0, size); } out.flush(); } finally { if (bis != null) { try { bis.close(); } catch (Exception e) { } } if (baos != null) { try { baos.close(); } catch (Exception e) { } } if (bais != null) { try { bais.close(); } catch (Exception e) { } } } } }
ãã®ä»ã®ãã¿ã¼ã³
ãã¡ã¤ã«ã·ã¹ãã ä¸ã«ãã®ã¾ã¾ãã¡ã¤ã«ãç½®ããã¦ããéçã³ã³ãã³ã以å¤ã«ãDBã«éçã³ã³ãã³ããããå ´åã¯ãDBã®ãã£ã¼ã«ãã«LastUpdateãªã©ã®TIMESTAMPåãç¨æãã¦ãResource.get()ã§åããããã«ãã¦ãã¾ãã
ãã¨ãJavaScriptããéçã³ã³ãã³ãã®æçµæ´æ°æ¥ãåãé¨åã§ã¯ãJavaScriptçã®Resource.get()ç¸å½ã®ã¡ã½ããï¼å
容ã¯URLã¨æ´æ°æ¥ã®é£æ³é
åãã¼ã¿ãåãè¾¼ãã ãã®ï¼ããµã¼ããã¬ã¹ãã³ã¹ããããã«ãã¦ãã¾ãã
æåã«ããã¾ãããï¼
ãã®ä»çµã¿ã§ãããããã¸ã§ã¯ãã®éçºçµäºç´åã§ããã¯ãã«ãªãã¾ããããResource.get()ã«æ¸ãæãç®æãè¨å¤§ã ã£ããããæ»ã«ããã§ããã
æ»ã«ããã§ããã価å¤ã¯ããã®ã§çãããã£ãæ¹ãããã§ãããã§ããã°ããã¸ã§ã¯ãã®éå§æã«ä»çµã¿ãå°å
¥ãã¦ãããæ¹ãè³¢æã§ãã
é«éåï¼é«éåï¼é«éåï¼
ââ
ã¢ããªåè¨éçºãWebã·ã¹ãã åè¨éçºãè¡ã£ã¦ãã¾ãã以ä¸èªç¤¾è£½åã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
Googleã®Dartã使ã£ã¦ã¿ã
JavaScriptããããã使ãããã¸ã§ã¯ãã®ç¾ç¶
JavaScriptãã¬ã³ã¬ã³æ¸ããªãã¨ãããªãWebã¢ããªã¯ããã¸ãã¹ãã¸ãã¯ãJavaServletã§æ¸ãã¦ï¼ä»ã®è¨èªã§ããããã©ï¼ãJSPã¸è»¢éãã¦ï¼ä»ã®è¨èªã§ããã³ãã¬ã¼ãã¨ã使ãã¨æããã©ï¼ãJavaScriptãã¯ã©ã¤ã¢ã³ãã«éã£ã¦ãã¯ã©ã¤ã¢ã³ãã§ã¯ãHTMLï¼CSSã§ãã¸ã¥ã¢ã«ãã¬ã¤ã¢ã¦ãããã¦ãJavaScriptããã¸ã¥ã¢ã«ãåãããããAJAXã§ã¾ããµã¼ãã«ãªã¯ã¨ã¹ãããããAJAXã®ã¬ã¹ãã³ã¹ã§ã¾ããã¸ã¥ã¢ã«ãå¤ãã£ãããä¾ãã°ã¬ã¤ã¢ã¦ãã«ãã°ããã£ãå ´åãJavaServletãã¿ãããJSPãã¿ãããHTMLãCSSã¿ãããJavaScriptã®å®è¡ã«ã¨ã©ã¼ããªãã確èªããããAJAXã§å¾ãããã¬ã¹ãã³ã¹ã®å
容ãã¿ããã¨ãããªãéçºç°å¢ã¨ãã¦ã«ãªã¹ã§ãããä¸èªç¶ãªè¨³ã§ãã
ãã¨ãJavaScriptã®ã³ã¼ãéãå¤ãã¦ãã¼ã éçºã¨ãã ã¨ãã³ã¼ãã£ã³ã°ã«ã¼ã«ããã£ã¡ã決ãã¦ãã½ã¼ã¹ã³ã¼ãã¬ãã¥ã¼ãããªãã¨ãã¡ããã¡ããªã³ã¼ããæ¸ã人ãç¾ããããã¾ããã¯ã©ã¹å®ç¾©ã®æ¸ãæ¹ãã¿ããªãã©ãã©ã ã£ãããã³ã³ã¹ãã©ã¯ã¿ä»¥å¤ã§ã¡ã³ãå¤æ°ãåæã«è¿½å ããã¦ãããã
//ã¨ããããããã«ç½®ãã¦ãã
ã¿ãããªã³ã¡ã³ãã¨å
±ã«ã½ã¼ã¹ã³ã¼ãã®ä¸ã»ã©ã«ã¡ã³ãå¤æ°ãå¢ãããã¦ãããããã¨ãããæ»ãã§ããï¼ã¨å«ã³ãããªã訳ã§ãã
ããããJavaScriptã®ãããªéçãªåããªãè¨èªã¯ãIDEã®è£éãå¹ããªãã£ãããåç
§æ¤ç´¢ããªãã£ãããå®è¡æã«ãªããªãã¨å¤æ°åãã¡ã½ããåãå
¥åãééãããã¨ãåãããªãã£ãããååå¤æ´ã®ãªãã¡ã¯ã¿ãªã³ã°ãå¹ããªãã£ããã¨ãå¹çãæªãã®ã§å¥½ãã§ã¯ããã¾ããã
次ã«ä½ãWebã¢ããªã¯ãJavaScriptã«ä»£ããè¨èªã§éçºããããªã¨æãããã£ã¨ã代ãããã®ãæ¤è¨ãã¦ã©ãããã¦ãã¾ãããDart, Haxe, TypeScript ã®3ã¤ãã¦ã©ãããã¦ããã®ã ãã©ãHaxeã¯èª¿æ»æ¸ã¿ã§ä¸é¨ã®ããã¸ã§ã¯ãã§ä½¿ç¨ãå§ãã¦ãã¾ãï¼æ°ãåãããHaxeã®ã¨ã³ããªãæ¸ãã¾ãï¼ã
ä»åã¯ãGoogleã®Dartã使ã£ã¦ã¿ãã®ã§ãã®ã¬ãã¼ãã
Dartè¨èªã®ç¹å¾´
æ¨å¹´ç§ã«ãå®å®æ¿ã®Dart Editorãåºã¾ããã
Dart Editor + Dart SDKã¯ã http://www.dartlang.org/ ãããããã¦ã³ãã¼ãã§ãã¾ããDartã®ç¹å¾´ã¯ã
- ãã¹ã¯ãããWebãã¢ãã¤ã«Webããµã¼ãç¨ã¨å¤ç¨é
- DartVMã§ãåãããããJavaScriptã¸ã³ã³ãã¤ã«ãã¦ãåããã
- ç°¡ç´ ã§ãå¹çãããã¹ã±ã¼ã©ãã«
- åãããããã¦ãèªã¿ãããææ³
- Dartè¨èªã¯ãã©ã¤ãã©ãªãããã±ã¼ã¸ããã¼ã¸ã£ãã¨ãã£ã¿ããªã¼ãã³ã½ã¼ã¹
- éçºå¹çãä¸ããPubããã±ã¼ã¸ããã¼ã¸ã£
- DartVMã¯é«éãJavaScriptã¨ã³ã¸ã³ã®V8ã®åé
ã¨ããæãã§ããDartVMãã¤ãã£ãã§åãããã®ã¯ãå½é¢ãµã¼ããµã¤ãã§ä½¿ãã¨ãã§ããããæ®éã¯ãdart2jsã§JavaScriptã«å¤æãã¦Webãã©ã¦ã¶ã®ä¸ã§ä½¿ãã®ãæ®éã§ãããã
主ãªè¨èªä»æ§
è¨èªä»æ§ã®ç¹å¾´ã¨ãã¦ã¯ã
- ã¯ã©ã¹ï¼prototype baseã¯è²ã åé¡ããããã¨ããã¨ããã§ãã
- ã¯ã©ã¹ã®å¤ã®ãããã¬ãã«é¢æ°ï¼Javaã¨éã£ã¦ã¯ã©ã¹ã®å¤ã«ãé¢æ°æ¸ãããã¨
- ãªãã·ã§ã³å¼æ°ï¼çç¥å¯è½å¼æ°ãC++ã®ããã«å¼æ°ãªã¹ãã®å¾ãã®æ¹ãçç¥ããæ¹æ³ã¨ãååä»ãå¼æ°ã«ãã¦ã©ããçç¥ãã¦ããã2éãããã
- æååã¤ã³ã¿ã¼ãã¬ã¼ã·ã§ã³ï¼Perlã®ãããª"Hello, ${name}"ã¿ãããªç½®æã§ãã
- ãã«ãã©ã¤ã³æååï¼Perlã®ãã¢ããã¥ã¡ã³ã($s=<<END;)ã¿ãããªæååãªãã©ã«ã§ãã
- åçã¡ã½ãããã³ããªã³ã°ï¼å®è¡æã«ã¡ã½ãããããã確èªããï¼éçã«ãã§ãã¯ãã¦ã»ããã®ã ãï¼
- ã«ã¹ã±ã¼ãæ¼ç®å(..)ï¼VBãJavaScriptã®withã¿ãããªãã®ã§ãã
- ãªãã·ã§ãã«ãªåï¼å°ããªã¢ããªããã£ã¨æ¸ãã¨ãã¯åãæ¸ããªããã¡ããã¨ããã¢ããªã¯ãåãæ¸ãï¼ç§ã¯å³å¯ãªåã欲ããï¼
- ã¬ãã·ã«ã«ã¹ã³ã¼ãï¼ã¡ããã¨{}ã®ãããã¯ãèå¥åã®ã¹ã³ã¼ãã§ãããã¯ãã¼ã¸ã£ã対å¿ãã¦ãããããã¼ã«ã«å¤æ°ãã£ããã£ããã¦ãããã¨ãã¾ãJavaScriptã ããç°å¸¸ã ã¨ã¯æããã
- ã©ã¤ãã©ãªï¼ã©ã¤ãã©ãªã使ãã¨ããä½ãã¨ããåãæ¿ãã¨ãã®ä¿®æ£ä¸è¦ãPubã¨ãããªã¼ãã³ãªãªãã¸ããªãããªããæ軽ã§ä¾¿å©
- Isolateï¼ã¢ã¤ã½ã¬ã¼ãï¼ï¼ãã«ãã¹ã¬ããã§ã¡ã¢ãªãå ±æãã¦ç®¡çããã®ã¯ãéçºããããã°ã大å¤ãIsolateå士ã¯ããäºãã®ã¡ã¢ãªã«ã¢ã¯ã»ã¹ã§ããªãã®ã§å®å ¨
ã¨ããæããã¾ãã¢ãã³ãªè¨èªä»æ§ã§ããã使ã£ã¦ã¿ãææ³ã¨ãã¦ã¯ããã¯ãC++ãJavaã好ããªåã¨ãã¦ã¯ã¡ã½ããããããã©ãããåçã«å¤æããã®ãè¾ãããä¸å¿ãDart Editorã§é»è²ãä¸ç·ãã§ã¦è¦åãã§ãã¨ãããããã©ã
ãã¨ã¯ãã¡ã½ããã®ãªã¼ãã¼ãã¼ããã§ããªããJavaScript風ã«ããã®ãããªãã·ã§ãã«ãªåã®ãããããªã¼ãã¼ãã¼ããããã¨ã½ã¼ã¹ãèªã¿ã«ããã¨ããæå³ãªã®ããJavaScriptã«ã³ã³ãã¤ã«ããã¨ãã«ç¾ãããªããããã
ãã¨ã¯ãintãåæå¤ã代å
¥ãã¦ããªãã¨ãã¯ãnullã«ãªã£ãããããããã¡ãã£ã¨æ°ã«ãªã£ãã¨ããã
classã®ä¾
// å½¢ç¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ abstract class Shape {// abstractã使ãã num perimeter();// numåã¯ãintåã¨doubleåã®superã¯ã©ã¹ } // ç©å½¢ã¯ã©ã¹ class Rectangle implements Shape {//implementsã§Shapeã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®è£ final num height, width; //finalã¯åæå¤ä»£å ¥ã®ã¿å¯è½ã§ä»¥éå¤æ´ä¸å¯ Rectangle(this.height, this.width); // ã³ã³ãã¯ãã³ã³ã¹ãã©ã¯ã¿è¡¨è¨ãå¼æ°ã§ã¡ã³ãã¼å¤æ°ãä»£å ¥ããã¨ããæå³ã num perimeter() => 2*height + 2*width; // é¢æ°ã®çç¥è¡¨è¨ãé¢æ°æ¬ä½ãåæã®ã¨ãã¯ããã®ããã«çç¥ã§ããã } // æ£æ¹å½¢ã¯ã©ã¹ class Square extends Rectangle {// extendsã§ç©å½¢ãç¶æ¿ï¼ç¶æ¿ã¯1ã¤ã¾ã§ï¼ Square(num size) : super(size, size);//ã³ã³ã¹ãã©ã¯ã¿ã§è¦ªã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãå¼ã¶ã¨ãã¯C++風ã«ã³ãã³ã使ããsuperã¨ããäºç´èªã使ãã¨ããã¯Java風ã }
ã¾ããããè¦ãã ãã§ãã¢ãã³ãªæãã§ããã
Dart Editorã®ç¹å¾´
IDEã§ããDart Editorã®ç¹å¾´ã¯ã
- ã³ã¼ãè£å®ï¼ã¡ã³ãå¤æ°ãã¡ã½ããåãè£å®ããã
- ãªãã¡ã¯ã¿ãªã³ã°æ©è½ï¼ãªãã¼ã ã¨ã
- ã¢ã¦ãã©ã¤ã³ãã¥ã¼ï¼ã¯ã©ã¹ã®ã¡ã³ãå¤æ°ãã¡ã½ãããããªã¼è¡¨ç¤º
- ãããã¬ã¼ï¼ãã¬ã¤ã¯ãã¤ã³ããå¤æ°ãè¦ããã¹ãããå®è¡
- éç解æï¼ã¡ã³ãå¤æ°ãããªãã¨ããä»£å ¥ãã¦ãªãã¨ãéç解æã§è¦åãã§ã
- å¼ã³åºãå æ¤ç´¢ï¼å¼ã³åºãå æ¤ç´¢ã§ããã«ããã表示ã§ãã
ã¨ããæãã
使ã£ã¦ã¿ãææ³ã¨ãã¦ã¯ãã³ã¼ãè£å®ãå¹ããªããªããã¨ããã£ã¦Dart Editorãåèµ·åãããç´ã£ãã¨ãããªãã¡ã¯ã¿ãªã³ã°ã®ãªãã¼ã ã¯ãã©ã¤ãã©ãªãè¶
ãã¦ã¯ç¡çãªã®ããå¹ããªãã¨ãããã£ããã¨ããå¼ã³åºãå
æ¤ç´¢ã¯1度ãåããªãã£ãããªã©æ®æ®µæ¸ãã¦ããJavaã®å®å¿æã«æ¯ã¹ãã¨å¿ãã¨ãªãã
ä½ã£ã¦ã¿ãã¢ããª
3æéãããã§ä½ã£ã¦ã¿ãã¢ããªãä¸è¨ãhtmlãã¡ã¤ã«ãã»ã¼æ¸ãããcssãã¡ã¤ã«ãã»ã¼æ¸ãããã³ã¼ãã§ã¦ã¤ã³ãã¦ãä½ã£ãããã³ã³ããã¼ã«ãé
ç½®ãããããWindow Toolkitã£ã½ããã®ãã¯ã©ã¤ã¢ã³ãå´ã¯ãhtml,cssã®ã³ã¼ãã¯æ¸ããã«dartã ãæ¸ãã¦ããµã¼ããµã¤ããcssãhtmlã¯ã»ã¨ãã©åºåããã«jsonã¨ãã ããåºåããã·ã¹ãã ãã¤ã¡ã¼ã¸ãããã®ã
ãªããPubã¨ãããªã¼ãã³ãªãªãã¸ããªãããpubã³ãã³ãã¨ããã©ã¤ãã©ãªããã¼ã¸ã£ããããä»ã®äººãä½ã£ãã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ããããã¢ãããã¼ãããããèªåã®ä½ã£ãã©ã¤ãã©ãªãã¢ãããã¼ãããã®ã¯ã¨ã¦ãç°¡åãããããpub installã³ãã³ãã§ãèªåãæ¸ãã¦ããã©ã¤ãã©ãªãåé¤ãããã¨ãããã¹ããã¦ãã¾ãã¾ããï¼ããã¦ãªã¬ãªã¬Window Toolkitä½ãç´ãï¼ãpubã«é¢ãã¦ã¯ã¾ã 調æ»ä¸è¶³ãªã®ã§ãã¿ãªããèªåã®ã©ã¤ãã©ãªãä½ã£ã¦ããå ´åã¯ãpubã³ãã³ãã®ä½¿ç¨åã«ã¯ããã¯ã¢ãããã¾ãããã
#dartããã°ãã調æ»ãããã次ã¯TypeScriptã調æ»äºå®ã
ââ
ã¢ããªåè¨éçºãWebã·ã¹ãã åè¨éçºãè¡ã£ã¦ãã¾ãã以ä¸èªç¤¾è£½åã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
AWSã®EC2ã®èªåãªãã¼ã
AWSã«å¼ã£è¶ããããç©çãµã¼ãã§ã¯çºçããªãã£ãããªã¼ãºï¼CPU100%ã§å¼µãä»ãï¼ããçºçãã¾ããã
ããã§ãç£è¦ããã°ã©ã ãç·æ¥ä½æãã¾ããã
ä¸è¨ããã°ã©ã ã®ãã¦ã³ãã¼ãã¯ã http://bit.ly/104LVnC ãã¡ãããã
AWSå¼ã£è¶ãã1ãæç®ã®èª²éã$5000ãªã¼ãã¼ãããããåæ¸ãã¦1/3ãããã«æ¸ããããããããããè ã®è¦ãæ(^_^)/
ââ
ã¢ããªåè¨éçºãWebã·ã¹ãã åè¨éçºãè¡ã£ã¦ãã¾ãã以ä¸èªç¤¾è£½åã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
ZABBIXã®ã¹ã¹ã¡
å
é±ã¯ãAWSã¸å¼ã£è¶ãã«ã¤ãã¦ã¨ã³ããªãæ¸ãããä»é±ã¯ããµã¼ãã¹ç£è¦ã«ã¤ãã¦ã
å¼ã£è¶ãåã¯ãMRTGã使ã£ã¦ããããµã¼ãã¹ç£è¦ã¨ããããã¯è² è·ã®å¯è¦åã§ãããSNMPï¼Simple Network Management Protocol)ã使ã£ã¦å¾ãããã¡ããªã¯ã¹ãã°ã©ãåãã¦ãã¾ãããCPUè² è·ãã¡ã¢ãªä½¿ç¨éããã£ã¹ã¯ä½¿ç¨éããããã¯ã¼ã¯ãã©ãã£ãã¯ï¼éä¿¡éï¼ãããã»ã¹æ°ãªã©ãdaily, weekly, monthlyã§ã°ã©ãåãã¾ããã°ã©ãåããã¦ããã¨ãåé¡ãèµ·ãã£ãã¨ãã«ä½ãåå ããã¾ãã¯ãåé¡ãèµ·ããåã«äºæ¸¬ãã§ãã¾ããå¼ã£è¶ãåã¯ãããã¨ã¯å¥ã«ãµã¼ãã¹ç£è¦ï¼æ»æ´»ç£è¦ï¼ã¨ãã¦Perlã¹ã¯ãªããã使ã£ã¦ããã»ã¹ãçãã¦ããããç£è¦ãã¦æ»ãã§ãããåèµ·åããããªã©ããã¦ãã¾ããã
MRTGå°å
¥æã¯ã7å¹´ãããåã ã£ãã®ã§ãããããå¤ããããã·ã¹ãã ã§ãªãè¿ä»£çãªãã®ã«ããããªã¨æã£ã¦æ¢ããã¨ããZABBIXããããã ã£ãã®ã§å°å
¥ãã¾ããã
ä¸å³ããããã·ã¥ãã¼ãã®ãããç»é¢ã§ãããã¹ããã°ã«ã¼ãåããã¦ãã©ã®ã°ã«ã¼ãã«è¦åãã§ã¦ããããã¨ã©ã¼ï¼ã¨ã©ã¼ã®ã¨ãã¯èµ¤ããªãï¼ãåºã¦ããããããã¾ããã°ã«ã¼ããã¯ãªãã¯ããã°ããã«ãã¹ãä¸è¦§ã¸ã¨ããªã«ãã¦ã³ã§ãã¾ããè¦åã¨ããããªã¬ã¼ãã¨ã©ã¼ã¨ããããªã¬ã¼ãè¨å®ã§ãã¾ããã°ã«ã¼ã管çã§ãããã¨ã§ãæ°ç¾å°ã®å ´åã§ã管çã§ããããã«ãªã£ã¦ããã®ã§ããããã¾ãã大éã®ã¡ããªã¯ã¹ãããªã¬ã¼ãã¤ãã³ãããã³ãã¬ã¼ãã¨ãã¦ããã©ã«ãã§ã¤ã³ã¹ãã¼ã«ãããã®ã§ããã¹ãã追å ããããã³ãã¬ã¼ãã追å ããã ãã§ã大éã®ã¡ããªã¯ã¹ãªã©ãä¸æ°ã«è¿½å ããã¦ä¾¿å©ã§ãã
ä¸å³ããCPU使ç¨çã§ããLoad Averageã¨éã£ã¦ãUser TimeãSystem TimeãI/O WaitãNiceãInterruptãSoft IRQãSteal Timeãªã©ãè²åããã¦è¡¨ç¤ºãã¦ããã¾ããã¾ããè² è·ãé«ãããªé¨åããºã¼ã ãããå ´åã§ããã®è¾ºãã横ã«ãã©ãã°ãã¦é¸æããã¨é¸æç¯å²ãæ¡å¤§ããã¾ãã
MRTGãããããªã£ããã¨
- MRTGã§ã¯ãµã¼ãä¸ã®è¨å®ãã¡ã¤ã«ãä½æãè¨å®å¤ã®è¿½å ãç·¨éãå¿ è¦ã§ããããã¹ãã®è¿½å ã»åé¤ã®åº¦ã«ãµã¼ãã§ã®ä½æ¥ãå¿ è¦ã§ãã£ãããZABBIXã§ã¯WebUIã§ãã¹ãã®è¿½å ãã¡ããªã¯ã¹ã®è¿½å ã»åé¤ã»ç·¨éãå¯è½ã«ãªã£ã
- MRTGã§ã¯ã¡ããªã¯ã¹ã®å¯è¦åï¼ã°ã©ãåï¼ã®ã¿ã§ãã£ãããZABBIXã¯ããªã¬ã¨ãã¤ãã³ãã§éç¥ãéãæ©è½ãªã©ããã
- MRTGã§ã¯ã°ã©ãã®ã°ã«ã¼ãåã¯ãHTMLãæ¸ããªã©ã®å¿ è¦ããã£ãããZABBIXã§ã¯WebUIã§ã°ã«ã¼ãåãã§ããããã°ã©ãä¸è¦§è¡¨ãã¼ã¸ï¼Screenã¨å¼ã¶ï¼ã追å ã»ç·¨éã»åé¤ãã§ãã
- MRTGã§ã¯daily, weekly, monthlyã¨åºå®çã§ãã£ãããZABBIXã§ã¯ãã¼ã¿ã¯RDBã«ä¿åããã¦ããï¼ã¢ã¤ãã¹ã§ã¯MySQLã使ç¨ï¼ãã°ã©ãã®ãã¥ã¼ã表示ã¹ãã³ãWebUIã§èªç±ã«å¤æ´ã§ãã
ZABBIXã®ä½¿ãã«ããã¨ãã
ãããã¨ã¥ããã«ã¿ãã¾ããã使ãã«ããã¨ãããããã¾ãã
- Screenã®ç·¨éã使ãã¥ãããå ¨ä½çã«ãã«ãã¦ã³ãé¸æãããå ¨ç»é¢ãªãã¼ãã«ãªã£ã¦ä½¿ãã«ãããç¹ã«Screenã®ç·¨éãã¤ãããè²ã ãªã¨ãããAJAXã«ãã¦é¨åæ¸ãæãã«ãªã£ã¦ãããã¨ããã
ã¨ããã¨ããã§ããWebUIãéãã¨çµå±ããã¹ããã¡ã¤ã«ã§ç·¨éããæ¹ãæ©ãã®ãï¼ã¨ãæãã¦ãã¾ãï¼ããããã¹ããã¡ã¤ã«ã¯ããã¹ããã¡ã¤ã«ã§ãã¹ããããã®ãåé¡ãªã®ã ãï¼ãä¸å¿ãXMLã§Exportãã¦ãããã¹ãã¨ãã£ã¿ã§ç·¨éãã¦Importãã§ããã®ã§ãããXMLã®ç·¨éèªä½ãé¢åãå¼·åãªXMLã¨ãã£ã¿ãæ¢ããæ¹ãããã®ããããã¾ããã
ä»ã®ã¨ãããã©ã°ã¤ã³ãä½æãã¦ç¬èªã®ã¡ããªã¯ã¹ã追å ã¨ããã®ã¯ãã£ã¦ãã¾ããããã®è¾ºã¯ç 究ãã¦ã³ãã³ã追å ãã¦ããããã¨æãã¾ãã
ï¼ä»æ¥ã¯ãé¸æã§ãããï¼æ©ã帰ã£ã¦é¸æçµæã®TVãã¿ããã
ââ
ã¢ããªåè¨éçºãWebã·ã¹ãã åè¨éçºãè¡ã£ã¦ãã¾ãã以ä¸èªç¤¾è£½åã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
AWSã§ã®ï¼ç¨®é¡ã®ãããã¯ã¼ã¯æ§æ
å
æ¥ãã¢ã¤ãã¹ã®ãµã¼ãã®å¼ã£è¶ããããã¾ãããå¼ã£è¶ãã¯æ¯åº¦æ¯åº¦å¤§å¤ã§ãããã¼ã¿ã»ã³ã¿ã¼ã«ç½®ãã¦ãããµã¼ã群ã§ããã大å¤ãªã®ã§ãããããªãã§ãããå¼ã£è¶ãããããè² ããªãäºæ
ãããã¾ãã¦ããã¼ã¿ã»ã³ã¿ã¼ããAWSã¸ãµã¼ã40å°ã®å¼ã£è¶ãããã¾ããã
AWSã¯ãåè¨éçºã§ã¯çµé¨ããããã®ã®èªç¤¾ãµã¼ãã¹ã§ã¯åãã¦ãåã大æ¥ãã§åå¼·ãã¦ãæ´ãã¦AWSããã¥ã¼ã§ãã
ã·ã¹ãã éçºã¯ãä¼ç»ãè¦ä»¶å®ç¾©ãè¨è¨ãå®è£ ã試é¨ãéç¨ã¨ããã¾ãããã©ãã楽ããã§ããããã®ã¥ããä¸æ³ï¼ãä»åã¯ããããã¯ã¼ã¯ã¢ã¼ããã¯ãã£ã®ã話ã§ãããããã¯ã¼ã¯ã¢ã¼ããã¯ãã£ãèããã¨ããæ¡å¼µæ§ã¯ãããï¼å¯ç¨æ§ã¯ãããï¼è² è·ã«èãããããï¼éç¨ãããããï¼ã³ã¹ããä¸ããã«ã¯ã©ããããï¼ã¨è²ã èããå¿ è¦ããã£ã¦æ¥½ããã§ããã
AWSã®è©±ã®åã«ãã¾ãã¯ä¸è¬çãªä¸å±¤ã¢ãã«ã®è§£èª¬ããã
ã¯ã©ã¤ã¢ã³ã(Webãã©ã¦ã¶ã¾ãã¯ã¢ããª)ããApacheã¸æ¥ç¶ãã¦ããã®å¾ãã«AP(ã¢ããªã±ã¼ã·ã§ã³ãµã¼ãï¼ããããAPããDBã«æ¥ç¶ã¨ããå½¢ããã¡ã®èªç¤¾è£½åã¯åºæ¬Javaãªã®ã§Webã¢ããªã±ã¼ã·ã§ã³ã¯Tomcatä¸ã§åãã¦ãã¾ãã
Apache-Tomcaté£æºãã¦ããã®ã¯ãæ¬æ¥ã¯éçã³ã³ãã³ãã¯Apacheãè¿ããåçã³ã³ãã³ãã¯APãè¿ãããã§ãããä¸è¬ã«éçã³ã³ãã³ãã¯Tomcatãè¿ãããApacheãè¿ãæ¹ãéãããã§ãã
ã¾ããApacheã®ãã¼ãã£ã«ãã¹ãæ©è½ã使ãããã«ãå
é ã«Apacheããã¾ãããã¼ãã£ã«ãã¹ãæ©è½ã¯ãè¤æ°ã®Webãµã¼ãã¹ã1å°ã®ãã¹ãã§å¦çããããã«å¿
è¦ã§è² è·ãé«ããªããµã¼ãã¹ãè¤æ°ããå ´åã¯ãApache1å°ã«è¤æ°ãµã¼ãã¹ãéç´ãã¦ã³ã¹ããåæ¸ãã¾ããä¾ãã°DNSãµã¼ãã®è¨å®ã§ãwww.example1.jpã¨www.example2.jpã®ï¼ã¤ã®ãã¡ã¤ã³ãåãIPã«è¨å®ãããã®ãã¹ãã«Apacheãç«ã¦ã¦ããã©ã¦ã¶ããã®ãªã¯ã¨ã¹ãã®ãã¡ã¤ã³ãè¦ã¦ãæ¯ãåãå
ã®APãåãæ¿ããã¨ããå½¢ã§ä½¿ãã¾ãã
3ã¤ç®ã®çç±ã¨ãã¦ãmod_rewriteãããã¾ããmod_rewriteã¯æ©è½ãå¼·åéãã¦æªéã®ãããªã¢ã¸ã¥ã¼ã«ã¨ä¸é¨ã§è¨ããã¦ãã¾ãããURLãæ£è¦è¡¨ç¾ã§ãããããã¦ãããããããAPã¸ãã©ã¯ã¼ãããã¨ãã«URLãæ¸ãæãã¦è»¢éããããã¨ãã§ãã¾ããä¾ãã°ã
http://d.hatena.ne.jp/kamiyan2/20121006
ã¨ãããªã¯ã¨ã¹ããããã³ãã®Apacheãåãä»ããã¨ãã«ãæ£è¦è¡¨ç¾ã§ãkamiyan2ãã¨ã20121006ãããããããã¦ã
http://d.hatena.ne.jp/entry.jsp?uid=kamiyan2&eid=20121006
ã®ããã«URLãæ¸ãæãã¦ãAPã«è»¢éããããã¨ãã§ãã¾ãã
RESTfulãæµè¡ã£ã¦ãã¾ããããã以åã«æ¤ç´¢ã«å¼ã£ããããããããããã«åããªã½ã¼ã¹ãæããªãPATHã«å«ãã¾ãããã¨ããã¨ããã§ããã
4ã¤ç®ã®çç±ã¨ãã¦ãå³ã«ãLBãã¨æ¸ãã¦ããããã«ãã¼ããã©ã³ãµã¨ãã¦ã®Apacheã§ãããmod_proxy_ajpã¨ãmod_proxy_httpãmod_jkãªã©ã使ã£ã¦APãå¢ããã¦åæ£å¦çããã¾ãã
ãã®1ï¼æå°ãµã¼ãã¹(AP + DB)
AWSã¸ã®å¼ã£è¶ãã§æãè² è·ã®å°ãããµã¼ãã¹ã¯ãEC2ã1å°ãRDSã2å°ï¼ä»ã®ãµã¼ãã¹ã¨å
±æï¼ã¨ãã¾ããããããEC2ã¯ããã¤ã¯ãã¤ã³ã¹ã¿ã³ã¹(æé¡ç´$19)ãDBã¯ãRDSã®ããã£ã¢ã ã¤ã³ã¹ã¿ã³ã¹(æé¡ç´$172)ãRDSããã£ã¢ã ã¤ã³ã¹ã¿ã³ã¹ã¯è² è·ã®å²ã«ãªã¼ãã¼ã¹ããã¯ã«ãªã£ã¦ãã¾ãããããã¯ä»ã®ãµã¼ãã¹ã¨ã®å
±æã§ä½¿ãããã«å¤§ãç®ã«ãªã£ã¦ãã¾ãããã1å°RDSã¯ããªã¼ãã¬ããªã«ã§ãããã®ãªã¼ãã¬ããªã«ã«ã¯ãAPããã®ã¢ã¯ã»ã¹ã¯ãã¦ããããåãªãããã¯ã¢ããç®çã§ãããã¡ã¤ã«ã«ããã¯ã¢ãããåã£ã¦éç¨ã ã¨é害æã«å¾©æ§ã«æéããããã®ã§ã¬ããªã±ã¼ã·ã§ã³ãã¦ãã¾ããå¹´ã
ãµã¼ãå´ã®ãã¼ã¿ã¯å¢ãã¦ããæ代ãªã®ã§ãããã¯ã¢ããããã®å¾©æ§åæã®ã·ã¹ãã ã¯ãããã¹ãã§ã¯ãªãã§ãããã
ã¡ãªã¿ã«ä¸å³ã®ã¢ã¤ã³ã³ã¯Amazonãé
å¸ãã¦ããã¢ã¤ã³ã³ã§ããããã¯ã¼ã¯å³ãæ¸ãã«ã¯æ¬ ãããªãã¢ã¤ã³ã³ã§ããããããæ¨æºåããã¦ããã¨ããã¯ãAmazonã®ããã¨ããã§ããã
ãªãEC2ã¤ã³ã¹ã¿ã³ã¹ã¯ãTerminateããã¨ã¤ã³ã¹ã¿ã³ã¹ã¹ãã¬ã¼ã¸ã«ä¿åããæ
å ±ã¯æ¶ãã¾ããã¹ãã¬ã¼ã¸ã®æ
å ±ãæ¶ããªãããã«ããã«ã¯ã¤ã³ã¹ã¿ã³ã¹ã¹ãã¬ã¼ã¸ã§ãªãEBSï¼ææï¼ã使ãã¨ãéã¯ä½åã«ããããã©ãã¡ãã£ã¨å®å¿ã§ãã
ãã¡ã®ã·ã¹ãã 群ã§ã¯ãLBãAPã§ä½¿ã£ã¦ããã®ã¯åºæ¬ã¯ãã£ãã·ã¥ã§ãéè¦ãªæ
å ±ã¯ä¿åãã¦ããªãã®ã§EBSã¯ä½¿ãã¾ããã§ããã
ã¾ããå¥éAMIï¼ã¤ã¡ã¼ã¸ãã¡ã¤ã«ï¼ããèµ·åããã¨ãã©ã¤ãã¼ãIPãã°ãã¼ãã«IPãåçã«æ±ºãããã¦ãã¾ãã®ã§ã注æãå¿
è¦ã§ãããªãTerminateã§ã¯ãªããstop/startãrestartã§ã¯IPã¯å¤ãããªãã®ã§å¤§ä¸å¤«ã§ããTerminateã¯ãåæ¢ã¨ããããã¯ãç ´æ£ã§ãããOSãèµ·åããªããªã£ããrebootä¾é ¼ãå¹ããªããSSHã§å
¥ããªããªã£ããªã©ã®ã¨ãã«ä½¿ãããã§ãããä»ã®ã¨ãããã®ãããªäºæ
ã«ãªã£ããã¨ã¯ãªãã§ãã
IPã«é¢ãã¦ã¯ãEIPã§ã°ãã¼ãã«IPãåºå®IPåãã¾ããï¼ã»ã¼ç¡æï¼ãã¡ãªã¿ã«EIPã¯åæè¨å®ã§ã¯5件ã¾ã§ããä½æã§ãã¾ããããã以ä¸æ¬²ããå ´åã¯ãAmazonã¸é£çµ¡ããå¿
è¦ãããã¾ããã°ãã¼ãã«IPãè²´éã ããã§ãããããï¼ãã¡ã¯ä»ã®ã¨ãã5件以å
ã§æ¸ãã§ãã¾ãï¼ã
ãã®2ï¼ã¹ã¿ã³ãã¼ããµã¼ãã¹(CDN+LB+AP+DB)
æ¨æºçãªãããã¯ã¼ã¯æ§æã¨ãªã£ãã®ã¯ã http://ibispaint.com ãibisPaintã¯ãéæ¢ç»ã大éã«ã¬ã¹ãã³ã¹ããããäºåã«Cloud Flare(ç¡æCDNãµã¼ãã¹)ã追å ãã¦ãã¾ãããCloud Flareã¯ãfladdictããã®エントリーã§ç´¹ä»ããã¦ããã®ã§æ©éå
¥ãã¾ããã
AWSã§ã¯ãWANæ¥ç¶ã®ãã¼ã¿éä¿¡ã§ã課éãããããããã¼ã¿éãæããå¿
è¦ãããã¾ãããéçã³ã³ãã³ããCDNãµã¼ããã¬ã¹ãã³ã¹ãã¦ããããããAWSå´ã®ãµã¼ã群ã¾ã§ãªã¯ã¨ã¹ããæ¥ãéãæ¸ãã³ã¹ãåæ¸ã«ãªãã¾ããibispaintã®å®ç¸¾ã§ã¯ãã©ãã£ãã¯ã®60%ãåæ¸ã§ãã¾ãããéä¿¡éã®ã¿ãªããDBè² è·ãä¸ããã¾ãããã¾ããCDNãµã¼ãã¹ã¯ä¸çä¸ã«ã³ã³ãã³ããã£ãã·ã¥ãµã¼ããããã®ã§ãã¯ã©ã¤ã¢ã³ãã®è¿ãã®ãµã¼ããå¿çããããã«ãªã£ã¦ãã¦ãå¿çãæ©ããªãå¹æãããã¾ããibisPaintã¯ãUSããªã¼ã¹ãã©ãªã¢ãã¢ã©ããã¿ã¤ãéå½ãå°æ¹¾ãªã©ãããã¢ã¯ã»ã¹ãããã®ã§å°ãã¯ã¬ã¹ãã³ã¹ã¿ã¤ã åæ¸ã«ãå½¹ç«ã£ã¦ããããããã¾ããããªãCloud Flareã使ãã¨ãã¯ã©ã¤ã¢ã³ãããæå¯ãã®ã³ã³ãã³ããã£ãã·ã¥ãµã¼ãã«ã¢ã¯ã»ã¹ãæ¯ãããã«ãDNSãµã¼ãã¯Cloud Flareã®ãã®ã«ãªãã¾ããã¾ããåçã³ã³ãã³ããå«ããã£ããCloud Flareã®ãµã¼ããçµç±ãã¦ãªã¯ã¨ã¹ããèªåã®ãµã¼ãã«å±ãã¾ããCDNãµã¼ãã¹ã¯AWSã§ãããã®ã§ãããææã§ããããCloud Flareãå©ç¨ãã¾ãããç¡æã§ããã ãã®ãµã¼ãã¹ãåããããã¨ã¯é©æã§ãã
CDNã®æ¬¡ã«ãELB(ãã¼ããã©ã³ãµãæé¡ç´$18)ãç½®ãã¾ããããã¼ã¿ã»ã³ã¿ã¼ã®ããã¯ãApache mod_proxy_ajpã«ãããã©ã³ã·ã³ã°ã§ãããããã£ããAWSã«å¼ã£è¶ããã¨ãããã¨ã§ELBã使ãã¾ãããELBã«ã¯SSHã§ãã°ã¤ã³çã¯ã§ããAWSã®WebUIãªã©ããè¨å®ãã¾ããELBã®ç®¡çã¯ã»ã¨ãã©ãä»»ãç¶æ
ã§ãELBã«é害ãçºçããå ´åããåæã«ä»ã®ãã¹ãã§ç¶ç¶ããããã§ãåºå®IPã§ã¯ããã¾ããããã®ãããCDNããELBã®ãã¹ãã¸ã®åç
§ã¯ãã¡ã¤ã³åã§ã®åç
§ï¼DNSã®è¨å®ã§CNAMEï¼ã«ãªãã¾ããä»ã®ã¨ããELBã§ã®é害ã¯çµé¨ãã¦ã¾ãããã
ELBã®å¾ãã«APãµã¼ããè¨ç½®ããã®EC2ã¯ãApache-Tomcatã®ä¸¡æ¹ãåããã¹ãã«ããã¾ããããã¼ã¿ã»ã³ã¿ã¼ã®ããã¯ãApacheã¯ä¸»ã«ãã¼ããã©ã³ãµã¨ãã¦ä½¿ã£ã¦ããã®ã§ãApacheã¨Tomcatãåå±
ããããã¨ã¯ãªãã£ãã®ã§ãããAWSã§ã¯åå±
ããããã¨ã«ãã¾ãããApacheããTomcatã¸ã®æ¥ç¶ã§ã¯ãApacheå´ã®è¨å®ã§Tomcatãæå®ããå¿
è¦ãããã¾ãããå¥ã®EC2ã¤ã³ã¹ã¿ã³ã¹ã®å ´åãEC2ã¤ã³ã¹ã¿ã³ã¹ãæ°è¦ã«ç«ã¦ã度ã«ããã©ã¤ãã¼ãIPã決ã¾ãããã®åº¦ã«Apacheå´ã®è¨å®ãã¡ã¤ã«ãç·¨éããªããã°ãªããªãã®ã¯ãæéã大ããã¨å¤æããApache-Tomcatãåå±
ããã¦ãApacheå´è¨å®ãã¡ã¤ã«ã§ã¯ãTomcatã®ãã¹ããlocalhostã¨ãããã¨ã§ãAPã®è¿½å ä½æ¥ã楽ã«ãªãããã«ãã¾ãããæ¬å½ã¯ãApacheèªä½ããªãã«ãã¦ãELBããTomcatã¸ç´ã§ã¤ãªãããã£ãã®ã§ãããmod_rewriteã使ã£ã¦ãããELBã«ã¯mod_rewriteç¸å½ã®æ©è½ããªãã£ãã®ã§ãApache-Tomcatã¨ãªãã¾ããããã®è¾ºããå°æ¥æ°ãããµã¼ãã¹ãè¨è¨ããã¨ãã¯ãmod_rewriteä¸è¦ãªãã¬ã¼ã ã¯ã¼ã¯ã使ã£ã¦ãããããªã¨æãã¾ããä¸å³ã§ã¯ã4層ã¢ãã«ã«ã¿ãã¾ãããApache-Tomcatã¨ï¼ããã»ã¹ãããã®ã§ã5層ã¢ãã«ã«ãªã£ã¦ãã¾ã£ã¦ãã¾ãã
EC2ã®ã¤ã³ã¹ã¿ã³ã¹ã¯ãã¹ã¢ã¼ã«ã¤ã³ã¹ã¿ã³ã¹ï¼æé¡ç´$66ï¼ã2å°ã¨ãã¾ãããibisPaintã¯DBè² è·ããã©ãã£ãã¯ã¯å¤§ãããã®ã®APã®ä»äºã¯ã»ã¨ãã©ãªãã®ã§ãAPã®CPUè² è·ã¯ä½ãã§ãããå¯ç¨æ§ï¼ãµã¼ãã¹åæ¢åé¿ï¼ã®ããã«2å°ã«ãã¦ãã¾ãã
RDSã®è² è·ã¯é«ãã§ãããä»ã®ã¨ããAPããDBã¸ã®æ¥ç¶ã¯ãã¹ã¿ã¼ã®ã¿ã§ãã¬ããªã«ã¯ç¸å¤ãããããã¯ã¢ããç¨ã§ããéããªãåç
§ç³»ã¯ã¨ãªãã¬ããªã«ã¸ãæ¯ããã¨ã«ãªãã§ããããRDSã¯ãã©ã¼ã¸ã¤ã³ã¹ã¿ã³ã¹(1å°ãããæé¡ç´$345)ã使ã£ã¦ãã¾ãã
ã¡ãªã¿ã«ibisPaintã®æ稿ãããä½åï¼éæ¢ç»ãªã©ï¼ã¯ããã¹ã¦DBã«ä¿åãã¦ãããããããã¯ã¢ããã«æ°æéããªã¹ãã¢ã«æ°æ¥ãããããããã¯ãããã¯ã¢ããã¨ãªã¹ãã¢ã¨ããé¸æè¢ã¯ã»ã¼ãªãã«çããã§ãã
ã¾ãããã¼ã¿ã»ã³ã¿ã¼ããAWSã¸ã®å¼ã£è¶ãã§ã¯ãããã¯ã¢ãããã¦ãªã¹ãã¢ã§ã®å¼ã£è¶ãã§ã¯ããµã¼ãã¹åæ¢æéãé·ããããããå¿
è¦æä½éã®ãã¼ãã«ã ãããã¯ã¢ããã¨ãªã¹ãã¢ããã¦ï¼ãã®éã ãçæéãµã¼ãã¹åæ¢ï¼ãã¡ã¤ã³ã®å¤§éã®ãã¼ã¿ã¯ãå¾ã
ã«ãã¼ã¿ã»ã³ã¿ã¼ããAWSã¸ãããã§ç§»åããã¦ããããã§ã®ãã¼ã¿ç§»åä¸ã¯ãAWSã®DBã«ãã¼ã¿ããªããã°ãã¼ã¿ã»ã³ã¿ã¼ã«ãªã¯ã¨ã¹ããæ¯ãï¼ãã©ã¯ã¼ãã£ã³ã°ï¼ããã«APã®ããã°ã©ã ãæ¸ãæãã¦ãå¼ã£è¶ãããã¾ããã
大ããªãã¼ã¿ãæ°æ¥ããã¦ããã£ããã¨ç§»åãã¦ããæ§ã¯ããªãã¨ããã£ãããã§ããã
ãã®3ï¼DNSã©ã¦ã³ãããã³+èªç¤¾è£½LB+AP+DB
ä»åç´¹ä»ããæå¾ã®ãããã¯ã¼ã¯æ§æã§ãã
ãã¡ãã®ãµã¼ãã¹ã§ã¯ãELBã¯ä½¿ããã«èªç¤¾è£½ã®ãã¼ããã©ã³ãµã使ãã¾ãããçç±ã¯ãELBã§ã¯ã¹ãããã¼ã»ãã·ã§ã³ï¼åãã¦ã¼ã¶ããã®ãªã¯ã¨ã¹ãã¯åãAPã«æ¯ãæ©è½ï¼ã®ã»ãã·ã§ã³ãã¼ã¨ãã¦Cookieãã使ããããã®ãµã¼ãã¹ã¯ã¬ã©ã±ã¼ããã®ã¢ã¯ã»ã¹ãããããã»ãã·ã§ã³ãã¼ã¯URLã«åãè¾¼ãã§ããããã§ããi-modeãã©ã¦ã¶ãé·ããCookieé対å¿ã ã£ããããããªãURLã«åãè¾¼ãã§ããã¾ãããªããApacheã®mod_proxyãªã©ã®ãã¼ããã©ã³ãµæ©è½ã使ããèªç¤¾è£½ã¨ãªã£ã¦ããã®ã¯ãåã«ãã®ã·ã¹ãã ãç«ã¡ä¸ããã¨ãã«ãmod_proxyãã¾ã ãªããmod_jkãmod_jk2ãããªããã¾ããããããä¸å®å®ã§ãã£ãããã«éçºãã¾ããããããã§WebUIã§ã®è² è·ä¿æ°ã®å¤æ´ãAP追å ãåãé¢ããã§ãããã¨ä½¿ãåæã¯è¯ãã§ãã
ããã«ãã®ã·ã¹ãã ã§ã¯ããªã¯ã¨ã¹ãé »åº¦ãé«ãããLBã2å°ãEC2ï¼ã¹ã¢ã¼ã«ã¤ã³ã¹ã¿ã³ã¹ãæé¡ç´$66ï¼+EIP(åºå®IP)ã§å»ºã¦ã¦ãDNSã©ã¦ã³ãããã³ã§2å°ã«æ¯ãåãã¦ãã¾ãã
ãã®å¾ãã®APã¯ä¸å³ã§ã¯3å°ã§ããå®éã«ã¯16å°ã¨ãªã£ã¦ãã¾ããAPã¯ä¸é¨ãã¤CPUã¨ã¯ã¹ãã©ã©ã¼ã¸ï¼æé¡ç´$547)ã§ããEC2ã¤ã³ã¹ã¿ã³ã¹ã¯åæè¨å®ã§ã¯ã¢ã«ã¦ã³ãã«ã¤ã20å°ã¾ã§ãã追å ã§ãã¾ããããã以ä¸ã¯Amazonã¸åãåãããããå¿
è¦ãããã¾ããæããå¾æãã·ã¹ãã ãªã®ã§ä¸ä¿¡ä¸è¶³ã¨ãªããªãããã«ã§ã¯ãªããã¨æãã¾ãã
LBããAPã®åç
§ã¯ç¾ç¶hostsãã¡ã¤ã«ã«APãæ¸ããã¨ã§å¯¾å¿ãã¦ãã¾ããããã®è¾ºãã¯ã¹ã¯ãªããçãæ¸ãã¦ãèªååãããã¨ããã§ãã
RDSã®æ³¨æäºé
RDS(MySQL)ã¯ãSSHã§ãã°ã¤ã³ã§ãã¾ãããmysqlã³ãã³ãçã§ã¢ã¯ã»ã¹ãããã¨ã¯ã§ãã¾ããã¾ããmy.cnfã®è¨å®ãã¡ã¤ã«ã®é
ç®ã¨åæ§ã®è¨å®ããAWSã®WebUIããè¨å®ã§ãã¾ããããããmy.cnfè¨å®é
ç®ã®ä¸é¨ã¯è¨å®ä¸å¯ã«ãªã£ã¦ããã®ã§æ³¨æã§ããç¹ã«timezoneã®æå®ãã§ãããAPããæ¥ç¶éå§æã«ã»ãã·ã§ã³å
å¤æ°ã§å¤æ´ãã¦ã¢ã¯ã»ã¹ããããAPå´ã®ããã°ã©ã ãä¿®æ£ããå¿
è¦ãããã¾ãã
ãã¨SSHã§ãã°ã¤ã³ã§ããªãã®ã§ã¹ãã¼ãã°ã¨ããåºãã¾ãããæ£ç¢ºã«ã¯ããã°ãã¡ã¤ã«ã¨ãã¦åºåããããã¨ãã§ããªãã®ã§ããã¼ãã«ã«åºåããããã¨ã«ãªãã¾ãï¼ç¾ç¶ãã¾ã 試ãã¦ããªãï¼ã
â»2013/03 è¿½è¨ AWSã®ã¢ãããã¼ãã§ãã°ã®é²è¦§ã®WebUIã¨APIã追å ããã¾ããã
ä¾¡æ ¼ã¯ã©ããªã®ï¼
ç¾ç¶ãã³ã¹ãã®å 訳ã¯ã
- EC2 71%
- RDS 20%
- ãã©ãã£ãã¯æ 8%
- ãã®ä» 1%
ã¨ãã£ãæãã§å§åçã«EC2ã§ã³ã¹ããããã£ã¦ãã¾ããå²ã¨APã®CPUè² è·ãé«ãã·ã¹ãã ã¨ããã®ãããã¨æãã¾ãããç¾ç¶ã¯ä½åç®ã«APãç«ã¦ã¦ããã®ã§é«ãã¨ããã®ãããã¾ããããã§ãã¼ã¿ã»ã³ã¿ã¼ã¨åé¡ç¨åº¦ã®ããããããããã¥ã¼ãã³ã°ããã¦å°æ°ãæ¸ããã°ãååãããã«ãªãã®ã§ã¯ãªãããªã¨ã¿ã¦ãã¾ããã¾ããç¾ç¶ã®å¥ç´ã¯ãªã³ããã³ãã¤ã³ã¹ã¿ã³ã¹ã§ããããªã¶ã¼ããã¤ã³ã¹ã¿ã³ã¹ã®å¥ç´ã«å¤ããã°ããã«1/3ã§ããã®ã§ããã¼ã¿ã»ã³ã¿ã¼ããããªãå®ããªãã¨æãã¾ãããµã¼ããå¢ããã®ãæ¸ããã®ãå®ãµã¼ãããæéãå°ãªãã®ã§ããªãæ°æ¥½ã«èª¿æ´ã§ããã®ãããã§ããã
ãããã«
ãµã¼ã40å°ã®å¼ã£è¶ãããµãã·ã¹ãã ãå«ããã¨20ãããããã·ã¹ãã ã大å¤ãªé£é¡ããã¸ã§ã¯ããªã®ã§ãç·å¼µã®é£ç¶ã§ãããã¨ã¦ããã¼ãã«ãé«ãä½æ¥ã§ãããããã¼ã ã¡ã³ãã¼å
¨å¡ççãªå¢ãã§åå¼·ãï¼å
¨å¡AWSæªçµé¨ï¼ãä¸ç´ã®ãããã¯ã¼ã¯ã¨ã³ã¸ãã¢ã¨ããããããããããªããããã¡ãï¼ã¨ãããã¯ã¼ã¯ã¢ã¼ããã¯ãã£ã«ã¤ãã¦è°è«ããã¤ã¤ã調æ»ãä¿®æ£ãä½æ¥æé æ¸ä½æãå®è¡ã試é¨ãçæéã§ããã¨ããå¿ããæ¸ããã¤ã¤ã大å¤ææ義ã§ããã
ããããèªååã¹ã¯ãªããããäºæ
ãèµ·ããã¨ããæ³å®ããããã¥ã¢ã«ä½ãã¨ã復æ§è¨ç·´ããµã¼ãã¹ç£è¦ã®ãã¥ã¼ãã³ã°ããã³ã¹ãåæ¸ã®ããã®ãã¥ã¼ãã³ã°ãããã¾ãããã¾ããã¦ãã¦ãã³ãã³ãã¨è²¯ãã¦ããããã¨æãã¾ãã
ã¯ã©ã¦ãã«ç§»ã£ã¦ãã¯ãã¹ã±ã¼ã«ã¢ã¦ããã¹ã±ã¼ã«ã¢ããã楽ã«ãªã£ãã®ã¯æ°ã楽ã§ããã
å¼ã£è¶ãããã¸ã§ã¯ããã¨ã¦ãè²´éãªçµé¨ã§ãã
éè¦ãããã°ãµã¼ãã¹ç£è¦ã«ã¤ãã¦ã®ã¨ã³ããªãæ¸ããã¨æãã¾ãã
ââ
ã¢ããªåè¨éçºãWebã·ã¹ãã åè¨éçºãè¡ã£ã¦ãã¾ãã以ä¸èªç¤¾è£½åã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
æè¡è åã iOS6 æ°æ©è½ï¼
iOS6ã§ã¾ãããããiOS6ã®çºè¡¨ã¯ãå¤ä¸ã®2æã«ãããã®åã«å¾ ã¡æ§ãã¦ãã¯ã¯ãã«ããªããçºè¡¨ãèãã¦ãã¾ãããæ¯åº¦æ¯åº¦ãã³ã·ã§ã³ãä¸ããã¾ããï¼
iPhone5ã§ã¾ãããããåã¯ãã½ãããã³ã¯ã®ãªã³ã©ã¤ã³ã·ã§ããã§çºå£²æ¥ã®16æã«äºç´ãµã¤ãã«è¡ã£ã¦ããµã¼ãæ··éä¸ã¨1æéã»ã©æ ¼éããªããäºç´ãã¾ãããçºå£²æ¥ã®ç¿æ¥ã«iPhone5ãå±ãã¾ãããã
iOSãã£ããããã¼ãªãã¿ããªMAXçãä¸ããã¨ãã ãããç¥ãã ï¼ç¥ãã ï¼
ãã¦æ°ããOSãã§ããå¿ ãæ°æ©è½ããã§ãã¯ãã¹ãï¼ã¢ããªä¼ç»è ããã£ã¬ã¯ã¿ã¼ãããã°ã©ããªãã¿ããªãã§ãã¯ãã¹ãï¼ã©ãã«ä¼ç»ã®ãã¿ãè½ã¡ã¦ãããåãããªãããã©ãã«èªåã®ã¢ããªã®æ¹åå¯è½ç¹ããããåãããªãããããã¯å¿ é ï¼ã¨ãã訳ã§æ¯åº¦ããªãã¿ã®iOS Dev Centerã®æ°æ©è½ç´¹ä»ãã¼ã¸ã®ç¿»è¨³ã§ãããã¤ãOSãªãªã¼ã¹ã¨åæã«ããã°ã«ã¢ãããã¦ããã®ã ãã©ãã¡ãã£ã¨ãã¿ãã¿ãã¦ã§é ãã¾ãããã ã£ã¦iPhone5ã縦é·ãªãã¦ã®ãªã®ãªã¾ã§çºè¡¨ãããªããã ãã®ãã¿ããªã¢ããªã®ã¢ãããã¼ãã§æ»ã«ããã§ããã
ã¨ãã訳ã§ãã¤ãã©ããé©å½æ訳ããããã©è¡ã£ã¦ã¿ãããã
iOS6æ°æ©è½
ããã
ã¢ããã«ãæä¾ããæ°ããå°å³ã«å ãã¦ããããããã¢ããªã¨MapKitãã¬ã¼ã ã¯ã¼ã¯ã¯ä»ã®ã¢ããªã¨ã®ããåããæ°ãã«ãµãã¼ããã¾ããç¾å¨å調åä½ãããªãç¬èªå°å³ã¢ããªãããããããã¢ããªãèµ·åããããèå³ã®ããå ´æãã«ã¼ãæ
å ±ã表示ãããããç°¡åãªæ¹æ³ãç¨æããã¦ãã¾ããã¿ã¼ã³byã¿ã¼ã³ããã²ã¼ã·ã§ã³ãµã¼ãã¹ã®ãããªã«ã¼ãæ
å ±ãæä¾ããã¢ããªã¯ãã«ã¼ãã£ã³ã°ã¢ããªã¨ãã¦ç»é²ã§ããã·ã¹ãã å
¨ä½ã§æå¹ãªãµã¼ãã¹ãä½ããã¨ãã§ãã¾ãã
ã«ã¼ãã£ã³ã°ã¢ããªã¨ãã¦ç»é²ãããã¨ã¯ã¦ã¼ã¶ã®ç®ã®åã«ãµã¼ããã¼ãã£ã®ã¢ããªãåå¾ããæ©ä¼ãããå¤ããã¾ããã«ã¼ãã£ã³ã°ã¢ããªã¯åã«ãã©ã¤ããã¦ã©ã¼ãã³ã°ã«éå®ããããã®ã§ã¯ããã¾ãããã«ã¼ãã£ã³ã°ã¢ããªã¯ã¦ã¼ã¶ã®å¥½ããªèªè»¢è»ããã¤ãã³ã°ãèªç©ºè·¯ãå°ä¸éããã®ä»ã®å
Œ
±äº¤éæ©é¢ã®ã«ã¼ããæä¾ãã¾ããããã¦ã¢ããªã¯ã¦ã¼ã¶ã®ããã¤ã¹ã«ãã¦ã³ãã¼ãããå¿
è¦ãããã¾ããããããããã¢ããªã¯ãAppStoreã§ã«ã¼ãã£ã³ã°ã¢ããªã«ã¤ãã¦ç¥ã£ã¦ãã¦ãã«ã¼ãæ
å ±ã®ããã«ãããã®ã¢ããªãè³¼å
¥ãããªãã·ã§ã³ãã¦ã¼ã¶ã«æä¾ãããã¨ãã§ãã¾ãã
ã«ã¼ãæ
å ±ãæä¾ãã¦ããªãã¢ããªã§ããããããã¢ããªã¨ã«ã¼ãã£ã³ã°ã¢ããªã®ä¸¡æ¹ã®ã¡ãªãããå¾ããã¨ãã§ãã¾ããã¢ããªã¯ç¹å®ã®ä½ç½®ã表示ãããã¨ã2å°ç¹ã®ã«ã¼ãæ
å ±ã表示ããæ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã使ããã¨ãã§ãã¾ãã
ã¢ããªã§ã«ã¼ãæ
å ±ãæä¾ããæ¹æ³ãããããããã¢ããªã§ã«ã¼ãæ
å ±ã表示ããæ¹æ³ã®è©³ç´°ã¯ãLocation Awareness Programing Guideåç
§ãã¦ãã ããã
ãã¿ããï¼ä½ãã¨æ®å¿µãªå°å³ã§ä¸éããé¨ãããã¦ããApple製å°å³ã§ããããªããã«ã¼ãã£ã³ã°ã¢ããªã¨ãæ°ããä»çµã¿ãããã¿ãããããã«å¯¾å¿ããã¨ã¦ã¼ã¶ãã¢ããªããã¦ã³ãã¼ãããªãã¦ãããã®ã¢ããªãæ示ãã¦ããã¦ãã¦ã³ãã¼ãæ©ä¼ãå¢ããã¦ãããã£ã¦æ¸ãã¦ãããã©ãã©ããªæããªãã ããããããªã³ã¿ãããªã¢ããªã¯ãã£ã³ã¹ãªã®ããªï¼
ã½ã¼ã·ã£ã«ãã¬ã¼ã ã¯ã¼ã¯
Social Framework(Social.framework)ã¯ãã¦ã¼ã¶ã®ã½ã¼ã·ã£ã«ã¡ãã£ã¢ã¢ã«ã¦ã³ãã«ã¢ã¯ã»ã¹ããã·ã³ãã«ãªã¤ã³ã¿ã¼ãã§ã¼ã¹ãæä¾ãã¾ãããã®ãã¬ã¼ã ã¯ã¼ã¯ã¯ãiOS5ã§å°å
¥ãããTwitterãã¬ã¼ã ã¯ã¼ã¯ã«ã¨ã£ã¦ä»£ãããFacebookãä¸å½ã®Weiboãµã¼ãã¹ã追å ããã¾ãããã¢ããªã¯ãã®ãã¬ã¼ã ã¯ã¼ã¯ã使ããã¨ã«ãã£ã¦ã¦ã¼ã¶ã®ã¢ã«ã¦ã³ãã§ã¹ãã¼ã¿ã¹æ´æ°ãåçã®æ稿ãã§ãã¾ãããã®ãã¬ã¼ã ã¯ã¼ã¯ã¯Accountsãã¬ã¼ã ã¯ã¼ã¯ã¨é£æºãã¦ãã¦ã¼ã¶ã«ã·ã³ã°ã«ãµã¤ã³ãªã³ãæä¾ããã¾ããã¦ã¼ã¶ã®æ¿èªãããã¢ã«ã¦ã³ãã«ã¢ã¯ã»ã¹ãããã¨ãä¿è¨¼ãã¾ãã
UIKitãã¬ã¼ã ã¯ã¼ã¯ã¯ãã¦ã¼ã¶ãããã¤ãã®é¸æãããå
容ã«åºã¥ãã¦å®è¡ã§ããã¢ã¯ã·ã§ã³ã表示ããããã®æ°ããUIActivityViewControllerã¯ã©ã¹ãæä¾ãã¾ãããã®ã¯ã©ã¹ã®æ©è½ã¯ãã¦ã¼ã¶ãTwitterãFacebookãªã©ã®ã½ã¼ã·ã£ã«ã¢ã«ã¦ã³ãã«ã³ã³ãã³ããæ稿ã§ããããã«ãããã¨ã§ããã¢ããªã¯ãiPhoneä¸ã§ã¢ã¼ãã«ã«ãã®ã¯ã©ã¹ã表示ããããiPadä¸ã§Popoverã®ã³ã³ããã¼ã©ã®å©ç¨ã§è¡¨ç¤ºããããããã¨ãã§ãã¾ããã¦ã¼ã¶ãããããã®ãã¿ã³ãã¿ããããã¨ãView Controllerã¯ãé¢é£ä»ããããã¢ã¯ã·ã§ã³ãå®è¡ããããã®æ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãæä¾ãã¾ãã
ã½ã¼ã·ã£ã«ãã¬ã¼ã ã¯ã¼ã¯ã«ã¤ãã¦ããã詳細ãªæ
å ±ã¯ãSocial Framework Referenceãåç
§ãã¦ãã ãããUIActivityViewControllerã¯ã©ã¹ã«ã¤ãã¦ã¯ãUIKit Framework Referenceãåç
§ãã¦ãã ããã
ãã¿ããï¼Facebookã«æ稿ã楽ã«ãªã£ããããã¯ããï¼ãã¨Safariã®å ±æãã¿ã³ã®ãããªUIãUIActivityViewControllerã§ç°¡åã«å®è£ ã§ãããã§ãããå ±æãç°¡åã«å®è£ ã§ããããããããï¼
Pass Kit
Pass Kitã¯ãWebãµã¼ãã¹ãæ°ãããã¡ã¤ã«ãã©ã¼ããããObjective-C(PassKit.framework)ã使ãããã¦ã³ãã¼ãå¯è½ãªãã¹ãå®è£
ããæ°ããæè¡ã§ããä¼æ¥ã¯ãã¯ã¼ãã³ãæä¹å¸ãä¼æ¥åãã®å²å¼å¸ãªã©ã表ããã¹ãä½ããã¨ãã§ãã¾ãããããã®ç©ã表ãç©ççãªç©ãæã¡éã¶ä»£ããã«ãã¦ã¼ã¶ã¯iOSããã¤ã¹ã«ããããä¿åããä»ã¾ã§ã¨åããããªä½¿ãæ¹ã§ä½¿ããã¨ãã§ãã¾ãã
ãã¹ã¯ããµã¼ããã¼ãã£ã®Webãµã¼ãã¹ã§ä½æãããã¡ã¼ã«ãSafariãã¢ããªã§é
ä¿¡ããã¾ãããã¹ããèªèº«ã¯ãç¹å¥ãªãã¡ã¤ã«ãã©ã¼ãããã§ãé
ä¿¡åã«è¨¼æããæå·åããã¦ãã¾ãããã¡ã¤ã«ãã©ã¼ãããã¯ãã¦ã¼ã¶ãä½ã®ããã®ãµã¼ãã¹ãªã®ããç¥ãããã®é¢é£ããèå¥æ
å ±ãæã£ã¦ãã¾ããã¾ããã¼ã³ã¼ãããæ¯å交æãããã使ã£ããã§ããããã«ã«ã¼ããæ¤è¨¼ãããã®ä»ã®æ
å ±ãå«ã¾ãã¦ããå ´åãããã¾ãã
PassKitããã¢ããªã§PassKitããµãã¼ãããå ´åã®ãã詳細ãªæ
å ±ã¯ãPassbook Programing Guideãåç
§ãã¦ãã ããã
ãã¿ããï¼è²¡å¸ã®ä¸ã®ã«ã¼ãé¡ãå ¨é¨ãªããªãæ代ãããã¨ãããï¼éã®ãã¯é·ãã¨æããã©ãæµè¡ã£ã¦æ¬²ããï¼
Game Center
Game Centerã¯ãã²ã¼ã ãéã¶ä½é¨ãé²åãããããã«è¿½å ãããæ°ããæ©è½ãããã¾ããGameKitãã¬ã¼ã ã¯ã¼ã¯ã«è¿½å ããã主è¦ãªå¤æ´ã¯ä»¥ä¸ã§ãã
- ãã£ã¬ã³ã¸ã¯ãã¢ãã¼ãã¡ã³ããã¹ã³ã¢ãåéã¨ç«¶äºãããã¨ãã§ãã¾ãããã¬ã¤ã¤ã¼ã¯Game Centerã¢ããªãããã£ã¬ã³ã¸ãçºè¡ãããã¨ãã§ãã¾ããã¢ããªã¯ãGKChallengeã¯ã©ã¹ã使ã£ã¦ã²ã¼ã ã«ãã£ã¬ã³ã¸ã®çºè¡ãããããã¨ãã§ãã¾ãã
- GKGameCenterViewControllerã¯ã©ã¹ã¯ã以åã®ãªã¼ãã¼ãã¼ããã¢ãã¼ãã¡ã³ããåéãªã¯ã¨ã¹ãã®ãã¥ã¼ã³ã³ããã¼ã©ã®æ©è½ããã¹ã¦çµ±åãã¦ãã¾ããã¢ããªã¯ä»¥åã®ãã¥ã¼ã³ã³ããã¼ã©ã使ããã¨ãã§ãã¾ããããããã¯æ°ããGame Center ãã¥ã¼ã³ã³ããã¼ã©ã®ä¸ã®ã¿ãã¨ãã¦è¡¨ç¤ºããã¾ãã
- ãã¼ã«ã«ãã¬ã¤ã¤ã¼ã®èªè¨¼ã®ããã»ã¹ãå¤æ´ã«ãªãã¾ãããæ°ããããã»ã¹ã§ã¯ãã¢ããªã¯ãã¹ã¦ã®èªè¨¼ã¹ããããå®è¡ãããããã¯ãauthenticateHanderããããã£ã«è¨å®ãã¾ããä¸åº¦ãè¨å®ãããGameKitã¯å¿ è¦ãªã¨ãã«ãã¼ã«ã«ãã¬ã¤ã¤ã¼ãèªåçã«èªè¨¼ãã¾ãããããGameKitã¯ç´æ¥ãèªè¨¼ã¤ã³ã¿ã¼ãã§ã¼ã¹ã表示ãã¾ããã代ããã«ããã³ãã©ã¯æä¾ããã¦ããèªè¨¼ãã¥ã¼ã³ã³ããã¼ã©ã表示ããèªè¨¼UIã表示ãããã¨ãã«ããæ£ç¢ºã«å¶å¾¡ã§ããæ©ä¼ãã¢ããªã«ä¸ãã¾ãã
- ï¼è¨³æ³¨ï¼ãã®ä»ãã¿ã¼ã³å¶ã²ã¼ã ã¨ããGKMathmakerã¯ã©ã¹ã¨ãããã¤ããããã©èå³ããªãã®ã§ãã¹ï¼
ãã¿ããï¼åéã¨ãã£ã¬ã³ã¸ï¼ã¨ããã®ãã¤ããã¿ããã ããã¾ã 試ãã¦ãªããã
ãªãã¤ã³ã
Event Kitãã¬ã¼ã ã¯ã¼ã¯ã¦ã¼ã¶ã®ããã¤ã¹ã§ãªãã¤ã³ããä½æãããã¢ã¯ã»ã¹ãããããã¤ã³ã¿ã¼ãã§ã¼ã¹ã追å ããã¾ãããã¢ããªãä½æãããªãã¤ã³ãã¯ãã¦ã¼ã¶ãä½æãããã®ã¨ä¸ç·ã«ãªãã¤ã³ãã¢ããªã«è¡¨ç¤ºããã¾ãããªãã¤ã³ãã¯ãä½ç½®ãã¼ã¹ãæéãã¼ã¹ã®ã¢ã©ã¼ã ãå«ããã¨ãã§ãã¾ãã
ãªãã¤ã³ãã®çæã®æ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãå«ãEventKitãã¬ã¼ã ã¯ã¼ã¯ã«ã¤ãã¦ããã詳細ãªæ
å ±ã¯ãEvent Kit Framework Referenceãåç
§ãã¦ä¸ããã
ãã¿ããï¼ã¤ãã«ãªãã¤ã³ããAPIãå ¬éãããããªãã¤ã³ãç½®ãæãã¢ããªã¨ããåºããã§ããï¼
ã¢ããªå 課é
StoreKitãã¬ã¼ã ã¯ã¼ã¯(StoreKit.framework)ã¯ãæ°ãã«ã¢ããªå
ã§iTunesã®ã³ã³ãã³ããè³¼å
¥ããæ©è½ãæä¾ããAppleã®ãµã¼ãã®ãã¦ã³ãã¼ãå¯è½ãªã³ã³ãã³ããåå¾ããæ©è½ãæä¾ãã¾ããã¢ããªã¯ãã¥ã¼ã³ã³ããã¼ã©ã表示ããã¦ã¼ã¶ã«iTunesã®ã¢ããªãé³æ¥½ãæ¬ãä»ã®ã³ã³ãã³ããã¢ããªå
ããç´æ¥è³¼å
¥ããããã¨ãã§ãã¾ããã¢ããªã¯è³¼å
¥ã®ããã«å©ç¨ã§ããããã«ãããã³ã³ãã³ããèå¥ãã¾ãããè³¼å
¥å¦çã®æ®ãã®é¨åã¯StoreKitãå¦çãã¾ãã
iOS6ããåã¯ãéçºè
ã¯ã¢ããªå
課éãéãã¦å©ç¨å¯è½ã«ãããã¦ã³ãã¼ãå¯è½ãªä»»æã®ã³ã³ãã³ãã管çããããã«å¯¾å¿ããå¿
è¦ãããã¾ããããã¹ãã£ãããã¦ã³ãã¼ãã¯ãæ°ãã«ã¦ã¼ã¶ã«å©ç¨å¯è½ã«ããããã«éçºè
ãããªããã°ãªããªããã¨ãç°¡ç´ åãã¾ããæ°ããSKDownloadã¯ã©ã¹ã¯ãã³ã³ãã³ãã®ãã¦ã³ãã¼ãå¯è½ãªä¸é¨ã表ãã¾ããå ãã¦SKPaymentTransactionã¯ã©ã¹ã¯ä»»æã®ãã¹ãã£ããã³ã³ãã³ãã®ããã«ãã¦ã³ãã¼ããªãã¸ã§ã¯ãã®é
åãæä¾ããããã«å¤æ´ããã¾ãããã³ã³ãã³ãã®ä¸é¨ããã¦ã³ãã¼ãããããã«ãã¢ããªã¯ãã¦ã³ãã¼ããªãã¸ã§ã¯ãããã¤ã¡ã³ããã¥ã¼ã«è¿½å ãã¾ãããã¦ã³ãã¼ããå®äºãããããã¤ã¡ã³ããã¥ã¼ãªãã¶ã¼ãã¼ã«éç¥ããã¾ãã
Store Kitãã¬ã¼ã ã¯ã¼ã¯ã®ã¯ã©ã¹ã«ã¤ãã¦ã®è©³ç´°ã¯ãStore Kit Framework Referenceãåç
§ãã¦ãã ããã
ãã¿ããï¼ãªãã¨ï¼ã¢ããªããiTunesã®ã¢ããªãé³æ¥½ãæ¬ãè²·ããï¼ã¢ãã£ãªã¨ã¤ããã£ã¼ã¨ãå ¥ãã®ããããã¾ãé£åããã³ã³ãã³ãç´¹ä»ã¢ããªã¨ãå¢ãããã§ããã
ã³ã¬ã¯ã·ã§ã³ãã¥ã¼
UICollectionViewã¯ã©ã¹ã¯ã¦ã¼ã¶ã«é åºä»ãããããã¼ã¿ã表示ããæ°ããæ¹æ³ãæä¾ãã¾ããã³ã¬ã¯ã·ã§ã³ãã¥ã¼ãªãã¸ã§ã¯ãã使ç¨ããã¨ãã¢ããªã¯åãè¾¼ã¾ãããã¥ã¼ã®è¡¨ç¤ºã¨é
ç½®ãå®ç¾©ãããã¨ãã§ãã¾ããã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã¯ã©ã¹ã¯ãç¬ç«ãããã¼ã¿é
ç®ã®é
ç½®ãå®ç¾©ããããã«ä»éããã¬ã¤ã¢ã¦ããªãã¸ã§ã¯ãã¨å¯ã«é£æºãã¦åä½ãã¾ããUIKitã¯ãæ¨æºã¾ãã¯ãã¾ãã¾ãªãµã¤ãºã®é
ç®ãå«ãè¤æ°åã®ã°ãªãããå®è£
ããããã«å©ç¨ã§ããæ¨æºçãªããã¼ãã¼ã¹ã®ã¬ã¤ã¢ã¦ããªãã¸ã§ã¯ããæä¾ãã¾ããã¾ãã°ãªããã¬ã¤ã¢ã¦ãããè¯ããã®ãä½ãããå ´åã¯ãéçºè
ãé¸æããä»»æã®ã¬ã¤ã¢ã¦ãã¹ã¿ã¤ã«ãæä¾ããããã«ãã«ã¹ã¿ã ã¬ã¤ã¢ã¦ããä½æãããã¨ãã§ãã¾ãã
ã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã¯é
ç®ã®è¡¨ç¤ºããµãã¼ãããããã®å°ç¨ã®ã¯ã©ã¹ã®ã°ã«ã¼ãã§åä½ãã¾ããã»ã«ã«å ãã¦ã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã¯è£å©çãªãã¥ã¼ã¨è£
飾ãã¥ã¼ãæã¤ãã¨ãã§ãã¾ãããããã®ãã¥ã¼ã®ä½¿ãæ¹ã¨é
ç½®ã¯ãã¬ã¤ã¢ã¦ããªãã¸ã§ã¯ãã«ãã£ã¦å®å
¨ã«å¶å¾¡ããã¾ããä¾ãã°ãããã¼ãã¼ã¹ã¬ã¤ã¢ã¦ããªãã¸ã§ã¯ãã¯ãã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã®ä¸ã®ã»ã¯ã·ã§ã³ã®ããã«ãããã¨ããã¿ã®ãã¥ã¼ãå®è£
ããããã®è£å©çãªãã¥ã¼ã使ç¨ãã¾ãã
ãã®ä»ã®ã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã®æ³¨ç®ãã¹ãç¹å¾´ã¨ãã¦ã¯æ¬¡ã®ãããªãã®ãããã¾ãã
- ã¢ããªã®ã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã®è¡¨ç¤ºã管çããããã«UICollectionViewControllerã¯ã©ã¹ãããã¾ã
- ã³ã¬ã¯ã·ã§ã³ãã¥ã¼å ã®ã³ã³ãã³ãã®ã¢ãã¡ã¼ã·ã§ã³ããµãã¼ããã¾ã
- é ç®ã®æ¿å ¥ã移åãåé¤ãå¦çãã¾ã
- ã»ã«ãä»ã®ãã¥ã¼ãçæããã管çãããããããã«ç°¡ç´ åãããã¢ãã«ãæä¾ãã¾ãã
ã¢ããªã®UIã¨ãã¦ã³ã¬ã¯ã·ã§ã³ãã¥ã¼ã使ããã¨ã«ã¤ãã¦ã®è©³ç´°ã¯ãCollection View Programing Guide for iOSãåç §ãã¦ãã ããã
ãã¿ããï¼@fladdictãããUITableViewControllerãããã¯ãã¦ã«ã¹ã¿ãã¤ãºãiphone_devåå¼·ä¼ã§çºè¡¨ãã¦ãããã©ãæ±ç¨åãããã¨ãããã¨ããªï¼
UIã¹ãã¼ãä¿å
ã¹ãã¼ãä¿åã¯ãã¢ããªã«å¯¾ãã¦ã¦ã¼ã¶ãæå¾ã«ä½¿ç¨ããã¨ãã®ã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ç¶æ
ã復å
ãããã¨ãããç°¡åã«ã§ããããã«ãã¾ããiOS6ããåã§ã¯ãã¢ããªã®çµäºã¤ãã³ãã§ç¾å¨ã®UIã®ç¶æ
ã«ã¤ãã¦ã®æ
å ±ãã¢ããªãä¿åãããã¨ãæ¨å¥¨ããã¦ãã¾ãããåèµ·åããã¨ã¢ããªã¯ããã®æ
å ±ã使ãUIã®ç¶æ
ã復å
ããã¢ããªãçµäºãã¦ãªãããã«è¦ãã¦ãã¾ãããUIã¹ãã¼ãã§ã¯ãã¢ããªã®ã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ãä¿åããã復å
ãããããããã«åºç¤ãæä¾ãããã®ããã»ã¹ãç°¡ç´ åãã¾ãã
ã¹ãã¼ãä¿åã®å®è£
ã§ã¯ãã¢ããªã®ã¦ã¼ã¶ã¤ã³ã¿ã¼ãã§ã¼ã¹ã®ãã¡ã©ã®é¨åãä¿åããã®ããèå¥ããå´åã¯ã¾ã å¿
è¦ã¨ãªãã¾ããå ãã¦ãä¿åã¨å¾©å
ã®ããã»ã¹ã¯ãåèµ·åã®éã«ã³ã³ãã³ããæ¬ è½ãããã¢ããªã®UIãå¤åãããã¨ãã£ããä¸æ¸¬ã®äºæ
ã«åãã¦ã«ã¹ã¿ãã¤ãºãããã¨ãã§ãã¾ãã
ã¹ãã¼ãä¿åã«ã¤ãã¦ãã詳細ãªæ
å ±ã¯ãiOS App Programing Guideãåç
§ãã¦ãã ããã
ãã¿ããï¼ibisMailã§ã¯ãããèªåã§ãã£ã¦ã¾ãããã·ã¹ãã ãé¢åè¦ã¦ãããã¨æ¥½ã«ãªãã¾ããã
ãªã¼ãã¬ã¤ã¢ã¦ã
ãªã¼ãã¬ã¤ã¢ã¦ãã¯ã以åã«UIã®è¦ç´ ãã¬ã¤ã¢ã¦ãããããã«ä½¿ç¨ããããã¹ããªã³ã°ã»ã¹ãã©ãããã¢ãã«ãæ¹è¯ãããã®ã§ãããªã¼ãã¬ã¤ã¢ã¦ãã§ã¯ãã¢ããªã®UIã®è¦ç´ ãã¬ã¤ã¢ã¦ãããæ¹æ³ã«ã¤ãã¦ã®è¦åãå®ç¾©ãã¾ãããããã®ã«ã¼ã«ã¯ãã¹ããªã³ã°ã»ã¹ãã©ããã¢ãã«ããããããé¢é£ã®å¤§ããªã¯ã©ã¹ã表ç¾ããããç´è¦³çã«ãªãã¾ãã
ãªã¼ãã¬ã¤ã¢ã¦ãã§ä½¿ç¨ãããã¨ã³ãã£ãã£ã¯ãå¶ç´ã¨å¼ã°ããObjective-Cã®ãªãã¸ã§ã¯ãã§ãããã®æ¹æ³ã¯ãå¤ãã®ã¡ãªãããããããã¾ãã
- ãã¼ã«ã©ã¤ãºã§æååã交æããã¨ãã«ãã¬ã¤ã¢ã¦ããä¿®æ£ããªãã¦ãã
- ããã©ã¤èªãã¢ã©ãèªã®ãããªå³ããå·¦ã®è¨èªã®ã¨ãã«UIè¦ç´ ãå転ããªãã¦ãã
- ãã¥ã¼å ã®ãªãã¸ã§ã¯ãã¨ã³ã³ããã¼ã©ã¼ã¬ã¤ã¤ã¼ã®éã§ã®èª¿æ´ããããããªã
大æµããã¥ã¼ãªãã¸ã§ã¯ãã¯è¦ªãã¥ã¼ã¨é¢é£ããå
å¼ãã¥ã¼ã®ä¸ã§æ¨æºçãªãµã¤ãºã¨ä½ç½®ã«ã¤ãã¦ã®ãã¹ããç¥ã£ã¦ãã¾ããã³ã³ããã¼ã©ã¯ããªã«ãããã®çç±ã§éæ¨æºãè¦æ±ãããã¨ãã¯ããããã®å¤ãä¸æ¸ããããã¨ãã§ãã¾ãã
ãªã¼ãã¬ã¤ã¢ã¦ãã«ã¤ãã¦ãã詳細ãªæ
å ±ã¯ãCocoa Auto Layout Guideãåç
§ãã ããã
ãã¿ããï¼ãªã¼ãã¬ã¤ã¢ã¦ãã®çºè¡¨ã®ã¨ãã¯Macåããªæ©è½ã ãªã¨æã£ãã縦é·iPhone5ã®ããã ã£ããï¼ææãã¼ã¹ã§ãããã®ãã¥ã¼ã ãé«ããææããªããã©ãä»ã®ãã¥ã¼ã¯ä¸ã«ææã¨ãä¸ã«ææã¿ããã«ããã®ããªã
ãã¼ã¿ãã©ã¤ãã·ã¼
ä½ç½®æ å ±ã«å ãã¦ãã·ã¹ãã ã¯æ°ãã«æ¬¡ã®ã¦ã¼ã¶ã®ãã¼ã¿ã«ãµã¼ããã¼ãã£ã¢ããªãã¢ã¯ã»ã¹ããåã«ã¦ã¼ã¶ã«è¨±å¯ãã¦ããããåãåããã¾ãã
- é£çµ¡å
- ã«ã¬ã³ãã¼
- ãªãã¤ã³ã
- ãã©ãã®ã£ã©ãªã¼
é£çµ¡å
ãã«ã¬ã³ãã¼ããªãã¤ã³ããã¼ã¿ã§ã¯ãã¢ããªã¯ãããã®é
ç®ã«ã¢ã¯ã»ã¹ãæå¦ãããå ´åã«åãã¦æºåãããããæå¦ã«å¿ãã¦åä½ã調æ´ãããããå¿
è¦ãããã¾ããããã¢ã¯ã»ã¹è¨±å¯ã®ããã³ããã表示ãã¦ãªãå ´åã¯ãå¾ããããã¼ã¿æ§é ã¯æå¹ã§ãããã¬ã³ã¼ãã¯ããã¾ãããããã¦ã¼ã¶ãã¢ã¯ã»ã¹æå¦ããããã¢ããªã¯NULLå¤ã空ã®ãã¼ã¿ãå¾ã¾ããããã¦ã¼ã¶ãã¢ããªã«è¨±å¯ãä¸ããããã·ã¹ãã ã¯ãã¼ã¿ããªãã¼ãããã復å
ãããããå¿
è¦ããããã¨ãã¢ããªã«éç¥ãã¾ãã
ãã©ãã©ã¤ãã©ãªã§ã¯ãæ¢åã®UIã§ãã¢ã¯ã»ã¹æå¦ã«å¯¾å¿ãã¦ãã¾ãã
ã¢ããªã¯Info.plistãã¡ã¤ã«ã§ã©ã®ããã«ãã¼ã¿ã使ç¨ããã¤ããã§ãããã®èª¬æãæä¾ããããã¨ãã§ãã¾ããã¢ã¯ã»ã¹ã®ããã«ã·ã¹ãã ãããã³ããã表示ããå¿
è¦ãããã¨ãã«ã¦ã¼ã¶ã«ãã®èª¬æã表示ããã¾ãã
Info.plistãã¡ã¤ã«ã«ã©ã®ãã¼ã足ãå¿
è¦ãããã®ãã«ã¤ãã¦ã®è©³ç´°ã¯ Information Property List Key Referenceãåç
§ãã¦ãã ãããåå¥ã®ãã¼ã¿ã¸ã®ã¢ã¯ã»ã¹ã«ã¤ãã¦ã¯ãé¢é£ãããã¬ã¼ã ã¯ã¼ã¯ãªãã¡ã¬ã³ã¹ãåç
§ãã ããã
ãã¿ããï¼ã¬ã©ã±ã¼ã®iã¢ããªã®ã¨ãã¯ãã©ã¤ãã·ã¼ã¬ãã¬ãã§èªç±åº¦ããªãã£ããã©ãåãã¦iPhoneã®APIãã¿ãã¨ãã¯ç·©ããã¦æãã£ããã©ããã¯ãã¤ãã¾ããããããããããã¢ããªãã£ããããã¼ããããããµãã¼ããå¢ããã ãããibisMailãibisPaintãé£çµ¡å¸³ã®ååã表示ããã¾ããã¨ããç»åããã©ãã©ã¤ãã©ãªã«ä¿åã§ãã¾ããã¨ããããæ¥ã¾ããã
ãã¬ã¼ã ã¯ã¼ã¯ã®æ©è½æ¡å¼µ
åã®ç¯ã§èª¬æããé ç®ã«å ãã¦ã以ä¸ã®ãã¬ã¼ã ã¯ã¼ã¯ã¯ã追å ã®æ¡å¼µæ©è½ãæã£ã¦ãã¾ããæ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã®å®å ¨ãªãªã¹ãã«ã¤ãã¦ã¯ãiOS6.0 API Diffãåç §ãã¦ãã ããã
UIKitãã¬ã¼ã ã¯ã¼ã¯
- UIã¹ãã¼ãä¿åãæ°ãã«ãµãã¼ãããã¾ãããUI State Preservationãåç §ãã¦ãã ãã
- ãã¥ã¼ã¯å¶ç´ãã¼ã¹ã¬ã¤ã¢ã¦ãã«æ°ãã«å¯¾å¿ãã¾ããã Auto Layoutãåç §ãã¦ãã ãã
- UICollectionViewã¯ã©ã¹(ã¨ããããµãã¼ãããã¯ã©ã¹ã¨ãããã³ã«ï¼ã¯ãé åºã¥ããããé ç®ã表示ãããã¨ããµãã¼ããã¾ããCollection Viewsãåç §ãã¦ãã ãã
- UITextViewã¨UITextFieldã¯æ°ãã«ã¢ããªãã¥ã¼ãæååã使ã£ã¦ã¹ã¿ã¤ã«ä»ãã®ããã¹ãããµãã¼ããã¾ããã
- UIKitã¯æ°ãã«NSAttributedStringã¨NSMutableAttributedStringãªãã¸ã§ã¯ãã®æç»ããµãã¼ããã¾ãããããã¦æååãã¼ã¹ã®ãã¥ã¼ã¯æ°ãã«ã³ã³ãã³ãã®ããã«ã¢ããªãã¥ã¼ãæååããµãã¼ããã¾ããã
- ã¢ã¯ã»ã·ããªãã£ã¯æ°ãã«ãã¤ã¹ãªã¼ãã¼ãæ¡å¼µãã¾ãã
- ãã¤ã¹ãªã¼ãã¼ã¯ç¹å®ã®ã¢ã¯ã·ã§ã³ãããªã¬ã¼ã«ããæ°ããã¸ã§ã¹ãã£ã¼ã使ããããã«ãªãã¾ããã
- éçºè ã¯ãè¦ç´ ããè¦ç´ ã¸ãããè«ççãªããã¼ãæä¾ããããã«ãã¤ã¹ãªã¼ãã¼ãçæããè¦ç´ ã®ãªã¹ãã®é ç®ãä¸æ¬ã§ä¸¦ã¹ããã¨ãã§ãã¾ãã
- ã¹ã¯ãã¼ã«ãã¥ã¼ã¯æ°ãã«ã¹ã¯ãã¼ã«ä¸ã«ç¹å¥ãªç¶æ ã®æååãæä¾ã§ããããã«ãªãã¾ããã
- ã¢ããªã¯æ°ãã«ãã¢ã¯ã»ã·ããªãã£ã·ã¹ãã ãã¢ããªã®ã¬ã¤ã¢ã¦ããUIãå¤åãããã¨ãç¥ãããã«éç¥ãéããã¨ãã§ããããã«ãªãã¾ããã
- æ°ããéç¥ã¯ãã¤ã¹ãªã¼ãã¼ã®ãç¥ããã®ç¶æ ã«ã¤ãã¦ã®æ å ±ãæä¾ãã¾ãã
- UIActivityViewControllerã¯ã©ã¹ã¯ã¡ã¼ã«ãTwitterãFacebookã®ãããªãµã¼ãã¹ãéãã¦ã³ã³ãã³ããã·ã§ã¢ããããã®æ©è½ã追å ããã¾ãããSocial Frameworkãåç §ãã¦ãã ããã
- UIDeviceã¯ã©ã¹ã¯ãã³ãã¼åºæIDã追å ããã¾ããã
- UIImageã¯ã©ã¹ã¯æ°ãã«ãç»åã®æ¡å¤§ç¸®å°çãæå®ããããã®åæåã¡ã½ããã追å ããã¾ããã
- ã¢ãã¢ã©ã³ã¹(è¦ãç®)ã®ã«ã¹ã¿ãã¤ãºã¯ãUIBarButtonItemãUIPageControlãUIPageViewControllerãUISwitchãUIStepperã¯ã©ã¹ã«ã追å ããã¾ããã
- UITableViewã¯ã©ã¹ã¯ä»¥ä¸ã®å¤æ´ãããã¾ãã
- æ°ããUITableViewHeaderFooterViewã¯ã©ã¹ã¯ãã¼ãã«ã®ãããã¨ããã¿ãå®è£ ãã¾ãã
- ã»ã«ãä»ã®ãã¥ã¼ã®çæã¨ç®¡çãããç°¡ç´ ãªã¢ãã«ã«ãã¾ããã
- ã¹ãã¼ãªã¼ãã¼ãã¯ãã¢ããªãã»ã°ã¦ã§ã¤ã®å·»ãæ»ãã¨å¾©å IDã®æå®ãã§ããããã«ãªãã¾ããã
- UIWebViewã¯ã©ã¹ã¯ãWebã³ã³ãã³ãã®ã¤ã³ã¯ãªã¡ã³ã¿ã«ã¬ã³ããªã³ã°ãOFFã«ããæ¹æ³ãæä¾ããã¾ããã
- UIViewControllerã¯ã©ã¹ã¯æ¬¡ã®ãããªåä½ããµãã¼ãããæ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã追å ããã¾ããã
- æ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯ç»é¢ã®å転ã管çããã追跡ãããããåããããããã¹ãæä¾ããã¾ããã
- ã¢ããªã¯ããªã¬ã¼ãããã»ã°ã¦ã§ã¤ãæå¦ã§ããããã«ãªãã¾ããã
- ã»ã°ã¦ã§ã¤ã®å·»ãæ»ãã追å ããã¾ããã
- UINavigationBarããµãã¯ã©ã¹åãã¦ãã¢ããªã®ããã²ã¼ã·ã§ã³UIã«ã«ã¹ã¿ã ããã²ã¼ã·ã§ã³ãã¼ãå調ããããã¨ãã§ããããã«ãªãã¾ããã
UIKit frameworkã®ã¯ã©ã¹ã«ã¤ãã¦è©³ç´°ãªæ å ±ã¯ãUIKit Framework Referenceãåç §ãã¦ãã ããã
ãã¿ããï¼ãã³ãã¼åºæIDããã¾ããããUDIDãéæ¨å¥¨ã«ãªã£ã代ããã§ãããããåããã£ããããã¼å ãªãããã¤ã¹ãä¸æã«èå¥ã§ããã¨ã
OpenGL ES
OpenGL ESã¯æ¬¡ã®æ°ããæ¡å¼µãããã¾ãã
- GL_EXT_texture_storageæ¡å¼µã¯ã1ã³ã¼ã«ã§ãã¯ã¹ãã£ã®å ¨ä½ã®æ§é ãæå®ãããã¨ãã§ããã¢ããªã®ãã¯ã¹ãã£ãOpenGL ESã«ãã£ã¦ããã«æé©åã§ãã¾ããï¼è¨³æ³¨ï¼ãã¯ã¹ãã£ãã©ã¼ãããã®å¤æ´ã¨ãããã¨ãï¼ï¼
- GL_APPLE_copy_texture_levelsæ¡å¼µã¯ãGL_EXT_texture_storageæ¡å¼µã®æ©è½ã®ä¸ã«æ§ç¯ããããã¯ã¹ãã£ã®ããããããéåããã¯ã¹ãã£ãããã¯ã¹ãã£ã¸ã³ãã¼ã§ãã¾ããï¼è¨³æ³¨ï¼ãããããããã¨ã³ãã¼ã¨ãããã¨ãï¼
- GL_EXT_map_buffer_rangeæ¡å¼µã¯ããããã¡ãªãã¸ã§ã¯ãã®ä¸é¨ã ããå¤æ´ããå¿ è¦ãããã¨ãã«ããã©ã¼ãã³ã¹ãæ¹åãã¾ãã
- GL_APPLE_syncæ¡å¼µã¯ãã¢ããªã«ãã¡ã¤ã³ã²ã¤ã³åæãæä¾ãã¾ããããã¯ã¢ããªãéãOpenGL ESã³ãã³ãã®ä¸é¨ãé¸æãããããããã®ã³ãã³ããå®äºããã¾ã§å¾ ã£ãããããã¨ãã§ãã¾ããï¼è¨³æ³¨ï¼CPUã¨GPUã§åãã¡ã¢ãªã«ã¢ã¯ã»ã¹ãªã©ã®ããã®åææ©æ§ãããï¼
- GL_EXT_shader_framebuffer_fetchæ¡å¼µã¯ãOpenGL ES 2.0ã¢ããªã«ã®ã¿æå¹ã§ããã©ã°ã¡ã³ãã·ã§ã¼ãã¼ã§ãã¬ã¼ã ãããã¡ã®ãã¼ã¿ã®èªã¿åãããµãã¼ããã¾ãã
ãããã®æ¡å¼µã¯ãiOS6ãèµ°ããã¹ã¦ã®ããã¤ã¹ã§æå¹ã§ãããã¤ãã®ããã«ã¢ããªã§ä½¿ãåã«æ¡å¼µãããã確èªãã¦ãã ããã
ãã¿ããï¼ããã¯å¬ããï¼ãã©ã°ã¡ã³ãã·ã§ã¼ãã¼ã§ã¯ãã¬ã¼ã ãããã¡ã¯åºåå ã§ãããªãã£ããèªã¿åããã§ããããã«ãªã£ãã
ã¡ãã£ã¢ãã¬ã¤ã¤ã¼ãã¬ã¼ã ã¯ã¼ã¯
MPVolumeViewã¯ã©ã¹ã¯é³éãã¥ã¼ã®è¦ãç®ãã«ã¹ã¿ãã¤ãºããæ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã追å ããã¾ãããã¢ããªã¯ããªã¥ã¼ã ã¹ã©ã¤ãã¼ã¨ã«ã¼ãã£ã³ã°ãã¿ã³ã«é¢é£ä»ããããç»åãå¤æ´ããããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã使ããã¨ãã§ãã¾ãã
MediaPlayerãã¬ã¼ã ã¯ã¼ã¯ã®ã¯ã©ã¹ã®æ
å ±ã«ã¤ãã¦ã詳細ã¯Media Player Framework Referenceãåç
§ãã¦ãã ããã
Image IO ãã¬ã¼ã ã¯ã¼ã¯
Image IO framework(ImageIO.framework)ã¯ãç»åã®EXIFã¨IPTCã¡ã¿ãã¼ã¿ã«ã¢ã¯ã»ã¹ããæ¹æ³ã追å ããã¾ãããã¢ããªã¯CGImageSourceRefã¨CGImageDestinationRefã®ãªããã¥ã¼ã¿ã¤ãã«é¢é£ããé¢æ°ã使ã£ã¦ã¡ã¿ãã¼ã¿ã«ã¢ã¯ã»ã¹ã§ãã¾ãã
Image IO frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ
å ±ã®è©³ç´°ã¯ãImage I/O Reference Collectionãåç
§ãã¦ãã ããã
iAdãã¬ã¼ã ã¯ã¼ã¯
iAd framework(iAd.framework)ã¯ãiPadããã¤ã¹ç¨ã«ããã£ã¢ã ç©å½¢ãµã¤ãºãæ°ãã«ãµãã¼ããã¾ãããiAd frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãiAd Framework Referenceãåç §ãã¦ãã ããã
Foundationãã¬ã¼ã ã¯ã¼ã¯
Foundation framework(Foundation.framework)ã¯æ¬¡ã®æ¡å¼µãå«ã¾ãã¾ãã
- NSFileManagerã¯ã©ã¹ã¯iCloudã®å©ç¨å¯è½å¤å®ã®ããã®ubiquityIdentityTokenã¡ã½ããã追å ãããã¾ããiCloudã«ã¦ã¼ã¶ããã°ã¤ã³ããããã°ã¢ã¦ããããã¢ã«ã¦ã³ããå¤æ´ããããã¨ãä¼ããããã«NSUbiquityIdentityDidChangeNotificationéç¥ã追å ããã¾ããã
- NSUUIDã¯ã©ã¹ã¯æ§ã ãªã¿ã¤ãã®UUIDã表ç¾ãããªãã¸ã§ã¯ããçæããã®ã«å½¹ç«ã¡ã¾ããä¾ãã°ãã¢ããªã¯RFC4122ver.4ã®ã©ã³ãã ãªãã¤ãåã¨ãã¦NSUUIDãªãã¸ã§ã¯ããä½æããããæ¢åã®UUIDæååããã¼ã¹ã«ããããããã¨ãã§ãã¾ãã
- NSURLRequestã¯ã©ã¹ã¯æºå¸¯é»è©±ãããã¯ã¼ã¯çµç±ã®ãªã¯ã¨ã¹ãã許å¯ãã¹ããã©ããã¢ããªããæå®ã§ãã¾ãã
- NSStringã¯ã©ã¹ã¯ããã¹ã¦å¤§æåã¸ããã¹ã¦å°æåã¸ãåèªã®å é 大æåã¸ã®å¤æã¡ã½ããã追å ããã¾ããã
Foundation frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãFoundation Framework Referenceãåç §ãã¦ãã ããã
å¤é¨ã¢ã¯ã»ãµãªãã¬ã¼ã ã¯ã¼ã¯
External Accessory framework(ExternalAccessory.framework)ã¯ãBluetoothããã¤ã¹ã¸ã®æ¥ç¶ã管çããããã®æ°ããã¤ã³ã¿ã¼ãã§ã¼ã¹ãå«ã¾ãã¾ããã¢ããªã¯ãã¢ãªã³ã°ã®ããã«æå¹ãªBluetoothããã¤ã¹ã®ãªã¹ãã®ã¢ã©ã¼ãããã«ã表示ãããã¨ãã§ãã¾ããèªåæ¥ç¶ããªã以åã«ãã¢ãªã³ã°ãããã¢ã¯ã»ãµãªã¼ãèµ·ããæ©è½ãæä¾ããã¾ãã
External Accessory frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ
å ±ã®è©³ç´°ã¯ãExternal Accessory Framework Referenceãåç
§ãã¦ãã ããã
Event Kitãã¬ã¼ã ã¯ã¼ã¯
Event Kit fremework(EventKit.framework)ã¯æ¬¡ã®æ¡å¼µãå«ã¿ã¾ãã
- ãã¬ã¼ã ã¯ã¼ã¯ã¯ããªãã¤ã³ãã®çæããµãã¼ããã¾ããRemindersãåç §ãã¦ãã ããã
- ã«ã¬ã³ãã¼ã¨ãªãã¤ã³ãã®ã¤ãã³ãã¯æ°ãããµã¼ãä¸ã®åãã¤ãã³ããè¤æ°ã®ããã¤ã¹ã§åç §ããããã®å¤é¨èå¥åãæä¾ãã¾ãã
- iOS6以éã«ãªã³ã¯ããã¢ããªã®ããã«ãã·ã¹ãã ã¯ã«ã¬ã³ãã¼ããªãã¤ã³ããã¼ã¿ã«ã¢ã¯ã»ã¹ããåã«ã¦ã¼ã¶ã«è¨±å¯ãåãã¾ãã
- ã¢ããªã¯æ°ãã«EKEventEditViewControllerãªãã¸ã§ã¯ãããããã°ã©ã çã«ç·¨éããã£ã³ã»ã«ããããã¨ãã§ãã¾ãã
Event Kit frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãCalendar and Reminders Programming Guideãåç §ãã¦ãã ããã
Core Video ãã¬ã¼ã ã¯ã¼ã¯
Core Video framework(CoreVideo.framework)ã¯ï¼ã¤ã®æ°ãããã¯ã»ã«ãã©ã¼ãããã«å¯¾å¿ãã¾ããããããã®ãã©ã¼ãããã¯ãOpenGL ESã¨å調ãã1ãã£ã³ãã«ã¨2ãã£ã³ãã«ã®ç»åã®ããã®å¹ççãªä¿åæ¹æ³ãæä¾ãã¾ããCore Video frameworkã®é¢æ°ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãCore Video Framework Referenceãåç §ãã¦ãã ããã
Core Media ãã¬ã¼ã ã¯ã¼ã¯
Core Media Framework(CoreMedia.framework)ã¯åºæ¬ã¡ãã£ã¢ã¿ã¤ã ãµã¼ãã¹ããã¤ãã¢ã¨ãã¦å®ç¾©ãããCMColockRefã¨CMTimebaseRefåã追å ãã¾ãããCore Media frameworkã®é¢æ°ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯Core Media Framework Referenceãåç §ãã¦ãã ããã
Core Location ãã¬ã¼ã ã¯ã¼ã¯
Core Location Framework(CoreLocation.framework)ã¯æ¬¡ã®å¤æ´ãå«ã¿ã¾ãã
- CLLocationManagerãªãã¸ã§ã¯ãã¯æ°ãã«ã¦ã¼ã¶ãé·ãéè¡ã£ã¦ããªãå ´åã«ãã±ã¼ã·ã§ã³ã¤ãã³ãã®é ä¿¡ãä¸æåæ¢ãã¾ãããã®åä½ã¯ãã¬ã¼ã ã¯ã¼ã¯ãGPSãä»ã®ãã¼ãã¦ã§ã¢ãOFFã«ãããã¨ã«ãã£ã¦ããããªã¼ãç¯ç´ãã¾ããããã¯ããã©ã«ãã§æå¹ã§ãããCLLocationManagerãªãã¸ã§ã¯ãã®pausesLocationUpdatesAutomaticallyããããã£ã®å¤ãå¤æ´ãããã¨ã§ãã®ããããªã¼ç¯ç´æ©è½ãOFFã«ã§ãã¾ããã¢ããªã¯ãCLLocationManagerã®activityTypeããããã£ã®å¤ãé©åãªå¤ã«è¨å®ãããã¨ã§ä½¿ç¨æ¹æ³ãåºã«ããä½ç½®ã®ç²¾åº¦ã®åä¸ãã§ãã¾ãããã®ããããã£ã¯ç¾å¨ãè»ã§ã®ç§»åã¨ãã£ãããã¹ï¼è¨³æ³¨ï¼æ£æ©ã¨ãã¸ã§ã®ã³ã°ã¨æãããï¼ãåºå¥ããããã¨ãã§ãã¾ãã
Core Location frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãCore Location Framework Referenceãåç §ãã¦ãã ããã
Core Bluetooth ãã¬ã¼ã ã¯ã¼ã¯
Core Bluetooth framework(CoreBluetooth.framework)ã¯ãããªãã§ã©ã«ã¢ã¼ãã§Bluetoothããã¤ã¹ã¨éä¿¡ãããã¨ããµãã¼ããã¾ãããã¾ã¾ã§iOSããã¤ã¹ã¯ã»ã³ãã©ã«ã¢ã¼ãã§ã®ã¿éä¿¡ã§ããããæ°ãã«iOSããã¤ã¹ã¯ããªãã§ã©ã«ã¢ã¼ãã§èªåèªèº«ãã¢ããã¿ã¤ãºï¼è¨³æ³¨ï¼çºè¦ãããå´ã¨ãã¦å¾
ã¤ç¶æ
ï¼ã§ããä»ã®iOSããã¤ã¹ã¨éä¿¡ã§ããã
Core Bluetooth frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®æ
å ±ã®è©³ç´°ã¯ãCore Bluetooth Framework Referenceãåç
§ãã¦ãã ããã
ãã¿ããï¼Bluetooth4.0ã§ã¯çé»åã¢ã¼ããã§ãããã¿ã³é»æ± ã§1å¹´åä½ããBluetooth対å¿å°åæ©å¨çãä½ããããã«ãªããããã«ããè æè¨ãèæè¨ãªã©ã®æ©å¨ãçºå£²ããã¦ãã¦ããããããã®ããã¤ã¹ãããªãã§ã©ã«ããã¤ã¹(å¨è¾ºæ©å¨)ã¨å¼ã³ã親å´ãã»ã³ãã©ã«ããã¤ã¹ã¨å¼ã¶ãããã§ã¯ãä»ã¾ã§ã¯iOSããã¤ã¹ãã»ã³ãã©ã«ããã¤ã¹ã®ã¿ã§ãã£ãããããããã¯ããªãã§ã©ã«ããã¤ã¹ã¨ãã¦ãåä½ããããã¨ãã§ããã¨ãããã¨ãæãã¦ãã¾ãã
Core Audio
Core Audioãã¬ã¼ã ã¯ã¼ã¯ãã¡ããªã¯æ¬¡ã®å¤æ´ãå«ãã§ãã¾ãã
- æ¯è¼çé·ãã¿ã¤ã ã¹ã©ã¤ã¹ã使ç¨ãã¦ãåªå é ä½ã®ä½ãã¹ã¬ããã§å¦çãããã¨ãã§ããæ°ããAUDeferredRendererãªã¼ãã£ãªã¦ããããã§ãã¾ããã
- AudioQueueProcessingTapãªã¼ãã£ãªã¦ãããã¯ããªã¼ãã£ãªãã¥ã¼å ã®ãã¼ã¿ã«å²ãè¾¼ã¿ããããå¦çãããã¨ãã§ãã¾ãã
iOSã§å©ç¨å¯è½ãªãªã¼ãã£ãªæè¡ã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãMultimedia Programing Guideãåç §ãã¦ãã ãããæ°ãããªã¼ãã£ãªã¦ãããã«ã¤ãã¦ã®æ å ±ã®è©³ç´°ã¯ãAudio Unit Component Services Referenceãåç §ãã¦ãã ããã
AV Foundation ãã¬ã¼ã ã¯ã¼ã¯
AV Foundation framework (AVFoundation.framework)ã¯ã次ã®æ¡å¼µãå«ã¿ã¾ãã
- AVPlayerã¯ã©ã¹ã¯å¤é¨ã®ã¿ã¤ã ã½ã¼ã¹ã«åçãåæããããã®æ©è½ã追å ããã¾ãããã·ã³ã°ã«ãã¬ã¤ã¤ã¼ãªãã¸ã§ã¯ãã¯ãHTTPã©ã¤ãã¹ããªã¼ã ããã³ãã¡ã¤ã«ãã¼ã¹ã¢ã»ããï¼ããã°ã¬ãã·ããã¦ã³ãã¼ãããã¦ãããã¡ã¤ã«ã¨ãã¼ã«ã«ãã¡ã¤ã«ã®ä¸¡æ¹ãå«ãï¼ã®ä¸¡æ¹ãåçãããã¨ãã§ãã¾ããããã¦ãã¢ããªã¯åããã¬ã¤ã¤ã¼ãªãã¸ã§ã¯ãã®ãããªåºåã表示ããããã«è¤æ°ã®AVPlayerLayerãªãã¸ã§ã¯ãã使ç¨ãããã¨ãã§ãã¾ãã
- æ°ããAVPlayerItemOutputã¯ã©ã¹ã¯ãã¢ããªãããããå¦çã§ããããã«ãåçä¸ã«å¾©å·åããããããªãã¬ã¼ã ãAVPlayerItemãªãã¸ã§ã¯ãã¨ãã¦åå¾ãããã¨ãã§ãã¾ãã
- AVAssetResourceLoaderã¯ã©ã¹ã使ç¨ããã¨ãã¢ã»ããã®ãã¼ãå¦çã«ããªã²ã¼ããªãã¸ã§ã¯ããæ¿å ¥ãã¦ãã«ã¹ã¿ã ãªã½ã¼ã¹ãªã¯ã¨ã¹ããå¦çã§ããããã«ãªãã¾ãããã®ã¯ã©ã¹ã¯ãAVURLAssetã¯ã©ã¹ã¨å ±ã«åä½ãã¾ãã
- AVAudioSessionã¯ã©ã¹ã¯æ°ãã使ç¨ä¸ã®ç¾å¨ã®ãªã¼ãã£ãªã«ã¼ãã«ã¤ãã¦ã®æ å ±ãå ¬éãã¾ãã
- AVAudioMixInputParametersã¯ã©ã¹ã¯ããªã¼ãã£ãªãã¼ã¿ãåçãããèªã¿è¾¼ã¾ããå ¬éãããåã«ãã®ãã¼ã¿ã«ã¢ã¯ã»ã¹ããããã«ä½¿ãããMTAudioProcessingTapRefãã¼ã¿ã«ã¢ã¯ã»ã¹ããæ©è½ãæä¾ãã¾ãã
- AVAudioSessionã¯ã©ã¹ã¯æ¬¡ã®æ¡å¼µãå«ã¿ã¾ãã
- å²ãè¾¼ã¿ãå¤æ´ãæ¤åºããããã®ãªã¼ãã£ãªã»ãã·ã§ã³ããªã²ã¼ãã®ä½¿ç¨ã¯ãæ°ããéç¥ã»ããã«ãã使ç¨éæ¨å¥¨ã«ãªãã¾ããã
- ãªã¼ãã£ãªã»ãã·ã§ã³ã¯è¤æ°ã®ãªã¼ãã£ãªãã¼ãã¦ã§ã¢ããã¤ã¹ã®ã«ã¼ãã£ã³ã°ã許å¯ããæ°ããAVAudioSessionCategoryMultiRouteãªã¼ãã£ãªã«ãã´ãªããµãã¼ããã¾ãã
- ãªã¼ãã£ãªã»ãã·ã§ã³ã¯ãã ã¼ãã¼åçã®ã·ããªãªã®ããã®é©åãªåºåä¿¡å·å¦çãããæ°ããAVAudioSessionModeMoviePlaybackã¢ã¼ãããµãã¼ããã¾ãã
- AVCaptureConnectionã¯ã©ã¹ã¯ãã¢ããªã§ãããªåä¿¡ã«ããã¦ãããªã®å®å®åã®ããã®æ©è½ãON/OFFãããã¨ãã§ãã¾ãã
- AVCaptureMetadataOutputã¯ã©ã¹ã¯ããã£ããã£ã³ãã¯ã·ã§ã³ãªãã¸ã§ã¯ãã«ãã£ã¦çºè¡ãããã¡ã¿ãã¼ã¿ã«å²ãè¾¼ãããã®æ°ããã¯ã©ã¹ã§ãã
- AVMetadataFaceObjectã¯AVCaptureMetadataOutputãªãã¸ã§ã¯ãã«ãã£ã¦ãã£ããã£ãããé¡èªèã®å ±åãããæ°ããã¯ã©ã¹ã§ãã
- AVTextStyleRuleã¯ã©ã¹ã¯ãåå¹ãã¯ãã¼ãºããã£ãã·ã§ã³ï¼è¨³æ³¨ï¼ON/OFFã§ããåå¹ï¼ãä»ã®ããã¹ãé¢é£ã¡ãã£ã¢ã¢ã»ããã®ããã®ãªãã·ã§ã³ã®ã¹ã¿ã¤ã«ãæå®ããããã®æ°ããã¯ã©ã¹ã§ãã
- AVAudioPlayerã¯ã©ã¹ã¯ãMPMediaLibraryã¯ã©ã¹ããåå¾ããURLã使ã£ã¦ã¦ã¼ã¶ã®iPodã©ã¤ãã©ãªãããªã¼ãã£ãªã¢ã¤ãã ãåçãããã¨ãã§ãã¾ãã
AV Foundation frameworkã®ã¯ã©ã¹ã«ã¤ãã¦ã®è©³ç´°ãªæ å ±ã¯ãAV Foundation Framework Referenceãåç §ãã¦ãã ããã
Ad Support ãã¬ã¼ã ã¯ã¼ã¯
Ad Support Framework ( AdSupport.framework )ã¯ãåºåç®çã§ã¢ããªã使ããã¨ãã§ããIDã«ã¢ã¯ã»ã¹ããæ©è½ãæä¾ããæ°ãããã¬ã¼ã ã¯ã¼ã¯ã§ãããã®ãã¬ã¼ã ã¯ã¼ã¯ã¯ã¾ããã¦ã¼ã¶ãã¢ããã©ããã³ã°ã«ãªããã¢ã¦ããã¦ãããã©ããã示ããã©ã°ãæä¾ãã¾ããã¢ããªã¯åºåIDã«ã¢ã¯ã»ã¹ããåã«ãªããã¢ã¦ããã©ã°ãã¿ã¦ãããã«å¾ãå¿
è¦ãããã¾ãã
ãã®ãã¬ã¼ã ã¯ã¼ã¯ã«ã¤ãã¦ã®æ
å ±ã®è©³ç´°ã¯ãAd Support Framework Referenceãåç
§ãã¦ãã ããã
Accelerate ãã¬ã¼ã ã¯ã¼ã¯
Accelerate Framework( Accelerate.framework )ã¯ãæ°ãã«ãã¯ã¿ã¹ã«ã©ãã¯ã¼é¢æ°ãvDSPé¢æ°ãé¢æ£ã³ãµã¤ã³å¤æé¢æ°ãSSEé¢é£ãã¯ã¿ã¼é¢æ°ãsineé¢æ°ãvImageé¢æ°ã追å ããã¾ããã
Accelerate frameworkã®é¢æ°ã«ã¤ãã¦ã®è©³ç´°ã¯ãAccelerate Framework Referenceãåç
§ãã¦ãã ããã
ãããã«
ãã¼ãiOS6ã¯iOS5ããOTAã§ã¢ãããã¼ãã§ããããã«ãªã£ãã®ã§ãæ®åã¯æ©ããã§ãããæ©ãã«iOS6å°ç¨ã¢ããªã¨ããæ°è¦ã«ä½ã£ã¦ãããããã楽ãã¿æ¥½ãã¿ã
å人çã«ã¯OpenGL ESã®æ°æ©è½ã触ã£ã¦èª¿ã¹ã¦ã¿ããã
ââ
ããã£ããibisMail Free(ç¡æ)ãibisPaint X(ç¡æ)ãã¦ã³ãã¼ãããããããé¡ããã¾ãã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan
iPhone Devåå¼·ä¼ ã§çºè¡¨ãã¾ããã
iPhone_Dev_jp 第1ååå¼·ä¼
2012/4/14 ã«iPhone_dev_jpã®ç¬¬1ååå¼·ä¼ãéå¬ãããã®ã§ãçºè¡¨ãã¦ãã¾ãããã
ATND㯠http://atnd.org/events/26946 ãã¡ãã
çºè¡¨ã«ä½¿ã£ãã¹ã©ã¤ããè²¼ã£ã¦ããã¾ããibisPaintã§ã®OpenGL ES2.0å©ç¨ã«ã¤ãã¦ã®çºè¡¨ã§ãã
ä»ã®æ¹ã®çºè¡¨ã§ãããã£ãã®ã¯
- @nakamura001ããã®Unityã®éçºãããã®ãã¢ã¯ãããªãã»ã©ãããã¯é«æ©è½ãç°¡åã«ä½ããããUnityãããã©ã°ã¡ã³ãã·ã§ã¼ãã¼ãæ¸ããã®ãããã¨ããæãã
- @akisutesamaããã®è¶ ãã¤ãã³ã·ã§ã³ã®ãã¬ã¼ã³ã§ãä¼å ´ã沸ããããã¯ããã¯ã¯ããã°ãããããããã¦ã¡ã½ããï¼ã¨ããæãã
- @sonson_twitããã® iCloudãiCloudã¯ãªããªã大å¤ãããã
- @fladdictããã®ãã³ã»ãºã¼ã ã»å転ã®å®è£ ã®ä»æ¹ã®çºè¡¨ã¯ãæè¡çã«ã¯ibisPaintã§ãå®è£ æ¸ã¿ãªã®ã§ç¥ã£ã¦ãããã¨ã§ãã£ããã©ããã¬ã¼ã³ã®ä»æ¹ãé常ã«åãããããããããfladdictããã¨ããæãã
iPhone_dev_jp第2ååå¼·ä¼
ã§ã2012/05/26ã«iPhone_dev_jp第2ååå¼·ä¼ããã£ãã®ã§ãããåéãã2æéãããã§éæ»æºå¸ã§ãçºè¡¨è
ãªãåãä»ããã¨ãããã¨ã§ã第2åãçºè¡¨ãã¾ããã
ATND㯠http://atnd.org/events/28693 ãã¡ãã
第1åã®ç§ã®çºè¡¨ã¯é£ããã£ããã¨ãã声ãTwitterã«æµãã¦ããã®ã§ããã©ã°ã¡ã³ãã·ã§ã¼ãã¼ã使ã£ã¦ã¿ã¦ããã¨ããçºè¡¨ãä»åã¯çºè¡¨ç¨ã«ã¢ããªãä½ã£ãã®ã§ã½ã¼ã¹ã³ã¼ããå
¬éãã¾ãããBSDã©ã¤ã³ã»ã³ã¹ã§å
¬éããã®ã§ä½¿ã£ã¦ãã ããã
ä»ã®çºè¡¨è
ã§é¢ç½ãã£ããªã¨æã£ãã®ã¯ã
- @k_katsumiããã®ARCãããã岸å·ãããè¶ è©³ç´°ãçµæ§ã¯ã¾ãã©ãããããARCãã§ã便å©ã
- @fladdictããã®UITableViewããã¯ã横ã«ã¹ã¯ãã¼ã«ããããã«ãã¼ããã¼ã£ã½ãããããç¸å¤ãããããã¬ã¼ã³ãåãããããã
- @cqa02303ããã®AirPrintãAirPrintã使ãå´ã®è©±ãã¨æã£ããIPP(Internet Printing Protocol)ããã¤ããªããã¯ãã¦ä»®æ³ããªã³ã¿ãå®è£ ããã¨ããä½ã¬ãã«ã§ã¹ããã
- @cathandnyaããã®WebViewã®contentEditableãããã¯ãã¡ã®ç¤¾å ã§ãibisMailã®ããã«ç 究ãã¦ãããã¨ãªã®ã§ãå 容ã¯ç¥ã£ã¦ãããã¨ã ã£ããã©ãåãããã¼ãã¼ããèªåã§åºãæ¹æ³ãè¦ã¤ãããªããã¨ããã¡ãããã§ibisMailã«æ¡ç¨ããã®ãè¦éã£ããiOSã®ãã¼ã¸ã§ã³ã¢ããã§å¶å¾¡ã§ããããã«ãªãã¨ãããªã
- @takiuchiããã®ã«ã¡ã©ã®è¼åº¦èª¿æ´ãAPIãä¸è¶³ãã¦ããã®ã§ãè£è¶³ãã¦å®è£ ãããã¢ã¤ãã¢ãããããããã¦ããã£ã¨OpenGL ES使ãã
ãã¾ã«ã¯çºè¡¨ãããã§ãããå¤ãã®ããã«ã¼ã«ä¼ãããã
ã¼ã¼
ãã®è¨äºãåèã«ãªã£ãã¨ããæ¹ã¯ãibisMail Free(ç¡æ)ãibisPaint X(ç¡æ)ã§ããã®ã§ãã¦ã³ãã¼ãããããããé¡ããã¾ãã
URL:ibisMail Freeã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPhoneã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisMail for iPadã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら
URL:ibisPaintã®ãã¦ã³ãã¼ããã¬ãã¥ã¼ã¯こちら ãµã¤ãã¯ãibispaint.com
ãæè¦ãè¦æã¯Twitterãã: @kamiyan