1. the easy way with playframework, the hard way with browsers!

    Two weeks ago i got an “urgent” request from my boss. They needed an application for the 27th National Congress of IT (Turkish > 27. Ulusal Bilişim Kurultayı) where they can get the Reports about who attended which session. I had only 4 days and it was 5 pm that means only 3 days left. I called a friend (@agaoglu) and asked if he could get a hand on this. We are working on a project called plevsy (Plus Event Systems) together. It is a Congress Management System.

    He came with the idea that we do it with playframework. Java? just for a couple of forms? I am coding for over 10 years now. I used mostly PHP on my web based projects. In the last couple of years with Django too. I even write CGI on the beginning. I know how Java works, but never done a project with it. It’s to complicated to run it. It’s just a couple of forms, thats all. I looked before at the playframework. On their site it seems simple as it can. So? “yep, why not!”

    After 2 days he build up the system and we meet at my place. We tested the data import from the barcode scanner. The main role was to register the participant, build a barcode for him and finally print his batch. So I got the barcode reader, but I don’t have a printer. It was a laser barcode reader, it couldn’t read from the screen :) As you can imagine we done nothing.

    Next day at work, I plugged a printer and tested the badge print out function. Our badge has a custom size so I wrote the style sheet for the print option. I gave the page size, width, height everything. As a result I had a blank badge. It wasn’t in the margin. As a developer I tried to fix it via the CSS and after a half day of research, rewrite of the styles I was still on the same step. It doesn’t work. Yes in the W3C CSS documentation it should be work. But the real life is different. I went to the easiest solution. Setup the printers for page size and the browsers print function. The best solution for this was to get the badge as pdf, but this will be done another day.

    Next day I set everything up, our server was running and plevsy with playframework with it. The client machines were ready to go. Get the printers tested and  I gave the users a 5 minute instruction how they use plevsy. The first attendees came to the desk and the registration progress began.

    I saw that on client computers that some problems occur. My friend (@agaoglu) wrote the code not IE friendly. What we got was, he wrote the search box, where they can search the name they have registered over the web, in html 5. HTML 5 ? We are talking about IE 6. So they had to click whit the mouse on the search button after they wrote the name in the search box. They couldn’t use the “Enter” key, because it didn’t work. You can say like him “so what?”. If you have one hundred people waiting before your desk every second is a life saver. Don’t forget that. Usability means that you do it for the user in the easy way and not in the hard way. You need to do it as simple as you can. 

    While we two developing on Linux machine we don’t have IE on it so we only test on Firefox, Chrome or Opera. We forgot often how IE works. I remembered this day IE ‘s bar with this “click to activate” thing. We had a couple of prompt boxes there and every time the user had to click on this “click to activate” thing and than come back to his keyboard to write it. So I disabled the prompt boxes. I make it hidden div’s and the speed gone up for the users.

    In the new attendee form there were the section of the Institution. So we can get later a report for this section. It was simple a select box of the list for previous entered Institutions and if it doesn’t exist a new Institution area. I saw that list grow and grow. The users gotta find the Institution from the list and it was time taking to do it. Mostly they entered it as new. So we used jquery and there will be a plugin for it! Of course it’s jquery. It builds from a select box a searchable list. That’s it another saved time in the process. 

    At the end, it deserves the name “play”. It was really an easy process to write it with play framework. The hit and go and the speed was unbelievable. I am waiting for a new project to use the play framework again. As a web developer and designer I can only say that finally you can use Java for web applications without a lot of pain. Thanks guys to make our lives easier.

    ps: sorry, it take a long time to publish this

     
    1. plevsy posted this