Posted in
Examples, php code on
August 27th, 2010 by
sinica –
Be the first to comment Tags: code share, php
We have decided to switch the server-side of Quark Framework 2.0 to the php language. The main reason is that PHP is everywhere,many programmers (and even non programmers) can deal with it and we can be more agile with PHP than with java. Also the hosting costs for SaaS are lower with PHP. I did programming for more then 14 years in strongly typed languages like C,C++,Java,C#,Action Script and I hate that I don’t have types for parameters in php and I don’t like how strange is PHP occasionally (php references are unlike others in any decent language I’ve ever used, the insane and ugly $this-> is annoying etc ). I’m not a big fan of Php but for what we need it is a rational choice (Don’t forget the unit tests or you are doooomed
)
Anyway,PHP is serving us well and I’ve decided to share here a small php class that will act like a sort of reference to function members. A closure could solve sometimes the same problem (sort of) but it will not make the code clearer. And it will not work for calling members from another class/instance.
class FunctionRef
{
protected $mythis;
protected $myFunction;
public function __construct($mythis,$myFunction)
{
$this->mythis = $mythis;
$this->myFunction = $myFunction;
}
public function call()
{
$args = func_get_args();
call_user_func_array(array(&$this->mythis, $this->myFunction), $args);
}
}
If you know a better way on doing this in PHP, I will be glad to know.
Posted in
Business thoughts, Opinions on
August 27th, 2010 by
sinica –
Be the first to comment Tags: obfusc, php
I’ve recently received an email with this content:
hi
i am BLaCkViRuS
Your program Security is Very Low < ..link to a rapidshare download page>
If you want we can work together and I have anti-cracking programs that you can do
Have a Nice Day !
He was talking about a program we sell at www.obfusc.com. It was not about security but about how strong the licensing is. That link was to a .exe file that was patching obfusc.exe and removed the licensing checks. Nice and friendly email,isn’t it?
In our backlog we have this sprint a story about introducing licensing for of our new product (SensErp based on Quark Framework) and it is a good moment to express my opinion on licensing and cracking:
- I don’t think that anybody in this world can create the perfect anti-cracking and 100% protection system for a code that will run on a computer where he doesn’t have full control (not having hardware under control)
- Having people creating cracks for your software it means that your software is good and you have market for it and there are people that love what are you are doing. I have received many e-mails from customers pleased by using Obfusc Php and that makes me proud and happy (and I make money also, not the salary of a senior programmer or a software manager but enough to consider Obfusc like a decent investment). Obfusc is a good piece of software but the market where it competes is too small for making me a millionaire :)
- I don’t think that the licensing system for a software should be very strong. It is better for me if somebody really desperate(out of money,etc) find a way to solve a problem using my software and not using other software or not solving their problem at all.
- I don’t think that people using such cracks do such a big business damage to a software producer. Somebody is very desperate if will run dubious .exe cracks on his computers at a risk of contacting viruses or other malicious piece of software on his computer. It is like having unprotected sex with a prostitute… some people will do it but they are not very smart if they take such risks.
- Some people are greedy,yes,but it is not my problem to solve this issue. Even God looks to have a difficult problem with greedy people
We will survive and flourish even if some people are unfairly using our software.
- People that are creating cracks for software and especially for software created by small companies (like Axiologic) are smart and highly skilled but are not decent persons: they don’t have any morale or ethical justifications for such actions. They will probably pay for it as other people will notice how they behave. They will probably loose opportunities for cooperation and they will not even notice that.
What was my answear to BLaCkViRuS ? Just that: Your offer to help is not acceptable.