What do you use to document site procedures, infrastructure and code? [closed] - php

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 11 years ago.
Improve this question
I'm looking at http://www.phpdoc.org/, but wondering what you guys have found useful. I'm wanting something that will help document our code, but also procedures and tasks that are performed frequently on the site. What's the best solution for this in a linux/PHP/MySQL environment?

PHPDoc is the way to go.
You will have:
Self-generated documentation files;
Contextual function docs on the editors that support it (a lot of them);
An easy way to check if your documentation is up to date (you'll see the docblocks every time you use a function/method; DOCS folders are usually doomed to oblivion - you only look at them if you didn't work on a project for a while, and at that point they will almost automatically be obsolete);
Since I guess you will use docblocks anyway, it does not make huge amounts of sense to have to mantain a separate docs folder.

A DOCS folder you have under version control. For dashboard archiving, I find photos useful.

phpdoc is just for documenting code. It's not meant to document architecture. You can use UML for that.

Related

Looking for a plugin to create floor plan [closed]

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 am looking to create a website in which I want to give users an option to create the floor plan of their house. I am looking to replicate something like http://floorplanner.com/demo#assets .
I tried to do code it with jqueryui, but found it very hard as I am not a programmer by profession.
Is anyone aware of an open source plugin that I can use in my website to create a similar tool. I searched the net for same (javascript and flash plugins) but did not get what I was looking for. I am not looking for an ideal solution, rather anything that will make it easier for me to make a final product.
Thanks,
SY
Concerning Javascript/HTML5 approach, probably the best way to solve this problem nowadays would be to make use of some HTML5 canvas library like:
- http://www.kineticjs.com/
- http://fabricjs.com/
or SVG library like Raphael.js:
- http://raphaeljs.com/
However, this is a complex problem and you'll hardly make a good and scalable solution without deeper understanding of Javascript programming.
Take a look at a similar thread, might help you.
SVG/Canvas vs Flash for FloorPlanner app

Transitioning from Coldfusion to PHP [closed]

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 11 years ago.
Improve this question
I am getting ready to learn PHP. I am looking for advice from other ColdFusion developers out there who have made the transition. I'm also looking for a guide showing some tag equivalencies (fingers crossed). Thanks!
Not sure why you just accepted a terribly biased answer like Best solution: stick with ColdFusion or Railo :) from ColdFusion is just better.
However, if you are looking at an idea of commands I would say start by looking at some common string / functions in php by going through things that might matter to you like:
arrays (http://us.php.net/manual/en/function.array.php)
strings (http://us.php.net/manual/en/function.echo.php)
You could also look at some frameworks (MVC - similar to coldfusion MVC frameworks):
CodeIgniter (http://codeigniter.com)
CakePHP (http://cakephp.org/)
Hope that helps, rather than give a blatantly one sided answer.
There are large differences between CF & PHP however both are beginner friendly (from my perspective) and offer great documentation.

PHP Refactoring Tool [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Is there any PHP refactoring tool that would transform a huge noodle code to a proper function based one?
No, you can't do that automatized. Static analysis may reformat your code, eliminate bad practices or inform you about security vulnerabilities, but it can't turn your code into nice and clean OOP.
2019+ answer
Nowadays you can use a tool called Rector (I'm author of).
It uses nikic/php-parser, static analysis and node based rules. That means you can e.g. rename every case of function strlen to Nette\Utils\Strings::length().
Or basically anything you want to. Many rules are supported from in the core code (see Rector on Github), e.g. upgrade from PHP 5.2 throughout to 7.4.
But it can be configured to do what you want. It will take some thinking to determine how to detect what should be extracted and what not. If you can put the transformation into words as a human, it's possible to put that into PHP code so it will do everywhere in your code for you.
Zend Studio (for Eclipse) has support for refactoring code - it allows you to select a piece of code and extract functions/methods. For example:
It also allows for renaming of variables to further clean up your code. While this is not a fully automated solution, it will significantly help you clean up the mess. Hope this helps.

Suggestions on a good way to promote a free resource [closed]

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 12 years ago.
Improve this question
As a developer, I've learned a heck of a lot from the global community and I believe like any community, you need to participate and contribute.
I've worked on several small projects that I want to offer up for free, but I want them to actually be used.
For the sincerity of this post, I am not going to promote them here.
What are some good ways to offer a free resource like a widget that does x,y, and z, for free. With an honest-to-god intent to just contribute?
Assuming it's open source, add to freshmeat for example to help people find it.
Write really good documentation, with examples etc. There's load of code out there which is lacking documentation making it pretty useless no matter how good the code is.
Make it easy for people to report bugs, suggest features, etc.
make a screencast showing how you made the software - other programmers will watch the video and may in-turn blog about it
i'm sure you'll get better suggestions than that though, good luck

opensourcing a website code [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm writing a little website (webapp) in php+codeigniter, I'd really like to make it open source (to attract collaborators and to have a free VCS hosting).
Is that a good practice?
This mine security?
Which are the best tools to change important data before uploading? (like config files with db names and passwords used for testing etc..)
Is that a good practice? Will this mine security?
Yes, it can be a good practice. If your project is interesting and you think that is has potential for attracting contributors, and you are comfortable with your source code not being "your ownership", then this is a good move.
It has benefits, but of course it has its drawbacks. You'll get new ideas, you can learn much, you will have someone to talk to about the project and ideas, and with a bit of luck you can create a great team. You won't be alone doing the work. Your project may grow, and become important.
Any drawbacks? Well, the fact, as I mentioned, that your code is not your own property anymore. Then the fact that you will be forced to confrontation, and sometimes to arguments among the contributors: you will start a community, with all the related challenges. I think it is worth it, anyway. Then, for example, security. In the medium term, if you have contributors, your security will increase for sure, because more people will be looking at the code and can spot problems, and fix them. In the short term however, someone malicious may look into it and find a weak spot and use it. So you should have your code reviewed by some contributors first, with a private disclosure, before going fully open source.
Which are the best tools to change important data before uploading?
You should put all the important data into a single configuration file, which is client-dependent, and distribute a template for it. If this file is called "config.php", then EXCLUDE this file from the distribution, and distribute a "config-dist.php" file, with example values: at first installation, the user will fill the data, and they will stay there even if you update.

Categories