오늘은 자투리 시간을 이용하여 Visual Web Developer 2008을 설치해서 가장 써보고 싶었던 기능인 JavaScript 편집 기능을 활용해 보았다. 평소에 JavaScript 에디터 중에 무료로 사용할 수 있으면서도 완벽한 기능을 보여주는 에디터가 없는게 큰 불만이었던터라 무척 반가웠다.

Visual Web Developer 2008의 자바스크립트 기능이 특별한 이유는 바로 JavaScript OOP를 지원하기 때문이며 부수적으로 HTML DOM을 완벽하게 해석하기 때문에 정확한 코딩을 할 수 있어서 좋다. 만약 JavaScript를 분석할 일이 있지만 까탈스러운 문법때문에 고민중이라면 당장이라도 Visual Web Developer 2008만은 다운로드받아서 활용해보길 바란다. 덤으로 테스트용 웹 서버까지 따라오므로 IIS도 필요없다.

본업인 닷넷 프레임워크 기반 개발 환경에 대해서도 당연히 관심이 있기에 ASP.NET AJAX가 2005때보다 얼마나 더 개발하기 편리해졌는지, 그리고 WCF (Windows Communication Foundation) 프레임워크 기반의 서비스 개발의 능력도 체크해 볼 생각이다.

Visual Web Developer 2008은 이 글을 쓰는 현 시점에서 아직까지 영문판 전용이지만 곧 한글판도 나올 것으로 보인다. http://msdn.microsoft.com/express 에서 받을 수 있다.

아래는 기념으로 만든 예제 코드이다. 요즈음은 어떤 환경이던간에 Hello World를 못할리가 없으므로 나는 예제 코드로 좌항과 우항을 더해서 결과값을 반환하는 사칙 연산 로직을 앞으로의 새로운 프로그래밍 언어에 대한 시험 코드로 써볼 생각이다.

[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Untitled Page</title>
    <script type="text/javascript">
    function exception(content) {
        this.message = content.toString();
       
        this.alert = function() {
            alert(this.message);
        }
       
        this.toString = function() {
            return this.message;
        }
    }

    function calc(leftVal, rightVal) {
        this.left = parseInt(leftVal.toString(), 10);
        this.right = parseInt(rightVal.toString(), 10);
       
        if (isNaN(this.left)) {
            throw new exception('left is NaN!');
        }
       
        if (isNaN(this.right)) {
            throw new exception('right is NaN!');
        }
       
        this.add = function() {
            return this.left + this.right;
        }
       
        this.sub = function() {
            return this.left - this.right;
        }
       
        this.multi = function() {
            return this.left * this.right;
        }
       
        this.div = function() {
            if (this.right == 0) {
                throw new exception('div/0!');
            }
            return this.left / this.right;
        }
       
        this.mod = function() {
            return this.left % this.right;
        }
       
        this.pow = function() {
            return Math.pow(this.left, this.right);
        }
    }
    </script>
</head>
<body>
    <div id="Test"></div>
    <script type="text/javascript">
    var test = new calc(3, 4);
    alert(test.add());
    alert(test.sub());
    alert(test.multi());
    alert(test.div());
    alert(test.mod());
    alert(test.pow());
    </script>
</body>
</html>


[/CODE]
Creative Commons License
Creative Commons License
남정현 이 작성.

당신의 의견을 작성해 주세요.

[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다