Wrzasq.pl

Generator kodów kreskowych

Thursday, 16 June 2016, 10:47

Przy okazji tworzenia nowej oddsłony pewnego serwisu zetknąłem się z kolejnym nowym problemem - tworzeniem kodów kreskowych. Trzeba było napisać aplikację generującą takie kody. Do tej pory nigdy nie zajmowałem się ich tworzeniem, a jedynie obsługą od strony bazy danych - tworzylem programy ktore zarządzały wcześniej zczytanymi kodami. Tym razem musiałem je generować. Dla mnie była to nowość, ale jak zawsze w takich sytuacjach wyszukałem potrzebne mi informacje i specyfikacje i bazując na nich napisałem kod odpowiedzialny za te czarne paski. Niestety zauważyłem, że jest to kolejna problematyka, która nie jest raczej nigdzie poruszana, bo jedyne materiały jakie znalazłem to oficjalne standardyzacje kodów, a pozostałe znaleziska to zazwyczaj pytania na forach bez odpowiedzi. Dlatego postanowiłem się podzielić kolejną pigułką wiedzy i omówić tworzenie takich kodów z poziomu PHP przy użyciu biblioteki GD.

Tags: , , , , , ,

» Komentarze

CupSell.pl

Thursday, 16 June 2016, 10:47

Po bardzo długim etapie tworzenia wreszcie w formie przystępnej dla użytkownika został uruchomiony system CupSell.pl. O historii tworzenia tego serwisu moglibyśmy napisać książkę, a gdybyśmy założyli kanał RSS na nowinki o rozwoju to wszystcy zostaliby zaspamowani wiadomościami. Burzliwie przebiegał ten proces - wystarczy wspomnieć, że zanim w projekt zaangażował się cHeSteR to przewinęło się conajmniej 3 (jeśli dobrze liczę) grafików, a sama praca nad serwisem zaczęła się już kilka lat temu (sic!). Ale w końcu powstał i chyba ma się dobrze :). Oczywiście wciąż jest wiele do zrobienia, ale najprościej rzecz ujmując - działa!

Tags: , , , ,

» Komentarze

Przecinek, kropka i wykres w ImageMagick

Thursday, 16 June 2016, 10:47

Nie, nie chodzi o interpunkcję. Do projektu, który właśnie wykonuję potrzeba było dorobić generowanie wykresów. Projekt w PHP więc praktycznie miałem dwie możliwości: GD i ImageMagick. Już nieraz przekonałem się jakie ograniczenia ma biblioteka GD i o ogromnej przewadze nad nią tej drugiej dlatego bez chwili wahania zdecydowałem się użyć tejże. Nie jest w tym momencie ważne czego wykresy są generowane, gdyż sprawa, o której piszę jest tak kuriozalna, że przyćmi niewątpliwie każdą tematykę strony. Mianowicie chodzi o problem (bug?), który powoduje następujący rodzaj błędów:

Tags: , , , ,

» Komentarze

Symfony2 - global templating variables in PHP renderer with ChillDevViewHelpersBundle

Thursday, 16 June 2016, 10:47

Short time ago, while working on one of my projects i faced a problem with PHP templating engine in Symfony2 (again the same) - passing pre-defined variables to view renderer. For some reason it's not possible to define global variables for PHP templating engine. It is possible for Twig (with TwigBundle), but there is no equivalent of that for PHP. After googling for a moment and browsing some of Stack Overflow questions I ensured myself that it's not possible and that I'm not the only one who is looking for such a feature.

Tags: , , ,

» Komentarze

Symfony2 - creating adapter-dependent sub-forms

Thursday, 16 June 2016, 10:47

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: , , , ,

» Komentarze

Symfony2 - simple, yet useful tips

Thursday, 16 June 2016, 10:47

It's been a while since my last article and activity, as I was mainly concentrated on my private life and commercials projects, but even though my top commitment was updating projects dependencies on GitHub I also experimented with some different approaches for organising Symfony2 projects. I want to share some of my thoughts, so you may also benefit from using it or tell me why these ideas are stupid. I don't want to write here some obvious stuff like "write unit tests", "use Composer" etc. - you can read that in every single tutorial for Symfony2. Some of my tricks are plain simple but not obvious, some, on the other hand look strange, but saved my ass, so you can give them a try. Please excuse my a bit chaotic form (and content), but I'm writing this in my free time while commuting by train :P.

Tags: , , , ,

» Komentarze

Symfony2 your way

Thursday, 16 June 2016, 10:47

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: , , , , , , , ,

» Komentarze