2005년 9월 28일 수요일

Xamlon Refocuses Amidst XAML Craze

September 16, 2005
Xamlon Refocuses Amidst XAML Craze

By Susan Kuchinskas

When Xamlon released its XAML (define) application in October, its CEO promised "XAML now."

But that was then. Now, Xamlon is backing away from XAML, saying developers aren't really ready.

The product in question, Xamlon 1.0, is an application development package providing streamlined coding for Web services (define) and Windows Presentation Foundation (formerly Avalon), the graphics display component in Windows Vista.

While the release of Windows Vista is planned for the end of 2006, Xamlon 1.0 lets .NET developers begin coding in XAML immediately.

On Tuesday, at Microsoft's (Quote, Chart) Professional Developers Conference, Xamlon released a beta version of Xamlon Web, a tool that lets those .NET developers use C# and Visual Studio .NET to create and deploy applications that deploy to any browser or operating system.

It's the same message but a different target.

"The announcement is a lot about messaging and a lot about focus," said Xamlon CEO Paul Colton. "We said, 'Let's align ourselves more closely with the release schedule of Microsoft and not force developers into something they don't want to use right now."

There was plenty of excitement at PDC about XAML and how it will enable developers to create both the front end and business logic of applications. But, while Microsoft has released community technology previews of XAML-related technologies, Vista is at least two years away from general market availability.

"Mainly we learned that developers, much as they love all the new technology out there like XAML and Avalon," Colton said, "they want to build Internet applications with technology they understand today."

Colton said that even developers who work with Macromedia's Flash said XAML wasn't top-of-mind right now. They liked the drag-and-drop interface of Xamlon, but they wanted to deploy to the Web.

Xamlon released Xamlon Pro, Flash Edition in March. It lets developers write Flash user interfaces using any .NET-based programming platform, including C# (define) and Visual Basic (define), instead of using Macromedia's (Quote, Chart) Flash MX tool.

Xamlon Web takes applications written in Visual Studio, and then uses Microsoft's Intermediate Language bytecode to create Flash files. The resulting applications can be deployed anywhere Flash is installed, including Windows, Mac and Linux computers, plus PDAs and cell phones.

Xamlon also plans to support DHTML and asynchronous JavaScript and XML (AJAX). Colton said Xamlon could also build on top of Atlas, the AJAX tool under development by Microsoft.

Colton said developers are struggling to keep up with the wave of new development environments being pushed out by Microsoft.

"We're trying to tell developers there's one unified way of building applications," Colton said. "We'll manage the process of deploying to AJAX, Flash or some future platform, so developers don't need to keep figuring out how to apply their skills to the next new thing."

MS, 「맥OS와 웹을 넘나드는 개발툴」 WPF/E 발표

MS는 앞으로 나올 윈도우 비스타로 개발자들을 인도하면서도, 맥OS용와 웹용 애플리케이션 작성 도구를 만들고 있다.

이번 주 MS가 개최한 전문 개발자 컨퍼런스(PDC)에서 MS는 앞으로 나올 데스크톱 윈도우 에디션인 윈도우 비스타 이외의 다른 운영체제에서 구동되는 애플리케이션 작성에 쓰일 최신 프론트 엔드 개발 도구를 프로그래머들이 사용할 수 있도록 할 것이라고 말했다.

MS는 자바스크립트와 자사의 XAML 페이지 레이아웃 언어를 이용해 애플리케이션을 개발하는 소프트웨어인 WPF/E(Windows Presentation Foundation Everywhere)을 선보였다.

이번 주까지만 해도 MS의 WPF(예전엔 아발론(Avalon)이라는 코드명으로 불렸다)는 윈도우에서 그래픽이 아주 많은 애플리케이션을 개발할 때에만 사용될 거라는 여겨졌었다. 하지만 자바스크립트가 여러 운영체제에서 동작하기 때문에 이론적으로 개발자들은 서너 군데 운영체제에서 WPF/E 도구를 이용할 수 있을 것이다.

애플의 맥OS는 WPF/E가 지원되는 운영체제 중 하나이며, 이외에도 윈도우 예전 버전과 MS의 스마트폰도 지원된다고 MS 측은 전했다. MS의 개발 도구 부문 그룹 제품 책임자인 포레스트 키(Forrest Key)는 다른 운영체제도 예정되어 있긴 하지만 리눅스를 지원할 지에 대해서는 확정된 바 없다고 말했다.

WPF/E의 개발을 이끌고 있는 키는 "한 1년 전쯤 폭 넓게 다가갈 필요가 있다는 점을 깨달았다. 앞으로 더 많은 플랫폼이 지원될 것"이라고 말했다.

WPF/E 소프트웨어는 윈도우 비스타가 내년 하반기 출시될 때쯤 이용할 수 있을 거라고 키는 말했다. 익명을 요구한 또 다른 MS 고위 관계자에 따르면 PF/E의 맥OS용 시제품은 현재 MS 내에서 동작하고 있다고 한다.

PF/E는 윈도우의 WPF에서 이용 가능한 완벽한 사용자 인터페이스 도구의 일부로서 그것만 갖고서 윈도우와 같은 풍부한 그래픽이 구현되지는 않는다. 최종 사용자들은 XAML 코드를 동작시키기 위해 1MB 미만의 크기인 "런타임"을 다운로드 해야 할 것이다.

키는 "사용자 경험에서 볼 때 우리가 알게 된 것은 계속해서 기술을 내놓고 어떻게 함께 사용될 수 있는지 강조하는 것이 최상이라는 점"이라고 말했다.

PDC에서 MS 임원들은 프레젠테이션 디자인의 중요성을 여러 차례 홍보했다. 회사들 대부분이 공개 웹 사이트를 갖고 있기 때문에 소프트웨어에서의 "사용자 경험"에 차별화를 꾀할 필요성이 늘게 될 것이라고 임원들은 말했다.

그러한 목적을 위해 MS는 화요일에 익스프레션(Expression)이라는 상표명을 붙인 디자인 관련 도구 제품군을 선보였다. 이 제품은 2006년 말께 나올 것으로 예상되고 있으며 윈우도에서 혹은 웹 브라우저에서 애니메이션 및 멀티미디어 통합 애플리케이션 빌드 과정을 쉽게 한다는 것이 목표다.

익스프레션 제품군에 속한 것 중에는 MS 스파클 인터랙티브 디자이너(Sparkle Interactive Designer)라는 도구가 있다. 이 도구는 애니메이션 등 여타 그래픽이 가능한 프런트엔드를 생성하기 위해 XAML을 이용한다. 사람들은 이 도구가 웹 그래픽에서 널리 사용되고 있는 어도비의 플래시(Flash) 형식과 경쟁할 것으로 보고 있다.

마이크로소프트의 애널리스트인 그렉 드미칠리는 일반 대중들이 방문하는 웹 사이트는 물론 내부 비즈니스 애플리케이션에서도 깔끔하고 효율적인 디자인이 중요하다는 건 모두 사실이라고 언급했다. 예를 들어 기능이 별로인 영업 애플리케이션을 이용해서 입력 작업을 하기 싫어하는 영업 사원들은 꼭 해야 할 때가 되서야 고객 정보를 입력하게 된다. 그렇다 보니 고용주들은 영업 상 좋은 정보를 얻지 못하게 된다.

웹이냐, 윈도우냐?

한편 MS는 웹에서만 구동되는 애플리케이션 개발에 구체적으로 초점을 맞추고 이를 선보였다.

MS는 소위 AJAX-스타일의 애플리케이션을 개발하기 위한 MS의 주력 상품인 비주얼 스튜디오를 이용해 협력 작업을 하는 "프레임워크"인 아트라스 초기 버전을 참석자들에게 나눠주었다. AJAX 웹 애플리케이션은 서버 측 데이터를 이용할 수 있는 인터랙티브 웹 애플리케이션을 개발하기 위해 동적 HTML처럼 현대적 표준을 사용한다.

화요일 아트라스 시연에서 MS 임원들은 자바스크립트 코딩을 통해 만들어지고 있는 아트라스 툴킷을 사용하여 작성된 애플리케이션이 어떻게 맥OS 상의 사파리 브라우저에서 변하지 않을 수 있는지 보여주었다.

MS는 이외에도 웹 개발과 관련하여 몇 가지 "소도구"를 소개했다. 윈도우 비스타 사이드바 창이나 사이드쇼(SideShow), 혹은 예를 들어 랩톱 덮개나 키보드에 부착될 수 있는 두 번째 화면에서 돌아갈 수 있는 그래픽 가득한 컴포넌트들이 그 예이다.

온라인 웹 애플리케이션을 살펴보면 개발자들은 MSN 인큐베이터 사이트인 스타트닷컴(Start.com)에서 돌아가는 소도구를 만들 수 있다. 스타트닷컴에서 사용자들은 특히 RSS(Really Simple Syndication) 피드 등 여러 곳에서 받은 정보를 하나의 맞춤 페이지에서 합쳐놓을 수 있다. 스타트닷컴은 수요일 개발자 센터 운영을 시작했다. 개발자들은 아트라스 툴킷을 사용하여 스타트닷컴에 애드온 형태로 동작하는 소도구를 개발할 수 있다.

자믈온(Xamlon)의 CEO인 폴 콜튼은 프런트엔드 개발에서 이것저것 선택할 수 있다는 점이 오히려 개발자들에겐 혼란스러울 수 있다고 말했다. 자믈온은 이번 주에 비주얼 스튜디오를 사용하여 웹 애플리케이션을 개발하기 위한 자체 프런트엔드 도구를 선보였다.

콜튼은 "충돌하는 면이 좀 있다. 어떤 면에서 보면 아트라스는 윈도우 애플리케이션을 크로스 플랫폼화하기 위해 존재한다. 다른 측면에서 보면 WPF는 윈도우 플랫폼에 개발자들을 묶어두기 위해 존재한다"며 "개발자들에겐 명확하지 않지만 내가 생각하기에 시장은 MS에 국한되지 않는 쪽으로 가게 될 것"이라고 말했다.

MS 임원은 프레젠테이션 기술 고려에서 상충하는 측면이 있다는 의견을 일축했다. 3차원, 벡터 그래픽, 애니메이션의 장점을 완벽히 이용하는 윈도우 비스타의 "똑똑한" 클라이언트 애플리케이션은 인터랙티브한 웹 애플리케이션과는 상당한 거리가 있을 거라고 윈도우 비스타 클라이언트를 맡고 있는 그룹 제품 책임자인 그렉 설리반은 말했다.

설리반은 "여러 가지 모델에 광범위하게 투자하고 있다"며 "ISV(Independent Software Vendors)가 윈도우 비스타를 갖고 만들 수 있는 새로운 종류의 애플리케이션은 웹 애플리케이션 모델에서 가능한 것과는 극적으로 다를 것이다. 나는 그것이 명확하게 차별화를 가져다 줄 것이라고 생각한다"고 말했다.

 

2005년 9월 21일 수요일

[펌] AJAX(Asynchronous JavaScript and XML)

AJAX(Asynchronous JavaScript and XML)
조회 (37)
J2EE 관련 2005/07/06 (수) 13:10
공감 스크랩
AJAX(Asynchronous JavaScript and XML)
 
대화식 웹 어플리케이션의 제작을 위해 아래와 같은 조합을 이용하는 개발 기법이다.
 
Ø         표현 정보를 위한 HTML (또는 XHTML) Cascading Style Sheets
Ø         동적인 화면 출력 및 표시 정보와의 상호작용을 위한 DOM, 자바스크립트
Ø         웹 서버와 비동기적으로 데이터를 교환하고 조작하기 위한 XML, XSLT, XMLHttpRequest (AJAX 어플리케이션은 XML/XSLT 대신 미리 정의된 HTML 이나 일반 텍스트, JSON, JSON-RPC를 이용할 수 있다).
 
DHTML이나 LAMP와 같이 AJAX는 자체가 하나의 특정한 기술을 말하는 것이 아니며, 함께 사용하는 기술의 묶음을 지칭하는 용어이다. 실제로 AFLAX와 같이 사실상 AJAX 에 바탕을 두고 있는 유사/복합 기술들이 속속 나타나고 있다.
AJAX 어플리케이션은 실행을 위한 플랫폼으로 위에서 열거한 기술들을 지원하는 브라우저를 이용한다. 이것을 지원하는 브라우저로는 모질라 파이어폭스, 인터넷 익스플로러, 오페라, 사파리 등이 있다.
 
AJAX 어플리케이션과 기존의 웹 어플리케이션
기존의 웹 어플리케이션은 폼을 채우고 제출(submit)을 하면, 웹 서버로 요청을 보내도록 한다. 웹 서버는 전송된 내용에 따라서 새로운 웹 페이지로 결과물을 되돌려준다. 이때 둘 사이에 중복되는 HTML 코드로 인해 많은 대역폭이 낭비된다. 게다가 이러한 방식으로는 네이티브 어플리케이션에 비해 고도로 대화형 사용자 인터페이스를 작성하기가 힘들다.
반면에 AJAX 어플리케이션은 필요한 데이터만을 주도록 웹 서버에 요청할 수 있다. 보통 SOAP XML 기반의 웹 서비스 언어를 사용하며, 웹 서버의 응답을 처리하기 위해 클라이언트 쪽에서 자바스크립트를 쓴다. 그 결과로 웹 브라우저와 웹 서버 사이의 교환되는 데이터량이 줄어들기 때문에 어플리케이션의 응답성이 좋아진다. 요청을 주는 수많은 컴퓨터에서 이 같은 일이 일어나기 때문에, 전체적인 웹 서버 처리량도 줄어들게 된다.


 


 
Sample Program
 
com.ajax.ValidationServlet
package com.ajax;
 
import java.io.IOException;
 
import java.util.HashMap;
 
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
public class ValidationServlet extends HttpServlet {
   
    private ServletContext context;
    private HashMap accounts = new HashMap();
 
    public void init(ServletConfig config) throws ServletException {
        this.context = config.getServletContext();
        accounts.put("greg","account data");
        accounts.put("duke","account data");
    }
   
    public void doGet(HttpServletRequest request, HttpServletResponse  response)
        throws IOException, ServletException {
       
        String targetId = request.getParameter("id");
                      if ((targetId != null) && !accounts.containsKey(targetId.trim())) {
            response.setContentType("text/xml");
            response.setHeader("Cache-Control", "no-cache");
            response.getWriter().write("<valid>true</valid>");
        } else {
            response.setContentType("text/xml");
            response.setHeader("Cache-Control", "no-cache");
            response.getWriter().write("<valid>false</valid>");
        }
    }
 
    public void doPost(HttpServletRequest request, HttpServletResponse  response)
        throws IOException, ServletException {
 
        String targetId = request.getParameter("id");
        if ((targetId != null) && !accounts.containsKey(targetId.trim())) {
            accounts.put(targetId.trim(), "account data");
            request.setAttribute("targetId", targetId);
            context.getRequestDispatcher("/success.jsp").forward(request, response);
        } else {
            context.getRequestDispatcher("/error.jsp").forward(request, response);
        }
    }
   
}
 
Ø        doGet() : AJAX 엔진을 통하여 전달된 Request 처리한다.
Ø        doPost() : 사용자 Account 추가한다.
 
<html>
<head>
<script type="text/javascript">
var req;
var target;
var isIE;
 
function initRequest(url) {
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
        isIE = true;
        req = new ActiveXObject("Microsoft.XMLHTTP");
    }
}
 
function validateUserId() {
    if (!target) target = document.getElementById("userid");
    var url = "validationservlet?id=" + escape(target.value);   
    initRequest(url);
    req.onreadystatechange = processRequest;
    req.open("GET", url, true);
    req.send(null);
}
 
function processRequest() {
    if (req.readyState == 4) {
        if (req.status == 200) {
            var message = req.responseXML.getElementsByTagName("valid")[0].childNodes[0].nodeValue;
            setMessageUsingDOM(message);
            var submitBtn = document.getElementById("submit_btn");
            if (message == "false") {
              submitBtn.disabled = true;
            } else {
              submitBtn.disabled = false;
            }
        }
    }
}
 
function setMessageUsingInline(message) {
    mdiv = document.getElementById("userIdMessage");
    if (message == "false") {
       mdiv.innerHTML = "<div style="color:red">Invalid User Id</div>";
    } else {
       mdiv.innerHTML = "<div style="color:green">Valid User Id</div>";
    } 
}
 
 function setMessageUsingDOM(message) {
     var userMessageElement = document.getElementById("userIdMessage");
     var messageText;
     if (message == "false") {
         userMessageElement.style.color = "red";
         messageText = "Invalid User Id";
     } else {
         userMessageElement.style.color = "green";
         messageText = "Valid User Id";
     }
     var messageBody = document.createTextNode(messageText);
     // if the messageBody element has been created simple replace it otherwise
     // append the new element
     if (userMessageElement.childNodes[0]) {
         userMessageElement.replaceChild(messageBody, userMessageElement.childNodes[0]);
     } else {
         userMessageElement.appendChild(messageBody);
     }
 }
 
function disableSubmitBtn() {
    var submitBtn = document.getElementById("submit_btn");
    submitBtn.disabled = true;
}
</script>
 <title>Form Data Validation using AJAX</title>
</head>
 <body omload="disableSubmitBtn()">
 
 <h1>Form Data Validation using AJAX</h1>
 <hr/>
 <p>
 This example shows how you can use AJAX to do server-side form data validation without
 a page reload.
 </p>
 <p>
 In the form below enter a user id. By default the user ids &quot;greg&quot; and &quot;duke&quot;
 are taken. If you attempt to enter a user id that has been taken an error message will be
 displayed next to the form field and the &quot;Create Account&quot; button will be
 disabled. After entering a valid user id and selecting the &quot;Create Account&quot;
 button that user id  will be added to the list of user ids that are taken.
 </p>
 
  <form name="updateAccount" action="validate" method="post">
   <input type="hidden" name="action" value="create"/>
   <table border="0" cellpadding="5" cellspacing="0">
    <tr>
     <td><b>User Id:</b></td>
     <td>
      <input    type="text"
                size="20" 
                id="userid"
                                   name="id"
             omkeyup="validateUserId()">
     </td>
     <td>
      <div id="userIdMessage"></div>
     </td>
    </tr>
    <tr>
     <td align="right" colspan="2">
      <input id="submit_btn" type="Submit" value="Create Account">
     </td>
     <td></td>
                  </tr>
   </table>
  </form>
 </body>
</html>
 




 

[펌] Sun Blueprints starts to address AJAX in J2EE

Sun Blueprints starts to address

AJAX in J2EE

Posted by: Joseph Ottinger on April 14, 2005 @ 01:25 PM

The Sun Blueprints project hosted by Java.net has started to address "Asynchronous JavaScript and XML (AJAX) with Java 2 Enterprise Edition" to enable dynamic web applications. From the Blueprints:

We have seen that there are many possible problems that AJAX interactions can solve. J2EE technology provides a good base to develop and deploy AJAX based applications with APIs for tying in HTTP processing, databases, web services, XML processing and business objects. With a better understanding of this interaction model, today's applications can become more interactive providing a better experience to the end user.
Use cases indicating appropriate use of AJAX, according to an explanatory document, include:

  • Realtime form data validation
  • Auto-completion in HTML controls
  • Master/detail page interactions that might not otherwise require complete page redraws
  • Sophisticated UI controls
  • Data refreshes for limited data (i.e., scores, forecasts, or stock prices)
  • Server-side notification polling

Disadvantages are also detailed, including complexity, standards issues (with XmlHttpRequest not being formally part of Javascript yet), implementation differences in browsers, debugging (since executable code is now on client and server), and exposed source code.

The blueprints team steps through a detailed analysis of four examples showing how AJAX works, with online examples still forthcoming.

Have you used AJAX? Do you think the blueprints team represents it properly? What tips do you have for design and integration with J2EE? How do you compensate for browsers that don't work with XmlHttpRequest as expected?

 

원문 : http://theserverside.com/news/thread.tss?thread_id=33319

요사이 주변사람들과 같이 관심을 두고 있는 Ajax....

rich client시장이 죽은듯 보이다가 요새 다시 일어나면서 주목받고 있는 녀석....

상당히 유용하긴 할 거 같아서 보고는 있는데...아직 적용은...-_-;;;

[펌] New Web Framework: Echo2, with Ajax-based Rendering

http://theserverside.com/news/thread.tss?thread_id=32834

 

TSS에 난 기삽니다... 이번에는 Echo2라는 웹프레임웍(또!)입니다.

그런데 데모를 보니까 요거 아주 흥미로운 물건인거 같습니다...

Ajax, XMLHttpRequest...  저는 첨보는 단어네요... 세상 참 신기한거 많네...^^

 

Ajax: A New Approach to Web Applications

http://www.adaptivepath.com/publications/essays/archives/000385.php

 

Very Dynamic Web Interfaces(XMLHttpRequest)

http://www.xml.com/pub/a/2005/02/09/xml-http-request.html

 

 

http://theserverside.com/news/thread.tss?thread_id=32834

New Web Framework: Echo2,

with Ajax-based Rendering

Posted by: Tod Liebeck on March 24, 2005 @ 07:28 AM

Echo2 is a reinvention of the Echo Web Framework built around an Ajax (Asynchronous JavaScript and XML) rendering engine. Distributed under the Mozilla Public License, Echo2 aims at providing a component-oriented/event-driven toolkit for developing web applications that approach the capabilities of rich clients.

Echo2 uses the array of Ajax technologies in the interest of providing a more rich-client-like user experience. All client/server interaction is accomplished over an XMLHttpRequest wire. An entire Echo application runs from within a single web page - without a reload nor full page update. User input is sent to the server by POSTing XML documents over XMLHttpRequests. The server reciprocates with XML messages containing synchronization instructions, which are then processed by pluggable client-side JavaScript modules. The net result is a markedly more fluid and "desktop-like" user experience and a dramatic performance improvement when compared to traditional web application technologies.

One way of understanding how the rendering engine works is to watch an Echo2 application run in "Debug Mode", which causes all the XML synchronization messages to be displayed. Debug Mode can be enabled by appending "?debug" to the URL of an Echo2 application. You can see this for yourself by visiting the "Interactive Test" application here: http://demo.nextapp.com/InteractiveTest/ia?debug (Please note that running in Debug Mode will cause a substantial performance degradation.)

All web rendering is performed behind the scenes with Echo2's entirely Java-based user-interface toolkit. The end-developer need only be concerned with the server-side representation of the user-interface. Echo's "Web Application Container" monitors the state of the component hierarchy and takes care of all communication with the client browser. The Application Container is responsible for processing synchronization messages from the client, and notifying the server-side application of user actions via plain Java events. When modifications are made to the server-side hierarchy of components representing an instance of the user-interface, the Application Container translates these changes into an efficient synchronization message sent to the client to bring its state up to date with the server.

The current release of Echo2 is 2.0 Alpha 3. Please understand that Echo2 is currently in the alpha stage and is under heavy development. We welcome input and participation in the project. Please visit http://www.nextapp.com/products/echo2 for more information and downloads. Our Echo community developer forums are also available at http://forum.nextapp.com.

For a sample demonstration application written using Echo2, please visit:
http://demo.nextapp.com/InteractiveTest/ia

[펌] AJAX 관련 사이트 (05. 08. 09)

/*

= 여기저기 퍼져있는 AJAX 관련 사이트 정리 =

(중복되었을 수도 있네요 ^^;;)

이 포스트가 많이 펌이 되네요 ^^

퍼가시면서 간단한 인사말 남기고 가세요

AJAX 공부하는 사람과 정보공유하고싶습니다 ^^

*/

 

http://en.wikipedia.org/wiki/AJAX

개념설명


http://lieb.mona.net/mblog 

- AJAX 사이트 정리
http://blog.naver.com/ansysda/12285128
최근 웹애플리케이션의 최대화두인 Ajax에 관련된 글들을 스크랩 해 봤다.
이미 구글에서 가능성이 입증되었으니 그 활약이 기대된다.
RIA(Rich Internet Application) 환경에서 Flash의 대안이 될 수 있을까?

관련 기사
http://news.com.com/Will+AJAX+help+Google+clean+up/2100- 1032_3-5621010.html
http://www.adaptivepath.com/publications/essays/archives/000385.php
http://www.themaninblue.com/writing/perspective/2005/03/02/

 

한글 소개 자료 (PDF)
http://www.likejazz.com/29692.html

 

Ajax in Flash
http://www.docuverse.com/blog/donpark/EntryViewPage.aspx?guid=495742b9-af21-4ab2-9ad7-ab0229a6ecf9

 

Sajax - Simple ajax toolkit for PHP
http://www.modernmethod.com/sajax/

 

Ajax DEMO (ASP.NET)
http://weblogs.asp.net/pleloup/archive/2005/04/06/397371.aspx

 

관련 북마크
http://del.icio.us/popular/ajax

 

SOAP와 XMLHTTP를 사용한 응용프로그램 사용하기
http://www.asptomorrow.net/asptoday/20000718/soap.asp? lectureid=62

 

Dynamic HTML and XML_ The XMLHttpRequest Object
http://developer.apple.com/internet/webcontent/xmlhttpreq.html

 

Very Dynamic Web Interfaces
http://www.xml.com/pub/a/2005/02/09/xml-http-request.html

 

AJAX Matters

http://ajaxmatters.com/r/welcome

 

채팅

http://aimh.new21.net/test/sajax/example_wall.php

 

phpschool 게시글

http://www.phpschool.com/bbs2/inc_view.html?id=12070&code=tnt2&start=0&mode=search&field=title&search_name=&operator=and&period=all&category_id=&s_que=ajax

 

AJAX에 대해 문의 하신 분이 있어 간단한 설명을 다음에 주소에 올려 두었습니다.
http://wednus.com/imod/viewtopic.php?t=419

 

외국인 칼럼- 개발자인가?

http://www.adaptivepath.com/team/jjg.php

http://jjg.net/

 

AJAX Matters - Asynchronous JavaScript and XML and XMLHTTP development information

http://www.ajaxmatters.com/ 

 

Ajaxian Blog

http://www.ajaxian.com/

 

Ajax Blog

http://ajaxblog.com/

 

AjaxPatterns

http://www.ajaxpatterns.org/

 

AjaxFaces_ General and Complete Integration Solution for JSF and Ajax

http://www.ajaxfaces.com/

 

한글 소개 자료 (PDF)

http://www.likejazz.com/29692.html

 

관련 북마크

http://del.icio.us/popular/ajax

 

Building Dynamic Web Applications with AJAX(ppt)

http://blog.joshuaeichorn.com/slides/Building_Rich_Web_Applications_With_AJAX/

 

AJAX in Action

http://www.javarss.com/ajax/j2ee-ajax.html

 

AJAX Java BluePrints Solutions Catalog

https://bpcatalog.dev.java.net/nonav/ajax/index.html

 

Ajax - Wikipedia

http://en.wikipedia.org/wiki/AJAX

 

개발자 모임을 빨리 찾아야겠군요...;;


 

[펌] AJAX with RubyOnRails

AJAX with RubyOnRails

Posted by nohmad 70 days ago

RubyOnRails는 AJAX를 지원하는 최고의 웹프레임웍이다. 이것은 순전히 prototype.js의 도움 덕분이라고 할 수 있다.

Track이라고 하는 GTD를 위해 고안된 웹어플리케이션을 개발하고 있는 bsag(But She's A Girl)이 멋진 AJAX 데모를 공개했다.

내친 김에 RubyOnRails에서 AJAX를 이용하는 데모 몇 개를 더 모아보았다.

[펌] [AJAX] Life Without Refresh

Life Without Refresh

 

Dmitri Khanine and Phil Carrillo

July 2005

Summary: Looks at creating more dynamic user interfaces using JavaScript RPC (Remote Procedure Call) to communicate with the server and update without requiring a browser refresh. (11 printed pages)

Download the sample code associated with this article, MSDNJSRPC.msi.

Contents

Google Suggest
Introducing JavaScript RPC
XmlHttpRequest
Data Binding and More
Web Server Support for JavaScript RPC
The Value of JavaScript RPC: From Mainframe to Client-Server
About the Authors

Internet Explorer and other major browsers have long provided the power and flexibility to support dynamic Web applications that match and surpass their desktop counterparts; however, that power still remains relatively unknown and underutilized. In this article we introduce a JavaScript RPC technique that allows a Web page to communicate with the server without refreshing itself and forcing the user to wait for the next page to load. We will also demonstrate how JavaScript RPC, combined with XML, can simplify your server-side code and make your application more robust and versatile.

Google Suggest

In December 2004 Google launched its famous Google Suggest, where it offers keyword suggestions in real time as you type. Except for providing an excellent search tool, Google Suggest attracted a great deal of attention to JavaScript RPC technique that the tool is based upon. As you type, JavaScript submits HTTP requests to the server and updates the suggestions drop-down box.

Introducing JavaScript RPC

JavaScript RPC technique has been available to the Web scripting community since the introduction of Internet Explorer 3.0 in 1996 (see http://www.microsoft.com/windows/WinHistoryIE.mspx). In essence, the technique allows a Web page to avoid reloading and interrupting user activity when it needs to do a trip to the server for a server-side validation, dynamic lookup, or similar action.

Let's look at an investor profile management screen where an account supervisor may update an investor's details and assign her a financial analyst who is authorized to deal with her portfolio size. Let's ignore the rest of the form and only focus on the dynamic lookup piece, where we will do a background HTTP request to retrieve a list of people who are authorized to handle the portfolio at hand. Remember, we don't want to interrupt an account supervisor who may continue to update the investor's profile while we retrieve analyst data. To illustrate this concept we left a text area comments field that will retain its content without any effort on our end while the financial analyst drop-down updates.

Figure 1. The sample application

One of the ways this can be accomplished is by posting the form to a hidden frame when the portfolio size selection changes. Here is how our sample form's main page looks:

<html>
   <head>
      <title>Dynamic data acquisition</title>
   </head>
   <frameset cols="100%,0%" frameborder="0">
      <frame name="frameA" id="frameA" src="frame_a.htm">
      <frame name="frameB" id="frameB">
   </frameset>
</html>

Notice that the second frame takes up 0% of the screen, which is what makes it hidden. It also has no document initially loaded, as it lacks the src attribute. Let's now look at our form page frame_a.htm:

<html>
  <head>
    <script language="javascript">
      function HandlerOnChange(){
       var mySelect = document.forms[0].portfolio;
       if (mySelect.selectedIndex>-1){
         var value = mySelect.options[mySelect.selectedIndex].text;
         // Send the request
         top.frameB.document.location.HREF="frame_b.asp?value=" + value;
       }
     }
      function buildOptions(optionsArray){
        var mySelect = document.forms[0].analyst;
        if (optionsArray != null){
          mySelect.innerHTML = "";
          for (var i=0; i < optionsArray.length; i++){
            var o = new Option();
            o.text = optionsArray[i];
            mySelect.add(o);
          }
         }
        }
    </script>
  </head>
   <body>
     <form id="form1" name="form1">
       <table>
         <tr>
           <td>Portfolio size:</td>
           <td>
              <select id="portfolio" name="portfolio" 
                 onchange="HandlerOnChange();">
                 <option></option>
                 <option>0 .. 10,000</option>
                 <option>10,000 to 100,000</option>
                 <option>Over 100,000</option>
              </select>
            </td>
          </tr>
          <tr>
            <td>Authorized financial analyst:</td>
            <td>
              <select id="analyst" name="analyst">
              </select>
            </td>
           </tr>
           <tr>
             <td>Comments</td>
             <td>
               <textarea name="comments" rows="3" cols="20"></textarea>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>

As you can see, on line 10 we are building a request URL based on the index of the currently selected portfolio size. We then submit the request by changing the URL of the hidden frame. After the response comes back, we update the content of our analyst drop-down. Here is what we expect back:

<html>
  <head>
    <script language="javascript">
      var optionsArray = ["John Doe", "Jason Smith", "Michael Roberts"];
      top.frameA.buildOptions(optionsArray);
    </script>
  </head>
  <body>
  </body>
</html>

The data returned by the server are in form of a JavaScript array on line 4. It is being passed to our visible frameA on line 5, where it is used by the buildOptions function to populate our analyst drop-down. We leave the task of producing the above HTML output to an ASP.NET Web form or plain old ASP page as an exercise for the reader.

The hidden frame JavaScript RPC code above will run with cosmetic modifications on Internet Explorer 3.0 and later and all of today's major browsers. In fact, this is the technique that Google Suggest uses as a fall-back when a browser doesn't support the more advanced features that we are now going to explore.

XmlHttpRequest

As you probably noticed, hidden frame RPC, while being portable across most almost all existing browsers, doesn't add much clarity to your code. It introduces a frameset and an extra document to manage, so if you would like to apply it to another page you will most likely have to duplicate that code. It also doesn't provide any specific XML support.

For quite some time, Internet Explorer 5.0 and later and Mozilla-based browsers have included an XmlHttpRequest object that enables us to implement an asynchronous HTTP request in just a few lines of code and provides intrinsic XML support. Let's rewrite our analyst lookup form fragment using XmlHttpRequest. This time will have our server produce a simple XML document instead. Later in this article we shall see how producing XML on the server lets us simplify our server side, making it more versatile and improving performance.

Here is what we expect from the server for a portfolio size range of "10,000 to 100,000":

<employees>
  <employee id="1">John Doe</employee>
  <employee id="2">Jason Smith</employee>
  <employee id="3">Michael Roberts</employee>
  </employees>

Notice how much clarity we gained by trading HTML output for XML. While its size is much smaller, it includes a lot more information in its element names and attributes. Now we can even reuse our sever-side script. For example, to have a standalone employee search by authorized portfolio size, all we need to do is create an XSL stylesheet.

Below is our familiar analyst look-up piece, this time implemented using XmlHttpRequest:

<html>
<head>
  <script language="javascript">
    var xhttp;

    function onSelectionChange(){
      var mySelect = document.forms[0].portfolio;
      if (mySelect.selectedIndex>-1){
        //instantiate XmlHttpRequest

          // Checking if IE-specific document.all collection exists 
          // to see if we are running in IE 
          if (document.all) { 
            xhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
           } else { 
          // Mozilla - based browser 
            xhttp = new XMLHttpRequest(); 
          }
          //hook the event handler
          xhttp.onreadystatechange = HandlerOnReadyStateChange;
          //prepare the call, http method=GET, false=asynchronous call
          xhttp.open("GET", 
            "http://www.myserver.com/getModels?portfolio=" + 
            mySelect.selectedIndex, false);
          //finally send the call
          xhttp.send();          
        }
      }
      function HandlerOnReadyStateChange(){
        var mySelect = document.forms[0].analyst;
        
        // This handler is called 4 times for each 
        // state change of xmlhttp
        // States are: 0 uninitialized
        //      1 loading
        //      2 loaded
        //      3 interactive
        //      4 complete
        if (xhttp.readyState==4){
          mySelect.innerHTML = "";
          
          //responseXML contains an XMLDOM object
          var nodes = xhttp.responseXML.selectNodes("//employee");
          for (var i=0; i<nodes.length; i++){
            var o = new Option();
              o.text = nodes(i).text;
            mySelect.add(o);
          }
        }
      }
    </script>
  </head>
  <body>
    <form id="form1" name="form1">
      <table>
        <tr>
          <td>Portfolio size:</td>
          <td>
            <select id="portfolio" name="portfolio" 
             onchange="onSelectionChange();">
              <option></option>
              <option>0 .. 10,000</option>
              <option>10,000 to 100,000</option>
              <option>Over 100,000</option>
            </select>
          </td>
        </tr>
        <tr>
          <td>Authorized financial analyst:</td>
          <td>
            <select id="analyst" name="analyst"> 
            </select>
          </td>
        </tr>
        <tr>
          <td>Comments</td>
          <td>
            <textarea name="comments" rows="3" cols="20"
              ID=Textarea1></textarea>
          </td>
        </tr>
      </table>
    </form>
  </body>
</html>

On lines 13 through 17 we instantiate an XmlHTTP control if we are running in Internet Explorer, or an XmlHttpRequest object if FireFox or another Mozilla-based browser runs our script. Both have almost identical interfaces. We then assign a handler for an onReadyStateChange event that will tell us when a response is ready to process. On lines 22 and 25 we open a connection and submit the request. Our event handler verifies whether we have a response to process (Line 37) and if so uses the XML document conveniently created for us by XmlHttpRequest to populate the analyst drop-down.

Data Binding and More

Let's face it, with Internet Explorer being by far the dominant browser, it's time to seriously consider its unique features, especially when they make our lives a lot easier. Once you get comfortable using XmlHttpRequest you may consider looking at XML data islands and data binding (see Fun with Data Binding). Data-bound XML islands ease development by automatically updating their content when form data changes, thus eliminating the need to code individual bindings. Direct updates to data-bound XML islands also reflect immediately on the form display, making it bi-directional. Whenever an update or refresh of the data is required, XmlHttpRequest can do this cleanly and efficiently, making it a Swiss army knife in your drawer of tools.

Web Server Support for JavaScript RPC

Even though it is entirely possible to successfully use JavaScript RPC within existing applications, it offers an enormous productivity, performance, and scalability boost on the server side if you consider the following changes:

  • Produce XML on the server instead of HTML. Consume it with JavaScript on the client or transform it with XSL.

    Switching HTML response to XML makes your application versatile and capable of supporting multiple presentation layers. A single application can serve to a cell phone WAP browser, Internet Explorer 6.0 client, and B2B partner applications. It also keeps server responses small, thus reducing traffic and bandwidth requirements.

  • Keep your server-side logic to data manipulation only. It should have no presentation logic in it.

    Designs with a clean separation of business and presentation logic, such as in the Model-View-Controller (MVC) pattern, make applications easier to develop and maintain.

  • There is no real need for state management when you use JavaScript RPC.

    With JavaScript RPC you are not forced to refresh every time you need to communicate with the server. Your presentation layer becomes stateful and doesn't need to rely on the Session object to maintain its state. This makes the infamous resource and scalability issues go away; see Tip 6: Using the Session Object Wisely.

Let's see how the ASP.NET HttpHandler can be used to implement a fast and light Web tier to support our browser JavaScript RPC application. Below is a bare-bones HttpHandler that produces the following XML using the System.Xml.XmlTextWriter class:

<employees>
  <employee id="5">John Doe</employee> 
      </employees>

It also checks whether an XML document has been submitted to it via the POST method and if one is found, loads it into the DOM document. Notice that you have to implement the IHttpHandler interface and its methods IsReusable (to specify whether your class can be reused for subsequent requests) and ProcessRequest. The latter allows you to do everything you need to produce XML response as its HttpContext parameter exposes all the objects you'd expect from an ASP.NET page, such as Request, Response, and Application.

using System;
using System.Web;
using System.Xml;
namespace Test {
  public class MyHandler : IHttpHandler {
    public bool IsReusable {
      get {
        return true;
      }
    }
    
    public void ProcessRequest(HttpContext ctx) {
      XmlDocument xmlDoc = null;

      // If XML document was submitted via POST method
      //   then load it in the DOM document:
      if (ctx.Request.InputStream.Length > 0 && 
        ctx.Request.ContentType.ToLower().IndexOf("/xml") > 0) {
        xmlDoc = new XmlDocument();
        xmlDoc.Load( ctx.Request.InputStream );
      }

      // Produce XML response
      ctx.Response.ContentType = "application/xml";
      XmlTextWriter xw = new XmlTextWriter(ctx.Response.OutputStream, 
        new System.Text.UTF8Encoding());

      xw.WriteStartElement("employees");
        xw.WriteStartElement("employee");
          xw.WriteAttributeString("id", "5");
          xw.WriteString("John Doe");
        xw.WriteEndElement(); // employee
      xw.WriteEndElement(); // employees

      xw.Close();
    }
  }
}

There are several options you can use to invoke your HttpHandler, but the simplest one is to use an HttpHandler .ashx file. An HttpHandler file is just like a regular ASP.NET .aspx file, and in this sample we use it to specify a class we want to invoke.

<% @ webhandler class="Test.MyHandler" %>

If we save this line to sample.ashx into our local Web root folder and put the compiled assembly with the Test.MyHandler class that implements IHttpHandler interface into the bin directory, we can use http://localhost/sample.ashx to invoke the handler.

What About AJAX?

In his essay Ajax: A New Approach to Web Applications Jesse James Garrett of Adaptive Path coined the term Ajax (Asynchronous JavaScript and XML) to describe a "new" way of developing dynamic Web applications. Since then Ajax became a buzzword all over the Web development community. But Garrett's term misses the key and required ingredient of the technique—the actual HTTP request.

The Value of JavaScript RPC: From Mainframe to Client-Server

In the mid-1970s IBM introduced 3270 terminals that were smart enough to present the user with custom markup-driven forms, collect the input, and send it back to the mainframe (see http://www.columbia.edu/acis/history/3270.html). Despite their graphic nature and ubiquity, most conventional Web applications are still based on that model, where the user either browses the site content or fills in simple forms and waits for results to be processed. In this model, the browser's role is limited to graphic effects and simple form validation.

Since the advent of more powerful and popular desktop computers, more and more processing has been offloaded to the client and the client-server paradigm has emerged. Well-written client-server applications behaved just like their desktop counterparts that are always available and responsive. Most of the server communication has been done in the background without interrupting the current user activity. So when do we expect our Web applications to behave like that? How about today? If my desktop e-mail client doesn't stop me from typing while it checks for new mail, why should the Web-based one? With techniques you've just learned, you are now fully equipped to provide your users with the seamless and dynamic user interface they've long been waiting for.