Category: Business

Why I choose CLI over web interface

Yesterday I was working on a piece of code which needs to communicate with beanstalkd server, so I spent about an hour or so trying to figure out which framework to use, Lumen, Slim or even Laravel.

The code was not that much complicated, just getting some data and passing it to the queue server and processing it later. Nothing that much complicated, I even though to do it with plain PHP and not use any framework at all.

Long story short, I ended up creating a PHP CLI application, I mean literally I found it the best solution, so why did I choose to go with CLI instead of any regular web application and make it a web app or even a RESTFUL app.

I went with CLI for few reasons :

  1. There is no interaction from outside, so no one will communicate with it or even call it from outside the server
  2. It has only one purpose, getting the data and push them to the queue server to be processed later.
  3. needed it to be light, and simple.
  4. didnt need all this mambo jambo of setting up nginx, PHP & SSL .. etc

And the nice thing is that I was able to do it in less time than if I ever wanted to use a framework.


so my advice to you, if you are going to work with microservices try to check if you can do the job via CLI, if yes dont do it via web.



Alert! As usual, English is not my first language so if you found any linguistic error just let me know to fix. thanks in advanced.
Filed under: Business, Code, Linux, PHP

What am doing and Why am not blogging that much

Okay, so basically I have few Ideas which I want to work on, some have been already in my head just needed the time, some just got into my head, so for sure I’ll work with what I already have.

So far I have got the domains, I do know where am going to host them :cough: Scaleway :cough:, and I already contacted one of the companies and got their permission to use their logo. But now am in the phase where I need to design the website and do all the HTML before I move on to the main part, and to accomplish this am going to start learning Sketchapp, HTML part is not the issue, designing the site & having the nice layout is.

So my first project which am going to work on, is not going to be a startup nor has any business relation, but it will be technical and the plan is to release it for free but with the ability for anyone to donate if they like using bitcoin, and yes am ready to take e-money not regular money, for many reasons I don’t think this post is the one which I’ll talk about it.

Wish me luck everyone, and I hope to see you joining the project once I lunch it.

Filed under: Business, Nginx, Other, Video

How to test and auto deploy your laravel code from Gitlab

Few days ago, I was playing with the new Laravel 5.4 and Gitlab CI, and got to the point where I wanted the CI to test my code once I push it.

Using google lead me to this post on Laracasts, and it was the starting point for me, there you can get important files .gitlab-ci.yml and  , basically the first one will define the stages for the testing and the second one will build the environment for your test.

So lets look at a short version of .gitlab-ci.yml

Continue reading

Filed under: Business, Code, docker, Laravel, Linux, MySQL, PHP

When to ask for Investments

First of all and before I say anything, I just want to take you in a small trip back in time where we (me and Hala) lunched our start-up Msrofi .

At that time everyone thought it was a good idea, but we forget one important things that nice ideas need money. So few years later we had to close the project and even when we tried to get investors to invest in the project ( in 2013 ) they though its not ready yet.

Now lets talk about Investors and do we really need them, In my opinion if you have a good amount of money which will let you create a stable business and valuable product then try to stay away from Investors, dont try to go to them let them come to you, and when I say a stable business I mean:

  1. Good and talented technical team.
  2. Good money income which cover some of your expenses, or lets say a stable money flow.
  3. Good plan for a steady growth.

Continue reading

Filed under: Business