I'm a budding php developer and my company requires that I use Dreamweaver to check files in and out from the server. This is really the only feature of Dreamweaver that I like. It's super easy to get a fresh copy of a file from the server and keep track of who has a file etc. But as an IDE it leaves tons to be desired. Obviously I could use Dreamweaver to check out the files and then edit them in another tool, but I'd rather not. I can't be the first person to be in this situation, What should I be using? Ecplipse? NetBeans? has someone written a plugin for something for this?
Sounds like you need to look at a source control solution, such as Git.
Related
I am working on a project (already started), but I do not know if it is done with framework since there are files in many different folders, but I do not see any syntax referring to some framework that I know of.
I hope someone can help me...
Well it would depend on the Folder Hierarchies and the code.
If the views folder has the term "blade" on it, it's definitely laravel.
If the the code of the library has the term "CI Controller" somewhere in the libraries its definitely CodeIgniter.
If the code has a lot of "wp-" string in its code, its definitely Wordpress.
TIP: Put the whole folder in Sublime, search the folder (right click the folder and choose "Find in folder...") and search for terms that are generally reserved words for mostly used frameworks.
There are different methods to identify the PHP framework used by a web application. But one of the easiest way I would like to share it with you to use this extension in your browser called Wappalyzer.
Wappalyzer is a cross-platform utility that uncovers the technologies used on websites. It detects content management systems, e-commerce platforms, web frameworks, server software, analytics tools and many more.
There are a few other tools out there that analyze what a website is using.
BuiltWith - Stand alone site, also available as a plugin
W3Techs - Stand alone site, also available as a plugin
Auto-generated comments may also help. In my case, I can tell from the comments in index.php that it's written in CodeIgniter.
If you have a copy of the project hosted somewhere you can use https://builtwith.com
I have looked and looked all over to find a way to make something similar to PhpBB's automod system they use for their software.
I cannot seem to find anything similar to this with the whole xml find and replace code updater and mod installer.
I may just be typing in the wrong keywords in Google, but does anyone know of any system like this available before I start trying to make my own?
EDIT: I mean more like a code updater. For example find and replaces in a php file.
FIND:
?>
ADD BEFORE:
echo "this is text added before the ?>";
I realize this could be done with str_replace but there is surely a system out there that already does this reliably.
The reason that a system doesn't exist outside of phpBB is because it's an incredibly poor way to manage modifications. Your question does not make it clear what you want to gain from this, but since it is your own code, you should definitely not look to copy something so awful.
For “patching” code
If you want the ability to apply updates to your code, then you should look at handling it through version control. For instance, you could develop and test in a local git repository, and once you are happy, push the changes to the server. You have many options here from a basic update script to a fully-fledged Continuous Integration solution.
phpBB have implemented a solution for patching code on your live site via a Web interface, which has many issues with security, verifiability and maintainability among others.
For exposing “plugin” functionality
If you want the ability to register plugins in parts of your code, then you should architect your code as such to allow it to be handled easily. Wordpress, MediaWiki and other projects can help you write such a structure.
I'm developing a distributed environment, mostly in PHP.
A lot of the projects that I have share some of the same code. For example my logging code (based on log4php but with some custom additions).
I can just copy-paste this code in every project, but naturally, if I change anything in it I need to re-paste it everywhere and 'hope' it doesn't change anything.
Obviously not a good way.
Now, I was wondering: what is the best and simplest way of sharing this code?
I'm hoping there is something as easy as making your own private PEAR-like channel? Do people do this for this use case? Or is there an ever easier way? I rather not start with inter-dependent repositories etc. If it matters though, I use Mercurial for versioning.
Thanks all.
Perhaps the best way (I am using too) is to host the common code in a versioning system such as Git or Mercurial or SVN and checkout this code in each related project. As long such a project does not have updates you can continue to work on your common code. In the case you want to touch a project again that utilizes the common code, you need to perform a source code update or pull. Then you update your project sources according to the changes of the common source base.
What about include_path PHP directive?
Just add include_path, for example /usr/share/php5/
and include your file like yourfile.php from each project
Use Git or Mercurial for that. In both of them, you can create sub-modules or sub-repositories.
http://kernel.org/pub/software/scm/git/docs/git-submodule.html
https://www.mercurial-scm.org/wiki/Subrepository
I am building a Flash, jQuery, and PHP based project which I would like to subversion from the get go. I have experience using Dreamweaver CS5's sub versioning capabilities. So, as far as the PHP and jQuery (the non-flash portion) goes, I'm pretty comfortable.
However, I would like some recommendations on how to subversion the Flash portion. I know Flash Builder has SVN capabilities, however, the flash portion isn't going to function as and RIA, but more, if you will, like a game. As far as my experience with Flash goes, this type of project will work best if done in Flash Professional. Here are the options, as I see them:
find an extension for Flash Professional which will enable SVN. Is there one???
create a "Flash Professional Project" in Flash Builder, built it in Flash Professional, and subversion with Flash Builder.
place my project within a defined site in Dreamweaver, and subversion from Dreamweaver.
I would like to avoid something like Tortoise SVN, as I have had more difficulty with that than I am up for for now. :)
Does anyone have any suggestions, or pointers as to how I can handle this?
Thank you for your time.
Well, any SVN client can handle any kind of file - you don't have to have an extension built into each piece of software you're using. The best way to do this is to put all of your project files into a folder somewhere and then using whatever SVN client you want just add that whole folder to your repo. Does that make sense? The front-end that you're using is more or less irrelevant.
I don't really understand what you are saying about TortoiseSVN, but since you are using different IDE's I would recommend you to use TortoiseSVN as the uniform interface to SVN. And IMO, TortoiseSVN is simple and powerful.
Man up and use the command line ;). Why SVN? Yes, I personally prefer it but there are other great alternatives, have a think about GIT, Mercurial and others too. Mercurial/Git have massive benefits for single developer projects. The flash file will be versioned just like everything else in there. Remember to set your ignore files appropriately to cut out all the os specific poop.
Soon as you get yourself a good versioning repository set up, it doesn't really matter what client you use. I like the one bundled with netbeans / versions or the cli.
I just installed CodeIgniter, and it gave me the source code.
From what I understand, I should move the source code to my local server folder.
I did the configuration; but now what should I do next? What should I use to write code -- DreamWeaver, for example, like any other PHP file? Is there any GUI program dedicated for CodeIgniter?
The very first thing you should do is read the documentation. I do not use it myself, but I know for a matter of fact that CodeIgniter has some documentation. And there are heaps of introductions and getting started materials. (It also explains how and where to unpack it.)
http://codeigniter.com/tutorials/watch/intro/
http://codeigniter.com/user_guide/overview/getting_started.html
http://www.google.com/search?q=codeigniter+introduction
Btw, there are no clicky-coloury apps that do the coding for you. You will have to resort to an editor; and yes Dreamweaver will do. And then learn the API.
Codeigniter has excellent documentation, wiki and forum. For coding you can try Notepad++ (http://notepad-plus-plus.org/) which is free, light, colors syntax, have plugins,... and you can even put it on the usb.
After that you can try one of many IDE like Eclipse or Netbeans.
textmate has a bundle for CI, i do alot of CI development and I use the following
maamp for localhost
http://www.mamp.info/en/index.html
textmate for php html / css dev
http://macromates.com/
navicat for mysql managment
http://navicat.com/