Please do not write anything more than what is required, and do not add any other
elements which can be not wanted. The coding problem is meant to be brief and
showcase your stage of coding expertise.
Developer Coding Problem For R-321
Introduction
On this coding problem, we want the candidate to showcase their coding expertise and information. Please present your suggestions on this check after finishing it (included within the add hyperlink).
Please do not write anything more than what is required, and do not add any other elements which can be not wanted. The coding problem is meant to be brief and showcase your stage of coding expertise.
A.The Backend Job:
Write a system that shops and validates the next elements:
1. Paperwork
2. Protein Sequences
three. Feedback
four. Notifications
The primary three elements require storing the person who created them, the date they have been created and the date they have been final modified.
The “notification” element solely requires the date it was created and a textual content message discipline along with the person being notified.
Along with the fields above, the “Protein Sequences” element will retailer the amino acids sequence, and its corresponding DNA sequence, each of those fields might be very lengthy strings, as much as 10 thousand characters (see beneath examples of amino acids and DNA sequences).
Additionally, the DNA discipline ought to all the time have three instances as many characters because the variety of characters of the protein amino acids sequence discipline. Each the protein amino acids sequence and DNA sequence fields are required.
The “Doc” element ought to have a textual content discipline for its content material, however we should filter out HTML components from its content material to keep away from XSS assaults. There ought to be a easy operate for this which you will want to write.
The “Remark” element also needs to include a textual content discipline for its content material and ought to be protected against XSS assaults, and most significantly the “Remark” element ought to save which entity it belongs to, which is now a “Protein Sequences” or a “Doc”, however it also needs to be very simple to change the code to add other elements sooner or later.
The “Notification” element ought to level to an entity (Remark, Protein Sequence, or Doc) and comprises the notification sort which might be certainly one of -Hyperlink, Static, or System- (It also needs to be very simple to change the code to add more varieties sooner or later).
Hyperlink notifications ought to include a hyperlink, and all notifications ought to include a message and a fundamental icon title string discipline.
The requirement is to write courses for these entities, and we would like validation over them to occur routinely once we merely name Django’s full_clean() operate over objects of those fashions.
Please pay shut consideration to writing the code for these fashions as concisely as potential. Use a number of inheritance wherever potential. Strive not to repeat fields and to call variables with clear names. Remark solely on complicated code segments or unclear mannequin fields.
Create 1 or 2 dummy knowledge objects from these fashions with the intention to check your syntax and validation.
The one requirement for this code is these courses, their autogenerated migrations, and the primary operate that instantiates objects from them and simulates totally different enter configurations to point out how appropriate the code is.
B. The Frontend Job
Subclass the supplied class (BaseControl) and use it to construct four easy elements:
1. Enter Discipline
2. Dropdown Menu
three. Button
four. Textual content Label (easy textual content content material not editable by customers)
These elements have to be generic, and ought to not care in regards to the logic taking place in the remainder of this job, however solely have means in them to attain it and any comparable habits.
You must create one other subclass of (BaseControl), that instantiates objects of those elements, and hyperlinks them to have the next habits:
When a price is entered within the enter, and the button is clicked, that worth is added to the dropdown menu, however should not be repeated (case delicate), additionally present the final enter as a standing message within the textual content label, for instance:
“This worth was added”
“This worth already exists”
“Dropdown modified to worth”
The place worth is the enter of the person.
Obtain this job utilizing the supplied class, and hyperlink the elements utilizing the occasion system. You may not name a operate of element B from some code in element A instantly. You may solely let element A ask element B -using occasion system- to run some motion and then element B will do the required motion upon receiving the occasion message.
You need to use composition to create new elements. Nonetheless, once more, use solely the occasion system to let composed elements work together with every other. The job of upper stage elements then is solely to instantiate and to hyperlink the composed elements.
BaseControl:
The Base Management class, has code for outlining, accessing, and initializing HTML components and other controls, it additionally has 2 strategies for its occasion system, and a number of life cycle strategies (initUI, present, and take away).
Connected to the category is an instance file of code subclassing BaseControl. If the code within the Base Management is not clear sufficient, please ask for Help.

Right here is an instance of protein amino acid sequence and its corresponding DNA sequence:
Protein Sequence:
LYLIFGAWAGMVGTALSLLIRAELGQPGTLLGDDQIYNVIVTAHAFVMIFFMVMPI
MIGGFGNWLVPLMIGAPDMAFPRMNNMSFWLLPPSFLLLLASSTVEAGAGTGW
TVYPPLAGNLAHAGASVDLAIFSLHLAGVSSILGAINFITTAINMKPPTLSQYQTPL
FVWSVLITAVLLLLSLPVLAAGITMLLTDRNLNTTFFDPAGGGDPVLYQHLFWFF GHPEVYILIL DNA Sequence:
CTGTACCTGATCTTCGGCGCCTGGGCCGGCATGGTGGGCACCGCCCTGAG
CCTGCTGATCAGGGCCGAGCTGGGCCAGCCCGGCACCCTGCTGGGCGAC
GACCAGATCTACAACGTGATCGTGACCGCCCACGCCTTCGTGATGATCTTCT
TCATGGTGATGCCCATCATGATCGGCGGCTTCGGCAACTGGCTGGTGCCCC
TGATGATCGGCGCCCCCGACATGGCCTTCCCCAGGATGAACAACATGAGCT
TCTGGCTGCTGCCCCCCAGCTTCCTGCTGCTGCTGGCCAGCAGCACCGTG
GAGGCCGGCGCCGGCACCGGCTGGACCGTGTACCCCCCCCTGGCCGGCA
ACCTGGCCCACGCCGGCGCCAGCGTGGACCTGGCCATCTTCAGCCTGCAC
CTGGCCGGCGTGAGCAGCATCCTGGGCGCCATCAACTTCATCACCACCGCC
ATCAACATGAAGCCCCCCACCCTGAGCCAGTACCAGACCCCCCTGTTCGTG
TGGAGCGTGCTGATCACCGCCGTGCTGCTGCTGCTGAGCCTGCCCGTGCT
GGCCGCCGGCATCACCATGCTGCTGACCGACAGGAACCTGAACACCACCTT
CTTCGACCCCGCCGGCGGCGGCGACCCCGTGCTGTACCAGCACCTGTTCT
GGTTCTTCGGCCACCCCGAGGTGTACATCCTGATCCTG

Published by
Medical
View all posts