-
-
I've just launched my first website using two very interesting new Microsoft technologies - ASP.Net MVC and ADO.Net Data Entities. It's called Chop or Champion.
Since I no longer do software development on a day to day basis, it's not easy for me to get back into the swing of it. This project has been a lot easier, since I absolutely love MVC. I always found Webforms a bit clunky and too loosely coupled. Codebehinds suck. For me, MVC makes development fun for the first time in years.
When you combine MVC with the ADO.Net Data Entity framework, you get a very efficient development environment. My only complaint is that adding/removing columns and then refreshing the data model seems to break everything. But this is easily fixed by deleting and recreating the data model in Visual Studio.
Some parts of the site have a pretty complex data model. I had never used LINQ before when I started this project, so there was a pretty steep learning curve. It took a while to figure out how to do things like nested subqueries and complex joins, sorting by subqueries etc. I nearly resorted to using Views a few times when I couldn't figure out how to do these things, but in the end I was able to get the LINQ right. So there is absolutely no raw SQL in the project at all.
Overall, I would highly recommend this as the model for future ASP.Net web development.
-
-
After tearing my hair out for half an hour, I have just figured out the painfully simple solution to a frustrating problem with UpdatePanels,Repeaters and LinkButtons.
The scenario: you have a Repeater in an UpdatePanel with LinkButtons in each RepeaterItem. The LinkButtons fire Repeater.ItemCommand. The problem is that every time you click on the LinkButton the page does a full postback - defeating the purpose of the UpdatePanel.
The solution: put IDs on your LinkButtons. All of a sudden your LinkButtons are firing nice async partial-page postbacks.
-
-
I was just checking out how something works in Facebook's IE7 stylesheet, and found the first few lines amusing:
/* ------------------------------------------------------------------------
Facebook | IE7/PC Hacks | getfirefox.com
------------------------------------------------------------------------ */