À¥Àº °è¼Ó ÁøÈÇϰí ÀÖ´Ù. Çϵå¿þ¾î¾îÀÇ ¹ßÀü¼Óµµ´Â ÈξÀ ºü¸£´Ù. °³ÀÎÈ PC ÀÇ ¼º´ÉÀº ÀÌÁ¦ ¼¹öÀÇ ¼º´É°ú ºñ±³Çصµ Å©°Ô ¼Õ»öÀÌ ¾øÀ» µíÇÏ´Ù. ÀÌÁ¦´Â ºñÁö´Ï½º ·ÎÁ÷À» ¼¹ö ÇÁ·Î±×·¥¿¡ ÀÇÁ¸Çß´ø ¹æ½Ä¿¡¼ ¹þ¾î³ª ºê¶ó¿ìÀúÀÇ ¿ª·®ÀÌ Á¡Á¡ Áß¿äÇØ Áö´Â ½ÃÁ¡ÀÌ ¾Æ´Ñ°¡ ½Í´Ù. ¸®Ä¡ Ŭ¶óÀ̾ðÆ®ÀÇ µîÀåÀÌ´Ù. ¾ÆÁ÷±îÁö´Â ¼Óµµ°¡ ¸¹ÀÌ ´À·Á¼ ºÒÆíÇÑ Á¡ÀÌ ¾øÁö ¾Ê¾Æ ÀÖÁö¸¸...¾ÕÀ¸·Î ÇÁ·Î±×·¡¹ÖÀÇ ÁÖµµ±ÇÀº ¾î¶»°Ô Àü°³µÉ±î? ½ºÅ©¸³Æ®¿¡ °¡Àå ÀûÇÕÇÑ ¾ð¾îµé(php, perl, ruby, common lisp)ÀÌ Á¡Á¡ ÁÖ¸ñÀ» ¹Þ°í ÀÖ´Â °É ¾î¶»°Ô ºÁ¾ß ÇÒ±î?
4Àå±îÁö ajax ¿¡ ´ëÇÑ ±âº»ÀûÀΠƯ¡µéÀ» ¿¹Á¦¸¦ ÅëÇØ¼ »ìÆìº¸¾Ò´Ù. Ajax ·Î °³¹ßÇÑ´Ù´Â °ÍÀº ÀÚ¹Ù½ºÅ©¸³Æ®¸¦ ¸¹ÀÌ »ç¿ëÇÑ´Ù´Â ÀǹÌÀÌ´Ù. µû¶ó¼ À̹ø 5Àå¿¡¼´Â ajax ¾îÇø®ÄÉÀ̼ÇÀ» Á» ´õ ½±°Ô °³¹ßÇÒ ¼ö ÀÖ´Â ¸î°¡Áö ÅøÀ» ¼Ò°³Çϱâ·Î ÇϰڴÙ. ù¹øÂ°·Î ÀÚ¹Ù½ºÅ©¸³Æ® ÄÚµåÀÇ ´ÙÅ¥¸ÕÆ®¸¦ »ý¼ºÇØ ÁÖ´Â ¿ÀǼҽº ¼³Ä¡ ¹× »ç¿ë¹ý¿¡ ´ëÇØ¼ ¾Ë¾Æº¸ÀÚ.
ÀÚ¹Ù½ºÅ©¸³Æ®ÀÇ °¡Àå Å« ´ÜÁ¡ ÁßÀÇ Çϳª´Â °¡µ¶¼ºÀÌ Á¤¸» ¶³¾îÁø´Ù´Â °ÍÀÌ´Ù. ÷ºÎÅÍ ´Ù½Ã ÄÚµùÇÏ´Â °ÍÀÌ ¿ÀÈ÷·Á ³ªÀ» Á¤µµ·Î ÀÚ¹Ù½ºÅ©¸³Æ®´Â Äڵ带 Àдµ¥ ³ÇØÇÑ ¾ð¾î Áß ÇϳªÀÌ´Ù. µû¶ó¼ ÀÚ½ºÅ©¸³Æ® ¼Ò½º¸¦ º¸°í ±â´ÉÀ» ÆÇ´ÜÇϱ⠺¸´Ù´Â ÁÖ¼®À» º¸°í »ç¿ë¹ýÀ» ÀÍÈ÷´Â °ÍÀÌ ´Ù¸¥ °³¹ßÀÚ¿¡ ´ëÇÑ ¹è·Á¶ó°í ÇÒ ¼ö ÀÖ°Ú´Ù. ÀÚ¹Ù ¾ð¾î¿¡´Â javadoc À̶ó´Â ¸í·É¾î¸¦ ÀÌ¿ëÇØ¼ ÁÖ¼®À» html ·Î ÀÛ¼ºÇÒ ¼ö ÀÖ´Ù. Áö±ÝÀº ´ëºÎºÐÀÇ ÅëÇÕ IDE Åø¿¡¼ ¸Þ´º·Î Á¦°øÇϰí ÀÖ´Ù. ÀÌ¿Í °°Àº ±â´ÉÀ» ±¸ÇöÇØ ³õÀº JSDoc(http://jsdoc.sourceforge.net/) À̶ó´Â Perl ·Î Á¦ÀÛµÈ ¿ÀǼҽº°¡ ÀÖ´Ù. ¸®´ª¼¿¡°Ô´Â ¹®Á¦°¡ ¾ÈµÇ°ÚÁö¸¸ À©µµ¿ì »ç¿ëÀÚµéÀº Perl runtime environment ¸¦ ¼³Ä¡ÇØ¾ß »ç¿ëÇÒ ¼ö ÀÖ´Ù.
JSdoc À» ½ÇÇàÇØ º¸±â À§Çؼ´Â ¿ì¼± ¾Æ·¡¿Í °°Àº °úÁ¤À» °ÅÃÄ¾ß ÇÑ´Ù.
1. ActivePerl ¼³Ä¡
2. HTML::Template Perl module ¼³Ä¡Çϱâ
3. jsDoc ´Ù¿î¹Þ±â
1. ActivePerl ¼³Ä¡Çϱâ
¿ÀǼҽºÀÎ JSDoc Àº Perl ·Î ¸¸µé¾î Á³±â ¶§¹®¿¡ Perl ½ÇÇàȯ°æÀÎ ActivePerl À» ¼³Ä¡ÇØ¾ß ÇÑ´Ù. ´ÙÀ½ url ¿¡¼ À©µµ¿ì ¿ë AS Package ¸¦ ´Ù¿î ¹Þ´Â´Ù. http://www.activeperl.com/Products/Download/Download.plex?id=ActivePerl
ActivePerl-5.6.1.638-MSWin32-x86.zip ÆÄÀÏÀ» ´Ù¿î ¹Þ°í ¾ÐÃàÀ» Ǭ ÈÄ install.bat ÆÄÀÏÀ» ½ÇÇàÇÑ ÈÄ Àû´çÇÑ ÀÔ·Â ÆÄ¶ó¹ÌÅ͸¦ ÀÔ·ÂÇÏ¸é ¾Æ·¡¿Í °°ÀÌ ¼³Ä¡°¡ ¸¶¹«¸® µÈ´Ù.
Welcome to ActivePerl.
This installer can install ActivePerl in any location of your choice.
You do not need Administrator privileges. However, please make sure
that you have write access to this location.
Enter top level directory for install [c:\Perl]: c:\Perl
The typical ActivePerl software installation requires 35 megabytes.
Please make sure enough free space is available before continuing.
ActivePerl 638 will be installed into 'c:\Perl'
Proceed? [y] y
If you have a development environment (e.g. Visual Studio) that you
wish to use with Perl, you should ensure that your environment (e.g.
%LIB% and %INCLUDE%) is set before installing, for example, by running
vcvars32.bat first.
Proceed? [y] y
Create shortcuts to the HTML documentation? [y] y
Add the Perl/bin directory to the PATH? [y] y
Copying files...
2455°³ ÆÄÀÏÀÌ º¹»çµÇ¾ú½À´Ï´Ù.
Finished copying files...
Configuring Perl installation at c:\Perl
Translating C:\p4view\Apps\ActivePerl\MSI\data\ActivePerl\Perl to c:\Perl
editing c:\Perl/site/lib/ppm.xml
editing c:\Perl/site/lib/ppm-conf/Archive-Tar.pkg
editing c:\Perl/site/lib/ppm-conf/Compress-Zlib.pkg
editing c:\Perl/site/lib/ppm-conf/Data-Dump.pkg
editing c:\Perl/site/lib/ppm-conf/Digest-HMAC.pkg
editing c:\Perl/site/lib/ppm-conf/Digest-MD2.pkg
editing c:\Perl/site/lib/ppm-conf/Digest-MD4.pkg
editing c:\Perl/site/lib/ppm-conf/Digest-SHA1.pkg
editing c:\Perl/site/lib/ppm-conf/Digest.pkg
editing c:\Perl/site/lib/ppm-conf/File-CounterFile.pkg
editing c:\Perl/site/lib/ppm-conf/Font-AFM.pkg
editing c:\Perl/site/lib/ppm-conf/HTML-Parser.pkg
editing c:\Perl/site/lib/ppm-conf/HTML-Tagset.pkg
editing c:\Perl/site/lib/ppm-conf/HTML-Tree.pkg
editing c:\Perl/site/lib/ppm-conf/IO-Zlib.pkg
editing c:\Perl/site/lib/ppm-conf/libnet.pkg
editing c:\Perl/site/lib/ppm-conf/libwin32.pkg
editing c:\Perl/site/lib/ppm-conf/libwww-perl.pkg
editing c:\Perl/site/lib/ppm-conf/MD5.pkg
editing c:\Perl/site/lib/ppm-conf/MIME-Base64.pkg
editing c:\Perl/site/lib/ppm-conf/PPM-Agent-Perl.pkg
editing c:\Perl/site/lib/ppm-conf/PPM.pkg
editing c:\Perl/site/lib/ppm-conf/ppminst.bat
editing c:\Perl/site/lib/ppm-conf/SOAP-Lite.pkg
editing c:\Perl/site/lib/ppm-conf/Storable.pkg
editing c:\Perl/site/lib/ppm-conf/Test-Simple.pkg
editing c:\Perl/site/lib/ppm-conf/Tk.pkg
editing c:\Perl/site/lib/ppm-conf/URI.pkg
editing c:\Perl/site/lib/ppm-conf/XML-Parser.pkg
editing c:\Perl/site/lib/ppm-conf/XML-Simple.pkg
editing c:\Perl/site/lib/auto/XML/Simple/.packlist
editing c:\Perl/site/lib/auto/XML/Parser/.packlist
editing c:\Perl/site/lib/auto/Win32/.packlist
editing c:\Perl/site/lib/auto/Win32/AuthenticateUser/.packlist
editing c:\Perl/site/lib/auto/URI/.packlist
editing c:\Perl/site/lib/auto/Unicode/String/.packlist
editing c:\Perl/site/lib/auto/Tk/.packlist
editing c:\Perl/site/lib/auto/Text/Autoformat/.packlist
editing c:\Perl/site/lib/auto/Test/Simple/.packlist
editing c:\Perl/site/lib/auto/Storable/.packlist
editing c:\Perl/site/lib/auto/SOAP/Lite/.packlist
editing c:\Perl/site/lib/auto/PPM-Agent-Perl/.packlist
editing c:\Perl/site/lib/auto/PPM/.packlist
editing c:\Perl/site/lib/auto/PPM/Shell/.packlist
editing c:\Perl/site/lib/auto/Net/.packlist
editing c:\Perl/site/lib/auto/MIME/Base64/.packlist
editing c:\Perl/site/lib/auto/MD5/.packlist
editing c:\Perl/site/lib/auto/libwww-perl/.packlist
editing c:\Perl/site/lib/auto/IO/Zlib/.packlist
editing c:\Perl/site/lib/auto/HTML-Tree/.packlist
editing c:\Perl/site/lib/auto/HTML/Tagset/.packlist
editing c:\Perl/site/lib/auto/HTML/Parser/.packlist
editing c:\Perl/site/lib/auto/Font/AFM/.packlist
editing c:\Perl/site/lib/auto/File/CounterFile/.packlist
editing c:\Perl/site/lib/auto/Digest/.packlist
editing c:\Perl/site/lib/auto/Digest/SHA1/.packlist
editing c:\Perl/site/lib/auto/Digest/MD5/.packlist
editing c:\Perl/site/lib/auto/Digest/MD4/.packlist
editing c:\Perl/site/lib/auto/Digest/MD2/.packlist
editing c:\Perl/site/lib/auto/Digest/HMAC/.packlist
editing c:\Perl/site/lib/auto/Data/Dump/.packlist
editing c:\Perl/site/lib/auto/Compress/Zlib/.packlist
editing c:\Perl/site/lib/auto/Archive/Zip/.packlist
editing c:\Perl/site/lib/auto/Archive/Tar/.packlist
editing c:\Perl/site/lib/auto/ActiveState/Rx/.packlist
editing c:\Perl/site/lib/auto/ActiveState/RelocateTree/.packlist
editing c:\Perl/site/lib/auto/ActivePerl/DocTools/.packlist
editing c:\Perl/lib/.packlist
editing c:\Perl/lib/Config.pm
editing c:\Perl/lib/perllocal.pod
editing c:\Perl/bin/c2ph.bat
editing c:\Perl/bin/find2perl.bat
editing c:\Perl/bin/h2ph.bat
editing c:\Perl/bin/h2xs.bat
editing c:\Perl/bin/perlbug.bat
editing c:\Perl/bin/perlcc.bat
editing c:\Perl/bin/perldoc.bat
editing c:\Perl/bin/pl2pm.bat
editing c:\Perl/bin/pod2html.bat
editing c:\Perl/bin/pod2latex.bat
editing c:\Perl/bin/pod2man.bat
editing c:\Perl/bin/pod2text.bat
editing c:\Perl/bin/ppm3-bin.cfg
editing c:\Perl/bin/pstruct.bat
editing c:\Perl/bin/s2p.bat
editing c:\Perl/bin/splain.bat
cleaning out backups
Configuring c:\Perl/lib/Config.pm for use in c:\Perl...
Configuring Perl ...
Configuring PPM for use in c:\Perl...
Build directory is now C:\DOCUME~1\JYJ\LOCALS~1\Temp.
If you are behind a firewall, you may need to set the following
environment variables so that PPM will operate properly:
set HTTP_proxy=address:port [e.g. 192.0.0.1:8080]
set HTTP_proxy_user=username
set HTTP_proxy_pass=password
set HTTP_proxy_agent=agent [e.g. "Mozilla/5.0"]
Building HTML documentation, please wait...
This simplified installation program currently does *not*:
o set up MSWin32 file associations
o configure Perl for use with a Web Server
Refer to your Operating System and/or Web Server documentation for
details on how to to perform these modifications.
Thank you for installing ActivePerl!
À©µµ¿ì¿¡ Perl ¼³Ä¡°¡ ³¡³ª¸é C:\Perl\bin µð·ºÅ丮¸¦ ÆÐ½º¿¡ °É¾îÁÖÀÚ. ¼³Ä¡µÈ ÆÞÀ» uninstall ÇÏ´Â °ÍÀº ¾ÆÁÖ °£´ÜÇÏ´Ù. ¼³Ä¡ÇÑ C:\Perl µð·ºÅ丮¸¦ Åë°·Î »èÁ¦ÇÏ¸é µÈ´Ù.
2. HTML::Template Perl module ¼³Ä¡Çϱâ
ÅÛÇø´ ÆÞ ¸ðµâÀº ¾ÆÁÖ ½±°Ô ¼³Ä¡µÈ´Ù.
C:\>ppm
PPM interactive shell (2.2.0) - type 'help' for available commands.
PPM> install HTML-Template
Install package 'HTML-Template?' (y/N): y
Installing package 'HTML-Template'...
Downloading http://ppm.activestate.com/PPMPackages/5.6/MSWin32-x86-multi-thread/
HTML-Template-2.7.tar.gz ...
Installing C:\Perl\html\site\lib\HTML\Template.html
Installing C:\Perl\site\lib\HTML\Template.pm
PPM> quit
Quit!
C:\>
3. jsDoc ´Ù¿î¹Þ±â
jsDoc Àº http://sourceforge.net/projects/jsdoc ¿¡¼ ´Ù¿î¹ÞÀ¸¸é µÈ´Ù.
tar Çü½ÄÀÇ ÆÄÀÏÀ» Ç®¸é jsdoc.pl À̶ó´Â ÆÞ·Î ÀÛ¼ºµÈ ÆÄÀÏÀÌ Á¸ÀçÇÒ °ÍÀÌ´Ù.
ÀÌÁ¦ ÀÚ¹Ù½ºÅ©¸³Æ®¿ë html ¿Â¶óÀÎ ´ÙÅ¥¸ÕÆ®¸¦ ¸¸µé Áغñ¸¦ ¸ðµÎ ¸¶ÃÆ´Ù. ´ÙÅ¥¸ÕÆ®¸¦ ¸¸µé ÀÚ¹Ù½ºÅ©¸³Æ® ÆÄÀÏ(*.js) À» jsDoc ÀÌ ¼³Ä¡µÈ µð·ºÅ丮·Î º¹»çÇÑ ÈÄ perl jsdoc.pl xxx.js ¸í·É¾î¸¦ ÀÔ·ÂÇÏ¸é ´ÙÅ¥¸ÕÆ®°¡ js_docs_out ¶ó´Â À̸§ÀÇ µð·ºÅ丮 ¾È¿¡ »ý¼ºµÈ´Ù. xxx.js ÆÄÀÏÀº ´ÙÅ¥¸ÕÆ®¸¦ »ý¼ºÇÒ ÀÚ¹Ù½ºÅ©¸³Æ® ÆÄÀÏÀÇ À̸§ÀÌ´Ù.
4. jsDoc »ùÇà ½ÇÇàÇϱâ
¾Æ·¡¿Í °°Àº ¸í·É¾î¸¦ ½ÇÇàÇϸé html ´ÙÅ¥¸ÕÆ®°¡ »ý¼ºµÈ´Ù.
E:\etc\JSdoc>perl jsdoc.pl jsDocExample.js
Loading sources from jsDocExample.js
Completed generating documentation
Å×½ºÆ®¿ë jsDocExample.js ÆÄÀÏÀº ¾Æ·¡¿Í °°´Ù.
/**
* @fileoverview This file is an example of how JSDoc can be used to document
* JavaScript.
*
* @author Ryan Asleson
* @version 1.0
*/
/**
* Construct a new Person class.
* @class This class represents an instance of a Person.
* @constructor
* @param {String} name The name of the Person.
* @return A new instance of a Person.
*/
function Person(name) {
/**
* The Person's name
* @type String
*/
this.name = name;
/**
* Return the Person's name. This function is assigned in the class
* constructor rather than using the prototype keyword.
* @returns The Person's name
* @type String
*/
this.getName = function() {
return name;
}
}
/**
* Construct a new Employee class.
* @extends Person
* @class This class represents an instance of an Employee.
* @constructor
* @return A new instance of a Person.
*/
function Employee(name, title, salary) {
this.name = name;
/**
* The Employee's title
* @type String
*/
this.title = title;
/**
* The Employee's salary
* @type int
*/
this.salary = salary;
}
/* Employee extends Person */
Employee.prototype = new Person();
/**
* An example of function assignment using the prototype keyword.
* This method returns a String representation of the Employee's data.
* @returns The Employee's name, title, and salary
* @type String
*/
Employee.prototype.getDescription = function() {
return this.name + " - "
+ this.title + " - "
+ "$" + this.salary;
}
<jsDocExample.js ÀÇ Àüü ¼Ò½º ÄÚµå>
À§ jsDocExample.js ÆÄÀÏÀ» jsDoc À» »ç¿ëÇÏ¿© ´ÙÅ¥¸ÕÆ®¸¦ »ý¼ºÇÑ °á°ú´Â ¾Æ·¡¿Í °°´Ù.
