티스토리 툴바

Will it play in App Engine에서 확인 가능. 스프링뿐 아니라 Java Enterprise Edition (Java EE) Technologies와JVM-based Languages, Miscellaneous Java™ Libraries and Frameworks의 세 개 분류로 자바 기술 스택의 주요 구성 요소와의 호환성을 확인할 수 있다.


Spring MVC
Version: 2.5.6
Status: COMPATIBLE

Spring ORM
Version: 2.5.6
Status: COMPATIBLE

Spring Security
Version(s): ?
Status: SEMI-COMPATIBLE

Grails
Version: 1.1.1
Status: SEMI-COMPATIBLE
  • A plugin has been made available which integrates the App Engine SDK with Grails, adding features to upload Grails application automatically and run the local dev server. To download this plugin or see a screencast and tutorial, see http://grails.org/plugin/app-engine.
  • As of now, you have to use the "grails app-engine run" command rather than "grails run-app", which blocks other plugins that extend run-app including the GWT plugin. More incompatibilities noted in this thread.


설정

트랙백

댓글

GUI 기반 프로그래밍 전형이다. SDK가 제공하는 인터페이스 구현(implements)를 통해 이벤트 핸들러를 정의한다.

        class MyHandler implements ClickHandler, KeyUpHandler {
            /**
             * Fired when the user clicks on the sendButton.
             */
            public void onClick(ClickEvent event) {
                sendNameToServer();
            }

            /**
             * Fired when the user types in the nameField.
             */
            public void onKeyUp(KeyUpEvent event) {
                if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
                    sendNameToServer();
                }
            }

실제 비즈니스 로직은 모아 두었다.(sendNameToServer() 메소드)

            private void sendNameToServer() {

               <중략>

                greetingService.greetServer(textToServer,
                        new AsyncCallback<String>() {
                            public void onFailure(Throwable caught) {
               <중략>
                            }

                            public void onSuccess(String result) {
               <중략>
                            }
                        });

GAE/J 가 원격 통신을 추상화시켜주겠지. 직관적인 콜백 메소드 이름(onFailure, on Success)탓에 쉽게 코드를 이해할 수 있다.

다른 GUI 프로그래밍과 다른 부분은 아래 코드다.

        RootPanel.get("nameFieldContainer").add(nameField);
        RootPanel.get("sendButtonContainer").add(sendButton);
        RootPanel.get("errorLabelContainer").add(errorLabel);

RootPanel 클래스의 add() 메소드로 HTML의 특정 영역을 지정하고, GWT 컴포넌트를 삽입한다. HTML 영역지정 코드는 다음과 같다.

        <td id="nameFieldContainer"></td>
        <td id="sendButtonContainer"></td>


이번에는 GAE/J Eclipse 개발환경의 특징이다. SDK로 서버가 배포되는 점에서 GAE/J의 포지션을 알 수 있는 부분이지만, 편리해서 마음에 든다.

The development server is part of the SDK. You can‘t use your own development server for App Engine debugging and testing. The App Engine JRE differs from other implementations.

얏호! 수 초의 작업 후에 배포에 성공했다.

http://ahnyounghoe.appspot.com/





설정

트랙백

댓글