{"id":184,"date":"2009-05-19T09:36:29","date_gmt":"2009-05-19T08:36:29","guid":{"rendered":"http:\/\/blog.eweibel.net\/?p=184"},"modified":"2010-11-13T15:57:45","modified_gmt":"2010-11-13T14:57:45","slug":"first-groovy-experiences","status":"publish","type":"post","link":"https:\/\/blog.eweibel.net\/?p=184","title":{"rendered":"First groovy experiences"},"content":{"rendered":"<p>Currently I&#8217;m staying at copenhagen at the GR8Conf (<a href=\"http:\/\/groovy.codehaus.org\/\">Grooy<\/a>, <a href=\"http:\/\/www.grails.org\/\">Grails<\/a> and Griffon confernence). In the talk of the day by <a href=\"http:\/\/glaforge.free.fr\/weblog\/\">Guillaume Laforge<\/a> about DSLs he showed the following code:<\/p>\n<p>[sourcecode language=&#8221;groovy&#8221;]<br \/>\nclass CurrencyAmount {<br \/>\n    Number amount<br \/>\n    String currency<br \/>\n    String toString() { &quot;$amount $currency&quot; }<br \/>\n}<\/p>\n<p>Number.metaClass.getEuros {-&gt;<br \/>\nnew CurrencyAmount(amount:delegate, currency:&quot;EUR&quot;)}<\/p>\n<p>10.euros<br \/>\n\/\/Output: 10 EUR<br \/>\n[\/sourcecode]<\/p>\n<p>It is really interesting to see where in the java world the language evolvement happend. It&#8217;s a bit similiar (I&#8217;m careful here, because I do not know groovy very well) to the extension methods in .Net.<\/p>\n<p>For me groovy and grails are very interesting technologies, so I will stay up to date.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Currently I&#8217;m staying at copenhagen at the GR8Conf (Grooy, Grails and Griffon confernence). In the talk of the day by Guillaume Laforge about DSLs he showed the following code: [sourcecode language=&#8221;groovy&#8221;] class CurrencyAmount { Number amount String currency String toString() { &quot;$amount $currency&quot; } } Number.metaClass.getEuros {-&gt; new CurrencyAmount(amount:delegate, currency:&quot;EUR&quot;)} 10.euros \/\/Output: 10 EUR [\/sourcecode] It is really interesting to see where in the java world the language evolvement happend. It&#8217;s a bit similiar (I&#8217;m careful here, because I do&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/blog.eweibel.net\/?p=184\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[15],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-groovy"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/plOV9-2Y","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":367,"url":"https:\/\/blog.eweibel.net\/?p=367","url_meta":{"origin":184,"position":0},"title":"Reason of silence","author":"Patrick","date":"13. Aug 2009","format":false,"excerpt":"Why is there no blog entry for the July and for the half of august? Well, the answer is, that my current project where I'm the project manager and and also the leader of a team of software engineers, comes to an end. Currently we implement the last features like\u2026","rel":"","context":"In &quot;Private&quot;","block_context":{"text":"Private","link":"https:\/\/blog.eweibel.net\/?cat=9"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":499,"url":"https:\/\/blog.eweibel.net\/?p=499","url_meta":{"origin":184,"position":1},"title":"Favoured podcasts","author":"Patrick","date":"1. Nov 2009","format":false,"excerpt":"I migrated my desktop PC to Windows 7 Professional. I didn\u2019t choose the upgrade path, I install Windows 7 from scratch. So, after installing iTunes I had to register my favoured podcasts again: .Net .Net Rocks! Hanselminutes herding {code} Stackoverflow Polymorphic Podcast Alt.NET podcast Java The Java Posse Software engineering\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":377,"url":"https:\/\/blog.eweibel.net\/?p=377","url_meta":{"origin":184,"position":2},"title":"NHibernate mapping possibilities","author":"Patrick","date":"24. Aug 2009","format":false,"excerpt":"I prepare currently a new talk about NHibernate. In this talk I'll show the different mapping possibilities with NHibernate. To demonstrate the three possibilities (and a fourth one) I chose a quite simple model: I implement three classes Cat, Dog and Bird an for each one I chose a different\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":942,"url":"https:\/\/blog.eweibel.net\/?p=942","url_meta":{"origin":184,"position":3},"title":"Enums and inheritance in .Net","author":"Patrick","date":"9. Feb 2011","format":false,"excerpt":"In one of my current projects I had the following code (I simplified the code a bit): public string ConnectionString { get { switch(this.Importer) { case Importer.SqlServer: return \"Server=localhost;Database=Northwind\"; case Importer.SqlServerOleDb: return\"Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind\"; default: throw new NotSupportedException( string.Format(\"Importer {0} is not supported yet.\", this.Importer)); } } } After running\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"CodeCoverage","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/CodeCoverage_thumb.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/CodeCoverage_thumb.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/CodeCoverage_thumb.png?resize=525%2C300 1.5x"},"classes":[]},{"id":489,"url":"https:\/\/blog.eweibel.net\/?p=489","url_meta":{"origin":184,"position":4},"title":"Kaizen and Software Engineering","author":"Patrick","date":"27. Oct 2009","format":false,"excerpt":"Kaizen is a very interesting approach, also in the software industry. On Wikipedia you\u2019ll find the following description of Kaizen: Kaizen is a Japanese word adopted into English referring to a philosophy or practices focusing on continuous improvement in manufacturing activities, business activities in general, and even life in general,\u2026","rel":"","context":"In &quot;Agile&quot;","block_context":{"text":"Agile","link":"https:\/\/blog.eweibel.net\/?cat=17"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1014,"url":"https:\/\/blog.eweibel.net\/?p=1014","url_meta":{"origin":184,"position":5},"title":"Master of Advanced Studies in Information Technology","author":"Patrick","date":"9. May 2011","format":false,"excerpt":"During the last three years I was a part-time student again because I did at the university of applied science in Berne a post-grade study. Last week I received my certificate and the new title on the CV is now \u201cMaster of Advanced Studies in Information Technology\u201d. I chose the\u2026","rel":"","context":"In &quot;Private&quot;","block_context":{"text":"Private","link":"https:\/\/blog.eweibel.net\/?cat=9"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/image_thumb16.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=184"}],"version-history":[{"count":15,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":886,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/184\/revisions\/886"}],"wp:attachment":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}