<div dir="ltr"><div><div><div><div><div><div><div>Hello, <br><br></div>I'm new to Ur and the ML family of languages, and am trying to learning by creating a simple application.<br><br></div>I want to create an application to add and store a Resume/CV.<br><br></div>For example:<br><br></div>Education<br></div>(here some fields to add education) [add]<br></div>* Graduated in xyz prorgam, Phoenix College (2002) [edit][delete]<br></div><div>* Associate degree in abc, Hertz College (2001) [edit][delete]<br><br></div><div>Employers<br></div><div>(here some fields to add employers) [add]<br><br></div><div>Employer1 [edit][delete]<br></div><div>(here some fields to add experience for Employer1)[add]<br></div><div>*experience1 [edit][delete]<br>*experience2 [edit][delete]<br><br><div>Employer2 [edit][delete]<br></div><div>(here some fields to add experience for Employer2)[add]<br></div>*experience1 [edit][delete]<br>*experience2 [edit][delete]<br><br></div><div>I am trying to follow the example in the article Ur/Web: A Simple Model for Programming the Web by Adam.  So figuring it out how to do it as a server application, then refactoring to moe of a client side application.<br><br></div><div>Following examples in the article, I was able to create some crude code for the "Employers" section.  However I am trying to understand the best approach for adding a form for adding a new employer, as well as a form under each employer so that the user is able to add a new work experience item under an employer.<br><br></div><div>Where would be the best placement for both of these forms and their handler functions?<br><br></div><div>Below is my ...code... so far.  Any comments or guidance would be appreciated. Your patience is also appreciated - I'm still very new to ML style programming and reading ML for the Working Programmer in parallel.<br></div><div><br>(* Create database tables *)<br>table employer : (Id: int, Name: string, Start: date, End: date)<br>table experience: (Description: string, EmployerID: int)<br><br>       <br>(* A function that queries the experience at a given employer *)<br>fun showExperience employer =<br>  experience <- queryX1 (SELECT * FROM experience)<br>                        (fn row =>  <xml><li>{[row.description]}</li></xml>); <br>  return {experience}<br><br><br>fun main () =<br><br>(* Query the table of employers, and display the work experience related to each employer *)<br>workExperience <- queryX1 (SELECT * FROM employer ORDER BY employer.Start )<br>                          (fn row =>  <xml><h2>{[row.Name]</h2> {[row.Start]} - {[row.End]}<br>                                       {showExperience row.Id});<br>                    <br>(* Display the professional experience *)<br>return  <xml><body><br>          <h1>Education</h1><br>          <h1>Professional Certifications</h1><br>          <h1>Acting Assignments<h1><br>          <h1>Projects</h1><br>          {workExperience}<br>        </body></xml><br></div><div><br></div></div>