A simple and robust MVC-architecture of BioSilico
BioSilico adopts simple JSP applications (JSP-pages and JavaBeans) in Model-View-Controller (MVC) to manage the complexity in developing the large web-DB site. The MVC is a commonly used and powerful architecture for GUIs; the logic, presentation and program flow of BioSilico can be separated as follows:
The interaction between the BioSilico and the Chem DB
Using a web browser, the user enters a structure into MarvinSketch. A custom JSP script for substructure/similarity searching is activated, which connects to a database through JDBC, searches in a table containing structures, and creates a list containing the ID numbers of found structures. The JSP script retrieves mixed structural and non-structural data by SQL SELECT statements, using the list of hits and tables or views in the Chem DB. The JSP script also creates the page that displays the retrieved data in the client's browser using MarvinView.
UML modeling of BioSilico
Class diagrams are the backbone of almost every object-oriented method including UML. They describe the static structure of a system. For more detailed information, go to the UML modeling page.
Example source code
<%@ include file="Init.jsp" %>
<div id="header">
<h1>List compound(s): with 'compound whose name contains' option</h1>
</div>
<%
String path = request.getContextPath();
String basePath = "http://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String compound = request.getParameter("compound");
String lClass = "mars"; //or isis, mars, simple, report, mark
%>
<% include file="inc/header.jsp" %>
<% request.setAttribute( "list_compound", new ListTableListCompound(con, compound) ); %>
<h2><a href="./Search.jsp">Back to the Search Page</a> > LIST compound(s) whose name <%= "'" + compound + "'"%> contains.</h2>
<display:table name="list_compound" id="parent" class="<%=lClass%>">
<display:column title="LIGAND COMPOUND">
<display:table name="<%="list_compound.item[" + (parent_rowNum.intValue() -1)+ "].subListLCompound"%>" id="child" class="simple sublist" defaultsort="1" >
<display:column property="id" title="ID" sortable="true" headerClass="sortable"/>
<display:column property="common_name" title="COMMON NAME" sortable="true" headerClass="sortable"/>
<display:column property="synonyms" title="SYNONYMS" sortable="true" headerClass="sortable"/>
</display:table>
</display:column>
</display:table>
<display:table name="list_compound" id="parent" class="<%=lClass%>">
<display:column title="EcoCyc/MetaCyc COMPOUND">
<display:table name="<%="list_compound.item[" + (parent_rowNum.intValue() -1)+ "].subListPgCompound"%>" id="child" class="simple sublist" defaultsort="1">
<display:column property="id2" title="ID" sortable="true" headerClass="sortable"/>
<display:column property="common_name2" title="COMMON NAME" sortable="true" headerClass="sortable"/>
<display:column property="synonyms2" title="SYNONYMS" sortable="true" headerClass="sortable"/>
</display:table>
</display:column>
</display:table>
<% include file="inc/footer.jsp" %>