I got nothin’ today.
Okay, that’s not exactly true. I have a lot of garbage on my mind. A LOT of garbage.
I’ve been struggling for a few months now to get anything, anything, out of my skull in terms of fiction. But I’ve been overwhelmed by stress about Appmageddon and the now-past deadline of July 1. I haven’t even started yet. I don’t know where.
Okay, that’s not exactly true. I know I can create a new MVC project with my shiny new Visual Studio 2012, and get started by adding my shiny new data access layer (DAL) to the project. Then I can add a model or two (the “M” part of “MVC”, you recall) which take the results the DAL pulls (which are database records) and turn those into DTOs (don’t you love IT and its acronyms? That one means “data transfer objects”) which can then be used throughout the application to display and manipulate the data they hold.
Sounds like a good start, doesn’t it? I mean, once that’s done all I need to do is create a controller (there’s the “C” part of “MVC”, don’tcha know) to handle the DTOs from the model. Right?
Then I need to create some views (and that’s the “V” part of “MVC” to close the loop) to route to the controller to relay the DTOs back to the view, so it can be shown. Easy-peasy, right?
I don’t know how to do all that yet. Yes, I walked through a baby-steps tutorial on MVC (thanks, Bryce, good advice), but I still haven’t pinned this down. I don’t know how to tie them all together yet. I have to figure this out, and I have to figure it out SOON, because the CSS* will need this for her people by the end of the month. Prior to that, actually. Or maybe the end of the first quarter when she does reviews for her staff.
Making the DAL? Done. Making the model? Cinch. Making the controller to tie to that model? Um… Making the view to display what the controller returns from the model? Uhhh…
Hm. So, more work to do, and the best way to do it appears to be just putting my fingers on the keyboard to try things. *Sigh*
And that’s why I’m not writing fiction. That’s why I haven’t written anything fictitious in months and months. I’ve been trying to get my head around this project, dealing with the new projects which come my way, and trying not to do more harm than good with the projects I’ve already completed.
For instance, I made a few web pages for my boss to present something called perpetual inventory to our divisions who use our intranet site. We didn’t have that capability before, so he wanted to see about getting it out there for them. I built the page and did it very quickly. But…
Not only did I do it wrong, I didn’t even know I’d done it wrong until I revisited that page last week.
Holy crow. I have something on the page called a DataSource Control, which is a drag-and-drop bit of magic you can use in Microsoft web pages. It knows how to connect to, and return data from, databases. This particular one is specific to Microsoft Access, which is what I needed. It’s really, really quick to set up, it’s really easy to configure, and it works every time right out of the box.
“So,” I hear you asking, “what the f**k’s you’re problem, then?”
Well, it lives on the page where it’s been placed. Like a text box on a web page or a check box on a web page, or any other control on a web page, it’s a part of that web page.
Well…that means if (when) we move away from Microsoft Access to SQL Server (yeah, it’s almost a foregone conclusion at this point, unless we can find something free with enough similar capabilities AND the use of the Entity Framework, Microsoft’s newest data access and manipulation hoopla), I have to find and update each of those controls to work with the new data store.
And that, boys and girls, is the reason it’s a disaster to do it that way. Those controls are super-nice, super-easy, super-cool things to get you going quick and easy, like a hooker in a back alley. But like the hooker, they’re ugly and potentially harmful long-term.
But I’ve whined about all this before.
The solution, of course, is my DAL. She’s a doll. Very clever, very well behaved, and works perfectly. When we’re not using Microsoft Access anymore, DAL will have to be replaced with a new version, but if I’m careful to make sure things are generic enough in my application models, and don’t rely on the incredibly stupid table and field naming conventions my predecessor used, then swapping DAL for DAL won’t be noticed. Yes, it will be a great deal of work to create a new DAL, and it will be a lot of work to do the testing of the new DAL, but I will be able to use the Entity Framework to create that new DAL. And when I can do that, I’ll be able to sit back and watch it go because EF opens up a lot of currently-closed doors with MVC and other Microsoft web technologies.
But, I’ve cried about this before. I still don’t know anything about SQL Server, and have no way to fully replace the Microsoft Access backend because my predecessor built some VBA macros which populate the databases with our nightly data from the mainframe.
Step 1: Populate SQL Server with data automatically, replacing those macros on the server so we don’t need Microsoft’s Office Suite to migrate the data.
Step 2: Test, test, test, then test some more, running both versions side-by-side for a while.
Step 3: Begin writing a new DAL to get the needed information for aaaaaaaaaallllll the places on the intranet site where it needs to go. Try not to commit suicide along the way.
Step 4: Using MVC, rebuild the intranet site, implementing only the necessary parts (my boss’s estimate is 60% of it isn’t being used right now).
Step 5: Test, test, test, then test some more.
Step 6: Implement roles and memberships or whatever the f**k I need to do to create security so the whole thing isn’t accessible to any Tom, Dick and Harry on the corporate network.
Step 7: Test, test, test, and then test some more.
Step 8: Assuming the SQL Server databases and Microsoft Access databases are exact duplicates of one another, move the Access dbs into archives for safe keeping.
Step 9: Assuming I’m still alive, and not in a nursing home drooling down my chest wondering where I am, deploy the new web site, which should be a replica of the current site because both sets of databases have been populated with the nightly data all this time.
Step 10: Pray I didn’t miss anything.
And that, boys and girls, is why I’m not writing fiction right now.
How was your holiday? Or, if you’re not in the United States, how was your week?
* – Customer Service Supervisor