Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Topic author was deleted

    Oct 13, 2016 @ 11:43

    UI-O-Matic Version 2

    Hi all,

    A version 2 is currently in the works and will be based on the awesome work by Matt Brailsford in his fork https://github.com/mattbrailsford/UIOMatic

    Matt has done an awesome job at refactoring the code and adding new features.

    So far he has added:

    So my question I would like to ask is which features do you think can make UI-O-Matic even better?

    Also note there will be breaking changes so you can go nuts in feature requests ;)

  • Comment author was deleted

    Oct 13, 2016 @ 12:05

    1 thing I've been toying with is to remove the IUIOMatic interface and just use data annotations to validate so you would go from

    [UIOMaticAttribute("People","icon-users","icon-user")]
    [TableName("People")]
    public class Person: IUIOMaticModel
    {
    
        [UIOMaticIgnoreField]
        [PrimaryKeyColumn(AutoIncrement = true)]
        public int Id { get; set; }
    
        public string FirstName { get; set; }
    
        public string LastName { get; set; }
    
    
        public override string ToString()
        {
            return FirstName + " " + LastName;
        }
    
        public IEnumerable<Exception> Validate()
        {
            var exs = new List<Exception>();
    
            if(string.IsNullOrEmpty(FirstName))
                exs.Add(new Exception("Please provide a value for first name"));
    
            if (string.IsNullOrEmpty(LastName))
                exs.Add(new Exception("Please provide a value for last name"));
    
    
            return exs;
        }
    }
    

    To

    [UIOMaticAttribute("People","icon-users","icon-user")]
    [TableName("People")]
    public class Person
    {
    
        [UIOMaticIgnoreField]
        [PrimaryKeyColumn(AutoIncrement = true)]
        public int Id { get; set; }
    
        [Required]
        public string FirstName { get; set; }
    
       [Required]
        public string LastName { get; set; }
    
        public override string ToString()
        {
            return FirstName + " " + LastName;
        }
    }
    
  • Anthony Chudley 50 posts 197 karma points
    Oct 14, 2016 @ 12:41
    Anthony Chudley
    0

    I like the idea of swapping over to the annotation approach, as that falls in line with the other validation bits I'm already using.

    Really like what Matt has added so far, it all looks incredibly cool and useful.

    Whilst looking at feature requests I've been pondering whether the addition of a deletedObject/deletingObject event might be useful. I've had one case where I could have done with it, but not sure whether it would benefit everyone.

  • Comment author was deleted

    Oct 14, 2016 @ 12:48

    Thanks for the feedback, yeah adding those events makes perfect sense so we'll get them in there!

    Cheers, Tim

  • keilo 568 posts 1023 karma points
    Oct 14, 2016 @ 13:37
    keilo
    0

    Data annotation approach looks great!

  • Comment author was deleted

    Oct 14, 2016 @ 14:43

    Thanks for the feedback :)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Oct 17, 2016 @ 09:17
    Matt Brailsford
    1

    One thing I've been pondering, but it's quite a departure from my own code base too, is somehow allowing people to define their own data repository classes for performing the various lookups / creation etc.

    It may be that we expose an IUIOMaticRepository interface so we know we have specific methods, or it may be that we can define the methods to use as part of the UIOMaticAttribute, I'm not sure (not fully thought it through).

    My reasoning being, once you have records in the DB, you are likely going to want to access them later on so you end up having to define a repository anyway, so just thought it would help with consistency if we had our lookup logic in one place (for example, if you have some result columns and what not, we would have the logic for fetching that in one place).

    Like I say though, this is a big deviation from what I currently have myself so not sure how good / bad an idea that is. Maybe that's more a v3 thing :)

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Oct 17, 2016 @ 09:26
    Matt Brailsford
    2

    Just a few comments:

    1) I haven't put the google map control in the core project yet, but it won't be a big deal to add

    2) I've got an idea for a nice general uploader api handler which I might implement. I'd quite like an upload control that can save to disk outside of media section, and in implementing some other feature I made a nice upload controller that can handle getting the file from request then firing some events for you to handle it which I thought might be quite nice to use / add

    3) There are a few breaking changes as you mention, probably the biggest one that I'll mention is that I've made the UIOMaticField attribute required if you want a field to be editable. I just felt this was much safer and more explicit. We can put the old feature back in, but thought I'd mention it :)

    4) Another nice addition I've added is with the "list" field view. This now passes a return url through so when you modify a child item, it can send you back to parent. And I've also added ability to pass through a value for the foreign key field and auto hide the associated field on the child editor. I thought this was a quite nice UX. I just need to find a way to link back to the same tab when returning to list.

    5) I'm sure there is more to add, but can't think of anything right now :)

  • keilo 568 posts 1023 karma points
    Oct 17, 2016 @ 09:31
    keilo
    0

    ".. an upload control that can save to disk outside of media section.."

    this is an awesome idea! especially if events/handler would allow check file type/size

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Oct 17, 2016 @ 09:39
    Matt Brailsford
    1

    yup, so you could cancel it if you want. But you should be able to access all form field values so you can determine how to handle it. Should be a real nice solution.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Oct 17, 2016 @ 09:38
    Matt Brailsford
    1

    Oh, I also added sorting to the "list" field table :)

  • Comment author was deleted

    Oct 17, 2016 @ 09:39

    You're on fire :) #H5YR!

  • Comment author was deleted

    Oct 24, 2016 @ 11:08

    V2 Beta (aka the Brailsfordised version) is out :)

    https://www.nuget.org/packages/Nibble.Umbraco.UIOMatic/2.0.0-beta

    Contains a lot of goodies, docs will be updated by the time final hits the shelves

    So if you have some time to spare to test that would be awesome, please report any issues here on the forum or on the issue tracker over at github https://github.com/TimGeyssens/UIOMatic/issues

  • Comment author was deleted

    Oct 28, 2016 @ 15:08

    Aaaaaand RC is out :) https://github.com/TimGeyssens/UIOMatic

    Latest goodie we added is the ability to plug in list view actions http://www.nibble.be/?p=520 (for example export of data)

    You can also test that with an addon that I just published on nuget https://www.nuget.org/packages/Nibble.Umbraco.UIOMatic.Addons.Export/

  • Comment author was deleted

    Oct 28, 2016 @ 15:11

    Ow and link to the RC on Nuget is https://www.nuget.org/packages/Nibble.Umbraco.UIOMatic/2.0.0-rc

    Latest chance to test before final so if you have some time to spare that would be ace! Thanks and have a great weekend all!

Please Sign in or register to post replies

Write your reply to:

Draft