I’ve just completed Chapter 5 of the MCTS Self Paced Training Kit for 70-515 (Web Developer).
Over the past month or two I’ve been slowly working my way through the book, and the things that I read are in some cases, quite amazing.
Its the little things I’m being educated about. Take for instance two of the most (at least I believe they are) misunderstood methods in regards to site navigation. Response.Redirect and Server.Transfer. Although these two methods appear to do the same thing, when I read the actual technical differences between the two, my jaw dropped.
For instance, Response.Redirect is called a Client Side Browser Redirect, meaning that after a postback, the application redirects to another page as if a user has clicked a hyperlink (or some other non-server related object), meaning no data is preserved between the post from one page to another. This is by no means a Bad Thing, however when I read the correct usage of Server.Transfer (which is called a Server Side Transfer), I had a fluttery feeling of butterflies in my stomach. Server.Transfer preserves the previous page’s data in a property called (you guessed it!) PreviousPage, whereas if a page is loaded via Response.Redirect, the PreviousPage property is never populated.
Oh the possibilities!
With Response.Redirect, the most widely used method of preserving data across page transfers is passing key/value pairs in the QueryString. In most cases nothing is wrong with this, the only drawback is that you can potentially display sensitive data to the user (as the QueryString appears as part of the Url of the page you are redirecting to, in plain text). Server.Transfer however, doesn’t show (to the user) that they have left the original page! In addition to this, if you’ve set up your page properties correctly you can access whatever you need to in the new page via the magical PreviousPage property.
Ive used both of these methods frequently, without quite knowing how it worked, only that it did. Upon reading this chapter, I am viewing site navigation in a whole new (and more accurate!) light. From now on, when doing dev work in any web application, I will now analyze which method would be better and apply this wonderful tidbit accordingly.
Well, I just finished chapter 1 of the 70-515 Self Paced Learning Kit and I gotta say Im enjoying it quite a bit so far, and Im still at the basics.
And I mean reeeeally basic. Like File -> New -> New Project Basics.
But you can certainly get something from going back to the start, as if you were a novice programmer (and I gotta say, there are times where I still feel like that). You would be amazed at the little details you tend to miss out on… useful details. The book goes over the different web site types for use with IIS 7, when creating a new project, and it highlighted some things I actually never knew about IIS 6! But onto that a bit later.
This book starts at the basic basics. Lesson 1 is entitled: Understanding Web Communications. A good chunk of this stuff is something we all understand on some level (as you cant actually do advanced work if you dont understand the fundamentals), however actually having it laid out in front of you, especially as Ive never really had a proper grounding in the web world, was enlightening. The differences between GET, POST and PUT, although simple, is stuff that just isnt taught in a useful way (at least it wasnt for me). The basic structure of HTTP communication might sound simple (and it is), but having it laid out in technical terms as opposed to “Form sends message to server, server responds”, complete with HTTP status codes is wonderful!
Heck, they even give us a table of the status code groups!
100-199: Usually informational. The server has recieved the request and is about to process it.
200-299: Identifies a successful roundtrip of recieving, understanding and acceptance of the action.
300-399: Redirect codes, usually meaning the url requested actually needs to be something else instead and redirects the client to the appropriate resource.
400-499: Client error. Weve all seen the 404: Not found errors. This can mean the url requested was not found on the web server.
500-599: Server error. The server was unable to answer the request, even though it appears valid.
THIS is the smoothing of rough edges I was talking about. I had a rough understanding of these codes and how they worked, but to actually have specific meanings was very… 100. (get it?! ha!)
Keep in mind at this point, we havent even opened up visual studio yet, which brings us to lesson 2! Creating a Website and adding new Webpages. Again, basic, but surprisingly helpful. This lesson goes through all the options available to a developer when creating a new website, as well as the type of website being created. It also tells you to be mindful of using different options with different server configurations as these will sometimes simply not work. For instance, trying to create a HTTP type website (ie. creating the website within IIS) with visual studio with a version of IIS without FrontPage exentions, will quite simply tell you to bugger off. This sort of stuff can save many, many hours of headbanging on the keyboard (not in this case as the error is actually quite informative, but you get the point). But the best part of this lesson was the complete description of the ASP.NET Special Folders and their purposes, along with some I never knew even existed! App_Browsers? whodathunkit? Add into the mix the detailed description of the various *.config files for IIS (as well as web.config hierarchies) and with barely starting visual studio you have already had a better grounding than any self-taught developer. God I wish Id had books like these when I was learning to program.
There is just one tiny problem with this perfect world of wonderful fundmentals and book exercises and labs…
My VM is broken 😦
I dont know why, but it seems to constantly lock up and freeze. Its a basic 32-bit VM of Windows 7, with 4gb of assigned memory and…
… shoot and fiddlesticks!!!! (yes, that was VERY censored). I am such an idiot! I just realised why my bloody VM has been playing up so much! Ive been having quite a bit of trouble with my computer… well… ever since I got it. My computer ORIGINALLY was 8GB of DDR3, however due to possible memory stick/memory slot issues (still need to find the time to determine which!), Ive taken a stick out. So basically my 4GB VM was fighting over memory with the host machine… not a pretty contest, believe me.
Whew, glad thats been sorted out! Decreased the RAM to 1GB and its actually running now! Huzzah! 😀 Now I dont have to spend the better part of half a day rebuilding the VM! Was originally going to grizzle about the VM being unusable for some (ha!) reason, but now Im just glad to be able to do the bloody exercises! Pretty sure that will be tomorrow night though 🙂
Have a good night all 🙂
/looks back at the date of the last entry…
Wow, has it really been that long? /sheepish grin
Things have kind of gotten away from me the past 10 months, with married life being a tad more hectic than I thought, and moving not once, but TWICE in these last 10 months. Been a fun year! 😛 In any case, Im back!
A few months back I was taking stock of my life as a programmer (this is in addition to this post), and with almost 4 years of experience up my sleeve (once upon a time that would have seemed gargantuan to me, oh how little I knew!), I realized just how limited my exposure was to some forms of the .NET technology stack. While I do know the business side of my job quite well, and certainly understand quite well the technologies our client currently uses, it came to me that we are still using .NET 2.0 (or earlier in some cases!) for most of our main applications.
Thats right folks, with my 4 years of ‘experience’ the total sum of the foundation of my knowledge is a technology released in 2005!
It was at this point I came to the realization that I really, really need to do something about this! Ive realized that it is quite important as a developer to know when you are lagging behind the pack, or when your skill-set isnt quite what it could be, and pull your finger out and do something about it. And you know what they say… better late than never! 🙂
So Ive decided to study for my Microsoft Certification, specifically (at the moment); .NET Framework 4, Web Applications. My long term goal being having enough MCTS (Microsoft Certified Technology Specialist) qualifications to sit the exam for my Microsoft Certified Professional Developer qualification. I figure that the certification using the latest .NET version will even out some of the rough edges in my lack of experience with other areas, with things like WCF/PF, MVC etc. Im going to start out at 1 hour a night, and once I hit the meatier stuff maybe a bit more, and then do a recap every sunday with what Ive learnt/gone through in… you guessed it! A blog post! 😀
Im hoping to get through about a chapter a week (although it wouldnt surprise me if it took longer as I get further along), and sit my exam in a few months. Hopefully the blog entries I do are informative and give a clear sense of understanding about the MCTS qualifications and what they entail, and even help other people out there learning the technologies Im studying…
Have a good night everyone 🙂