Rafał Wrzeszcz - Wrzasq.pl

JSON-RPC services with pl.chilldev.commons

Saturday, 16 May 2015, 23:03

Yesterday a new version of pl.chilldev.commons (0.0.3) introduced a completely new component - pl.chilldev.commons:commons-jsonrpc. It is designed to ease building JSON-RPC services. It glues Apache MINA networking library with JSON-RPC 2.0 Base library. Thanks for using MINA, unlike most of the other JSON-RPC libraries, services are using plain TCP layer, without any envelope like HTTP. This gives possibility for making them more robust and efficient - client can use one connection session to interact asynchronously with the server with multiple parallel requests.

Tags: JSON-RPC, Code, Tutorial, ChillDev, Java

» Komentarze

ChillDev-Facelets - various Spring-based Facelets handlers

Wednesday, 12 November 2014, 22:27

Digging more and more into Java and building more and more apps with Spring I began to discover more and more technologies. One of my, probably key, decisions was to use Facelets as a view technology. Seems to be quite simple, but it isn't so - first of all Spring has a very limited integration possibilities for Facelets views; secondly Facelets are based on a different concepts than classic view templating engines like JSP, Velocity etc.; and finally Facelets are strictly designed for JSF framework so some of core features depend on it. But it's not impossible! Basic integration with Facelets is provided by Spring itself by variable resolver class that resolves Facelets variables by using Spring beans. Even better integration is possible by using Spring Web Flow which provides view resolver. What is missing is the integration of many core components, which are available in JSP tags. I began to create taglibs to fill missing gaps.

Tags: XHTML, Web, Forms, Spring, Tutorial, ChillDev, Java, Facelets

» Komentarze

Symfony2 your way

Sunday, 29 June 2014, 23:01

Last Friday, on Tech Fusion (a tech meetup in Szczecin, Poland), I had a talk about using Symfony2 to build own applications. The main purpose of it was to present various ways in which this flexible framework can be adapted to the needs of your application (without doing dirty, nasty and ugly hacks). It's not a complete compendium - a form of a meetup restricted it to be a maximum of 30 minutes talk, to present essential solutions and aspects of this subject. If you missed it, don't worry! It's already available online on SlideShare.

Tags: Symfony, Web, Szczecin, Portfolio, Presentation, Kod, Tutorial, Meetup, PHP

» Komentarze

ChillDev-Web - web page model library for Java

Thursday, 12 June 2014, 20:49

Last time I'm trying to migrate more and more towards technologies different than PHP, which I always found primitive and messed-up, but was skilled enought to do some fancy stuff with it. Even though I often play with different technologies and languages, I always liked Java and I'm moving more and more into it with my projects. For me, especially after years of PHP development, the biggest disadvantage is lack of many presentation-related features in JSP layer and MVC frameworks. I've decided to spend sime time trying my skills and reminding myself a bit of Java with creating library for JSP presentation technology that would help managing page meta-data. Basically is an attempt to port ChillDevViewHelpersBundle, my Symfony2 bundle, for Java/Spring.

Tags: XHTML, Web, Spring, SEO, JSP, Tutorial, ChillDev, Java

» Komentarze

ChillDev-Commons Java library

Saturday, 05 April 2014, 15:43

Last time I'm playing more and more with Java. And like always some parts of project I'm working on were absolutely generic. As an enthusiast of technologry and open-source I decided to publish them as ChillDev-Commons - losely coupled general-purpose routines library for Java. There is no particular idea about them, just released those classes that are completely generic and can be used by anyone - maybe they will be helpful. Hopefuly project will grow a little in future.

Tags: Code, Tutorial, ChillDev, Java

» Komentarze

ChillDevSpintax library - objective PHP library for spintax texts

Friday, 24 January 2014, 21:03

I'm working right now on a SEO tool and a must-have feature for such tools is support for spintax texts. It's a really common requirement so I though that there are planty of libraries for PHP to work with it. To my surprise I've hardly found any code snippet, not even a "complete" libraries and what's more most of them was… let's say it straight - crappy. Especially that project I'm working on requires a little more then just generating random texts, I need to remember and exclude already generated combinations etc. I had no other way than developing own library to deal with it, but since it's a completely stand-alone solution I decided to publish it as open source project - ChillDevSpintax library.

Tags: Web, SEO, Code, Tutorial, Spintax, ChillDev, PHP

» Komentarze

Symfony2 - creating adapter-dependent sub-forms

Wednesday, 11 September 2013, 19:04

I think this is quite commonly needed feature - form structure that vary depending on some other field(s). The project, on which I'm currently working, is integrated with a lot of external APIs which usually require additional per-user options for each of them. It's a SEO tool and - to pick an example - provides various indexing services integration. Some of them require API key, some require login and password, some specify different URLs. So for each of them form structure can differ. Of course you could use some conditions to pick correct structure, but it's not enough - form needs to change together with selected option. There are some partial tutorials on the web how to alternate form based on events, but it's just one part of the solution - here is more complex one.

Tags: Symfony, Forms, Code, Tutorial, PHP

» Komentarze

ChillDevProxyTemplatingBundle - make your vendor bundle independent on templating engine

Saturday, 30 March 2013, 15:19

When working on ChillDevFileManagerBunde I faced a problem of implementing template engine switch to allow using it in systems that maybe use different templating engine then bundle was created for. Some common vendor bundles (like FOSUserBundle) try to provide such feature by manually creating template references in actions depending on their bundle configuration parameters. I know most Symfony 2 projects use Twig, but (as you maybe know already) I don't like it and use plain PHP templates. And that's not all - Symfony-based projects can use other templating engines, like Smarty for example. Vendor bundles should be possible to use in your system regardless of templating engine you use.

Tags: Symfony, Tutorial, ChillDev, Bundle, PHP

» Komentarze

ChillDevFileManagerBundle - Filemanager frontend bundle for Symfony 2

Tuesday, 25 December 2012, 23:33

In my old projects I often needed direct file operations to change something in system. The easiest way is to do that from shell, or through SFTP, but on many shared hostings there is no way to do that. Using FTP on the other hand is not very handy on mobile devices. Because of that I implemented web-based filemanager features in them. Now all my Symfony 2 projects run on dedicated servers and most things are handled at build and deploy time, but from time to time I miss some of these featues. I thought there must be some kind of filemanager for Symfony 2 since it looked like a quite generic part of system. But there wasn't… until now (well, maybe not yet, but starting to be). I've published ChillDevFileManagerBundle - this is currently just a stub with a very limited features, but will of course grow to become (hopefuly) real filemanager that works out -of-the-box with your Symfony 2 installation.

Tags: Symfony, Filesystem, Tutorial, ChillDev, Bundle, PHP

» Komentarze

ChillDevViewHelpersBundle - PHP templating helpers for Symfony 2

Thursday, 15 November 2012, 10:33

To keep my projects up-to-date some time ago I've chosen Symfony 2 as a base framework to replace outdated Zend Framework (version 1 is old and far behind moder web and version 2 development is far behind Symfony's and the new ZF2 is bloated and messed up). Symfony 2 is a great framework, but there is one thing that I can't understand - why the hell use Twig!? For years people were migrating from engines like Smarty to plain PHP views/templates yelling that templating engines for PHP are stupid idea; and I fully support this thesis. PHP is a great templating engine by default, this is what PHP was created for at it's basic purpose: it's not like Python or Java where you need to send output explicitely - this is the sole feature in case of PHP. Why bloat it with additional templating layer? I personally consider Twig as a step backward and stay with plain-PHP templates. Unfortunately people followed Twig-based conventions and if you want to use PHP renderer you need to do many things on your own - most of popular bundles comes only with extensions for Twig, but not with helpers for PHP rendering engine. This is where ChillDevViewHelpersBundle comes in! It is set of basic helpers for PHP-based templates (hope to extend it in future of course).

Tags: Symfony, XHTML, Tutorial, ChillDev, Bundle, PHP

» Komentarze