Category: PHP

JAVA : Statistics Class

Another name for it would be Counter class.

How many times you did this ?

int databaseUpdateCounter=0;
.
{
.
     databaseUpdateCounter++;
.
}
.
.
System.out.println( "databaseUpdateCounter"+ databaseUpdateCounter);

you only need to follow up on the count of a certain operation.

And then you needed to count something else, and kept on adding counterVariables ?!

Read more »

Helping out with Egyptian elections 2011

Egypt is experiencing its first free elections since decades.

Egyptian Symbol

Egyptian Coat of arms

And I have decided to test if the web technologies practiced inside a secure enterprise network would also work in the real-Internet-world.

I got the permission to go ahead and use the API provided by the Egyptian government for the people to query their database for Election Locations, candidates  ,constituents and contests.

I got to learn a lot about the political map in Egypt and try to adapt my application quickly to different and shifting requirements.

I have made the following technical decisions:

  1. Use PHP and MYSQL . because that is the available platform I have
  2. Use the PHP framework Codeigniter . Which I have to admit, so far I’m enjoying that decision. Sometimes you feel there is a lack of documentation, but if you dig deep enough you will find your answers. anyway not bad for my first time.
  3. For Ajax and JS, I’m using the Prototype Javascript library. I have used JQuery before, but I had to go with Prototype because there is an AJAX library already available with CodeIgniter.
So Far I’m not getting heavy traffic on the site (only 220 queries) so the real load-test has not been reached yet.
My biggest problem so far is Marketing for the website. Unless you are willing to spend some money, nothing could be done beyond telling you network on Facebook and twitter about the site.

Anyway that is my experience about the difference between Enterprise -web and real-web applictions.

Looking forward to hear your suggestions and rating.

Ah, the website I created is : http://eg.maksoft.ch

Web Development: Using WURFL to identify the Clients’s device

Sometimes in web-development, it is needed to identify the connecting device, if it is a mobile phone, a tablet or a normal desktop browser.

This is possible by inspecting the HTTP_USER_AGENT parameter -part of the HTTP header- which has some information about the client’s browser, connecting device and operating system.

Anyway; the HTTP_USER_AGENT parameter is a mess, there are no specifications about how the browser should formulate the HTTP_USER_AGENT string and you can never tell from the string signature the supported features on the connecting device. Sometimes it is needed to know if  the connecting device support HTML5 and J2ME? , does this device have a QWERTY keyboard …etc.

Read more »

Use XAMPP and Knowledgeroot to build your own knowledge base

Have you ever found yourself in the following situations:

– You find a great tip on the internet or in an email and you know that if you don’t record it somewhere right now, you will loose it.

– You get a certain Error message, and you know this is not the first time you had it.  You just know you have solved this error like a year ago, but you just don’t know where to look for for the solution you found before.

If you have Iron-bullet-proof memory, you don’t need to read any further.

Read more »