Why I dont like Version 2 of Springloops

I am a longtime user of Springloops, since 2008/2007 for all my PHP applications. I love their plans and features so much that I had upgraded to a paid plan and using that for last 1.5 years. Now, they have introduced the plan2 which looks strange and funnier to me. Let me tell you why.

I am using the Flowerpot plan of their old version 1, which has the following features
Storage: 2GB
Number of Projects: 10
Servers per project: 3
Number of users: unlimited
Price: $9/mo

Now, the new Flowerpot plan in version 2 offers the following
Storage: 3GB
Number of Projects: 10
Servers per project: 1
Number of users: 4
Price: $15/mo

Springloops V2 has Tickets and Milestones feature in V2, included with all plans. But for that, you will have to pay an extra $6 than what you were paying currently. And the funny thing is that not only the number of active servers decreases from 3 to 1, but also number of users will be reduced from unlimited for AWFUL 4? You gotta be kidding me, eh?

One of the springloops employee ( Szymon Szczepankowski ) had emailed me why do I hate v2 of springloops and didnt opt-in to upgrade to v2 from my v1 plans, immediately after I twitted about my frustration. And this blog post is written just in reply of that.

Stay in V1, enjoy a beautiful springloops. Never upgrade :)

hosting source code and projects for free – compare the available options

when you work as an individual (or even a small team/company), it often requires you to host your project files, source code (using svn/git/mercurial) for free, discuss with people and definitely to use some issue trackers, task list managers. fortunately there are some cool options available out there. some of them comes for free with paid plans as well, some of them have no free plans. some comes with minimal but very essential features and some of them are feature bloated.

i am going to share my comment about some of these applications for you so that you can choose the best that fits for you. and btw, i’m mentioning only those which comes with free plans

spring loops1. springloops : this is my most favorite one. springloops comes with both free and paid plans. free plan is enough to manage a small team because they support unlimited peoples in each project. and even in free account in spring loops, you can create up to three active projects. so whenever you are done on any project – just close that project or suspend and open another one. springloops has excellent deployment support. and it can notify or invoke a callback url once after each commit. and that feature is very very useful if you want to take action after “post commit” (which is called a web hook).

and you can create numbers of accounts with under same email address.

pros: excellent source code browser, deployment, support for subversion, nice todo list, 100 MB of space to host your files and source code, integration with basecamp and unlimited number of peoples
cons: no issue tracker, no support for git

spring loops2. unfuddle : another neat and cool project hosting service which i’ve been using for a long time. unlike springloops unfuddle has also support for git, storage is even higher by 100 MB more. unfuddle has really cool bug tracker, wiki pages, todo list manager and built in support for iCal and rss feed. but the most frustrating thing with unfuddle free plan is that only 1 active project and 2 people is allowed. this is mainly one of the reasons why I am sticking with springloops. and unfuddle also has no support for managing deployments but i really find that a minor issue.

pros: support for both svn and git, 200 MB of storage, todo list, bug tracker, wiki pages and iCal+feed support.
cons: no support for managing deployment, only 1 active project and 2 people is supported in free plan.

spring loops3. beanstalk : beanstalk is another very cute looking subversion hosting solution. beanstalk free plan comes with 100 MB of storage space for hosting your source code, 3 active users ad only 1 repository. btw, beanstalk has web hook suport only for paid plans.

pros: nice interface, daily backup, email/rss notification and guest access, integration with many external project hosting and issue tracking solutions.
cons: only 1 repository, only 3 active people. deployment and web hook only for paid accounts :(

spring loops4. goplan : goplan has no support for version controlling and it is more like a project management solution, and it has a very nice interface. goplan supports 3 concurrent projects but 2 people (and i hate that) and 2 collaborators. it gives you 100 MB of storage space. goplan comes with excellent todo list manager, time tracker, discussion board, file versioning and activity stream.

pros: time tracking, discussion board, calendar, plain file storage, todo list
cons: no source code version control (i really wish they will add it)

spring loops5. huddle : huddle is another alternative of goplan (project hosting) with no support for version controlling. but huddle comes with some amazing features like free voice conferencing, whiteboard and editing documents online. huddle is feature rich but i really didn’t like their interface that much. whereas others are focusing on a small audience, huddle tried to be solution for everyone. but i still like the ones who are focusing on small audience, because it helps them to be niche. btw, huddle free plan comes with 1 GB of storage.

pros: task list manager, meeting, discussion, file sharing, online file editing, whiteboard, 1GB of storage space.
cons: no source code version control (i really wish they will add it), and “not so cool” interface

some other solutions you can check out xp-dev, bounty source, assembla (was one of my favorite when they had free plans) and projectlocker, github (free for only open source projects) sourceforge and the google code (sourceforge and google code are only for open source projects)

How to make your own springloops in PHP

Springloops is a nice code management service recently came into focus. It helps you to manage the code base of your application, monitor the commit and deploy the final version easily to another server. So if you are wondering how to build such a system and how it actually works, this article is for you.

Please note that I am neither way affiliated with Springloops nor any of it’s contacts. This article expresses completely my own opinion.

The primary obstacles of making such a service are
1. Managing the subversion repositories and users
2. Interaction with subversion repositories (Not same as option 1)
3. Payment gateways
4. Code browser
5. User friendliness
6. Scaling

Among these options, 4 and 6 are out of the scope of this article. There are thousands of article explaining those topics to you. So I am not going to talk about them. There are excellent libraries available to manage many popular payment gateways. Just google it and you are done. And about user friendliness and design, you can hire a consultant who’s specializing on this subject and get it done.

1. Managing the subversion repositories and users
In springloops or any other subversion hosting service, you need to do some basic shell scripting which is required for adding the subversion repositories dynamically and to add users in it. There are some excellent articles how you can do it with apache2. To avoid any traffic related issue, best practice will be hosting these repositories in another server, and using htaccess – just point your user’s svn URL to the exact url. Check out the following urls to find out how to host subversion repositories with apache. Linux should be the first choice, heh heh.

Reference:
1. Setting up subversion with apache in Ubuntu gutsy gibon
2. Setting up subversion with apache2
3. Setting up subversion with apache2 and DAV in debian
4. Host your open source projects in ubuntu in 3 easy steps

All you have to do is writing shell script to automate these steps and restart the apache2 demon once an user register his/her project with your service. You are done

2. Interaction with subversion repositories (Not same as option 1)
Now this is quite a challenging part and many of you are lost how to achieve this kind of functionality for such services. For PHP developers, you know there are an excellent repository of extensions named PECL and also repository of libraries name PEAR. In PECL there is an excellent extension which is cent percent appropriate for this work. Yup, I am talking about “SVN” extension. You have to install this extension to use it with your PHP code. Once you are done with installing it, now you got the complete power to interact with the subversion repositories hosted by your users. This extension is very rich and provides all the functionalities you need to interact. For details please point your browser to the appropriate section in PHP manual.

Reference
1. Installing PECL SVN extension for PHP in Ubuntu Gutsy Gibon
2. PECL svn package
3. SVN extension documentation

4. Code Browser
Another challenging part of the total setup. If you cannot provide excellent code browser which will clearly demonstrate the changes in code from different revisions, figure out the log and the notes made during each commit and finally, make note on it to show to your fellow team members.

Using svn_diff, svn_ls and svn_log you can clearly find out the difference of a file in two different revisions, the file and directory structure of the repository and the log of each commit. So basically once you got the file and directory structure of your repository for a revision, you can just traverse through it and display as a nice report using your PHP code. And when user will ask you to display the difference, you will find the difference using svn_diff which returns the difference as standard diff format. Now using regular expression (or whatever way) you will mark the lines which was changed and just display them highlighting using different colors to your user, as a nice report. And You can also browse the log of any revision using svn_log and show it to your user.

And last but not the least, you can create tags, branch and whatever addition by maintaining a local shadow working copy of your repository. Only the thing that you cannot do (or still I am thinking how-to) is merging, heh heh.

And when it comes about deploy the latest code base to your server, you can do it using svn_update where the path is the working directory in your server.

Reference
1. Standard Diff Format
2. svn_diff
3. svn_log
4. svn_ls
5. svn_add
6. svn_update
7. svn_checkout

Basically this is how a service like Springloops is built. I hope, you’ve enjoyed this article as much as I did to write it, heh heh.

Installing PECL subversion extension for PHP in Ubuntu 7.10

I was trying to interact with my subversion repositories using PHP yesterday and I knew that PECL has a extension named “SVN” for PHP users. So I tried to install in in my machine by when I tried to install it with the following command it always failed saying “unable to locate svn_client.h

sudo pecl install -f svn

Then I googled for some time to find out which package actually and I found that it is a part of libsvn which I didnt install in my machine which has ubuntu 7.10. so I found the appropriate package using the following command and it obviously locate the appropriate lib to install, which is “libsvn-dev

sudo apt-cache search libsvn

After that I just installed it via the standard procedure “sudo apt-get install libsvn-dev” and then tried to install the pecl extension once again. And whoa!, it works.

Here’s a small snippet to find out the difference of a single file from the repository under two separate revisions. in the following example svn_diff function returns two streams. one of them contains the difference and another one contains the error block.


<?php
list($diff,$error) = svn_diff("http://orchidframework.googlecode.com/svn/trunk/app/config/configs.php",
52,
"http://orchidframework.googlecode.com/svn/trunk/app/config/configs.php",
61);
echo "<pre>";
fpassthru($diff);
?>

Easy, huh?

Installing subversion server

Most of subversion users are familier with Tortoise SVN which removes the need of using svn command line tool. Tortoise is a great tool. It helps a lot as a visual replacement of svn client. What if you want to setup a subversion server in your machine so that developers can work remotely? follow these steps

Before that, download the SVNService from http://gda.utp.edu.co/pub/svn/

1. Create the subversion working directoty by svnadmin tool
Example : svnadmin create “c:\projects\myproject”

2. add authentication setings in your project
open your working directory, such as “c:\projects\myproject” and open the conf/svnserve.conf file. Add the following lines

[general]
anon-access = read
auth-access = write
password-db = passwd

for the settings above, anonymous users will get the read-only access to the repository. If you want authenticated read access, make it as shown below.

[general]
auth-access = read
auth-access = write
password-db = passwd

3. add credentials
open conf/passwd file with notepad and add the username and password in following format

[users]
user1 = pass1
user2 = pass2

4. Install the subversion service and run it
svnservice -install -d -r “c:\projects\myproject”

OR

4. run the server simply
svnserve -d -r “c:\projects\myproject”

Now you can access your subversion repository remotely as “svn://your_server_ip/”

Thats it.