Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Community Voice - HOWTO: Set up a CodeIgniter project in Subversion
#1

[eluser]Derek Allard[/eluser]
EllisLab is blessed with two of the greatest communities that can be found anywhere on the internet in ExpressionEngine and more recently CodeIgniter. Despite being a relative newcomer to the scene, the people attracted to CodeIgniter are among the smartest, most talented and down-to-earth developers around today. From time to time we want to highlight some of these talented people, and we've asked them to lend their voice to ours. Have your voice. I hope you enjoy what they have to say as much as I did.

This week, our Community Voice author is Bruce Alderson, known on the forums as madmaxx, who has written a wonderful guide on how he uses subversion with CodeIgniter. Bruce is an elder web monkey and systems programmer. He totally digs the craft of building software, making cool stuff, and causing people to laugh so hard liquids are forced from their nose. He's currently the Chief Monkey at Discovery Software and author of the not-at-all famous robotpony.ca. (Go read the one about shaving your yak)

Read the full article
#2

[eluser]Kenzie[/eluser]
While I prefer to stick with the default CI directory structure, I do find it helps to set svn:ignore on cache/* and logs/*.php, as well as on config.php and database.php. Then I'll add config.php.default and database.php.default to the repository, so they just have to be renamed and modified for the dev/test/prod server environment.
#3

[eluser]Maarten B[/eluser]
Thanks!

But I do feel this is kind of a work around for something that could be handled by CI itself.

I would really appreciate it if:

a)
CodeIgniter's code and the application code would be separated by CI's design, rather than having to rely on symlinks. I mean separation at the root directory, like proposed above.

b)
the server specific configuration (database username and password, application URL, etc.) was also separated into a directory in the root. Now I have to go into a directory and change *part of* a several configuration files.

Maybe for a next version?


Maarten
#4

[eluser]GSV Sleeper Service[/eluser]
nice one Bruce, thanks very much
#5

[eluser]m4rw3r[/eluser]
Edited: nevermind, already mentioned
#6

[eluser]vrillusions[/eluser]
All I ended up doing is kept to the same structure as CI aside from creating a separate "web" folder that I set the web root too, thus preventing any access to system folder from a url. I then just throw the whole thing in subversion with a config.default.php and database.default.php. When there are upgrades to CI I just unpack the new version, copy everything over, make sure everything works and commit it all to subversion. It makes the repository larger since I'm versioning the CI source instead of just an SVN:EXTERNALS link, but makes things easy to deploy.

Another thing to keep in mind is at least apache servers by default usually have a deny rule set for ".*" files. Meaning any file that begins with a ., like ".svn" won't be served to web clients. So it's completely fine to leave the .svn folders in there. Of course I would try to access the .svn folders from a web browser to make sure, but more than likely it's already being blocked.
#7

[eluser]Bramme[/eluser]
I've just been reading up on SVN, got myself a free beanstalk account to mess around with it and decided I'd give it all a whirl with the current CI application I'm developing.

However, the guide's rather short and with the little explanation about symlinks there is, something tells me that the people who know about symlinks, will know how to setup the project as described.

I'd love to see a more hands on, better detailed explanation off everything. And a solution for Windows, if possible.
#8

[eluser]Tom Glover[/eluser]
Tortoise SVN is the only good option for Windows.
#9

[eluser]tchule[/eluser]
Eclipse with PHPEclipse or PHPIDE plus Subclipse is not bad too.
#10

[eluser]Mark van der Walle[/eluser]
A comment on the article: I do not like the external reference to the codeigniter repository. While usually the code will not break when updating CI sometimes this might happen. Therefore I prefer to pick the latest version, code the project and just keep that version. When there are updates/bugfixes I prefer to check the changes myself to avoid code breaking.




Theme © iAndrew 2016 - Forum software by © MyBB