dsl pattern language

22
Pattern Languages in “Domain Specific Language” DSL 䝟䝍䞊䞁䝷䞁䝀䞊䝆 Shibukawa Yoshiki 䜘䛧䛝 Email: "eW9zaGlraUBzaGlidS5qcA==".decode("base64")

Upload: yoshiki-shibukawa

Post on 28-Jan-2015

120 views

Category:

Technology


0 download

DESCRIPTION

This presentation was shown at Object Club 2008 Summer Event.

TRANSCRIPT

Page 1: Dsl Pattern Language

Pattern Languages in “Domain Specific Language”

DSL ���������

Shibukawa Yoshiki�� ���

Email: "eW9zaGlraUBzaGlidS5qcA==".decode("base64")

Page 2: Dsl Pattern Language

���

• �����������– ������������ ��������

– ����������������� !�

• �� ������– LT"#$�%&�'(��

• ����• ����(�� ���)• ����

– )*+,��-.�/$0123��4�

• ������������������� !"#$�

Page 3: Dsl Pattern Language

������LT��� � ��

���� ������ ��

2006� XP����(����� ) ��������

2006Xmas �������(��� � ) !"�����

2007� #$%&'()*(��+,-� ) !"�����

2007Xmas ./012134%56(78� ) ���

���������� ����

Page 4: Dsl Pattern Language

What’s DSL?

LanguageProgrammer

Page 5: Dsl Pattern Language

What’s DSL?DSL

DSLDSL

Programmer

User

Page 6: Dsl Pattern Language

Pattern Catalog• Distance

– Move Away– Move Closer

• Structure– Late Evaluation– Preprocessor– Embedded Processor– External Data– External System

• Purpose– End User Programming– Flexibility– Acceleration– Paradigm Change

Page 7: Dsl Pattern Language

Relationship between PatternsMoveCloser Away

Struc

ture

Purpo

seLate EvaluationLate Evaluation

PreprocessorPreprocessor

Embedded ProcessorEmbedded Processor

External DataExternal DataExternal SystemExternal System

FlexibilityFlexibilityAccelerationAccelerationEnd User ProgrammingEnd User Programming

Paradigm ChangeParadigm Change

Page 8: Dsl Pattern Language

Distance

Page 9: Dsl Pattern Language

Distance – Move Closer• �������������

– 567$8/9�:/��;<��

– =>$�?�!�@A!B�

– 56$CDEFGHI#J�KL����MNOP

• �� !– dRuby, Jython/IronPython, SQL CLR

Page 10: Dsl Pattern Language

Distance – Move Away• ���������"#��

– QR$56$�R-S��TUVWXY�

– QR$56$Z[�\ #�

– ]/^_/��?� ��

• �� !– HTML^/`G��, ab�:�56cSQLcLINQ#d,��56?efg$hi��j�

Page 11: Dsl Pattern Language

Structure

Page 12: Dsl Pattern Language

Structure - Late Evaluation• $%��&'%(�)*+,-�

– klDSLm n���

– opmqr$st���$�cuv$wxy�z�

– 56$e{$|}�~�W���

• �� !– Rakefile, RSpec

Page 13: Dsl Pattern Language

Structure - Preprocessor• .���������/012�

– a��G�WH��56mR#y�

– ����qr�������y#�/�!�

– ��W����-�KY�q���MNyO�

• 3– Hot Ruby / IronPython / C��� / YACC

Page 14: Dsl Pattern Language

Structure – Embedded Processor• �����/.�456� 789�

– �-�:8�$DSL�KL����

– ��R$56�q���MNOP

• �� !– Lua, VBA, SQLite, XML-��, ����

Page 15: Dsl Pattern Language

Structure - External Data• :(;<9!=>?���452�

– �a�^������Pc���z�

– � m��W¡�.�8¢�z�

– ^£���¤zW �¥�.¦§y���?��

– -��cuv$�������yO�

• �� !– XML?.ini, ¨©��ª«8I#d$opª«8I

– MDA, ActiveRecord

Page 16: Dsl Pattern Language

Structure - External System• :(�@�AB�CD2�?����

– ¬­#®la�^��¯"��

– UyYP#a�^�y° c=>±(²yAy�

• �� !– dRuby– ¨G�a³_I¥�.H��

– ab�:�56c´µ¶·`��¸I

Page 17: Dsl Pattern Language

Purpose

Page 18: Dsl Pattern Language

Purpose - End User Programming• E87FG:H E87B�IJ�KL2�

– a�^�$¹��º»W¼�����

– DSLls�½¾W�P¿ÀMNyO�

• �� !– Trac$S��ª��cVBA– MDA, MATLAB$simlink– 3D CADmY$¥�.

Page 19: Dsl Pattern Language

Purpose - Flexibility• MNO�PQRSTUV�WP-�

– S��ª��ls�LL�ÁÂ��ÃÄÅ�`

– ÆÇ�WO��ls�¾PÈ�cÉÊ�ËW��

– opls�¾PÈ��®lÌ��

• �� !– Lua, VBA, HTML^/`G��, opª«8I

Page 20: Dsl Pattern Language

Purpose - Accelerate• (XY/Z[\���CD>R[]�^_

• �� !– C56/Java/CLR(LLY�*�), Shader56

– 8/�8/ÅÍ/Î�, Inline::C(Perl)

Page 21: Dsl Pattern Language

Purpose - Paradigm Change• `a/bcd7e9B����fc

– H��56$g��ÁÂ�W �ÏÐ�wÑ��

• %&'()*+�,-, .��/�012• 345(126789:;!),<=>0�?@A

• �� !– MATLAB/simlink– SQL,����

– ��¡�+_ÒÅÁÓ

Page 22: Dsl Pattern Language

DSL Futures• ghTi>jc\kl

– `¨`�Í�K?fg¿guvÔ��

• �BCDEF�GHIGJK!LM$�BNIOP0�?@����OP.Q���RS$�TU(RubyVWJ9)

– Å�^ÕÆ^ÕÖW���I×�G��/¸Å$=>

• ;XYYZ[K!(�\�]K^_�`a• =Q�bcd�ef�ghDSLifj�klmn

– Ø/�Ù��(¸/9Ç�.Ú®$Ø/ÛÜÅ)@�

• PowerPoint�N��oP��pqrX.��/�012/s�512�,-J9r!gUA