What can I say, I’m not happy.
First let’s look at sub classing; this must be an issue with more web controls. You would think they (ASP.NET Team) would have made the controls smart enough to serialize to view state the exact types in the object.
Here is what happened to me, I used the treeview control, I sub classed the treenode and added a couple new simple properties. Well I expected on post back to up cast the selected node to my sub classed treenode. Guess what happened, it was just a regular treenode. It appears on postback that it reconstructs the treeview but uses base classes to do it.
If this is going to be how things work, why bother allowing sub classed objects, I know it might be a pain but give some warning. It appears that the only way you can have a sub classed treenode is to customize the control to control how it serializes to view state and un-serializes from view state, this is way to much WORK!!!!!
So needless to say, don’t subclass a control and expect view state to work right away.
Some other interesting things I have found that drive me crazy. Why doesn’t Firefox support ondrag event, the only solution is a crazy mix of using onmousemove, onmousedown, onmouseup and onmouseout. Just to duplicate the same effect. So far I have looked at several frameworks, some of which I want to make known here. A good friend William Rawls had passed me these interesting links.
using prototype: http://www.sergiopereira.com/articles/prototype.js.html or http://prototypedoc.com/
zend framework: http://framework.zend.com/
Now you might be wondering how I got into the whole ondrag issue rant. Well I was trying to resize a table column (at runtime). Now I didn’t want to use frames (which would have worked) because, everyone seems to hate them or recommends not using them. The one excuse I hear is because it doesn’t index well. My main problem is that I wanted it to work within a usercontrol. The solutions I first came up with worked with MS IE. Then after trying it in FF I found out it didn’t work. So I revise all the code and try to get it to work using several of the events above, still no worky, there are so many differences in how IE reads JS and FF(and others like FF) read JS. There really needs to be a good cross browser IDE for this stuff, I’ve did a quick search on google but nothing popped up.
My solution came in the form of this nice little DnD JS framework with other features.
Now I hadn’t explored all of its wonders yet, but I really like it.
I also want to note one other site:
Ok, my last beef. What are they thinking? I’m here plugging along in VS (visual studio 2k5) and I want a treenode when clicked to hit an IFrame to load a page. Well I set the target to the ID of the IFrame and the navigateURL to what I want loaded in the IFrame. It never works, so at some point I remembered that you have to set the Name property of the IFrame, now I had it like that originally but VS complained that it didn’t meet XML 1.0 something or other framework. Also that it was considered outdated, but guess what, if the name is set then all works. So I don’t know, why say something is outdated if it just doesn’t work any other way. Not sure if this is a Treeview issue or what. I tell you something else. If I have a value set for the treenode, I expect that when clicked that the value will be sent to the IFrame as a query parameter (but it doesn’t) I have to set what I want sent, which bites.
I hope this helps others, as my adventure back into ASP.NET development is painful at best. I still don’t know why people put up with such limited interfaces or why the controls we have so far to work with from MS in VS are so crude. Not one tabbed control, not one splitter control. Not even a decent JS framework for use in our apps that would take care of a lot of this.
Also did I say how much I hate how some third party vendors sell their wares, really! Think about it, most of them sell it at not per developer license but rather per site (though keep in mind each developer that runs stuff on their on PC has to have their own version). This totally doesn’t work when you do sites for several clients, each are required to pay that price. Doesn’t anyone else see this as unfair pricing?
Anyways, these are my thoughts and they do not reflect the thoughts of my employer.
I also want to note, if anyone is looking for a job, I know several people looking, including my new employer.
You might be wondering how things are going with my new employer, well they are going good. I do worry though, had some thoughts passed along that disturb me. Though for me, everything has its place and use. For I know where I want to go in the coming years. Either I would like to work for MS (designing IDE’s or controls/components for upcoming versions) or getting my www.connectblocks project off the ground and get that to start producing.
For those of you who wonder how things are going with my www.conectblocks.com project, wonder no more. It’s still being worked on and I’m taking full control over the project myself. This means that as soon as some of the bugs get worked out and the documentation is done, it will go to market, look for it either late this year or early next year. Though you can download the beta at anytime.
Enjoy your life, you only have one to live.