Spiga

‘ Web Aplications ’ category archive

Automated Model-Based Testing of Web Applications

November 23, 08 by Gabi Solomon

If you are a developer than you are well aware of the importance of testing your applications, and i dont mean testing it your self since that is really not going to be very helpful beyond the development stage.

Since you ( or your team ) have build this application you will not be tester, since you already know how the application will perform. The best thing to do is to do a test with more subjects, of all knowledge levels if possible and give them a series of events and tasks to perform to see how the application handles and how easy it is for them to perform those tasks.

I found that in all test groups there is always a “bird brain” (as the speaker in the presentation reffered to it) that will execute a series of actions that will crash your application (usually things you havent thought of anybody doing). Although some developers hate those type of testers ( how the F did you managed to get there) i like them. At my old job i used to have a secretary that would find any bug i might have overlooked in a matter of minutes, just by clicking around :) ).

Anyway, the point i was trying to make ( beside the fact that testing is important ) is that human driven tests although very creative at times, have a few limitations and will not managed to test the full amount of possibilities. And above this will take quite a few resources ( human and financially ) to execute this tests, and they cant be reused if the application changes.

So there are some really smart persons that are looking into making an automated system for testing web applications. Some the research in this field are also done by microsoft ( this is a small inside info for all those microsoft haters :-P ).

I am not going to go into much more details and let you watch the presentation.
Enjoy.

How do you schedule your meetings ?

November 16, 08 by Gabi Solomon

Although i have a major in engineering and it is sead that engeeners are organized people,  i guess i dont follow that rule since i am quite disorganized and i have to use varius tools to keep me organized and not forget meetings and deadlines.

tungle Until now i have been using google calendar and am really happy with it. But recently i found a new service that i think took online calendars to a whole new level. It is called Tungle.

It enables you yo quickly and easily share availabilities with other people no matter what calendar software do they use. So to schedule a meeting you can select a time frame ( for example monday from 2 pm to 6pm ) and they can chose one in that time frame. This works also if you have to invite multiple persons. Responses can be made online (either from the computer browser or a smart phone) really easy, no registration nedded from the person you invite.

Also if you book an invitation in that time-frame, it will be updated automaticly so no more double booking.

Also it can import calenders from iCal, Google Calendar or even Outlook. And if your not convinced … here’s another reason … its FREE

I really like this service, and think this is a gold mine for sales persons, executives and anybody that schedules a lot of meetings.
If you want to understand better how it works you can checkout the demo video below.

cheers.

Want to build an application to update all major social services ?

July 24, 08 by Gabi Solomon

As social networks seem to get bigger and bigger and new ways of online communication spring up, people get more and more caught up into updating their accounts on various networks.

So wheres there’s a need there’s an application :) .

As i was talking a few days ago a new service has been borne a few months ago called ping.fm that allows users to update their services all from one place. Well today i stumble upon a class on phpclasses.org called Ping.FM Wrapper that can be used to update multiple social networks using the Ping.FM API.

It accesses the Ping.FM Web services API server and can perform several operations to update social networks of a given user. It can for instance post messages or the user status, retrieve received messages, etc..

I guess this will make the life of developers required to do an application that will update social networks a whole lot easyer. :)

Cheers

An easy way to make and share panorama images

July 16, 08 by Gabi Solomon

I have always been a fan of photography and recently i started to get into mountain trekking, so put those to together and you get panorama photography :) ). But the problem with panorama photography is that its no fun unless you can share it with friends, and sending large files and scrolling in the preview window is not so fun. Not to talk about finding good stitching software, that is also free is almost impossible. 

Well today i found a solution for both problems. 

CleVR offers a possible solution with a free, embeddable Flash viewer for panorama photographs. Not only this but it offers the means to stitch photograph together either in the old javascript editor or in the new adobe air application.

Below there is a demonstration, which features my first trekking panorama :) .

You will have to zoom out a little bit to get a better overall picture.

Panorama of Vf. Toaca ( 1800m ) on CleVR.com

Free online billing solution for freelancers

July 15, 08 by Gabi Solomon

i dont know about you guys but i am very disorganized and i tend to forget billing my clients, or i remember they have an unpaid bill but cant remember what was it for. So i was always searching for means to organize my billing, to add bills, to keep track of what bills have not been paid, and maybe even to automatically notify my clients of their bill. Well i know there are a lot of software that can do that, but i had 2 more requirements – online and free – that prove to narrow those solutions to just a few, witch for various reason were not to my liking. 

Today i managed to stumble upon curdbee.com that seems to do the trick for me. 

CurdBee is a safe and secure web-based billing application from Vesess. Use it to send clients invoices and then collect payments via PayPal or Google Checkout, all with just a few clicks of your mouse. It’s so simple, you won’t believe it till you see it.

cudbee front end

Allows Branding

CurdBee allows you to easily customise your invoices to include your logo and corporate colours. It evens allows you to have a custom URL for your application. something like : http://username.CurdBee.com
CurdBee branding

Easy user friendly interface

It is very easy to use and you can add clients and invoices in just a few clicks. And even allows to send invoices directly to your customers’ inboxes .
curdbee send incoices

Accept Payment online

And the most important part of your freelance work :) ) – payment.
It allows you to Accept secure payments online with Google Checkout and PayPal, or opt to be paid offline.
curdbee payment

In the words of Bugs Bunny – That is all folks.
Hope you enjoy this applications as much as i do and await to see your thoughts in the comment sections below :)

Cheers.

How to check if a yahoo user exits using php

June 22, 08 by Gabi Solomon

On a recent project i had to find a way to test if a yahoo user account entered by the user is real or not. The purpose of this was to not create unnecessary load on the server for an id that wasn't real. So i went to the yahoo registration form and looked on how do they check it.

In that form the access this address if i test my id :

https://edit.yahoo.com/reg_json?PartnerName=yahoo_default&AccountID=solomongaby@yahoo.com&ApiName=ValidateFields

There were a few other get parameters but i strip them out, since they didnt seem to add any more value, and the result was the same. If the account you entered ( solomongaby@yahoo.com in this case ) is a valid one the result will be :

HTML:
  1. {
  2.   "ResultCode":"PERMANENT_FAILURE",
  3.   "SuggestedIDList": ["infostud_ro79@yahoo.com",  "infostud_ro12@yahoo.com",  "infostud_ro89@yahoo.com"], 
  4.    "SuggestedDBIDList":["infostud_ro33@rocketmail.com","infostud_ro38@ymail.com"],
  5.    "ErrorList":[{"ErrorCode":"100000","ErrorField":"AccountID"}]
  6. }

As you see the result already has the recomandation into it. If you try to run the same request for an id that doenst exist like solomongaby12382109 you would get this result:

HTML:
  1. {"ResultCode":"SUCCESS"}

Based on this i wrote a small php function :

PHP:
  1. $check = file_get_contents('https://edit.yahoo.com/reg_json?PartnerName=yahoo_default&AccountID='.$this->id_name.'@yahoo.com&ApiName=ValidateFields');
  2.         if ( strpos($check,'SUCCESS')===false ) return true;
  3.         else return false;

Hope this has helped you.
Cheers

Oscommerce Quick Checkout

June 20, 08 by Gabi Solomon

Since you are here you probably want to make your oscommerce checkout process shorter and faster, right?

Well first lets look and the standard checkout procedure in oscommerce 2.2 Millstone:

Step 1. Login or create account choice page
Step 2. Create Account Page
Step 3. Account created confirmation page
Step 4. Shipping choice page
Step 5. Payment choice page
Step 6. Order overview and confirmation order page
Step 7. Thanks for order page.

To shorten this 7 steps procedure there are a few paths/modification you can make.

1. Combined Login and Checkout Page

Combined login and create account page reducing 2 steps.
Simple mod which gives you a login box on top of your create account page. Pre-modded files and screenshot included in the package.

2. Purchase without an account (PWA)

Allow your customers to choose the three following options at checkout time:
1)Proceed Directly to Checkout (no account creation)
2)Create a New Account
3)Login to Existing Account

3. Fast and easy checkout (FEC)

Fast and easy checkout combines the checkout shipping and payment pages in one
combines login and create account to one page and adds checkout without account capability to it.

4. Alternative Purchase System v2.0

Alternative Checkout System that able to change regular checkout process to something more easy and more short with this System your buyers will able to do purchase by couple clicks.

For test go:http://www.procreator.info and then Test Shop

5. More Logical Checkout v1.0

This mod streamline the checkout process with an aim to make it more logical it also removes 2 steps from the checkout procedure by skipping the login/create account page and going straight to create account info page and by removing the create account success page.

Hope you find what your looking for.

Cheers

Easiest Way to Secure your WordPress Admin

June 08, 08 by Gabi Solomon

Recently i have had my blog hacked.
Somebody broke in and change the admin user account password and email adress. So this let me completely out. Well not quite, i could still get in by modifying the admin details directly in the database.

This incident made me search for more details about securing your wordpress blog. Although there are lot of ways to secure your wordpress Administration Panel like .htaccess blocking, using SSL or Banning Ips, most of them are a little complicated and require some little knowledge to implement. But during my search i came across a small tip that is going to make your administration panel a little harder to hack.

The Trick is changing the administrator username. The default installation name is admin, this make the hacker jobs more easy since the already know the username, they just need to guess the password. So by simple changing the username from the default admin to something different you will make the hacker job a little harder.

To do this you need to login into your PhpMyAdmin and browse to the table wp_users and edit the entry of your username and change username from admin to any other username ( make sure it is not already used by another user ). It is recomended that the username is not a dictionary name, since that will make it easier to break.

Hope this information helped you, and i await your comments.

Cheers

Extracting text from Word Documents in PHP with COM objects

May 29, 08 by Gabi Solomon

dont know if you know but i have a pet project called infostud.ro that is a university teacher grading website. It also has a students essay section where members can download various essay and papers written by other members for there inspiration with there own projects. Almost all those papers are in the word format. In the hope to help them i wanted to have a description of each file so they can preview some of the contents of the files before downloading it, so they know if its going to help them or not. Until recently that description was entered manually by the users, but i decided to give them a hand and make php read the files and have the first X characters from the file as the description.

So i start googling for ways to read the word files, since simple opening the file would return a buch of strange code. On my browsing in the past i remembered reading something about COM objects and how you can read word documents with it.

As i discovered COM ( Component Object Model ) is a interface standard for software componentry introduced by Microsoft. Sounds pretty fancy, but what that means is that using COM objects any other application can communicate with any Microsoft application ( Word, Excel, IE ) and perform various commands as if a user would use it.

Now that i knew what i was looking for, i started to look for documentation on how i could use a COM object in php to open a word document. Even if i thought i would have to read tons of documentation, turns out that using a com object is pretty straight forward.

For my needs i actulay found to ways of reading the text from a word document.

The first way was to convert the word document to a TXT file.

PHP:
  1. $filename="file.doc";
  2. $TXTfilename = $filename . ".txt";
  3.  
  4. $word = new COM("word.application") or die("Unable to instantiate Word object");
  5. $word->Documents->Open($filename);
  6.  
  7. // the '2' parameter specifies saving in txt format
  8. $word->Documents[1]->SaveAs($TXTfilename ,2);
  9. $word->Documents[1]->Close(false);
  10. $word->Quit();
  11. $word->Release();
  12. $word = NULL;
  13. unset($word);
  14.  
  15. $content = file_get_contents($TXTfilename);
  16. unlink($TXTfilename);

Although this method worked pretty good, as i was about to close the google found pages i saw a different approach to the problem that i liked more then the above ( ans showed me new COM commands - i couldnt find a list of it anywhere )

PHP:
  1. $word = new COM("word.application") or die ("Could not initialise MS Word object.");
  2. $word->Documents->Open(realpath("Sample.doc"));
  3.  
  4. // Extract content.
  5. $content = (string) $word->ActiveDocument->Content;
  6.  
  7. echo $content;
  8.  
  9. $word->ActiveDocument->Close(false);
  10.  
  11. $word->Quit();
  12. $word = null;
  13. unset($word);

As the author points out here this uses a small trick, if you would check $word->ActiveDocument->Contentyou would find that it is an empty object (variant). If you assign the value to a variable you’ll get an empty string, as the variant object has no real __toString(). The workaround in PHP is to explicitly type cast the value as a string and make PHP/COM take care of finding the real value.

As a last pointer, if you look at the script you would see the 3 last commands that are meant to destroy any the COM object and release the memory taken by it, since it takes about 10-15MB upon initialization because it opens a full instance of WINWORD.exe.

So, in just ten lines of code you can get the text out of an MS Word document, easy as ever!

Hope this helped you,

Cheers

Fatal error: Maximum execution time exceeded in /wp-includes/streams.php

May 25, 08 by Gabi Solomon

Recently i started to do some cleaning on my blog, and added and removed some plugins. At one point i starting getting the error:

Fatal error: Maximum execution time exceeded in /wp-includes/streams.php

At first i tought it has something to do with the plugins i just added, or the multi-language plugin ( wich i disabled later on, and moved my romanian posts to gabrielsolomon.ro ). So i started to do some googling and discovered it was not to do with the plugins but it was a bug in the version 2.5 of wordpress.
Which kind of made sense since i recently upgraded to it ... and have not encountered this error before.

It seems it is caused by the WPLANG setting in the wordpress wp-config.php file.
So if you have setup the file like this :

// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', 'ro');

Then you need to remove the language like so :

define ('WPLANG', '');

That seem to do the trick for me, and the error stop showing up.

Hope this article saved you some googling time and invite you to comment if you encountered a similar problem or have a better solution.