I first posted my first impressions of VS.NET on saturday . Since posting that article a lot of good things has happened. The only bad news to report is my laptop pretty much can be used to code in VS.NET 2005, not to be used for regular stuff like sending email or posting stuff in .Text blogs. My IE browser is acting pretty flakey, but is usable. Enough bad news, the great thing is my project is coming along and actually can do stuff now. Compared to vs.net 2002 pre-beta builds, I could never get things to quite work. With VS 2005 things are coming along nicely, I have two web pages (one in-line code page, one code behind) that do the same thing but allowed me to explore the new default of inline page code vs using *new* code behinds. I have to say, inline code pages remind me of the early 1.0 beta days. This has a nice comfort feel but does mix code and presentation layer. I have to admit I don’t like this now. Having things separated is nicer. Both webpages submit data to the database and the data actually gets there. Ran into one flakey *feature* in the code behind. Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Notice the Handles Me.Load section, this caused the webpage to post itself twice which was causing two records to be written to the database. I used the debugger to step through and discovered this nice feature.
Other things that i’ve gotten used to is the *little web server* that is integrated into vs.net. G. Andrew Duthrie pointed out a great reason to keep this feature, this allows a developer to run as a non-admin on his/her developer machine. I think this web server is what morfed from cassini, the free web server that is available as part of web matrix. Not sure if there is way to shutdown these resources after VS.NET is closed or crashed. Wish they could tie this event so I’d not have to go back and clean up. Maybe that is targeted for future builds of VS.NET 2005. I do have a favorable feeling about this feature.
Additional items that have been added are a dropdownlist box, this selects data from a lookup table in the database. Another cool thing is the freetextbox control is working very seemlessly and rocks personally! I think in the next day or two the data model will have all the fields I want to capture so I can start to importing production data. One of the last items i’m adding is dynamic error handling that records errors to the db. Some of the things that continue to pop up is when I try to add *new items* to the project. These items just disappear. I’m glad this project will only have 3 or 4 webpages total. This will complete phase 1 of getting the data into the database. Phase 2 will have a windows service that will, on demand or scheduled republish the site. Other links that I’ve discovered over the last couple of days.
In closing, there is a really good section in MSDN magazine that covers various languages enhancements in vs.net 2005. As much as I’ve learned over the last few years, it never stop’s amazing how humbled I can feel ready material on various items. There is one article section on C# 2.0 and generics. I have NO idea where I would ever use this technique. Maybe its my VB or scripter background but I’ve read that article at least 5 times and throw the magazine down complaining everytime why I can’t grasp this concept. As I’ve done in the past, as impatient as I am, my persistance will pay off and eventually when every other developer on the planet uses them. Only then will i understand this concept and why something like this would be used in my limited world. Hopefully over the next week there will be pictures of phase 1 w/code samples.
Visual Studio 2005 Developer Center
ASP.NET v2.0: Code-Beside Replaces Code-Behind by Paul Wilson
One thought on “VS .net 2005 – day 3 of using for my content engine project and misc items”
Steve: Have you tried using "code-beside" partial classes yet? What do you think of them? So far, I think it’s a pretty good idea because at least you don’t have to declare all of the page controls. In some ways, it’s almost LESS coupled to the page than traditional code-behind.