tag:blogger.com,1999:blog-7850597441038481852024-03-13T12:16:46.917+01:00jan blogjanhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.comBlogger101125tag:blogger.com,1999:blog-785059744103848185.post-38916907051153374662021-07-10T00:05:00.001+02:002021-07-10T00:05:38.138+02:00WP - POD - Custom Taxonomy or Post Type - relationship field<p>If you are wondering how to traverse relationship field of custom post type or custom taxonomy created using PODs here is some code which can help you.</p><p>This code is running on the archive page. Archive is custom taxonomy created with PODS. Name of the relationship field is <i>child_category</i>.</p><p>Note that this is not copy/paste code. Its just code which works but you need to change it according to your configuration.</p><p><br /></p><p>$current_term = get_queried_object();</p><p>//echo $current_term->term_id;</p><p>$pod = pods( 'gif_category', $current_term->term_id );</p><p>$related = $pod->field( 'child_category' );</p><p>if( !empty($related)){</p><p>//var_dump( $related );</p><p> foreach ( $related as $rel ) {</p><p> //echo "<br/>aaaaaaaaaaa";</p><p> //echo $rel['slug'];</p><p> $slug = $rel['slug'];</p><p> //echo $slug;</p><p> //echo get_term_link( $slug, 'gif_category' );</p><p> //echo "<br/>";</p><p> echo "<a href='" . get_term_link( $slug, 'gif_category' ). "'>".$rel['name']."</a>";</p><p> echo ", ";</p><p> //var_dump( $rel );</p><p> //echo get_permalink( $id );</p><p> }</p><p>} </p><p><br /></p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-9298312468886705942021-07-10T00:01:00.004+02:002021-07-10T00:01:32.574+02:00See the value of variable in WordPress - vardump<p> In WP happens that you got to some object and you want to find as much as possible about that object.</p><p>So the question is: what is the content of WP object.</p><p>Trick which works very often is to use function var_dump($variable)</p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-9223547420229944472021-06-18T00:26:00.004+02:002021-06-18T00:26:45.108+02:00How to create YOAST custom variable<p> If you wonder how to create custom YOAST variable here is solution:</p><p>You have to add following code into <i>functions.php</i>.</p><p>First create empty function which will be used to register all YOAST custom variables:</p><p><i>function register_custom_yoast_variables() {}</i></p><p>Now register that function with YOAST so it knows how to load custom variable. Add following code:</p><p><i>add_action('wpseo_register_extra_replacements', 'register_custom_yoast_variables');</i></p><p>Now create function which will return value of your custom variable. For example:</p><p>function say_hello() {<br /><span> return "hello world";<br /></span>}</p><p>And we are almost ready. Into <i>register_custom_yoast_variables()</i> add code which will actually register function <i>say_hello</i> as custom variable.</p><p>Basically add following code:</p><p><i>wpseo_register_var_replacement( '%%say_hello%%', 'say_hello', 'advanced', 'My custom say_hello yoast variable' );</i></p><p>So <i>function register_custom_yoast_variables </i>will now look like this:</p><p><i>function register_custom_yoast_variables() {<br /><span> </span></i><i>wpseo_register_var_replacement( '%%say_hello%%', 'say_hello', 'advanced', 'My custom say_hello yoast variable' );<br /></i><i>}</i></p><p>Now if you need more custom variables just create php function which will return value and register it in the <i>function register_custom_yoast_variables</i></p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-50057122806297869092021-06-17T23:56:00.005+02:002021-07-05T00:38:55.269+02:00WordPress - How to find parent term of current term<p> You have hierarchical categories or custom taxonomy and for SEO reasons or navigation reasons you want to display parent term or the current term.</p><p>To get name of the parent term if such is available you can use following code:</p><p>Note you have to be on the taxonomy page (archive) for this to work.</p><p>function parent_term() { </p><p><span style="white-space: pre;"> </span>$term = get_queried_object();</p><p><span style="white-space: pre;"> </span>$parent = "";</p><p><span style="white-space: pre;"> </span>if ($term->parent == 0) {</p><p><span style="white-space: pre;"> </span>$parent = "";</p><p><span style="white-space: pre;"> </span>} else {</p><p><span style="white-space: pre;"> </span>$termParent = ($term->parent == 0) ? $term : get_term($term->parent, $term->taxonomy);<span style="white-space: pre;"> </span></p><p><span style="white-space: pre;"> </span>$parent = $termParent->name;</p><p><span style="white-space: pre;"> </span>}</p><p><span style="white-space: pre;"> </span>return $parent;</p><p>} </p><p> </p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-27655939431045347122021-06-17T23:52:00.005+02:002021-06-17T23:52:16.450+02:00WP - Theme Editor not visible<p> If you are asking: Why theme editor is not visible in my WP? or Why I cannot edit functions.php in WordPress? or Why theme editor is missing?</p><p>The probable reason is that you have disabled editing files. </p><p>Here are few possibilities how to get your theme editor back:</p><p>1. In wp-config.php find following line:</p><p><i>define (‘DISALLOW_FILE_EDIT’, true)</i></p><p>and change it to</p><p><i>define (‘DISALLOW_FILE_EDIT’, false)</i></p><p>2. If you have no access to wp-config.php it means some security plugin blocked this.</p><p>In the case you are using iThemes just do following:</p><p>- In iThemes <i>Settings</i> go to <i>WordPress Tweaks</i> and enable/disable <i>File Editor - Disable File Editor</i></p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-40336532981293128522021-04-26T22:50:00.000+02:002021-04-26T22:50:04.286+02:00WP - Display all tags in a tag cloud<p>You may have lot of tags but in your WordPress not all tags are displayed in the tag cloud. To display all or more tags there is simple solution.</p><p>Go to <i>Appearance->Theme Editor</i></p><p>Then in <i>Theme Files</i> select <i>functions.php</i>.</p><p>Add the following at the end:</p><div style="text-align: left;">//Register tag cloud filter callback<br />add_filter('widget_tag_cloud_args', 'tag_widget_limit');<br /> <br />//Limit number of tags inside widget<br />function tag_widget_limit($args){<br /> <br /> //Check if taxonomy option inside widget is set to tags<br /> if(isset($args['taxonomy']) && $args['taxonomy'] == 'post_tag'){<br /> $args['number'] = 500; //Limit number of tags<br /> }<br /> <br /> return $args;<br />}</div><p style="text-align: left;">Save the file.</p><p style="text-align: left;">If you want to display even more tags or less tags then change the number of tags to value which suites you.</p><p style="text-align: left;">If you want this behavior for WP categories then instead of <i>'post_tag'</i> use <i>'category'</i>.</p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-43845704822169478672019-07-23T00:23:00.001+02:002019-07-23T00:23:42.378+02:00My new WordPress project<div dir="ltr" style="text-align: left;" trbidi="on">
For long time (actually up to few weeks ago) all my projects were developed using Java, Grails and similar technologies. Majority of web applications had big business logic or need serious database access and display logic. The result of that was that actually I had no experience with number of existing tools online. I didn't worry about that as I thought that everything can be done fast and easy using my favorite tools, Java and Grails :)<br />
<br />
I must admit that I was wrong. With my wife we have decided that we want to try personal website related to tattoo, tattoo images and number of things related to tattooing. If you want to have a look on the result you can check <a href="https://withtattoo.com/">withtattoo.com</a>.<br />
<br />
After consideration I have decided that I will try to go with WordPress. I had no experience before that. So I just created trial account on wordpress.com and have been playing little bit. Very soon you realize architecture of WP as such and start feeling very good about working with it. Soon you need to decide the look and feel. With such amount of free or commercial themes available it is actually hard work to choose :).<br />
<br />
When I found a theme I needed some hosting. After initial surprise of low prices very soon I have found that some serious WP hosting costs similar to Java hosting. Around $30-$50. I have decided for WP liquidweb.com hosting. There are no limitations which plugins you need to use, which themes you can install and basically you have full control. To must surprise this was not the case for some strong WP hosting companies even when you pay more. Additionally I have very good professional experience with LiquidWeb as our virtual servers provider in the company.<br />
<br />
So basically after choosing WP theme, hosting you start working on website. Soon different ideas are coming how to accomplish different goals. To my surprise there is almost infinite number of available WP plugins to use and those plugin really speeds up your work. SEO, Social media, similar content and more. All this I know how to implement in Java but real enjoyment is that you can achieve same almost without work (again, this is case for simple website not advanced heavy back-end application).<br />
<br />
So just my conclusion. If you are thinking about some project, even if you are good software developer, before you start implementing it consider some existing frameworks and solutions. If you choose well and understand architecture behind it you can really do nice things.<br />
<br />
So basically, my first WP project is about tattoos and can be found on address withtattoo.com.</div>
janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-14942183879489737612018-04-27T20:04:00.002+02:002018-04-27T20:06:38.027+02:00Websites and Zones in terms of AdServer<div dir="ltr" style="text-align: left;" trbidi="on">
To make it simple regarding websites there are no surprises what is website in the Ad Server platforms technology. As it name implies it is just simply website. Places everybody are visiting daily and place where ads are displayed.<br />
<br />
These days when you visit website what will you also see in the most cases are different advertisements. Big banner at the top, video ad in the middle and even some text ads. And this brings us to the second important term in the world of Ad Servers.<br />
<br />
<b>Ad Zone</b><br />
<b><br /></b>
So what is actually Ad Zone?<br />
Ad Zone is unique place where ad is displayed.<br />
<br />
So if you take common website most probably on each of the pages you will see ad at the top of the page. Top of the page is header and it is the same header through out the whole website. So this you will identify as one Ad Zone. So no matter on how many pages ad is displayed basically it is just one same place.<br />
So one way of thinking what is Ad zone is to think about unique place where ad is displayed.<br />
<br />
But you can also think about ad zones from selling point of view. In this case Ad zone is place on your website which you can rent for real money. And those who rented this place will display they ads on the website. So somebody can e.g. pay you to display his own ads in the header. So header is the ad zone.<br />
<br />
<b>Mobile vs desktop</b><br />
In the pre-mobile era there was no difference between mobile and desktop website. These days this is usually different. So while it is the same website zone is different. You can sell to one partner header on your desktop website and also header to another partner.<br />
<br />
In this case you actually have two zones. Mobile header and desktop header.<br />
<br />
<br />
<b>Tree structure</b><br />
If we put all these together then actually websites and zones create kind of tree structure. On the top of the structure is <i>website</i> and <i>zones</i> are leafs of such tree. Have a look on the screenshot from the <a href="https://liteadserver.com/" target="_blank">Lite Ad Server platform</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-2CGqssdYUIg/WuNl05NCukI/AAAAAAAAJjA/t7nQ_hD8SPo_o6auUDuF8lx0VmvK_Z1YgCLcBGAs/s1600/tree-structure.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="225" data-original-width="318" src="https://2.bp.blogspot.com/-2CGqssdYUIg/WuNl05NCukI/AAAAAAAAJjA/t7nQ_hD8SPo_o6auUDuF8lx0VmvK_Z1YgCLcBGAs/s1600/tree-structure.PNG" /></a></div>
<br />
As you can see in the picture above it is obvious that <i>advertising website</i> has 5 different Ad Zones.<br />
<br />
Responsibility of ad servers is to display ads in the ad zones.<br />
<br /></div>
janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-47345800057289366582018-04-15T01:21:00.000+02:002018-04-15T01:21:07.457+02:00Basics of Ad Servers<div dir="ltr" style="text-align: left;" trbidi="on">
Although my responsibilities are mainly technical I was lucky enough to also get much more into online sales business. As we are using lot of advertising, banners and ad serving I got lot of experience with that.<br />
<br />
When I moved more into advertising I found out lot of new buzz words for me. Some of them are Ad Server, creative, pop-under, A/B testing, zone, ad space, campaign, landing pages...<br />
<br />
To my big surprise even number of experienced persons still do have confusion regarding all these. The problem is that online advertising and online sales very often much more looks like magic than something where you can setup some real processes.<br />
<br />
Anyway there are some standard rule sets valid for every company which wants to advertise product or service using Ad Server and banners (or better tell creatives).<br />
<br />
This brought me to decision to write series of blog posts which will help others to get good understanding into basics of ad servers, ad serving and other commonly used terms in online advertising.<br />
<br />
In the next post I will start with basics. We will see what is actually web site and zone in the online marketing. As we get deeper into the matter I will use <a href="https://liteadserver.com/" target="_blank">Lite Ad Server</a> in examples. This way we will be able to see everything mentioned in practice.</div>
janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-65091872984122382122010-08-02T01:00:00.002+02:002010-08-02T01:05:42.589+02:00Am I getting something wrong? (thinking about OOP)<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: 'Times New Roman'; font-size: medium; "><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">Maybe I am totally wrong but here is what is in my mind. Most of the books that describe object oriented programming, architecture or whatever are making examples using “objects” like person, cat, mammal and then big hierarchy of classes. Of course, more advance books are explaining why huge hierarchy of classes can be wrong and why it is good to use composition. I will not even try to explain that in this post.</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">And then having these classes you can read about different aspects of OOP. Some of the examples can be:</span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">dog.bark()</span></span><span class="Apple-style-span" style="font-family:georgia;"><br /></span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">person.walk()</span></span><span class="Apple-style-span" style="font-family:georgia;"><br /></span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">person.openDoor()</span></span><span class="Apple-style-span" style="font-family:georgia;"><br /></span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">engine.start()</span></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">And I agree that these are almost great examples (except </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">person.openDoor() </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">where I will come back later on). </span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">So let me try to explain where are I am aiming with me question (in the caption of the post).</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">For learning OOP these may be good examples but from my experience so far these are cases that I don’t meet so often in practice.</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">Let try one example. Imagine class </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Can</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "> (not verb but noun). Coming from the examples above one could model method: </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Can.open()</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">. Uhmmm, is it really possible that </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Can </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">is able to open itself? I wouldn’t say this is reality. </span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">So what is solution here? Quite straight forward. Model a class </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">CanOpener</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">. Then model method </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">CanOpener.open(Can can)</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">. This is now much closer to reality.</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">But what is </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Can </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">and what is </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">CanOpener </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">from the programming point of view? Well I would say:</span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Can</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "> - is data</span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">CanOpener</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "> - is service</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">And in most of the projects this is what I meet. Most often you are working with data and then perform something on that data. If you try to model your solution as explained at the beginning of the post you will finish with domain classes that have hundred of methods and probably thousands of lines. But very often domain classes are just data while services are actually performing real work. But be careful not to fall into trap of procedural programming.</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">So come back to example from the beginning: </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">person.openDoor()</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">. As I mentioned this is not good example. And again I would model this quite differently:</span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Door</span></span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">DoorOpener</span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "> (interface)</span><br /><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Person </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">(implements DoorOpener)</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">It is clear that doors can be opened by person, but they can be opened by engine or wind. So “item” that is able to open door is again service while door is just class keeping data (entity). And yes, you need to add code to open door into </span><span style="font-size: 11pt; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "><span class="Apple-style-span" style="font-family:georgia;">Person </span></span><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">but again this can be great situation to use composition. </span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">I hope I successfully explained how I try to model solutions for programming problems.</span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; "></span><br /><span style="font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; ">And just short note at the end. Please do not add Service, Manager or similar words at the end of class name. It can easy trap you into procedural programming as you will place too much responsibility into those “managers”.</span></div>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com5tag:blogger.com,1999:blog-785059744103848185.post-8646046303139011682010-07-31T00:00:00.000+02:002010-07-31T00:01:31.542+02:00Starting with Startup - Agile Acceptance Challenges<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; ">When starting with the agile development (Scrum as base in our case) there are always some challenges that you will meet at the beginning and during the road.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">I will try to explain structure of the team and acceptance of different agile parts.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Team</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">We have started with team of 6 (including me). Two of us already had experience with Scrum, one of us had experience with classical water-fall models and three had no experience with project management models. Few months later the team was extended with the tester.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">The structure of the team was (is) following:</div><div style="margin-top: 0px; margin-bottom: 0px; ">3 senior developers - 2 with agile experience and 1 with water-fall experience</div><div style="margin-top: 0px; margin-bottom: 0px; ">1 intermediate developer - experience only with ad-hoc project management model</div><div style="margin-top: 0px; margin-bottom: 0px; ">1 junior developer - no experience with any project management model</div><div style="margin-top: 0px; margin-bottom: 0px; ">1 designer - no experience with any real project management model</div><div style="margin-top: 0px; margin-bottom: 0px; ">1 tester (few months later) - experience with water-fall models</div><br />So let see how this team went through agile adoption.<div style="margin-top: 0px; margin-bottom: 0px; ">For each part I will split acceptance into three parts:</div><div style="margin-top: 0px; margin-bottom: 0px; ">- <i>with agile experience</i> - acceptance of the team members who had agile experience</div><div style="margin-top: 0px; margin-bottom: 0px; ">- <i>no experience</i> -acceptance of the team members that had no experience with project management methodologies</div><div style="margin-top: 0px; margin-bottom: 0px; ">- <i>water-fall experience</i> - acceptance of the team members that had experience with water-fall project management models.<br /><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Writing requirements (user stories)</b></div><div style="margin-top: 0px; margin-bottom: 0px; "><i>With agile experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">Team members that already had agile experience had no issues in writing user stories.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><i>No experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">Team members without experience with project management methodologies accepted user stories as the form of writing requirements. At the beginning there were some issues to write user story of the right size (sometimes they were too small or too big) but they got the right form very quickly.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><i>Water-fall experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">In the case of developer user stories have never been really accepted. My feeling was that there was no even wish to understand what is advantage of user stories. User stories were constantly too big (e.g. As admin I can do anything). Actually this colleague have never accommodated to agile development and left the company later.</div><div style="margin-top: 0px; margin-bottom: 0px; ">In the case of tester acceptance of user stories came much faster. For him it is much easier to understand what to expect when user story is implemented. It is obvious that tester prefers user stories than complex use cases or other functional specification.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Estimation</b></div><div style="margin-top: 0px; margin-bottom: 0px; "><i>With agile experience</i></div><i><span class="Apple-style-span" style="font-style: normal; ">Surprisingly here we needed some time to accommodate. The reason was that I have decided to use </span>story points<span class="Apple-style-span" style="font-style: normal; "> as estimation method. But the team member with agile experience was used to </span>ideal person days<span class="Apple-style-span" style="font-style: normal; "> estimation. It was confusing for him for some time. But at the end estimation model with user stories was fully accepted</span><br /><br /></i><div style="margin-top: 0px; margin-bottom: 0px; "><i>No experience and water-fall experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">After some turbulences at the beginning estimation model was accepted. The most issues were regarding over-estimation and under-estimation. But with help estimation became better and now is constant.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Meaning of DONE</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Meaning of DONE in agile is very interesting. You should finish user story in the way that in the future you should not come back to that user story. User story should be ready for production.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><i>With agile experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">Anybody with agile experience should not have problems to get meaning of DONE. At least that was the case with us.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><i>No experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">At the beginning it was not so clear what DONE means. There were questions like: Is it already DONE? Can I improve this? I have such good idea, can I add it? </div><div style="margin-top: 0px; margin-bottom: 0px; ">All the time I have insisted only on implementing user story and focusing on tasks. Very soon they realized what done means and actually realized why DONE is very helpful. </div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><i>Water-fall experience</i></div><div style="margin-top: 0px; margin-bottom: 0px; ">Here situation was much more interesting.</div><div style="margin-top: 0px; margin-bottom: 0px; ">Developer with water-fall model experience had constant problems to get work DONE. There were always small tasks that can be easily finished later. There were always some missing features because they were not specified enough in the user story description. The "wrong" influence of the water-fall could be felt most of the time. </div><div style="margin-top: 0px; margin-bottom: 0px; ">But tester was much happier. He read user story and had understanding what to expect from it. This way he can test and easily see if it is DONE. There are no answers like: I will do it later. It quite simple - if you sent user story for testing everything must work.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Testing</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Under "testing" I mean writing unit and integration (as we use Grails) tests. Here situation differs from team member to team member. Some of them understand and know how to write good tests and some of the are still fighting to get the tests right. The most common issues are like: </div><div style="margin-top: 0px; margin-bottom: 0px; ">- writing test that tests too much functionality and spread through number of classes or services. </div><div style="margin-top: 0px; margin-bottom: 0px; ">- writing test that tests method not functionality</div><br /><br /><br /><br /><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Conclusion</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">My feeling is that team accepted agile development very good. For team members without project methodology experience agile acceptance was easy and what is the most important natural. They have feeling that it is the right way to do the work. The most problems had a developer with water-fall experience. But the proof that having water-fall experience does not mean it is impossible to accommodate to agile is new team member that also came with water-fall experience but is accepting agile approach very good.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">What is your experience in accepting agile?<br /></div></div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-76197859439637353492010-06-17T00:17:00.000+02:002010-06-17T00:19:50.223+02:00Starting with Startup - Minimizing Unknowns<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; ">In the previous post I have explained some <a href="http://jan-so.blogspot.com/2010/05/starting-with-startup-tools-and.html">reasoning why have we selected certain technologies</a>, tools and processes. As mentioned all decisions were made to minimize number of unknowns in the project.<br /><br />So process was selected in a way so we can adapt easily - means Agile.<br />Tools and technologies were selected according to project needs and common knowledge of the team.<br />Hopefully team will get know each other as time passes by and I have believed that everything will go fine (and mostly lucky for us that was the case).<br /><br /><b>But the biggest unknown was still there - PROJECT.</b><br /><br />You cannot start development before you know what need to be implemented. Just having list of user stories would not be enough. You have to understand similar projects, you need to feel similar projects, know what are your main differences and how to use them to be successful.<br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">Or in short - team has to share the same <b>VISION</b>.</div><br />And next few sprints were devoted exactly to this. Project investigation. We have been doing 1 week sprints and each project member was investigating different aspects of the similar projects. We have studied things like:<br /><ul style="margin-top: 0px; margin-bottom: 0px; "><li style="margin-top: 0px; margin-bottom: 0px; ">features</li><li style="margin-top: 0px; margin-bottom: 0px; ">user interface</li><li style="margin-top: 0px; margin-bottom: 0px; ">easy of use</li><li style="margin-top: 0px; margin-bottom: 0px; ">lot of discussion with product owner to get feeling what are his main ideas<br /></li></ul><br />At the end of each sprint we had demo. Demo was used to present in details what are doing similar companies (should I say competitors :) ). This way all project members (including product owner) were able to better understand what is expected from us and in which direction we should roll out project.<br /><br />We did couple of week length sprints and when we have feel confident enough we were able to start with the project.<br /><br />So let summarize steps we did so far:<br /><ul style="margin-top: 0px; margin-bottom: 0px; "><li style="margin-top: 0px; margin-bottom: 0px; ">process selection</li><li style="margin-top: 0px; margin-bottom: 0px; ">team educatin</li><li style="margin-top: 0px; margin-bottom: 0px; ">tools and technology selection</li><li style="margin-top: 0px; margin-bottom: 0px; ">project investigation</li></ul><br />And now we are finally ready to start with the project. So in next posts I will describe some challenges we had during project development. Stay tuned :)<br /></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-74852310088399457232010-05-31T23:04:00.001+02:002010-05-31T23:06:56.649+02:00Starting with Startup - Tools and Technologies ReasoningFor those that read 'Starting with Startup' posts I want to apologize for not writing recently but last months we have been working a lot. You know how it is in startups :)<br /><br />In the previous posts I have explained <a href="http://jan-so.blogspot.com/2010/01/starting-with-startup-selecting.html">processes</a> and <a href="http://jan-so.blogspot.com/2010/02/starting-with-startup-setting-up.html">tools</a> we have decided to use. There were some comments and questions why this and not that technology and similar.<br /><br />When you start with the startup everything is completely new. The following list captures the most important new things that each member of the startup team meet:<br /><ul><li>team members</li><li>project</li><li>processes (you cannot expect that each team member will have experience with the process you select)<br /></li><li>technologies (you cannot expect that each team member will have experience with all technologies you select)</li></ul><br />As we all know it is much easier to predict result if there is minimum of unknowns. And in the startup company more or less everything is unknown - from the project to the project acceptance from final users. So what you try is to minimize unknowns. And to do that you have to carefully select each aspect of the technology and process.<br /><br />I would say that selection of agile and Scrum is more or less straight-forward. You want to be able to adapt to each new situation that will come up and what gives you more possibilities for that than agile development.<br /><br />How to minimize unknowns in the project will be topic of further posts.<br /><br />And at the end comes technology. And here is reasoning similar. You select what suites the best for the team and the project that is in front of you. And that is reason why we didn't select some upcoming technologies like GIT. We have created list of tools we need and then selected those that are the most known to all of us. And the result of selections are in details explained in the previous post.janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-41978737859173649942010-02-15T22:06:00.000+01:002010-02-15T22:07:21.528+01:00Starting with the Startup - Setting Up Development Environment<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; ">After we have set <a href="http://jan-so.blogspot.com/2010/02/starting-with-startup-start-using-scrum.html">basics for using Scrum</a> we can start with our first sprints. Our first sprints were devoted to choosing and setting up development environment.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">So let explore what do we know so far about the project (of course I knew much more than I can write in this post). </div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">* Our main focus are desktop and mobile web applications</div><div style="margin-top: 0px; margin-bottom: 0px; ">* Our core business is in the field of affiliate networks</div><div style="margin-top: 0px; margin-bottom: 0px; ">* We will use agile process or to be more specific Scrum</div><br /><div style="margin-top: 0px; margin-bottom: 0px; ">So I will jump directly into decisions we had to make and what have we decided:</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Web development framework</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Basically we have been deciding between two choices: Grails and Wicket. Who is reading my blog from time to time probably already knows answer to this. We have decided for <b>Grails</b>.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Build process</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Although Grails have nice build commands we needed something that is easier to integrate with the builds of other projects. Basically we have been deciding between maven and ivy. As Grails supports ivy much better than maven we have decided for <b>ivy</b>.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Continuous build process</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">More or less we have not been thinking too much here. We have decided for <b>Hudson</b>. Hudson is easy to install, has great front-end for management and number of very useful plugins. One note: although Hudson has Grails plugin we are not using it. We are using ivy in the Hudson to build the Grails projects.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Bug tracker</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Although we would be happy not to have bugs that is not reality. So we needed bug tracker. As most of us had experience with Mantis we have decided that our bug tracking tool will be <b>Mantis</b></div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Libraries repository</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">We will be depending on some external libraries. As we don't want to have them stored on Internet we needed some tool that handles dependencies. We have decided for <b>Nexus</b>.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Source code control</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Although there are new source code control system like git we have decided to use probably the most common one <b>Subversion</b></div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Mobile web development framework</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">After lot of investigation you find out that the market with the mobile web application frameworks is quite poor. The only available and really useful open source solution is: <b>WALL NG</b>. Luckily we have managed to almost fully integrate WALL NG with the Grails.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>IDE Tool</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">Although we didn't have any experience with InteliJ Idea as this is currently only tool with good support for groovy/grails we have decided that our IDE tool of selection is <b>InteliJ Idea</b>.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>In-house Grails plugin repository</b></div><div style="margin-top: 0px; margin-bottom: 0px; ">As Grails has number of useful plugins and we knew we will be using them. This leads that we need local Grails plugin repository. Grails repository is set in the Subversion.</div><br /><br /><div style="margin-top: 0px; margin-bottom: 0px; ">Having setup like the one mentioned above should give you fluent build process that is easy to repeat in the any moment. Additionally Hudson will ensure that your build is in the fit condition because it will report all build and test breaks.</div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com4tag:blogger.com,1999:blog-785059744103848185.post-54738370729987603122010-02-04T23:05:00.002+01:002010-02-04T23:09:36.317+01:00Starting with the Startup - Start Using Scrum<span class="Apple-style-span" style=" ;font-family:Verdana;font-size:13px;"><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">After <a href="http://jan-so.blogspot.com/2010/01/starting-with-startup-selecting.html">Scrum has been selected as process</a> and the <a href="http://jan-so.blogspot.com/2010/01/starting-with-startup-educating-team.html">team have been educated about agile and Scrum</a> we can start with setting up development environment. Very important thing to notice is that we can start using Scrum right away. Yes, Scrum can be used for tasks where you need to make decisions, investigation, setup of development environment and similar tasks. </span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">As quite often those tasks are not too much time consuming and you want to review current status more often it is best to start with short sprints. E.g. we decided to make one week sprints. This means that you can review your progress, adapt to new findings and adjust your directions on the weekly basis. When you are deciding about length of the sprint you should ask question: For what time period can we be sure that we will not change our minds?</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">The first thing we did was not part of the sprint but we did that with the purpose. We wanted to select some Scrum tool. </span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">More or less there are two basic options:</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium; "> * Using excel for product backlog and sprint backlog</span><br /><span class="Apple-style-span" style="font-size: medium; "> * Using some of existing (commercial or open sourced) Scrum tools</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">We have decided to use </span><a href="http://danube.com/scrumworks" id="wse9" title="ScrumWorks"><span class="Apple-style-span" style="font-size: medium;">ScrumWorks</span></a><span class="Apple-style-span" style="font-size: medium;"> basic edition with the addition of the big pin-board.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">ScrumWorks enables you to have product backlog, sprint backlog with the burndown chart, and some advance reporting options. Pin-board is used for user story cards. Idea is to split the pin-board in columns (e.g. todo, progress, testing, done) so everybody can see the status of the current sprint by simply looking onto it. If you are asking: isn't Scrum tool enough, I would say no. The reason is that if you are not part of the team, to check the status of the sprint it is enough to check the pin-board. Without pin-board you would had to open Scrum tool and this is already enough to give it up on checking status of the sprint. </span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><i><span class="Apple-style-span" style="font-size: medium;">One of the most important features of the agile and Scrum is transparency.</span></i><span class="Apple-style-span" style="font-size: medium;"> We want to be aware of the real situation in each moment. If the project or sprint is late we want to find it out as soon as possible. </span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">So we have prepared our Scrum tools and now we are ready to start sprint(s) for setting up development environment.</span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;"><br /></span></div><div style="margin-top: 0px; margin-bottom: 0px; "><span class="Apple-style-span" style="font-size: medium;">So how we set up development environment will be described in the next post.</span></div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-49050636698184269352010-01-31T22:37:00.000+01:002010-01-31T22:39:59.044+01:00Starting with the Startup - Educating the Team<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; ">In the previous post I have explained <a href="http://jan-so.blogspot.com/2010/01/starting-with-startup-selecting.html">why we have choose agile approach</a><b> </b>or more directly Scrum. But before you start using agile approach it is very important to explain what is agile and Scrum to the whole team and of course to the management.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">In our case we are lucky because we have full support from the management. It means there are no "artificial" obstacles in implementing Scrum. The only real obstacle are we. So before going on I made presentation about Scrum, team members did some reading and then we discussed about the whole approach.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">So when you are educating team do not forget to explain to them:</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><ul><li>Cores of the agile and the Scrum</li></ul></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">And especially take care to explain:</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><ul><li>Why everything in Scrum is time-boxed</li><li>What is user story and what are the differences between user story and use case</li><li>What means DONE</li><li>What is goal of the sprint</li><li>What is velocity and why it gives better estimation when things will be done than "classical" approaches</li><li>Why testing is so important in the agile approach</li><li>What is burndown chart and how it helps the whole team</li></ul></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">It may be clear why these points are important but I will shortly explain why I think it is important to take care there is full understanding of them.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Time-boxing</b> - very often developers are used to implement some tasks as long as they want. Even after deadlines. In Scrum everything is time-boxed because this way everybody have to be focused that features have to be finished in proposed time. So it is not possible to change architecture forever. In one moment you have to decide and do implementation.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>User story - </b>in lot of companies and even in schools developers are used to thing in use cases. While use cases are good very often they put limitation that need not to be set in given moment. Classical examples are: then user clicks the button.... How the use case knows there is .... button. User story explains functionality that user wants to achieve without too much details.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Done -</b> Done must mean: I am confident that feature implemented can go online. It is tested, written in good quality and I believe there are no bugs. This should be approach for all features that are marked done. You should not return back to this feature.</div><br /><div style="margin-top: 0px; margin-bottom: 0px; "><b>Goal of the sprint</b> - you have to set goal if you want to have good feeling at the end of sprint. How could you know if your sprint was success or failure without clear goal?</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Velocity</b> - velocity is number that based on the experience (yesterday's weather) tells you how much team can implement in the given period of time. Velocity is better than "classical" approaches because it covers meetings, phone calls, unexpected bugs and everything that is happening more or less regulary. </div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Testing</b> - if there are no tests how can you change the code and be sure that you didn't break any of the existing functionality. Well you cannot and you have to check everything after each change. If you have lot of tests you just run them and find out immediately if you have broke some existing functionality.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Burndown</b> - is great tool that tells you without mercy you current status. It will tell you if you are doing good or if you are doing bad. Just have it in front of eyes.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Conclusion:</b> If you have decided to take agile approach do not forget to educate developers what is agile. It is better to do it at the beginning then fixing problems in the middle.</div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-72550639868456744212010-01-26T22:08:00.001+01:002010-01-26T22:11:08.274+01:00Starting with the Startup - Selecting Processes<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; ">In the previous post about <a href="http://jan-so.blogspot.com/2010/01/starting-with-startup.html">Starting with the Startup</a> I explained that as our first step we have decided to choose processes. Of course one of the most important decisions to make is to choose right management methodology (framework). The product owner (managing director) was coming from the company with the strong full life cycle (waterfall if you prefer this way) process. He had no idea about any other processes and he was used to work in that way. Even all the next steps he planned were in that direction. There was plan to hire external consultant that will more or less write "book with the boxes" that we will implement. And that will be our solutions.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">The good thing is that although he didn't know for something else than waterfall methodology he didn't like waterfall approach. </div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">So as you may guess it was not hard to explain him what is agile, what is scrum and what are advantages of the agile approach compared to waterfall approach.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">For those who don't know difference just shortly: in waterfall you define and plan the whole project in advance and then just implement what was planned. No changes are allowed or complex change request processes are defined to introduce new requirements. In agile style you create vision and rough plan of your project and then implement your project in increments and iterations. You allow project to grow and change in the way according you new discoveries or business needs.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">Selecting agile approach out of the box would be mistake because for any decision you should have a good reasons. So let analyze situation we have.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><ul><li>We are startup company with small number of developers.</li><li>We have rough idea what is our goal</li><li>Our main focus are desktop and mobile web applications</li><li>The market where we are moving is changing rapidly</li><li>We are not sure and not aware of all the features we will need in our applications</li></ul></div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Possibility 1: Waterfall (or similar strong processes)</b> - if we choose this path it means that we need to define all the features of our applications. Oops, we are still not sure how many applications we will have. Not to talk about features of those applications. Ok, but if we analyze problem carefully maybe we would be able to define all the features in all the applications. But the next problem is: market is changing rapidly. Are we sure we want to create detailed plans too far in the future knowing that market will change in the mean time. <i>Decision: this is not the way we should go</i>.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Possibility 2: Agile (Scrum) </b>- I would say this is the direct hit. Agile approach is good to use if you have clear vision but not clear plan. If you have small (up to 9 persons) collocated team. If you requirements can change fast according to new discoveries and you need to adjust your goals according to market changes. Well if you check the list above agile is covering situation we have.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; "><b>Decision:</b> So actually it was not so hard to make the decision. We have decided to take agile approach implemented with Scrum.</div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-21142306955487866652010-01-26T00:03:00.001+01:002010-01-26T00:05:51.981+01:00Starting with the Startup<span class="Apple-style-span" style="font-family: Verdana; font-size: 13px; "><div style="margin-top: 0px; margin-bottom: 0px; "><div style="margin-top: 0px; margin-bottom: 0px; ">Few months ago (October last year) I have joined the startup company. An what is the real luck I have joined them really at the beginning. So when I came on my first working day there was server room prepared, tables with computers and few developers that joined the company a month before me. The core business of the company is (will be) affiliate networks and mobile web applications. It is quite young and very innovating area of the current industry trends. If you don't believe me Google it :)</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">The great thing in joining startup right from the beginning is that you have big influence on the whole process. It is never boring and commonly it is taken care that the team is created from great people and developers. And of course it does not mean that big and small companies do not have great people and great developers.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">So when the team is established, servers are prepared and there is rough idea what needs to be implemented you can jump right away into development. You install Eclipse, and start writing code. And doing it this way you will fail in a few months :)</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">First steps to be done are to establish some basic processes. As my part is mainly considered to development processes I will go through development processes and development environment setup.</div><div style="margin-top: 0px; margin-bottom: 0px; "><br /></div><div style="margin-top: 0px; margin-bottom: 0px; ">Well our decisions I will explain in the coming posts. </div></div></span>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-81962060129465401442010-01-04T01:03:00.003+01:002010-01-04T01:13:27.588+01:00New feature on spend day with kidsFor those who are using <a href="http://www.spenddaywithkids.com">spend day with kids</a> site or find it interesting or useful just to let you know that I have added some new features. Now it is possible to search for indoor and outdoor places to go with kids. So for example now it is possible to search for <a href="http://www.spenddaywithkids.com/home/placesAroundLocation?locationName=london&distance=50&orderBy=closest&_indoor=&indoor=on&_outdoor=&_action_placesAroundLocation=Show+me">indoor places to go with kids in the range of 50 kms from London</a> or <a href="http://www.spenddaywithkids.com/home/placesAroundLocation?locationName=new+york&distance=20&orderBy=closest&_indoor=&_outdoor=&outdoor=on&_action_placesAroundLocation=Show+me">outdoor things to do with kids in the range of 20 kms from New York</a>.<div><br /></div><div>As I have recently changed my job position my free time become really limited so it is really hard to work on pet projects. Even this small change would be almost impossible if there would not be Grails. Thanks to it it's quite easy to add new features. Actually implementation took only few hours and updating all over 1400 places to visit took much more time. </div><div><br /></div><div>I hope that in the coming days I will be able to write some posts about my experience with Grails in the startup company. We had lot of interesting points that deserves blogs posts. </div>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-13554055004548693202009-10-27T22:42:00.003+01:002009-10-27T22:46:21.538+01:00RSS Builder in Grails in a Few minutes<p>As I planned to include RSS feeds into <a href="http://www.spenddaywithkids.com/">www.spenddaywithkids.com</a> I needed possibility to create kind of RSS Builder. The good example of what I needed is <a href="http://rss.icerocket.com/">IceRocket RSS Builder</a>. So you are not generating RSS feeds directly from the data on your site but you are writing them manually. This way RSS feeds become kind of communication channel between the web site and users. </p> <p>I would stay with IceRocket but I couldn’t find possibility to do even simple formatting for RSS items. So my thought was let see how it is complicated to do it in Grails. And it turned out that it takes only few minutes to get very similar functionality. So here is short example done almost step by step.</p> <p><strong>Note:</strong> As my site is currently running on Grails 1.0.3 maybe not everything will be compatible with 1.1 version out of the box.</p> <p>So let go with implementation.</p> <p>First create grails application and named it rssbuilder.</p> <pre class="csharpcode">grails create-app rssbuilder</pre>Then create two domain classes:<br /><pre class="csharpcode"><span class="kwrd">class</span> RssChannel {<br /> String name<br /> String channelLink<br /> String description<br /><br /> <span class="kwrd">static</span> constraints = {<br /> name(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">true</span>)<br /> channelLink(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">false</span>, url:<span class="kwrd">true</span>)<br /> description(blank:<span class="kwrd">true</span>, nullable:<span class="kwrd">true</span>, maxSize:30000)<br /> }<br />}<br /><br /><br /><span class="kwrd">class</span> RssItem {<br /> String title<br /> String itemLink<br /> String summary<br /> RssChannel rssChannel<br /> Date dateCreated<br /> Date lastUpdated <br /><br /> <span class="kwrd">static</span> constraints = {<br /> title(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">false</span>)<br /> itemLink(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">false</span>, url:<span class="kwrd">true</span>)<br /> summary(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">false</span>, maxSize:50000)<br /> rssChannel(blank:<span class="kwrd">false</span>, nullable:<span class="kwrd">false</span>, unique:<span class="kwrd">false</span>)<br /> }<br />}</pre>Ah, don’t forget to install two plugins: <a href="http://grails.org/plugin/feeds">Feeds Plugin</a> and <a href="http://grails.org/plugin/richui">RichUI plugin</a>.<br /><br />Now we can generate controllers and views for two domain classes:<br /><pre class="csharpcode">grails generate-all RssChannel<br />grails generate-all RssItem</pre>Well now if you start application you are able to specify RSS channel and items for RSS channel. To provide possibility to specify better formatting for RssItem we can reuse <richui:richTextEditor tag from the RichUI plugin. In the create and edit view of the RssItem change summary and bind it to the <em>richTextEditor</em>. More or less you should <em>input </em>tag with the following:<br /><br /><pre class="csharpcode"><span class="kwrd"><</span><span class="html">richui:richTextEditor</span> <span class="attr">name</span><span class="kwrd">="summary"</span> <span class="attr">value</span><span class="kwrd">="${rssItem?.summary}"</span> <span class="attr">width</span><span class="kwrd">="525"</span> <span class="attr">height</span><span class="kwrd">="525"</span> <span class="kwrd">/></span></pre>Now to generate RSS feed we can reuse functionality of the Feed plugin. So create FeedController class with command grails create-controller Feed.<br /><br /><p>The code of the feed controller should be:</p><pre class="csharpcode"> def rss = {<br /> <span class="kwrd">if</span> (!<span class="kwrd">params</span>.id) {<br /> render <span class="str">"missing id in params"</span><br /> <span class="kwrd">return</span><br /> }<br /><br /> RssChannel rssChannel = RssChannel.get(<span class="kwrd">new</span> Long(<span class="kwrd">params</span>.id))<br /><br /> <span class="kwrd">if</span>(!rssChannel) {<br /> render <span class="str">"rss channel not found"</span><br /> <span class="kwrd">return</span><br /> }<br /><br /><br /> render(feedType:<span class="str">"rss"</span>, feedVersion:<span class="str">"2.0"</span>) {<br /> title = rssChannel.name<br /> link = rssChannel.channelLink<br /> description = rssChannel.description<br /> RssItem.findAllByRssChannel(rssChannel, [sort:<span class="str">"dateCreated"</span>, order:<span class="str">"desc"</span>]).each() { item -><br /> entry(item.title) {<br /> link=item.itemLink<br /> item.summary<br /> }<br /> }<br /> }<br /> }</pre>So now if you start application and create RSS channel and some items in that channel all you need to know is ID of that channel.<br /><p>If the Id of the channel is e.g. 1 in the browser write <a title="http://localhost:8080/rssbuilder/feed/rss/1" href="http://localhost:8080/rssbuilder/feed/rss/1">http://localhost:8080/rssbuilder/feed/rss/1</a> and you will see your feed.</p><p>I believe this was really easy :)</p><p>As soon as I switch fun <a href="http://www.spenddaywithkids.com">places to go with kids</a> to the Grails 1.1 I will create plugin from this.<br /></p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-88481403982423979592009-10-26T00:06:00.003+01:002009-10-26T00:08:45.999+01:00Grails scaffolding for domain classes in packages<p>While working on one simple subproject for <a href="http://www.spenddaywithkids.com/">spend day with kids</a> I got one interesting issue. I don't use scaffolding too often but this time I needed to get proof of concept. And I came to something where I am not sure if it is a bug or feature. And just to be clear this is happening with Grails version 1.0.3 and I am not sure if it is reproducible in later versions.</p> <p>Note: Having packages for domain classes is highly advisable and you should always use packages for all domain classes. <br />So let get to the point. I have create following domain class (please notice that package is defined).</p> <pre class="csharpcode">com.jan.rssbuilder.domain.RssChannel</pre><style type="text/css"><br />.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color:</style>And after that I have created RssChannelController this way:<br /><pre class="csharpcode">package com.jan.rssbuilder.domain<br /><br /><span class="kwrd">class</span> RssChannelController {<br /> def scaffold = <span class="kwrd">true</span><br />}</pre>After accessing this controller I got following exception:<br /><pre class="csharpcode">java.lang.IllegalStateException: Scaffolder supports action [index] <span class="kwrd">for</span> controller [com.jan.rssbuilder.domain.RssChannelController] but getAction returned <span class="kwrd">null</span>!</pre>After changing controller by specifying domain class everything worked fine:<br /><pre class="csharpcode">package com.jan.rssbuilder.domain<br /><br /><span class="kwrd">class</span> RssChannelController {<br /> def scaffold = com.jan.rssbuilder.domain.RssChannel<br />}</pre><br /><style type="text/css"><br />.csharpcode, .csharpcode pre<br />{<br /> font-size: small;<br /> color: black;<br /> font-family: consolas, "Courier New", courier, monospace;<br /> background-color: #ffffff;<br /> /*white-space: pre;*/<br />}<br />.csharpcode pre { margin: 0em; }<br />.csharpcode .rem { color: #008000; }<br />.csharpcode .kwrd { color: #0000ff; }<br />.csharpcode .str { color: #006080; }<br />.csharpcode .op { color: #0000c0; }<br />.csharpcode .preproc { color: #cc6633; }<br />.csharpcode .asp { background-color: #ffff00; }<br />.csharpcode .html { color: #800000; }<br />.csharpcode .attr { color: #ff0000; }<br />.csharpcode .alt <br />{<br /> background-color: #f4f4f4;<br /> width: 100%;<br /> margin: 0em;<br />}<br />.csharpcode .lnum { color: #606060; }</style>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-49556248830439854962009-10-18T22:10:00.002+02:002009-10-18T22:12:30.584+02:00Tips for working with front-end in Grails<p>I have implemented few web projects with Grails and some techniques while working with Grails front-end turned out to be better than other. When I didn’t follow them later on I usually had to refactor the code and did it the correct way.</p> <p>If you are reading this blog you noticed that I write very often about developing front-end with Grails. The reason is not that I am the best in the front-end but the reason is that I am the worst in the front-end. I am back-end developer and what I was missing in the majority of web frameworks was impossibility to make front-end more modular. In Grails this is easily to achieve thanks to <a href="http://jan-so.blogspot.com/2008/06/make-gsp-readable-with-grails-templates.html">Grails templates and tags</a>. And then you are almost to code in the normal java code.</p> <p>But come back to tips.</p> <p><strong>Tip 1:</strong> Always create one gsp page per state of the result.</p> <p><strong>Tip 2:</strong> Use templates and tags to make your pages more modular.</p> <p><strong>Tip 3:</strong> When ever it gives sense send custom model classes to the gsp page (not the domain classes). </p> <p>Well tips are nothing without some example. As an example I will take my latest project <a href="http://www.spenddaywithkids.com/">fun things to do with kids</a>.</p> <p>In the first installment home page had following responsibilities:</p> <ul> <li>As a starting point for visitors</li> <li>To display found places to go with kids</li> <li>To inform user that the city provided cannot be uniquely identified (there is more than one city with provided name)</li> <li>To inform user that no attractions were found around provided city</li> </ul> <p>As you can see that is obvious break of the SRP (single responsibility principle). Because of too much responsibilities the model I was sending to the page was quite complex and the page contained number of <em>if</em> blocks. And you must admit that having <em>if</em> blocks in the html page is not the best practice. Another side effect was that page had about 300 lines that is simply too much.</p> <p>So what I did? Well, of course I did some refactoring. </p> <p>I have created one page per responsibility and depending on result controller decide which page to display and provides correct data model (is this maybe kind of strategy pattern?). This way it is much easier to understand what pages are doing. And now they are up to 30 lines long.</p> <p>But if you check pages you can see they are quite similar:</p> <p>To see home page navigate to: <a href="http://www.spenddaywithkids.com/">spend day with kids</a> <br />To see page with results navigate to: <a href="http://www.spenddaywithkids.com/home/placesAroundLocation?locationName=nottingham&distance=20&orderBy=closest&_action_placesAroundLocation=Show+me">things to do with kids in Nottingham</a> <br />To see page where there are multiple cities e.g. <a href="http://www.spenddaywithkids.com/home/placesAroundLocation?locationName=Malinovo&distance=100&orderBy=closest&_action_placesAroundLocation=Show+me">search for Malinovo</a>. Select Malinovo, Slovakia to see places to visit nearby my home :) <br />To see page where there are no results check e.g. for <a href="http://www.spenddaywithkids.com/home/placesAroundLocation?locationName=belgrade&distance=100&orderBy=closest&_action_placesAroundLocation=Show+me">Belgrade</a>.</p> <p>If you checked all these pages you can notice that they are very similar but little bit different. So how do you solve similarities. Very easy. Use <strong>templates and tags</strong>.</p> <p>And the last but not the least, it is obvious that the data models delivered to the pages can be quite different and even some cases need not to contain any domain classes.</p><p>So I hope that those tips will help you while working on your own grails projects.<br /></p>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com2tag:blogger.com,1999:blog-785059744103848185.post-15385663734918551982009-10-17T13:44:00.002+02:002009-10-17T14:10:56.252+02:00New features on spend day with kidsI have finally found some free time so I decided to implement some new features on <a href="http://www.spenddaywithkids.com">spend day with kids</a>.<br /><br />So far all searches have been performed with the same default parameters. The defaults were distance is 100 kms and the sorting of attractions was by type.<br /><br />Very soon after the launch of the site I got mail from Jeff where he proposed that results should be displayed in the order of proximity from the provided city. I liked the idea immediately and now this feature is supported.<br /><br />So now you can provide city or even address and specify the distance of places to be searched and additionally to select ordering type. Possible ordering types are of course by distance and by city.<br /><br />As you probably know spend day with kids site helps you find great <a href="http://www.spenddaywithkids.com">family days out</a> and is implemented with Grails. While developing this site, so far I didn't hit any special interesting features that could be worth for blogging about. But if you have any ideas just let me knowjanhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-1092397243629286652009-10-10T01:01:00.002+02:002009-10-10T01:10:21.677+02:00Hope to have more material for bloggingI am aware that last few weeks I was quite lazy with blogging but as I was changing employer so lot of responsibilities have been in front of me. Of course, important part was knowledge transfer. From the October I am in my new company.<div><br /></div><div>First I would like to thanks my previous company for having a chance to work on interesting and exciting projects.</div><div><br /></div><div>In the new company I am coming to the position of Head of Software Development. It is a small start up company and we are working on the green field project. Yes, you see it right, its green field :)</div><div><br /></div><div>As my future work will include some new technologies and different market I hope that I will have lot of materials for blogging. We will mainly work with affiliate networks and mobile web development. As this is quite new field for me I believe I will be able to share a lot of interesting discoveries.</div><div><br /></div><div>As the field we will be working in is very dynamic we are of course on Scrum and agile software development. Dynamic projects and agile software development create great combination. I am very sure we will have lot of fun. </div>janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0tag:blogger.com,1999:blog-785059744103848185.post-26974609492718103372009-10-07T22:13:00.002+02:002009-10-07T22:18:20.563+02:00Software books reviews down - permanently (so far)It has been some time as I planned to take down software books reviews. Although I don't think that the idea was bad it takes time to make the site grow and support from the community was not so good.<br />As running site takes some money, lot of time and I have two other sites online too: <a href="http://www.grailstutorials.com">grails tutorials</a> and <a href="http://www.spenddaywithkids.com">things to do with kids</a> I have to choose which one to take down.<br />So my decision was to take down the software books reviews.<br /><br />Now I want to be able to concentrate on my new work and to try to extend functionality of the spend day with kids site. I promised few months ago that I will open source grails tutorials and I still plan to do that. The problem is that I need few days of additional work before I open source it and I am not able to find those day.<br /><br />So for all that were visiting software books reviews, sorry but I had to take it down.janhttp://www.blogger.com/profile/09450549833036134264noreply@blogger.com0