So I’ve just started out using this for a few side-projects that I want to play around with and investigate into these types of systems that allow me to get to logic code asap, rather than spending so much time working on and perfecting the setup stuff.
My project is similar to a really simple fixture system. I have tableA, which is purely a ID, name pair for people, then I have tableB, which is a table where I input fixtures between people. It has a column for playerA (foreign key for tableA), playerB (foreign key for tableA), datetime and playerAScore, playerBScore.
I’ve gone through the setup for the Model and CRUD creation of tableA first, then tableB. With going through this way, I thought I’d easily be able to go in and add a new fixture by selecting a player who was already in tableA, from a dropdown list, then the same for playerB, a calendar popup, with a time input for datetime, then integer inputs for the two scores. Now, while the Model and CRUD generator is awesome and has saved me tons of work, I can’t help feel a wee bit underwhelmed when I was presented with very basic integer input for every column (with no type checking on the datetime, I was able to put in ‘a’ as an input, which gave me a zero date and an unavailable foreign key error being shown only when you tried to save a row).
For me, with that type of setup instantly available (form input with real foreign key relationships in and viewable to you from dropdown lists, and similar) would be a huge bonus. Same again with the datetime, I’ve seen plenty of Javascript popup calendars that do that sorta thing.
First things first, I’ve only just dipped my toe in the water with Yii, and am known to be crazy impatient so I don’t actually know if what I’ve currently got is all that is available. If it’s not at all, I’d be more than interested to actually start implementing something along those lines. I’m all about my schemas and ease of setup for stuff like what Gii does.
As I said, I’m not sure if this is already in Yii / Gii, but I don’t know about, but if it’s not, it does seem to be a common way of using these types of systems, so I’d love to know if people are using a standard library, or something, writing a good bit of extra code to do this, or what’s their solution.
Thanks for any feedback or suggestions.