Tumgik
classprodevblog-blog · 12 years
Link
We wanted to make sure that everything in your Classpro account is safe, secure, and password protected.
To make this happen, we had several security measures followed at Classpro.
Role-Based Usage
On the application level, Classpro provides each user with a email and password that is...
1 note · View note
classprodevblog-blog · 12 years
Text
Project collaboration using Git
In earlier post, we discussed that why we switched from SVN to Git for Classpro source code revision control. The very next concern for us was where to store the initial git repository. We had the option of going for a git hosting service such as Github or create our own git server. We decided to create our own git server on remote server.
Install Git on both Server and Client machines.
if you’re on a Debian-based distribution like Ubuntu, try apt-get to install Git:
apt-get install git-core
Prferred way of doing GIT on server:
In order to initially set up any Git server, you have to export an existing repository into a new bare repository — a repository that doesn’t contain a working directory.
This is generally straightforward to do. In order to clone your repository to create a new bare repository, you run the clone command with the —bare option. By convention, bare repository directories end in .git, like so:
git clone --bare my_project.git output: Initialized empty Git repository in /var/www/my_project.git/ warning: this creates an empty git repository.
On Client machine
Step 1 on client machine clone the remote repository using,
git clone [email protected]:/var/www/my_app.git output: Initialized empty Git repository in /var/www/my_app/.git/ warning: You appear to have cloned an empty repository.
Step 2 create a Readme file inside the my_app folder and add it to the stage and commit it,
git add Readme git status git commit -m "Initial commit adding readme file"
Step 3 check the remote repository information using
git remote -v output: origin [email protected]:/var/www/my_app.git (fetch) origin [email protected]:/var/www/my_app.git (push)
Step 4 check your branches in local repository
git branch output: * master
Step 5 lets create a new branch that reflect new code in the project.
git checkout -b develop master output: Switched to a new branch 'develop'
Step 6 again, check your branches in local repository
git branch output: * develop master
Step 7 lets switch to master branch
git checkout master output: Switched to branch 'master'
Step 8 adding remote path to git
git remote add origin ssh://[email protected]/var/www/my_app.git
Step 9 pushing local master code to remote repository
git push origin master
Step 9 same way push the develop code to remote repository
git push origin develop
Step 10 to fetch the latest code from the remote repository
git fetch origin < branch name >
Git Tips: To remove a file(s) from Git
git rm --cached < file path >
0 notes
classprodevblog-blog · 12 years
Text
Why we moved to Git?
When we started Classpro, we had to build up our working development environment. We started using SVN as revision control for source code. SVN has the advantage that it's much simple to learn especially with TortoiseSVN GUI.
Why Switch to Git?
Fast-forward 4 months: we’re still just 3 developers, so our needs are fairly minimal. However, this seemed like a good time to make the switch for a few reasons:
Decentralized: Imagine you are a developer, you develop on your laptop and you want to have source control so that you can go back to previous version. With Subversion, you have a Problem: The SVN Repository may be in a location you can't reach (in your company, and you don't have internet at the moment), you cannot commit. If you want to make a copy of your code, you have to literally copy/paste it. With Git, you do not have this problem. Your local copy is a repository, and you can commit to it and get all benefits of source control. When you regain connectivity to the main repository, you can commit against it.
Branching: We had 5 different branches (master, development, deepak_repo, vijay_repo and jayesh_repo). We had horrible flashbacks of late nights trying to merge an SVN branch back into master trunk. In less words: SVN merging sucks. In Git, Branches are lightweight and merging is easy, and I mean really easy.
Fear: Having all of our revision history and development code on one machine, especially on local machine, is terrifying.
Where Git really shines is branching and working with other people.
Conclusion
Though git is much harder to learn than SVN, since it has more concepts, commands and sometimes more confusing for a starter. What is a remote? and How to properly set up the initial repository? are two questions that come up at the beginning, especially compared to SVN's simple "svnadmin create", Git's "git init" can take the parameters --bare and --shared which seems to be the "proper" way to set up a centralized repository. There are reasons for this, but it adds complexity. But once you get it all, it is simple to use.
Git is not better or worse, it's just different and I’m confident that the switch was a good move. It didn’t cause much downtime for the three of us, and it’s a lot easier to switch while you’re small. I’d definitely recommend at least looking into Git (creating a test repo, poking around, etc).
1 note · View note
classprodevblog-blog · 13 years
Text
The Classpro Tech Stack
Classpro was started as an internal application that classpro team put together in a month to manage our own computer coaching classes in Mumbai. What we needed was a simple and affordable solution.
One of the questions we always get asked at meet-ups and conversations with other engineers is, “what’s your stack?” We thought it would be fun to give a sense of all the systems that power Classpro.
For Classpro, We opted for promising new technologies that would deliver an awesome experience. This is pretty far from any of the work we’ve done before, so from a technical perspective Classpro has been an adventure.
The Server
Ruby on Rails
MySQL
Nginx with Phusion Passenger
The Client
Jquery (DOM manipulation)
HTML5
Handlebars (templating language)
This excellent set of open-source projects has sped up our development, left us with a solid and maintainable code base that we’re eager to move forward with, and made Classpro a more responsive and beautiful app. Thanks to everyone who has contributed to them.
0 notes