Niezalogowany [ logowanie ]
Subskrybuj kanał ATOM Kanał ATOM

Autor wpisu: Łukasz, dodany: 05.09.2012 17:27, tagi: css, javascript

And this is a very interesting thing, that I found very recently. That’s called Zen Coding, and if you are irritated like me for writing html in editor, that’s tool for you. In short, you can write to your editor expression similar to what you use in work with CSS or jQuery:

div#header+(div#content>table>tr*3>td*5)+div#footer

And Zen Coding is changing it into pretty-looking HTML:

<div id="header"></div> <div id="content">     <table>         <tr>             <td></td>             <td></td>             <td></td>             <td></td>             <td></td>         </tr>         <tr>             <td></td>             <td></td>             <td></td>             <td></td>             <td></td>         </tr>         <tr>             <td></td>             <td></td>             <td></td>

Czytaj dalej tutaj (rozwija treść wpisu)
Czytaj dalej na blogu autora...

Autor wpisu: Łukasz, dodany: 04.09.2012 12:44, tagi: php, apache

I like Ubuntu, on which I was working with my projects for all last year, but this system is very good as server, espescially dev’s server. But, as a desktop for working, that’s not it for me. Never nothing was working as it should work, but for my sympathy for Ubuntu, I will not give you details ;) . Worst thing I faced was running a virtual machine with Photoshop ;) . Some days ago I changed my old laptop for newer model, so I decided to configure my working environment smarter, than until now.

On preinstalled Windows 7 I installed all, what I need for work. Editors, office tools, etc. Servers are handled by VirtualBox with Ubuntu 12. Configuration of Ubuntu itself, installation of mysql, Apache and PHP didn’t take long time – all that was needed was to run packet management application.

Next problem was visibility of host and virtual machine to each other. In option NAT, that was impossible. Next I tried “bridged” mode. That was also not best idea, computers were not seeing each other where host was not connected to network. Maybe it would not disturb in everyday work, but it was far away from ideal solution. Therefore, I tried to use “card of isolated network”(or something like that – my VirtualBox is in Polish). That’s it! I set manually IP and DNS on VM, so it has the same IP everytime (be carefult to use proper IP as a gate: we need IP that is used to connection with VM, in my case that was automatically given 192.168.137.1). And that was all. Pings are coming brilliant to both machines, and in browser I saw default web page of Apache.

Configuration of Samba (for need of sharing files – unfortunatelly sharing directories possible to do in VirtualBox didn’t work good – owner of directory mounted in that way was root and I was unable to change it in any way – that’s pity, very possible that it would work better) also wasn’t complicated. I created two shares of samba, for /var/www and for my home directory, and mounted it in Windows as network disks. For configuration I would recommend GSambad. You can of course edit configuration file manually, but – as I am not a no-life – I prefer simplier solutions. ;)

Why I did that, and not installed all on Windows? For this, that many libraries, and also PHP language, behave in another way on Linux and on Windows. And my applications are in 99% hosted on Linux hosts.

Autor wpisu: Tomasz Kowalczyk, dodany: 02.09.2012 20:19, tagi: mysql

Na pewno wpadliście kiedyś w pułapkę, w której podczas testowania wydajności / sposobu działania wpisaliście w okienko phpMyAdmina lub bezpośrednio w konsolę MySQLa nie do końca przemyślane zapytanie. Jeśli zawierało jakiś błąd składniowy, to sprawa jest prosta – na ekranie … #LINK#

Autor wpisu: Wojciech Sznapka, dodany: 02.09.2012 13:47, tagi: php, symfony

Everyone fall in love with Behat. It's powerfull tool for testing business requirements in PHP. Behat scenarios, written in cross-platform Gherkin language, are readable for developers, easy to understand and verify for business people and executable by machine, which goes through an application to prove that it works as expected. Behat scenarios are one of the best ways to describe system. UML Use Cases or tons of pages in SRS documents are fine, but hard to understand from the begining, and even harder to maintain in the future. Behat eases this process and also gives opportunity to automate requirements verification.

Autor wpisu: Łukasz Socha, dodany: 01.09.2012 21:32, tagi: css

pobierz w .pdf(przeznaczone do wydruku)

CSS 3 dostarcza wiele nowości, które z pewnością ułatwią i przyspieszą pracę nad atrakcyjnymi wizualnie projektami. Mimo, że CSS 3 jest jeszcze w fazie implementacji przez wszystkich najważniejszych producentów przeglądarek, warto powoli zaznajamiać się z możliwościami tej technologii ;)

Osobiście najbardziej nie lubię tworzyć wszelkiej maści formularzy. Nie dość, że trzeba napisać wiele linii kodu, to jeszcze istnieją ograniczenia technologiczne. Co nowego przynosi CSS 3 na tym polu?

Nowa wersja CSS „potrafi” rozróżniać różne typy pół formularza – zamiast pisać osobne klasy dla checkbox czy radio będziemy mogli napisać input[type=checkbox]. Prawda, że dużo lepiej tak wygląda? Poza tym, w końcu, będziemy mogli dowolnie edytować wygląd pól typu radio i checkbox bez utycia JavaScriptu – tak na marginesie, nie rozumiem czemu dopiero teraz deweloperzy umożliwią to. Inną przydatną nowością jest pseudoklasa :focus.

Żeby nie było tylko teoretycznie zamieszczam kod przykładowego formularza kontaktowego z wykorzystaniem CSS 3:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>...</title>
        <style type="text/css">
            body{
                font-family: Arial, sans-serif;
                font-size:14px;
                padding: 30px;
            }
            label{
                width:100px;
                display: inline-block;
            }
            input, textarea{
                margin: 5px 0;
                border:1px solid #BAE1FF;
                border-radius: 5px;
                -webkit-appearance: none;
                -moz-appearance: none;
                background-image: linear-gradient(top, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -o-linear-gradient(top, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -moz-linear-gradient(top, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -webkit-linear-gradient(top, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -ms-linear-gradient(top, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);

                background-image: -webkit-gradient(
                    linear,
                    left top,
                    left bottom,
                    color-stop(0, rgb(255,255,255)),
                    color-stop(1, rgb(226,242,252))
                    );
            }
            textarea{
                width:400px;
                height: 200px;
            }
            input[type=text] {
                width:150px;
                height: 26px;
                margin-left: 5px;
            }
            input:focus, textarea:focus, select:focus {
                outline-color: #0090FF;
                ackground-image: linear-gradient(bottom, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -o-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -moz-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -webkit-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);
                background-image: -ms-linear-gradient(bottom, rgb(255,255,255) 0%, rgb(226,242,252) 100%, rgb(57,101,133) 84%);

                background-image: -webkit-gradient(
                    linear,
                    left bottom,
                    left top,
                    color-stop(0, rgb(255,255,255)),
                    color-stop(1, rgb(226,242,252))
                    );
            }
            input[type=checkbox] {
                width:20px;
                height: 20px;
                border-radius: 2px;
                vertical-align: middle;
                margin-right: 5px;
            }
            input[type=checkbox]:checked {
                background: url('images/checkbox.png') center no-repeat;;
            }
            input[type=submit] {
                background: #0199FA;
                color: #ffffff;
                font-weight: bold;
                padding: 5px 15px;
            }
            input[type=reset] {
                background: #DEF3FF;
                color: #0784CE;
                font-weight: bold;
                padding: 5px 15px;
                margin-left: 10px;
            }
        </style>
    </head>
    <body>

        <form>
            <label for="name">Imię i nazwisko:</label>
            <input type="text" name="name" /><br />
            <label for="email">Adres e-mail:</label>
            <input type="text" name="email" /><br />
            <label for="message">Treść: </label><br />
            <textarea placeholder="Wpisz treść" name="message"></textarea><br/>
            <input type="checkbox" name="send"/> Wyślij kopię na mojego e-maila.<br />
            <input type="submit" value="Wyślij" /><input type="reset" value="Wyczyść" />
        </form>
    </body>
</html>

Jak to wygląda w praktyce możecie zobaczyć tutaj.

W połączeniu nowości CSS 3 z możliwościami Web forms 2, o którym pisałem opisujac HTML5, będziemy mieli naprawdę zaawansowane narzędzia do tworzenia formularzy. Pytanie tylko kiedy?

Wszystkie wpisy należą do ich twórców. PHP.pl nie ponosi odpowiedzialności za treść wpisów.