web https://janezurevc.name/ en Playing with the Sculpin static site generator https://janezurevc.name/playing-sculpin-static-site-generator <span>Playing with the Sculpin static site generator</span> <span><span lang="" about="https://janezurevc.name/users/slashrsm" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">slashrsm</span></span> <span>Sun, 29.01.2017 - 22:08</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p><img src="https://janezurevc.name/sites/default/files/attached-files/sculpin.jpg" alt="Sculpin generator" /></p> <p>I can hear you asking: "What the hack is that?" Let me quote the <a href="https://sculpin.io/">Sculpin's authors</a>:</p> <blockquote>Sculpin is a static site generator written in PHP. It converts Markdown files, Twig templates and standard HTML into a static HTML site that can be easily deployed. </blockquote> <p>Few days ago a need for a very simple website arose which was way too simple to use <a href="https://www.drupal.org/8">Drupal 8</a> for it. Even <a href="https://wordpress.org">Wordpress</a> would be way over the top. On the other hand I really wanted to try static HTML generators for a while and this seemed a perfect opportunity to do that.</p> <p>There are many static HTML generators out there, <a href="https://jekyllrb.com/">Jekyll</a> probably being the most popular (it is also supported by <a href="https://pages.github.com/">GitHub pages</a>, which makes hosting trivial). I, however, decided to go with Sculpin because it is written in PHP and is using Symfony and Twig. I am already more or less familiar with all these technologies, which made the task a bit easier.</p> <p>Result?</p> <p>Few hours, very simple <a href="https://getbootstrap.com/">Bootstrap</a> based theme, <a href="https://flexslider.woothemes.com/">FlexSlider</a>, some <a href="https://en.wikipedia.org/wiki/Markdown">Markdown</a> and violà! Site was done and running. It is performant, I can host it literary everywhere, no need to clear caches every time when something behaves strange, no updates, security out of the box, ...</p> <p>I could totally use something similar for this blog too. Heresy against The religion of Drupal™ you say? Maybe.... But think about it. I am already using Markdown (not really a WYSIWYG fan) to write my posts. That wouldn't change at all. I use <a href="https://disqus.com/">Disqus</a> for comments, which would play perfectly fine with static HTML. I could use <a href="liquidforms.io/">Liquid Forms</a> or something similar to run the contact form or simply ask people to reach out via Twitter or IRC. That's it. It could probably be done in a day while it took me 3 or 4 days to <a href="https://janezurevc.name/janezurevc-name-runs-on-drupal-8">migrate my Drupal 7 blog to Drupal 8</a>. Not to mention the significantly easier maintenance.</p> <p>I might even consider doing that when the migration to Drupal 9 comes around. We'll see what the hip thing at that time will be...</p> <h2>All this got me thinking...</h2> <p>Solutions like Jekyll and Sculpin are gaining popularity in the lowest end of the web market. By that they are eating into what used to be market of CMSes like Drupal and Wordpress just a few years ago. Benefits are clear (mainly performance and easy maintenance). The user experience and the ease of use is still on the CMS side, but for slightly tech savvy users it is completely doable. And this might very likely change in the next few years (every software tries to improve over time, right). That said, this kind of tools might (together with pure SaaS solutions) dominate the lower-end web market in the future.</p> <p>"But Drupal 8 is enterprise-oriented. That's what we care about!" you'll say. OK. Probably true, but...</p> <p>It is easier than ever to build custom web projects in PHP. In the times before Composer, Packagist and all other nice stuff that we have today existed it was total PITA to find and bring a bunch of 3rd party libraries together to help you build a custom app. In just a few short years this became much simpler and will become even easier as our tools and ecosystem evolve. And PHP is not alone in this world. There are many new and modern languages/platforms that are all doing similar things from this perspective. All of them have some kind of package manager, dependency resolver, repositories of 3rd party packages, etc. It is to be expected that this will only continue. Tools will become even easier to use, 3rd party libraries/packages will become more powerful and building custom projects based on them even faster.</p> <p>Higher-end projects usually have some budget to invest into development. What would you choose if the cost of development using a CMS like Drupal would be similar to the cost of building a custom project? Specially if you don't need all the features and complexity that CMS offers?</p> <p>"Are you saying that Drupal is going away?" you ask.</p> <p>Of course not. Drupal is a great tool that can efficiently solve many problems. But there are definitely better tools for some others. It also seems that there is strong competition on all sides of the web market, which is eating into the pie that was reserved for traditional CMSes in the past. Drupal will need to think about this and position itself into that segment of the market where it is the strongest. The days of "Drupal for everything" are clearly over.</p> <p><em>What is your opinion about this? What do you think future will bring us? Let's continue the discussion in the comments below!</em></p> </div> <div class="field field--name-field-related field--type-entity-reference field--label-above"> <div class="field--label">Enjoyed this post? There is more!</div> <div class="field--items"> <div class="field--item"><a href="https://janezurevc.name/join-us-next-drupal-media-sprint-mountain-camp-davos" hreflang="en">Join us at the next Drupal Media sprint at the Mountain camp in Davos!</a></div> <div class="field--item"><a href="https://janezurevc.name/drupal-dev-environment-on-docker" hreflang="en">Drupal dev environment on Docker</a></div> <div class="field--item"><a href="https://janezurevc.name/entity-browser-feature-freeze-will-happen-two-weeks" hreflang="en">Entity browser feature freeze will happen in two weeks</a></div> </div> </div> Sun, 29 Jan 2017 21:08:24 +0000 slashrsm 106 at https://janezurevc.name How to get client's IP number to Drupal when using Varnish https://janezurevc.name/how-get-clients-ip-number-drupal-when-using-varnish <span>How to get client's IP number to Drupal when using Varnish</span> <span><span lang="" about="https://janezurevc.name/users/slashrsm" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">slashrsm</span></span> <span>Wed, 07.12.2011 - 00:50</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>There are a lot of places, where you need client's IP address in <a href="https://drupal.org">Drupal</a> (or any other CMS/web app of course). The problem arises, when you use a <a href="https://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy server</a> (like <a href="https://varnish-cache.org">Varnish</a>), since every request to web server will be done by the latter. We will have every single visitor of our website coming from a single IP (reverse proxy), as a result.</p> <p>Drupal is smart enough to overcome that. Reverse proxy servers can be configured to forward original client IP in a request header (usually <em>X-Forwarded-For</em>). This value can be used on web server to know where our visitory come from. In Drupal we have function <a href="https://api.drupal.org/api/drupal/includes--bootstrap.inc/function/ip_address/7"><em>ip_address()</em></a>, which will read and return client's IP. If we take a look at this function's code, we can see that it already has support for situations, where reverse proxy is used. This function will still return Varnish's IP address by default, though.</p> <p>To make things working as we expected, we have to configure at least two variables in <em>settings.php</em>:</p> <pre> // Tell Drupal that we are behind a reverse proxy server $conf['reverse_proxy'] = TRUE; // List of trusted IPs (IP numbers of our reverse proxies) $conf['reverse_proxy_addresses'] = array( '127.0.0.1', ); </pre><p>That's it. Now <em>ip_address()</em> returns IP number that was sent via request header. There is also a possibility to use custom header name:</p> <pre> // Drupal will look for IP in $_SERVER['HTTP_MY_CUSTOM_HEADER'] $conf['reverse_proxy_header'] = 'HTTP_MY_CUSTOM_HEADER'; </pre></div> Tue, 06 Dec 2011 23:50:39 +0000 slashrsm 30 at https://janezurevc.name slovenskenovice.si - biggest Slovenian Drupal site https://janezurevc.name/slovenskenovicesi-biggest-slovenian-drupal-site <span>slovenskenovice.si - biggest Slovenian Drupal site</span> <span><span lang="" about="https://janezurevc.name/users/slashrsm" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">slashrsm</span></span> <span>Mon, 05.12.2011 - 23:15</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p><img alt="" data-entity-type="file" data-entity-uuid="8503d0db-5bb7-4b29-8c0b-119938f59d5c" src="https://janezurevc.name/sites/default/files/sn-screenshoot.com_.png" /></p> <p><a href="https://www.slovenskenovice.si">Slovenske novice</a> are Slovenian national daily newspaper with largest circulation on national level. Last week we lunched redesign of it's web variant, which is a news portal with about 200.000 unique visitors and 4.5 million impressions per month. This numbers wil definetely become larger soon, as they have monthly growth between 10 and 15%.</p> <p>Site was developed on <a href="https://drupal.org">Drupal 7</a>. We extensively used <a href="https://drupal.org/project/panels">Panels</a> and <a href="https://drupal.org/project/views">Views</a>. Search is based on <a href="https://lucene.apache.org/solr/">Apache Solr</a>, driven by <a href="https://drupal.org/project/search_api">Search API framework</a>. To achieve performance we used <a href="https://drupal.org/project/memcache">Memcached</a>, <a href="https://drupal.org/project/varnish">Varnish</a>, <a href="https://drupal.org/project/apc">APC</a> and developed some own cache expiration rules. This is how we achieved performance we needed and flexibility requested by editorial team. Everything is hosted on our own HA LAMP stack.</p> <p>Just two days after launch we had national elections in Slovenia, which are also a big media event. Our site broke the record in daily visits and everything was working smooth.</p> <p>Since a custom CMS, which was developed inside company about 10 years ago, was used before, one of the most important aspects of this project was experience for editorial team. They learned how to use Drupal surprisingly fast. There were some minor issues reported, but in general Drupal works really got for them.</p> <p>Site was developed by core development team:</p> <ul><li><a href="https://drupal.org/user/19501">Tadej Baša</a>, <a href="https://twitter.com/paranojik">@paranojik</a></li> <li><a href="https://drupal.org/user/282629">Primož Hmeljak</a>, <a href="https://twitter.com/theprimsi">@theprimsi</a></li> <li>Tim Rijavec, <a href="https://twitter.com/timrijavec">@timrijavec</a></li> <li><a href="https://drupal.org/user/744628">Janez Urevc</a> (me :)), <a href="https://twitter.com/slashrsm">@slashrsm</a></li> </ul><p>We also had some themeing help from <a href="https://drupal.org/user/123987">Iztok Smolič</a> (<a href="https://twitter.com/Iztok">@Iztok</a>). </p> <p>We will publish some more information about project in the following weeks.</p> </div> Mon, 05 Dec 2011 22:15:27 +0000 slashrsm 29 at https://janezurevc.name Survey about satisfaction with Scrum https://janezurevc.name/survey-about-satisfaction-scrum <span>Survey about satisfaction with Scrum</span> <span><span lang="" about="https://janezurevc.name/users/slashrsm" typeof="schema:Person" property="schema:name" datatype="" xml:lang="">slashrsm</span></span> <span>Fri, 18.11.2011 - 23:30</span> <div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"><p>I am currently working on my bachelor thesis at Faculty of Computer and Information Science in Ljubljana. The topic of my thesis is implementation of Scrum methodology in a webdev department of the biggest national daily newspaper company, <a href="https://www.delo.si">Delo</a>. </p> <p>I would like to compare my conclusions about it's strengths, weaknesses and challenges in implementing the Scrum methodology in real environment with the opinions of people who faced this method in their professional career. I therefore kindly ask you to <a href="https://www.surveymonkey.com/s/RFFTRML">participate in the survey</a>, which will take you about 10 minutes.</p> <p>I will share my conclusions here. Thank you for your time!</p> </div> Fri, 18 Nov 2011 22:30:00 +0000 slashrsm 28 at https://janezurevc.name