Best Way To Do Admin Sections on Sites
Posted: Wed Jun 03, 2009 11:55 pm
I wanted to kick off a roundtable here on what people think would be the best way to do an admin section on a custom site they have built, and especially in an MVC way. I implemented something using MVC and a generator batch script, turning out CRUD pages on domain objects, but what was disappointing was that there was a lot of common code that could use some refactoring, yet not refactor it such that I can't make a domain object do things a little bit more special.
Minimum considerations for these admin systems are:
* a login form/logout page
* a main dashboard
* a sidebar menu (on the left) split out by main groups, followed by domain objects, followed by CRUD, followed by special CRUD (like Reset Password). For instance:
Employers (main grouping)
- Employer Profiles (a domain object)
- New Employer Profile
- Search/View Employer Profile...
- Search/Edit Employer Profile...
- Search/Delete Employer Profile...
- Search/Activate/Deactivate Employer Profile... (custom CRUD that copies Edit Employer Profile and only focuses on one field)
(For me, I just use a control on the left sidebar menu at the top like "< Employers >" where you click the left and right buttons to switch between main groups like Employers, Customers, etc. Then, it displays a jQuery Accordion Menu below that per the main group context, so I might see Employer Accounts, Employer Settings, and Employer Profiles. When you expand that, it shows the CRUD menus beneath it. You click a given CRUD menu item and on the right pane you see either a search form, a locked view form, or some kind of edit form, and usually never anything else.)
* a paginated search form and result grid
* CRUD forms
* an inline DIV dialog in the right pane that lets you search for something and match it to a CRUD form that's shown in the right pane. For instance, let's say I want to select job categories desired by a candidate for their job preference, such as Jack Mason wanting jobs dealing with Aviation or Cooking.
I guess what the discussion really is would be what the best design patterns you think would be from the Gang of Four and/or EAI patterns. I mean, ultimately I want to be able to implement the admin system just as fast as I can, without needing to use a batch generation script (that basically speeds up my cut and paste but makes it hard to extend and doesn't solve the problem of using too much cut and paste).
As well, I think the idea of the "View" may get the axe here in this case because admin systems really don't have a heavy focus on a template that you can revise like the main site might have. I mean, clients would be inclined to stick with a page template that wasn't the most exciting thing in the world, but at least worked and seemed intuitive. So for instance, you might have interaction in your model objects just start emitting XHTML, bypassing the view stuff, just to make it easier to knock out an admin system and with far less cut and paste. So, without having to deal with page templates, it potentially means a faster implementation? Although, this is another talking point on whether that's a good idea or not.
Then again, perhaps I'm asking for way too much here.
Minimum considerations for these admin systems are:
* a login form/logout page
* a main dashboard
* a sidebar menu (on the left) split out by main groups, followed by domain objects, followed by CRUD, followed by special CRUD (like Reset Password). For instance:
Employers (main grouping)
- Employer Profiles (a domain object)
- New Employer Profile
- Search/View Employer Profile...
- Search/Edit Employer Profile...
- Search/Delete Employer Profile...
- Search/Activate/Deactivate Employer Profile... (custom CRUD that copies Edit Employer Profile and only focuses on one field)
(For me, I just use a control on the left sidebar menu at the top like "< Employers >" where you click the left and right buttons to switch between main groups like Employers, Customers, etc. Then, it displays a jQuery Accordion Menu below that per the main group context, so I might see Employer Accounts, Employer Settings, and Employer Profiles. When you expand that, it shows the CRUD menus beneath it. You click a given CRUD menu item and on the right pane you see either a search form, a locked view form, or some kind of edit form, and usually never anything else.)
* a paginated search form and result grid
* CRUD forms
* an inline DIV dialog in the right pane that lets you search for something and match it to a CRUD form that's shown in the right pane. For instance, let's say I want to select job categories desired by a candidate for their job preference, such as Jack Mason wanting jobs dealing with Aviation or Cooking.
I guess what the discussion really is would be what the best design patterns you think would be from the Gang of Four and/or EAI patterns. I mean, ultimately I want to be able to implement the admin system just as fast as I can, without needing to use a batch generation script (that basically speeds up my cut and paste but makes it hard to extend and doesn't solve the problem of using too much cut and paste).
As well, I think the idea of the "View" may get the axe here in this case because admin systems really don't have a heavy focus on a template that you can revise like the main site might have. I mean, clients would be inclined to stick with a page template that wasn't the most exciting thing in the world, but at least worked and seemed intuitive. So for instance, you might have interaction in your model objects just start emitting XHTML, bypassing the view stuff, just to make it easier to knock out an admin system and with far less cut and paste. So, without having to deal with page templates, it potentially means a faster implementation? Although, this is another talking point on whether that's a good idea or not.
Then again, perhaps I'm asking for way too much here.