• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Software Project Management
 

Software Project Management

on

  • 1,633 views

Easy (Web) Software Project Development & Managegement with Django and Mercurial

Easy (Web) Software Project Development & Managegement with Django and Mercurial

Statistics

Views

Total Views
1,633
Views on SlideShare
1,632
Embed Views
1

Actions

Likes
0
Downloads
47
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Software Project Management Software Project Management Presentation Transcript

    • Easy Web Project Development and Management with Django & Mercurial Widoyo <widoyo@gmail.com>
    • Why?
      • MVC = Model View Controller
      • Django > MTV = Model Template View
      • Many software developer does not track their code
    • The Project
      • Human Resource Management Software (simplified)
      • Web base application
      • 100% using Open Source Software
      • Source Code are well Manage
    • HRM Data to Cover
      • HR Data {Nama, Alamat, Hp, Lahir, email, masuk}
      • Training {judul, mulai, akhir, kota}
    • Open Source Software
      • Ubuntu Desktop + Server 8.04.2
      • Python 2.5.2
      • Django 1.0.final
      • Sqlite 3.4.2
      • Mercurial DSCM 0.9.5
    • Ubuntu
      • Linux for human being
      • LTS = Long Term Support (5 year)
      • Latest = 9.04 (9 means 2009, 04 means April)
      • Varian
        • Desktop
        • Server
        • Netbook Remix
    • Python
      • Python is a dynamic object-oriented programming language that can be used for many kinds of software development. ... and can be learned in a few days . Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code .
      • &quot; Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. ...”
    • Django
      • The web framework for perfectionists with deadline
      • Python base web framework
      • http://djangoproject.com
      • http://djangobook.com
      • http://djangoinstant.com
    • SQlite
      • SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world.
      • http://sqlite.org
    • Mercurial
      • a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects.
      • http://selenic.com/mercurial
    • Install
      • Come with Ubuntu:
        • Python 2.5.2 (default), Sqlite3
        • Mercurial
          • $sudo apt-get install mercurial
      • Django
        • Download django-<ver>.tar.gz
        • $tar -vzxf django-<ver>.tar.gz
        • $cd django-ver
        • $sudo python setup.py install
    • Let's Start
      • Project skeleton
        • $django-admin.py startproject hrapp
        • $cd hrapp
        • $python manage.py runserver (test It Worked!)
        • $chmod 755 manage.py
        • $gvim settings.py (for Database & django.contrib.admin)
        • $./manage.py syncdb (populate database & create super user)
    • Creating Application
      • Creating Application
        • $./manage.py startapp apps
      • Creating Models
        • Person {Nama, Alamat, Hp, Lahir, email, masuk}
        • $gvim apps/models.py
        • Activating application & generating table
        • $gvim settings.py (install 'apps' into INSTALLED_APPS)
        • $./manage.py syncdb
    • Files
      • apps/models.py
      • from django.db import models
      • class Person(models.Model):
      • nama = models.CharField(max_length=50)
      • alamat = models.CharField(max_length=200)
      • hp = models.CharField(max_length=35, blank=True, null=True)
      • lahir = models.DateField()
      • masuk = models.DateField()
      • settings.py
      • DATABASE_ENGINE = 'sqlite3'
      • DATABASE_NAME = '/tmp/hrapp.db'
      • .
      • .
      • .
      • INSTALLED_APPS = (
      • .
      • 'django.contrib.admin',
      • 'hrapp.apps',
      • )
    • Activating 'admin' Interface
      • $gvim urls.py
        • from django.contrib.admin import admin
        • admin.autodiscover()
        • .
        • .
        • (r'^admin/(.*)', admin.site.root),
      • $gvim apps/admin.py (to manage Person Data)
        • from hrapp.apps.models import Person
        • from django.contrib import admin
        • class PersonAdmin(admin.ModelAdmin):
        • list_display = ['nama', 'alamat','hp','masuk','lahir']
        • admin.site.register(Person, PersonAdmin)
    • Check-in Into Repository
      • $hg init
      • $hg add
      • $hg commit –m -'Initial project'
    • Creating Training Data Model
      • apps/models.py
        • class Training(models.Model):
        • person = models.ForeignKey(Person)
        • judul = models.CharField(max_length=200)
        • mulai = models.DateField()
        • akhir = models.DateField()
        • kota = models.CharField(max_length=35)
      • $./manage.py syncdb
      • Check-in repository
        • $hg commit
    • Creating 'admin' for Training
      • Training inline to Person
      • $gvim apps/admin.py
        • from hrapp.apps.models import Person, Training
        • ...
        • class TrainingInline(admin.StackedInline):
        • model = Training
        • extra = 3
        • class PersonAdmin(admin.ModelAdmin):
        • list_display = ['nama', 'alamat','hp','masuk','lahir']
        • inlines = [TrainingInline]
        • ...
    • Customize Admin
      • Adding 'search'
      • Adding 'filter'
      • apps/admin.py
        • search_fields = ['nama']
        • list_filter = ['kota']
      • $hg commit
    • Public Interface: Homepage
      • Homepage
        • $gvim urls.py
          • from hrapp.apps.views import homepage
          • (r'^$', homepage)
        • $gvim apps/views.py
          • from django.http import HttpResponse
          • def homepage(request):
          • return HttpResponse(“Hello RICE Expo”)
      • $hg commit
    • Public Interface: Person Data
      • List
        • $gvim urls.py
          • from django.shortcuts import render_to_response
          • from hrapp.apps.views import homepage, person_list
          • (r'^person/', person_list)
        • $gvim apps/views.py
          • from django.http import HttpResponse
          • def person_list(request):
          • person_list = Person.objects.all()
          • return render_to_response('person_list.html', {'person_list': person_list})
        • $gvim templates/person_list.html
          • <table>
          • {% for person in person_list %}
          • <tr><td>{{ person.nama }}</td><td>{{ person.alamat }}</td></tr>
          • {% endfor %}
          • </table>
    • Person Data
      • Detail
        • $gvim urls.py
          • from hrapp.apps.views import homepage, person_list, person_detail
          • (r'^person/', person_list),
          • (r'^person/(?P<object_id>)/$', person_detail),
        • $gvim apps/views.py
          • def person_detail(request, object_id):
          • person = Person.objects.get(id=object_id)
          • return render_to_response('person_detail.html', {'person': person})
        • $gvim templates/person_detail.html
          • <h1>{{ person.nama }}</h1>
          • <i>{{ person.alamat }}</i>
          • {% if person.training_set.all %}<ol>
          • {% for training in person.training_set.all %}<li>{{ training.judul }}<li>{% endfor %}</ol>
          • {% else %}
          • <p>Belum ada riwayat training</p>
          • {% endif %}
    • Django Pattern
      • Urls >> View (method) >> Template
      • URLConf
        • Loose coupling
        • Mapping between url and method to execute
    • Better Page Layout
      • Creating and applying template
    • Mercurial
      • Viewing change log
    • Terima kasih
      • Widoyo <widoyo@gmail.com>