Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
Sometimes a feature that I want to create for my laravel application already exists as a package.
It is easy to install them, but I am worried about their impact on the application performance.
What should I consider when choosing whether to install a package or develop a feature by myself?
It's personal preference at the end of the day.
Some packages are well written, optimized and maintained and this gives you so many benefits:
Reduced maintainence cost (i.e. you aren't 100% responsible for fixing the package code)
Decreased development time (i.e. you don't have to write it)
Increased functionality (i.e. they may have features you hadn't even thought of)
Other packages are poorly written, un-optimized and in some cases obsolete. These can have the opposite effect:
Increased maintainence cost (i.e. the author isn't neccesarily going to fix an issue)
Increased development time (i.e. you will probably have to learn their code base and fix issues yourself)
My advice would be to make sure that if it's a well respected author/company and their code base is activily being worked on (check github / npm / etc), then using the package will likely save you time and hassle in the long run.
You aren't likely to see any massive performance degredation by using composer packages over writing it yourself!
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
I am looking for a solution for code management in the company.
We have a lot of projects that we work on on a daily basis. And sometimes two developers are required to work on the same project simultaneously.
An optimal situation for us is that each developer will have his local environment. And when he updates his code, the changes will be updated by all developers automatically.
And so virtually all developers will have the constantly updated version.
The problem with GIT is that the upload/download has to be manual, so the developer may forget to download a version.
We work in a PC environment.
Please, inspire me :)
My employer had this same problem, and came to the conclusion that there is only one way to handle it:
Teach your developers to use git properly. Ideally, teach them some kind of system for branching and merging, such as git-flow or GitLab Flow.
Some git tools can help you by automatically querying the server every 10 minutes to see if someone else has pushed new commits and prompt you to download them. (I think VSCode has this feature, but I don't remember for sure. Personally, I use SmartGit which also has this feature.)
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm looking at update codebase I'm working with from PHP5 to PHP7 when PHP7 reaches full release (largely due to the fact the speed gains and the ?? operator could really help our site).
As there are deprecated functions, and some things that are altered between the versions, I'm considering using filemtime on php files before including them to see if I should include functions that will modify php7's behavior to act a bit more like php5 in regards to those files. Although this will work on the existing server, I know various copy methods (some down the pipeline that it will be hard to control) will likely change the modified date as files are copied.
Is there a method for determining which php version a file is written with or compatible with and interpreting them appropriately, or is this hacky and risky solution really my best bet?
On solution I see was inspired while hunting for solutions here: link
In short...
create two different localhost servers
set each localhost to link to a different version of php
write code afterwards that pulls from the old code as if it were pulling from a different server.
steadily migrate files from old to new version of php after initial migration.
As a result, instead of having to migrate the entire codebase, it can be migrated a chunk at a time, without having to do all-or-nothing all-at-once. It also should be more durable than the filemtime solution. The downside is that it makes it harder to immediately integrate old code into new code.
Still interested in better solutions, but at least it's a solution.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I recently analysed performance differences of two test PHP scripts by running them on various combinations of Apache / NGinx / HHVM / ReactPHP.
My question now is if there is an expected performance difference between a PHP script executed on HHVM and the (as much as possible) identical script implemented in Hack (and executed on HHVM)?
Has anyone tried this?
According to a comment on the HHVM blog, as of April 2014 there is no runtime difference due to the types being erased at runtime.
However, once that changes you should be able to expect a small performance increase, considering that HHVM is optimized for Hack, and that static typing is generally faster than dynamic typing.
And a little bit of background:
HHVM had to be developed from the ground up, and is still relatively new. Facebook's codebase was originally in PHP, and moved to Hack as they had time to recode. They are focusing on improving the runtime as a whole, and this is (comparatively) a very minor area of improvement. The change would only affect Hack, so I expect they will delay that until they are running low on other, larger improvements
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
We are building a new PHP project, and we heard of the new HHVM, we wanted to deploy our application on it, but we are not sure if it is ready for production environments or not?
We have a laravel 4 application with MySQL and MongoDB as the databases.
Our application is concerned alot about performance and speed of requests because it is a financial application.
Is HHVM production ready ? if it is not and we should wait, how easy will it be to migrate to it after we are live when it becomes production ready, will it break our code? and most of all will PHP be on HHVM for a good while after hack is in town ? is there any live examples of it (other than FB)?, We really like HHVMs performance, but we can't risk the whole project goin down after production.
I do not risk moving my current project to it yet, but I plan to enable CI-tests using HHVM (parallel to usual PHP-5.5 tests) really soon. This way I will know when the project is compatible and plan transition
My opinion:
I simply don't trust such a new one (Hack) and can't risk until it's become available or accepted by the community. It's not sure whether it'll gain trust or not. You are going to reduce the support for your project if you need any during the development, not enough resources and fellow developers, AFAIK.
I think, It's risky and you should think again about it. An article about Hack.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a product in its base version, and some of my clients demands some modifications that cannot be handled by plugin structure as it's not additional feature - but heavily modified version of some of core features. The problem is that we could handle applying bug-fixes for lets say two or three clients but now it is quite hard to handle and remember to apply same code changes in various projects.
The questions is: Is there methodology explaining how to handle such a problem, and how software like GIT or other SCMs could help me with it.
it is quite hard to handle and remember to apply same code changes in various projects.
git is perfect in your case. You can branch for each client and do the core modifications in the branchs. When it comes to apply bug fixes to every branch, you can either cherry-pick (a cool git feature) or rebase (another cool git feature) for each branch.