My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Developers  

Featured
Updated May 17, 2010 by phaneend...@google.com

This page shows how to get started with CloudCourse development.

Introduction

CloudCourse is built with Python and App Engine. It uses some third party dependencies:

The binaries include all necessary dependencies. If you build CloudCourse yourself, you will need to download them manually. The easiest way to set up the dependencies is to look at a CloudCourse binary and replicate the same folder structure for dependencies.

Getting the code

Check out the code from subversion.

Start development

Code structure

The bulk of the code is located under the 'core' directory. Look at the core/urlsauto.py module to see all the entry points in the application.

The application entry points are split into 3 categories:

  • core/tasks.py contains entry points for everything related to tasks/cron jobs
  • core/ajax.py contains every function which is called in an ajax fashion from the client
  • core/views.py handles every other http request

We are using the django templating system. All templates are located under core/templates

Static resources

All static resources (scripts, styles, images) are located under core/static

Before deploying the application in production, javascript files need to be compiled using the closure compiler and the css files need to be concatenated in one bundle.

There is a helper script make.sh which does the job. The output js and css files are tagged with the version number of the application (from app.yaml).

When developing on your local server, the js/css files are served directly from the original source files. When running on App Engine servers, the js/css are served from the compiled bundles.

You can change this behavior by changing the debug mode in core/context_processors.py

Contributions

We love contributions. New features, bug fixes, crazy ideas... you name it! If you want write access to svn, contact us.

Comment by joshuary...@gmail.com, May 24, 2010

Hey, is there any chance there could be a demo version of this to try out?

Comment by project member ir...@google.com, May 24, 2010

You can try it out at http://cloudcourseio.appspot.com

although this does not have all services implemented (user info & search services are dummy in this deployment).

Comment by fed...@gmail.com, May 24, 2010

Hi Irwin,

The document above says: "The binaries include all necessary dependencies. If you build CloudCourse? yourself, you will need to download them manually. The easiest way to set up the dependencies is to look at a CloudCourse? binary and replicate the same folder structure for dependencies."

Is there any reason to not simply use the CloudCourse? binary and change app.yaml.

That's what I did and it seems to work fine.

I've also updated the make script to work in windows. It's hardcoded to version 1, but it could be modified to read app.yaml

@echo off
: #!/bin/bash
: # Copyright 2010 Google Inc. All Rights Reserved.
: # 
: # Licensed under the Apache License, Version 2.0 (the "License");
: # you may not use this file except in compliance with the License.
: # You may obtain a copy of the License at
: # 
: #      http://www.apache.org/licenses/LICENSE-2.0
: # 
: # Unless required by applicable law or agreed to in writing, software
: # distributed under the License is distributed on an "AS-IS" BASIS,
: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
: # See the License for the specific language governing permissions and
: # limitations under the License.
: 
: #

: APP_VERSION=`grep ^version: app.yaml | awk {'print $2'}`
set APP_VERSION=1

echo 'Compiling javascript...'
.\closure-library-read-only\closure\bin\build\closurebuilder.py -c third_party/compiler.jar --output_file=core/static/scripts/scripts_compiled_%APP_VERSION%.js -i core/static/scripts/approvals.js  -i core/static/scripts/dialog.js  -i core/static/scripts/editor.js  -i core/static/scripts/roster.js  -i core/static/scripts/search.js  -i core/static/scripts/sessions.js  --root=.  -o compiled 
: #-f --compilation_level -f ADVANCED_OPTIMIZATIONS \

echo 'Creating css'
type closure-library-read-only\closure\goog\css\editortoolbar.css closure-library-read-only\closure\goog\css\toolbar.css core\static\styles\datepicker.css  core\static\styles\dialog.css  core\static\styles\main.css  core\static\styles\roster.css  core\static\styles\sessions.css > core\static\styles\styles_compiled_%APP_VERSION%.css
echo 'All tasks completed.'
Comment by project member ir...@google.com, May 24, 2010

Yes, using binary works fine. But if you want to set up your own workspace by checking source code in order to contribute to the project, and run/deploy from your local version then you will need those dependencies. (this page is geared toward developers who want to get source code. There is another wiki page for people who just want to install the binary).

Comment by fed...@gmail.com, May 24, 2010

I understand. Thanks.

I'd like write access.

I'd like to merge my appengine credit card processing code at http://move.brooklynmarathon.com/ with cloudcourse

Comment by project member ir...@google.com, May 24, 2010

Can you start this discussion with details on use cases etc. on the cloudcourse google group ?

Thanks

Comment by wkornew...@gmail.com, May 27, 2010

Did you consider switching to Django-nonrel? We don't maintain app-engine-patch, anymore, and Django-nonrel is already more similar to what we can expect from official NoSQL support in Django.

http://www.allbuttonspressed.com/projects/django-nonrel

Comment by project member ir...@google.com, May 27, 2010

We should certainly switch. If someone wants to take a stab at it, that would be great. Is some how-to guide on how to migrate ?


Sign in to add a comment
Powered by Google Project Hosting