{"id":116,"date":"2012-03-12T20:32:37","date_gmt":"2012-03-12T19:32:37","guid":{"rendered":"http:\/\/dev.qualilogy.com\/en\/?p=116"},"modified":"2013-01-04T20:45:22","modified_gmt":"2013-01-04T19:45:22","slug":"city-model-new-release","status":"publish","type":"post","link":"http:\/\/qualilogy.com\/en\/city-model-new-release\/","title":{"rendered":"City Model &#8211; New release"},"content":{"rendered":"<p>Do you remember that I got a <a title=\"City Model\" href=\"http:\/\/qualilogy.com\/en\/city-model\" target=\"_blank\">nice Christmas gift<\/a>?<\/p>\n<p>It was the Sonar plugin City Model made by eXcentia and they have released a <a title=\"City Model Sonar plugin\" href=\"https:\/\/servicios.excentia.es\/confluence\/display\/QAX\/QAlitaX+City+Model\" target=\"_blank\">new version<\/a>. This will let us the opportunity to show how to customize your own dashboard with Sonar.<\/p>\n<p><!--more--><\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Intranet1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-1264\" title=\"Intranet1\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Intranet1-300x230.jpg\" alt=\"\" width=\"370\" height=\"283\" \/><\/a>This is what looks my application after I installed the plugin. Remember you can go in every three directions using your mouse, to turn the &#8216;City&#8217; horizontally, vertically, or to get closer or away.<\/p>\n<p>The installation of the plugin is quite easy: you download it and save it into the directory &#8216;\\extensions\\plugins&#8217; of Sonar. Then you stop\/start Sonar to be able to use it.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Menu-Configure.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1269\" title=\"Menu Configure\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Menu-Configure.jpg\" alt=\"\" width=\"287\" height=\"26\" \/><\/a>In order to get the &#8216;City&#8217; into your dashboard, you login as an administrator so that when you select one project and display its dashboard, you now have a menu that allows you to personalize it.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/City-Model-Widget.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-1271\" title=\"City Model Widget\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/City-Model-Widget.jpg\" alt=\"\" width=\"282\" height=\"94\" \/><\/a>Let&#8217;s click on &#8216;Configure widgets&#8217; to display the list of all the widgets to customize your dashboard. Here is the one to add the City Model. Just click on &#8216;Add widget&#8217; to get a city representing your application.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/City-Model-Top-Widget.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1273\" title=\"City Model Top Widget\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/City-Model-Top-Widget.jpg\" alt=\"\" width=\"281\" height=\"94\" \/><\/a>Now, with the plugin of eXcentia comes another widget &#8211; City Model Top &#8211; that lists a determined number of classes according to the value you choose. And I find that really useful.<\/p>\n<p>When you meet a person for the first time, the first thing you look at is her size and you could get a pretty fine idea of it very easily. Same with an application, code size measured in LOC is a very easy measure to get, and this is the default value used when you add the City Model Top.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Nloc11.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1277\" title=\"Nloc1\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Nloc11.jpg\" alt=\"\" width=\"588\" height=\"155\" \/><\/a><\/p>\n<p>Then, you could try to evaluate the weight of this person or, for an application, its complexity. As it is not as easy to guess, you would probably have to ask this person in order to know its weight, as you need a code analysis tool to evaluate the Cyclomatic Complexity (CC) for an application.<\/p>\n<p>In order to do that, you just have to add again a City Model Top widget and to change its parameters by clicking the &#8216;Edit&#8217; button.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Complexity.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1278\" title=\"Complexity\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Complexity.jpg\" alt=\"\" width=\"581\" height=\"176\" \/><\/a><\/p>\n<p>Here we have entered our own values:<\/p>\n<ul>\n<li>A new title &#8216;Complexity&#8217;.<\/li>\n<li>&#8216;topListLength&#8217; = 5 to limit the display to the top five classes.<\/li>\n<li>{complexity} to indicate that we want to list the most complex classes.<\/li>\n<\/ul>\n<p>Click on &#8216;Save&#8217; to see the results:<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/TopComplexity.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1280\" title=\"TopComplexity\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/TopComplexity.jpg\" alt=\"\" width=\"581\" height=\"148\" \/><\/a><\/p>\n<p>Once you get an idea of the size and the complexity of the top classes, you begin to get an idea of the application. You will now need some more complex measures. Well, you can imagine different formulas.<\/p>\n<p>Here I have added a third widget to calculate the average CC per method using the following formula: {complexity}\/{functions}.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Functions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1282\" title=\"Functions\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Functions.jpg\" alt=\"\" width=\"581\" height=\"176\" \/><\/a><\/p>\n<p>And here it is:<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/TopFunctions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1283\" title=\"TopFunctions\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/TopFunctions.jpg\" alt=\"\" width=\"581\" height=\"148\" \/><\/a><\/p>\n<p>What is really great with the Sonar dashboard is that you can dispose these widgets we have been adding exactly where you wan them just by selecting and drag-dropping them.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Back-to-dashboard.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-1285\" title=\"Back to dashboard\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Back-to-dashboard.jpg\" alt=\"\" width=\"111\" height=\"25\" \/><\/a>The button &#8216;Back to dashboard&#8217; will save your choices and display your new customized dashboard.<\/p>\n<p>Here is mine, with the &#8216;City&#8217; on the left and three &#8216;top lists&#8217; of the biggest, most complex classes on the right.<\/p>\n<p><a href=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Dashboard-31.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1288\" title=\"Dashboard 3\" src=\"http:\/\/qualilogy.com\/wp-content\/uploads\/2012\/03\/Dashboard-31-1024x438.jpg\" alt=\"\" width=\"640\" height=\"273\" \/><\/a><\/p>\n<p>This allows you to assess quickly what are the most important numbers on any new application and get instantly the list of the classes to check. It helps you to define priorities to plan your tests, when someone introduces a change in one of these classes because they are the most difficult to understand and this is really easy to create new defects.<\/p>\n<p>Great value. The City Model plugin comes with a moderate price and a two weeks evaluation licence.<\/p>\n<p>Just experiment and enjoyed it.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you remember that I got a nice Christmas gift? It was the Sonar plugin City Model made by eXcentia and they have released a new version. This will let us the opportunity to show how to customize your own dashboard with Sonar.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-sonar-360"],"_links":{"self":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/116"}],"collection":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":2,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":122,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/posts\/116\/revisions\/122"}],"wp:attachment":[{"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/qualilogy.com\/en\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}