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;
}
}
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.
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 :)
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 :)
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.
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
Topic author was deleted
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
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
To
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
Thanks for the feedback, yeah adding those events makes perfect sense so we'll get them in there!
Cheers, Tim
Data annotation approach looks great!
Comment author was deleted
Thanks for the feedback :)
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 :)
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 :)
".. 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
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.
Oh, I also added sorting to the "list" field table :)
Comment author was deleted
You're on fire :) #H5YR!
Comment author was deleted
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
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
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!
is working on a reply...