Skip to end of metadata
Go to start of metadata

uigen.exe is a command line tool for generating a re-motion web application from domain object classes, as found in one or more domain object assemblys.

As the PhoneBook tutorial explains, a domain object class essentially is a set of properties (and attributes). Here is the sample Person class from the PhoneBook tutorial:

  public class Person : BindableDomainObject
    public virtual string FirstName { get; set; }

    [StringProperty(MaximumLength=60, IsNullable=false)]
    public virtual string Surname { get; set; }

    public virtual Location Location { get; set; }
    [DBBidirectionalRelation("Person", SortExpression="CountryCode, AreaCode, Number, Extension")]    
    public virtual ObjectList<PhoneNumber> PhoneNumbers { get; set; }

For managing such a person object in a web application, uigen.exe generates two types of forms:

  • a data entry form for editing a single Person object (an EditPersonForm.aspx)
  • a page for listing all Person objects in the database (a SearchResultPersonForm.aspx)

Here are illustrations for each.

The EditPersonForm in the browser

The SearchResultPersonForm in the browser

uigen.exe saves you a lot of work, but there is still room for improvement in the generated application. As you can see in the pictures:

  • The extra DisplayName must be removed manually
  • Lack of features (how to add some of those is explained in the PhoneBook tutorial)
  • No globalization – the "en" are placeholders, because uigen.exe what strings you want for property identifiers like PhoneNumber
uigen.exe is based on templates

re-motion web applications share a lot of code. For this reason, templates are expanded for each file in the resulting web application project (like
PhoneBook.Web). The resulting project is mirrored by the original template project, i.e. a directory tree with one template for each generated target file. The following tech-note is dedicated to the subject of how this mechanism works and how templates are expanded, and the elements of the (home-grown) template language: What uigen.exe does.

See also
  • No labels