스타트업을위한 Rapid development Inpion consulting 양수열
짧은기간 다양한시도 팀웍 투자 모자란인력 Startup 의현실 개발자!!!! 2
한국에서 Startup 이힘든이유? 참고 : http://venturesquare.net/2003 3
기존의일반적인개발?! 개발자 시스템엔지니어 DBA Webcoder(scripter) 4
드림팀!? 5
이들간자주보는광경 참조 : http://real21c.co.kr/82 6
내가생각하는드림개발자! 아이폰, 안드로이드안가리고개발해용 서버사이드개발경험많아유!!! 클라우드에서비스몇개올려봤는디유 SNS 랑로그데이터왕창모아서 M/R 프로그램좀해봤는데요. 하둡이요? 아 그거 3 년정도운영해봤어요 ^^ 7
최고의선택? 8
개발과정 Eclipse Weblogic / Websphere / tomcat Oracle DB / Mysql Maven / ivy / Ant Toad / orange Etc Lib Coding standard / Convention 9
그리고또?? Jenkins-ci Git / SVN Trac / redmine / bugzilla 10
과연이렇게하는게맞을까? 11
그럼어떻게? 빠른프로토타입핑. 짧은개발주기 가장보편적기술의도입. 모바일과웹을동시에지원가능한서비스설계 Scale out 고려한설계 클라우드고려한설계 12
Python Django Flask web2py Ruby Ruby on Rails Merb PHP Zend Cake Scala C / C++ 개발언어? 13
Architecture? Convert Layer Representation URL Cache RESTFul Resource Layer Business Resource Layer Resource Network Cache Database Access Layer Client Layered Architecture 14
REST 의특징 REST (REpresentational State Transfer) 의특징 SOAP, XML-RPC보다간단 OPEN-API 구현에많이사용 많은웹2.0 회사들이 Open API의구현방법으로많이사용. 구글, 플리커, 아마존등의 Open API가 REST 방식으로구현되어공개 서비스의서버플랫폼구축에있어필수적인아키텍쳐 REST는실제표준은아니지만 HTTP/URL/MIME Type같은웹표준만을사용. 15
REST 의성공요인 상태를유지하지않는클라이언트 / 서버구조 작고어디에서나적용되는인터페이스 GET, POST, PUT, DELETE 모든자원은 URI 를이용하여지정 사용자의요청에따른 Representation 사용하기편리 이기종통합성 16
REST RESPONSE 디자인 REST는 HTTP 프로토콜을최대한활용하는아키텍처스타일 REST의응답을디자인고려사항 반환데이터 응답코드 HTTP 코드 200 : OK (HTTP Message Body O) 404 : Not Found (URI가없는경우 ) 406 : Not Acceptable 405 : Method Not Allowed 예외발생시메세지 17
Playframework overview 18
A Java framework without the pain pure java Same Environment In REST App Routes (text) Controller class(plain java) Entity class(plain java) No HTML, CSS, JavaScript, xml etc. 19
Fix the bug and hit Reload 20
21
Simple stateless MVC architecture 22
HTTP-to-code mapping straightforward access to HTTP fundamental difference between Play and other Java web application frameworks HTTP the Request/Response pattern the REST architectural style content-type negotiation URI GET /clients/{id} Clients.show (routes) 23
Test driven development (if you like it) Creating automatic test suites Junit4 Functional Test Unit Test Selenium UAT #{selenium} tag Fixture The simplest way is to reset your database before each test YAML 24
25
Full-stack application framework relational database support through JDBC. object-relational mapping using Hibernate (with the JPA API). integrated cache support, with easy use of the distributed memcached system if needed. straightforward web services consumption either in JSON or XML OpenID support for distributed authentication. your web application ready to be deployed anywhere (application server, Google App Engine, Cloud, etc ) image manipulation API. Module repository!!! 26
Bind an HTTP parameter to a Java method parameter Request /articles/archive?date=08/01/08&page=2 Java method parameters public static void archive(date date, Integer page){ } List<Article> articles = Articles.fromArchive(date, page); render(articles); 27
Redirect to an action by calling the corresponding Java method Controller class: public static void show(long id) { Article article = Article.findById(id); render(article); } public static void edit(long id, String title) { Article article = Article.findById(id); article.title = title; article.save(); show(id); } 28
Don t Repeat Yourself when passing Java objects to templates 29 Most java framework Article article = Article.findById(id); User user = User.getConnected(); Map<String, Object> model = new HashMap<String,Object>(); model.put("article", article); model.put("user", user); render(model); Play Article article = Article.findById(id); User user = User.getConnected(); render(article, user);
JPA on steroids public void messages(int page) { } User connecteduser = User.find("byEmail", connected()).first(); List<Message> messages = Message.find( "user =? and read = false order by date desc", connecteduser ).from(page * 10).fetch(10); render(connecteduser, messages); 30
Straightforward file upload management HTML form #{form @uploadphoto(), enctype:'multipart/formdata'} <input type="text" name="title" /> <input type="file" id="photo" name="photo" /> <input type="submit" value="send it..." /> #{/} Java code public static void uploadphoto(string title, File photo) {... } 31
Install play install gae-1.6.0 Module dependencies.yml require: - play -> gae 1.6.0 32
소소한미숙한점들 암호화안된쿠키 Application logic may be revealed in cookie PLAY_SESSION 잘나누어줘야하는 controller IDE에서쓰기힘든템플릿타입들 Scala?! Groovy script templete engine?! 33
Q & A 감사합니다. 34