rehab for asp.net in production
Posted by jonathan - 20/02/08 at 07:02:06 amCompared to my buddies, Noam and Jason, I have always embodied the old webmaster job title the more them. This means I tend to work the box administration and configuration as much as the code. As I release my day-time code to beta, once again I am revisiting deployment control measures.
Question 1 - Do you manipulate, muck up, mess with the machine config?
I have been burnt by the GAC before <future post/> so I tend to deploy my apps with everything they need right in the bin and app folders. This means I a bit less tidiness, having have extra dlls in my bin and that I make most tweaks in my app web.config but has the benefit of easy deployment. Deployment is not the time you want to be messing with settings!
A recent post I came across from ScottGu’s blog linked to this article, Top 10 Best Practices for Production asp net Applications. I have read similarly titled articles in the past so I went here on a lark, expecting to find nothing new, but I was pleasantly surprised. The number one new tidbit was, “Set retail=’true’ in your machine.config”. Never heard of that before, but if true it does a hat trick:
This will kill three birds with one stone. It will force the ‘debug’ flag in the web.config to be false, it will disable page output tracing, and it will force the custom error page to be shown to remote users rather than the actual exception or error message. For more information you can read Scott Guthrie’s post or the MSDN reference.
I have to test it out, but I wish I had known about it years ago when I worked in a shop with very loose deployment controls. Developers were constantly leaving crumbs on my freshly vacuumed carpet, page level trace=”true” statements. Once tested I’ll then have to figure out how to role out machine.config changes to a web farm since my current company is freakishly spendthrift with the servers.
Question 2 - Do you deploy source code?
In a compiled language such as java or c#, do you deploy source code? My only real working knowledge is in c# so I’ll stick to that domain for now. This question arises as I have some java guys on the team who want to push .cs files to the server to have the “ability to patch code”. For me this smells like a glade plug-in, the scent while nauseating is really covering up the stank of bad source control management.
Fortunately google comes to the rescue as a search for for “deploying source code” gave me this first read from a relatively good source, aspnetresources.
The whitepaper also lists JIT compilation, but I won’t go there. It’s a questionable approach which is outside of the scope of this article. Please, refer to Chapter 4 of the whitepaper, “Deployment Issues for .NET Applications”, to read more about NGEN and JIT compilation.
The white paper mentioned is this, Deploying .NET Framework-based Applications at Patterns & Practices, which is a better source, but the paper is a bit dated being published in 2003. After a quick read that did not really give me anything useful.
After changing search terms, “deploying .cs files”. The first thread, mentions publishing .cs files, but not a single person says they do it. They mostly hawk the web deployment project and/or the web application project, which is of course what I’m already selling.
Dr. Peter A. Bromberg, creator of eggheadcafe says, “I wouldn’t even consider deploying .cs files”. - eggheadcafe
Having read the esteemed Dr Bromberg a few times over the years, that quote is good enough for me, but I am still searching for the article that explains the pros of deploying source. Let me know if you find it and make sure it is a reputable source too.
To top it off here’s my favorite qoute from Jason, invoking a bit of Amy Whinehouse,
“NO NO NO… when you ‘patch’ you create and unpredictable hybrid release that isn’t really anything.”
critique: tadalist
Posted by jonathan - 09/02/08 at 09:02:13 am
While I love 37 signals articles and their strong display of the KISS principle, I can’t help but think that these marketing savvy and self-describe usability experts are given a pass when people evaluate their software. Exhibiting the corporate spin-mastery that is rarely exhibited but exemplified by companies such as apple and google, they have deftly applied marketing, message and pr to dance the cha-cha around issues which which would trip up less skilled companies. As people fondle a product, how do you transform beyond KISS and move into KIMACS, Keep it minimal and complete stupid.
The company chatter mill was discussing the recent blog-talk about the relatively low line count of tadalist. I’m not sure how one can disregard the framework line count and the years of other work which resulted in the RoR framework. Lets take a look at where this task management software is failing me, and ript it a bit.
First off the design seems to follow the personal shit/task list management style of clearing your lists proposed by management self help gurus such as David Allan and Timothy Ferris
and The Steven Covey
. What happens if you are not the typical type A person and you have a list that is growing like mint in spring, no matter its dead state over the winter it keeps growing back?
Figure 1. - My personal list.
This is a mix of people to call, crap to fix around the house etc. Hmm it quickly grew to around 20 items and seems to hover in this state no matter my relative mix of sitting my fat ass on the couch vs getting jacked up on coffee and “getting things done”.
So in this perpetual state of 20 items, the add another item link (btw, links are for navigation, buttons are for actions, but that is another point), is redonkulously placed in the middle of my list serving as the dividing line between stuff to do and stuff thats done. To rectify this problem I might throw the add link at the top instead. Maybe I’d put it at the bottom of the page, at least I’d be able to ctrl+end to get to the button. Maybe I could split the stuff to do vs stuff done lists in half, thereby pushing the bottom to the bottom, but that might invade on the google ads revenue on the right. In any case the last place the link belongs is in the middle. Finally I could add a keyboard shortcut to add a new item, this might be there but I tried some Usually combo strokes and did not find anything.

Figure 2 - DoubleClick to add an item.
Next, why the hell do I click a link call “add another item” only to expose a textbox, cancel link, and a button titled “add this item”. This design paradigm has the code smell of dhtml click-trickery. If a developer in my shop did this they would face a grilling about why we would force a user to click another link to perform a primary action, adding an item. The clutter of the textbox, button and link does not need to be hidden. This type of flashiness is common for people who are just learning the artistry of dhtml. Remember, just because some browsers supported the <marquee> or <blink> tag does not mean we should have used them.
I could continue on with how the separate click into reorder mode renders the act of prioritization more annoying than I want, or how I do not understand the sorting mechanism on the main my lists page, or how this page is not reorderable, but my point in this dissection is not to catalog the design issues.
While its an admirable but questionable fact that tadalist was written with 600 lines of code, the “simplicity” of this app actually has some critical flaws. An honest evaluation of clickability, and navigation could result in no more net lines of code but a better product. As we move agile into the mainstream look out for more sophisticated methodologies to synthesize client feedback to migrate products from KISS to KIMACS.
fumbling around wordpress
Posted by jonathan - 24/01/08 at 11:01:39 am
I like to stay in touch with the people. When it comes to technology that means I test drive the software which non-nerd-tool people use to accomplish a task a software engineer might try and build himself, see blog.a.lish. In this case I chose to enable a wordpress blog through my hosting company, hostmysite.com. I have gotten past just kicking the tires and recently switched over to a calmer theme that I picked up from the best designer I know, forgetfoo. While the tagging structure of asp.net and php are similar, <%= “Hello 1 person reading this” %> to <?php echo “Hello 2nd person reading this” ?>, as a .net guy I sometimes feel like a fresh water fish in a salt water pond.
Only today did I fully realize that when you change a wordpress theme you change the header and footer files as well. To an asp.net guy a theme is a smaller more design oriented concept. For wordpress, a theme encompasses the entire css, js and php code for the site. Any custom code I had added in is gone. Doh! Bye-bye link to stylesheet, all done google analytics code, see you later ad words tweaks.
I put these items back into the theme, and decided to add the following mods to upgrade the the posting experience:
- css opacity on hover
- js code to throw in target=”_blank” on all external links
Check out the sample I setup here. If you view source on the html you will see link 3 has target=”_blank” defined already while link 4 does not. If you view the html post js processing, in firebug of course, you will see the target attribute added to the 4th link.
Do you have any custom code you’ve added to your blog for easilbity?
increasing whitespace on a page using opensearch
Posted by jonathan - 03/01/08 at 02:01:49 pmHaving not posted about tech in ages and wanting to add some special sauce to my current day-time site, I went back to adding an opensearch provider. My corporate gig in an enterprise tool which requires as much screen space as I can take. Therefore, I wanted to refactor search to pull the global search box off the page and move it into the browser.
After some googling (here and here and here), I thought about creating an opensearch generator, but as usual I was beaten to it here. Its these little focused tech sites that I love.
Basically, the opensearch provider can be broken down into two components.
- xml file that defines the search info to the browser
- link that tells the browser the search provider xml file exists
comment spam part II
Posted by jonathan - 27/12/07 at 09:12:32 am
Strange things happen in order to sell crap on the internet. I posted recently about the joys of comment spam combat since picking up the blog habit again. After posting a few items I was flooded with a 100 items of ridiculousness. I had comment moderation turned on but that does not seem democratic enough to me. I turned it off and opted in for a 3p service enabling the Akismet wordpress plug-in and a captcha filter. My buddy, Noam, informed me he could not post so I turned off these features, but for some reason the comment spam has failed to resurface.
Could the timing be related to indexing? Could it be that the spammers target bigger sites and somehow figured out the relative unimportance of my postings? Could the deluge be right around the corner and I’m just sitting here in Johnstown. Not like I’m going to implement anything soon, but I came across these two interesting posts lately.
NyTimes - Spammers Employ Stripper to Crack Security
Ned Batchhelder - Stopping spambots with hashes and honeypots
are asp.net and webforms dead?
Posted by jonathan - 04/12/07 at 07:12:17 amI have been struggling to convince my fellow php and java developers of the advantages asp.net. asp.net brought a lot to the table by applying oop to the presentation layer, abstracting html inconsistencies and using object style notation for controls, textbox.text= rather than request.form[”textbox”]. All these things were great in 2002 and seemed much better than the
< %=%> hell we had before. Oh but times have changed. With RIA and AJAX pushing client expectations, the kiddies pushing css like crack in the late 80s and the resurgance in javascript as cross-browser-issue-killer libraries have sprouted up like kudzu in Georgia, is asp.net, webforms and the PageController model dead?
tdd w/ rob myers
Posted by jonathan - 03/12/07 at 11:12:01 amRob is a great speaker and I look forward to this afternoons session at the sqe agile conf.
golden nuggets
- “tests act like herding dogs, they keep the sheep together, but not in one place”
- “The intent of the code lives in the tests”
- “Legacy code is code without tests”, quote from someone else
Seems like I have been writing a lot of legacy code.
moving to open source UI testing
Posted by jonathan - 20/05/07 at 07:05:16 pmfor some reason I really want to stop our company from using mercury qtp. why spent hundreds of thousands of dollars on licensing limited product. granted some of my grippes are do to our inability to handle admin such as sso, but there are plenty of cool open source tools coming to the market. look for my post series on selenium nunit and cc.net.
ref: IBM’s Selenium and Test NG | random examples | core reference | peter krantz’s selenium and asp.net |
Deployment project
Posted by jonathan - 31/01/07 at 07:01:20 pmI am setting up a web deployment project, now included in vs 2005 sp1, for a web app and struggling with the cryptic error message - “aspnet_merge.exe exited with code 1″. I have figured out that the first place to check is the partial classes of pages and controls. The merge tool cannot handle two files with the same partial class name. This can happen when you copy a file and rename it. The partial class name remains the same.
default.aspx
default.aspx.cs
partial class pages_default
contact.aspx
contact.aspx.cs
partial class pages_default
I usually start debuggin’ the setup by removing all files and selectively adding them back in until I find the point of failure. There has to be a faster solution and I’m still stuck on one offending file.
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.