Pergunta

One of our assignments is to write a website which should use a database. I would like to have some help organizing it. Here are characteristics of our work.

  • The assignment is for a group of 5 people.
  • We have access to a server, where each person of the lecture has an account and a database (MySQL). (Some haven't seen mysql until a week ago)
  • There is no git installed on that server. (We have little to no experience with git)
  • We can't access that server from our university (I could ask if this could be changed but I am afraid it won't be on time)

What are we doing:

  • We have divided the task between the members:

    One does the login, and input of data, another a user profile, another a different type of user profile, one has designed the database and another the program to use the information of the users

  • We have set up a github repository

    We try to synchronize the work using the repository, and then from there to the server (in my user folder)

Problems we face:

  • Recently we have discovered that is possible to edit directly to other users files. So we could make changes directly on the server (if we don't work from our university)
  • There is few cohesion between us, so there is lack of understanding what other members are doing or what should each one do.
  • Now that we try a beta of the website we found each part is not well correlated with each others.
  • We need to learn on the way: Some haven't seen mysql until a week ago, we learn php and html with tutorials and few support

Before doing any change to the organization or the way we work I would like to know how could we improve our work system.

Foi útil?

Solução

This won't answer all your questions but at least it may be better than nothing.

  • There is few cohesion between us, so there is lack of understanding what other members are doing or what should each one do.
  • Now that we try a beta of the website we found each part is not well correlated with each others.

I think you just start coding too fast, take more time to plan and list your features.

1. Requirements

  1. Write down all pages you would like to have (from the user point)
  2. From each of those pages write what you expect from this page (the main goal to keep in mind)
  3. Then for each page write down EVERY features you expect (and what it should like).
    eg. If I use a blog as an exemple of a website

    • Post.php (page to add/update a post) :
      • Mandatory: Force the user to be logged
      • Mandatory: Force the user to be admin (in case you have multiple level of security)
      • Mandatory: Validate content isn't empty
      • Have a textare with a submit/edit button

    3.1. Draw use case schemas of all interactions user could do.
    eg. If I try to edit a post but I'm not an admin nor logged I have to be redirect to the login screen.

This will help you creating a TODO list as well as clearly state the final behavior you expect.

2. Design

  1. Design the database from your requirements
  2. Identity common/shared stuff from each pages
    eg.

    • If I have many page that need to enforce user to be logged then I may try to create a class/method to do so and reuse it when needed.
    • Your UI have a common shape, try to have only one file with this shape.

    The idea here is to avoid doing the same job by each of your mates and in a different way. Do it once, share it your mates

  3. Think about the implementation from point 2. (The flow of your calls, your methods, your classes, ...) TOGETHER and make sure it is solid in rock. Because you are new to both programming and the MySQL/HTML/PHP everyone knowlege is important.

    Shared code is critical, you want to do it ONCE and not touching it after because you may end-up rewriting code in multiple files.
    NOTE: Code isn't SOLID IN ROCK, you may have to update it if needed.

    I'm bad at explaining it but the main goal is to clearly define what classes, methods will be availables in all of your files. (What will be shared).
    You shouldn't need to clearly etablish the inner (private) classes/methods nor the logic, but you MUST think about it because it will state what you will have to pass in your public methods/classes.

    eg. To check if i'm the admin I was thinking of a Security class with a IsPartOfGroup(group name). (Where group name is admin)
    I know that this class will need access to my login information and access to the database. I'm not sure if I should fetch data (a lazy load, which mean some logic to create !) only when IsPartOfGroup() is call (assuming it may be resource intensive) or if may already have it when calling IsPartOfGroup() (because I fetch it when creating my Security class).
    I do know I'm going to need my login information (a Session classe?) and the database connection and I won't need to pass it on each IsPartOfGroup() call. So I'm pretty safe to only pass my group name to IsPartOfGroup()

  4. Think deeper and deeper about your requirments (think fast about how you would implement it, but think more than 5 secs) in such way you are able to list developpement steps (help you from the design section!) :

    • Create a session system
      • Create a security group
    • Create shared shape of your website
      • Create HTML/JS
      • Create a way do include the requested page
    • Login.php
      • Create a session from valid credential
  5. Proof of concept I don't know if it could be a good idea (if you have the time) but because you are new to this it may be "easiler" to start coding and create dummy methods/classes that return hard-coded values for a test codes for the shared code part.

3. Programming phase

  1. Create dummy shared classes/methods returning an use case value. While the shared code is actually implemented other members of your team should be able to start doing their part using the dummy classes/methods.
    They would be able to test their code.
  2. Do what you have to do !

Dispatching

I don't know what tools may be available so I will keep it simple, you may create a shared google spreedsheet. List all your task and sub-tasks as a hierarchy. You will be able to dispatch tasks or/and take owner ship a task if you finish early a task.

Licenciado em: CC-BY-SA com atribuição
scroll top