As a blessing, my husband recently got promoted to full-time status at his job.Â This meant that I was able to leave my full-time job that was interesting, but demanding and stressful.Â After a few weeks of re-calibrating and getting a lot of home projects finished, I found that I really missed writing and coding.Â I wrote a few simple things to get warmed up, but I’m really glad that I did because it’s breathtaking how quickly those skills will slip if you don’t use them often.
I, like many young (okay, youngish) moms with kids in school, would like to find something useful and if possible profitable to do in the 6 or so hours a day while the kids are away.Â I’m finding that getting part-time or freelance work isn’t as easy as I thought.Â The consensus that I’ve read has been that for the most part, you’re going to have to tap all your network of peers/friends/family to get leads then start out working for little to no pay in order to build a reputation.Â I pretty much suspected this, but what I didn’t fully realize is something my sister brought up:
“Contracting/consulting can be awful in usually two ways: 1) What is available is the bottom of the barrel, makes no sense, and nobody else will work on it.Â 2) The project is interesting, but it has become a steaming pile of spaghetti code and they want you to wave your magic mouse and have it all fixed two weeks ago for next to nothing.”
So… here’s my dilemma.Â I want to be able to work part-time or telecommute so that I can keep my 10+ years of experience and skills sharp, but I would like to eventually get paid.
What I can’t understand is why more companies don’t allow their IT employees to have more flexibility provided that they well document the work they do and get it in on time.Â Especially because office space is a premium and gas prices are through the roof right now.Â In Pittsburgh, we have spectacularly bad traffic and highway infrastructure.Â If business owners know how expensive it is for employees to commute/park/bus downtown, why don’t they give them the option to take a small pay cut and telecommute?Â Both sides win that way.
Just kinda geeking out about this, but when looking over some of the new features for Visual Studio 2010Ã‚Â I caught this little gem in the white paperÃ¢â‚¬Â¦.
You see that?…. ITÃ¢â‚¬â„¢s A SHAREPOINT SITE IN THE SERVER EXPLORER!!Ã‚Â
<Rubs hands together gleefully> NowÃ¢â‚¬Â¦ to figure out how to fit playing with this in after all my other urgent prioritiesÃ¢â‚¬Â¦.
PART 1:Ã‚Â Setting up the database and Entity Framework Model
Okay, so say you need to create an internal IIS hosted web application that acts as a portal for managing internal training courses.Ã‚Â You could do a simple ASP.NET web forms app…. but what’s the fun in that?!?Ã‚Â Besides, you know that you’re going to need to expand this thing regularly to handle differentÃ‚Â course types and provide different layers of permission depending on the user.Ã‚Â Well, as it happens, ASP.NET MVC is a really nice way to address such a situation (especially if you’re already familiar with using Java and Struts).
Before we get started you’ll need to get the usual downloads from Microsoft found here:Ã‚Â http://www.asp.net/mvc/
Create ASP.NET MVC Project
ThenÃ‚Â you’ll need to openÃ‚Â either Visual Studio 2008 or the free Visual Web Developer 2008 Express and selectÃ‚Â the File->New Project menu item. Ã‚Â This will bring up the “New Project” dialog.Ã‚Â To create a new ASP.NET MVC application, we’ll select the “Web” node on the left-hand side of the dialog and then choose theÃ‚Â ASP.NET MVC Web Application template and enter the following:
- Name: TrainingPortalMVC
- Location: C:\Development
- Solution: Create new Solution
- Solution Name: TrainingPortalMVC
- Create directory for solution:Ã‚Â checked
SQL 2005 Database Tables
To setup your MVC project so it can use the Microsoft Entity Framework:
- Right-click the App_Data folder in the Solution Explorer window and select the menu option Add, New Item.
- From the Add New Item dialog box, select SQL Server Database, give the database the name TrainingPortalDB.mdf, and click the Add button.
- Double-click the TrainingPortalDB.mdf file to open the Server Explorer/Database Explorer window.
- Click on the Database Diagrams folder and say yes to create a new diagram
- Setup your tables to look like this:
Create the Entity Framework Model
- Right-click the TrainingPortalMVC project.
- Select in the menu Add New Item
- Select from the Templates: ADO.NET Entity Data Model
- Enter the name TrainingPortalEDM.edmx then click Add
- Choose the Generate from database then click Next>
- For the data connection, select TrainingMvc.mdf make sure the checkbox is checked and the connection settings is TrainingMvcEntities then click Next>
- Check all tables in the database except for the sysdiagrams (dbo) one and make sure the Model Namespace is TrainingMvcModel.Ã‚Â Click Finish
- Open the ModelBrowser panel in Visual Studio 2008, and expand the EntityContainer->EntitySets and add Ã¢â‚¬Å“SetÃ¢â‚¬Â to the end of your Entity SetsÃ¢â‚¬Â¦.. Trust me, it will make things much less confusing laterÃ¢â‚¬Â¦
When you’re done you should have something like this:
This is the end of Part 1…… Calm down, I know you can’t possibly wait for more answers, but a girl’s gotta have a little mystery to keep things interesting.Ã‚Â Good luck and hopefully this will help you shed another angle of light to get a better idea of how you want to approach this type of application until I can finish procrastinating…. I mean preparing Part 2…..