Difference between revisions of "Team:Michigan Software/Design"

Line 11: Line 11:
 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When uploading a protocol, the author is automatically chosen to be the username name of the uploader, taken from the user database. Each uploaded protocol is also given an auto-incremented id number. This id is used when making queries to the database to view a protocol, and helps differentiate protocols with the same name. </p>
 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When uploading a protocol, the author is automatically chosen to be the username name of the uploader, taken from the user database. Each uploaded protocol is also given an auto-incremented id number. This id is used when making queries to the database to view a protocol, and helps differentiate protocols with the same name. </p>
  
<img src="https://static.igem.org/mediawiki/2015/3/35/Team_Michigan_Software_Databases.png" width=300px />
+
<img src="https://static.igem.org/mediawiki/2015/3/35/Team_Michigan_Software_Databases.png" width=350px />
<img src="https://static.igem.org/mediawiki/2015/8/88/Team_Michigan_Software_Usage.png" width=300px />
+
<img src="https://static.igem.org/mediawiki/2015/8/88/Team_Michigan_Software_Usage.png" width=350px />
  
 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploading protocols and signing up for Protocat is the Controller in the MVC system because this is how we allow users to interact with the database. People accessing protocols from the database is where the View comes in to play. </p>
 
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uploading protocols and signing up for Protocat is the Controller in the MVC system because this is how we allow users to interact with the database. People accessing protocols from the database is where the View comes in to play. </p>

Revision as of 21:46, 16 September 2015


Michigan Software 2015

Design

     HTML, CSS, and Javascript were used to create the user interface for Protocat. The intent was to design the site in a way that makes it easy for users to create, find, and use any protocol on our database. We used Bootstrap for its HTML grid layout to format our pages.

     On the back end of Protocat, we used the Django web framework designed for Python 3.4. Django is a convenient framework to use because it is able manage administration, databases, authentication, and templating data on HTML pages, as well as other useful features. It is also fairly simple to learn because of it's Model-View-Controller (MVC) system. To create the database we created a "class Protocol," the model of a protocol for our database. Attributes in our Protocol class are properties associated with a protocol, such as name, reagents, and steps. We then migrate these models through Django which creates our database for us. Whenever we want to make changes to our models, all we have to do is migrate the changes through Django which will change our database accordingly. Django comes with its own user system, so there is no need for us to make a user model.

     We have two databases, one for protocols and one for users. When someone signs up for Protocat, their username, email, password, first, and last name are added to the user database. Likewise, when someone uploads a protocol, all attributes of the protocol are saved into the protocol database.

     When uploading a protocol, the author is automatically chosen to be the username name of the uploader, taken from the user database. Each uploaded protocol is also given an auto-incremented id number. This id is used when making queries to the database to view a protocol, and helps differentiate protocols with the same name.

     Uploading protocols and signing up for Protocat is the Controller in the MVC system because this is how we allow users to interact with the database. People accessing protocols from the database is where the View comes in to play.