Standing on the shoulders of giants. RSS 2.0
# Wednesday, February 18, 2009

Shawn Wildermuth wrote about his experience using ASP.NET MVC for a new site he developed.

  1. Part 1: Why ASP.NET MVC
  2. Part 2: MVC in action
  3. Part 3: Datavalidation

One of the things he does is sending "complex" models to the view to render, I'm not sure that's something you should do. I believe that you should stick so simple strings and have the controller do all the heavy lifting. It's a slippery slope you're stepping on, before you know, you're sending 'models' straight from the Entity Model to the view.

Not sure if that's really feasible (or the simplest/easiest) in all situations, but it ensure a clean separation between business logic in the controller and the model and the UI in the view.

More info:Enforcing Strict Model-View Separation in Template Engines (pdf)

Wednesday, February 18, 2009 8:56:48 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1] - Trackback
ASP.NET | Security
# Tuesday, January 27, 2009

Yesterday and today I had an interesting problem to solve. One of the projects I’m working on involves calling stored procedures on an Oracle server which return User Defined Types (UDT). To get this to work you need to install at least ODP.NET version 11.1.0.6.20, which at the moment is only publicly available in a 32bit. This was not a problem during development and since most .NET components are not architecture specific we were a bit surprised when we couldn’t get data from the Oracle server on the 64bit test environment.

After some investigation we discovered the ODP.NET components are architecture specific, so we needed to find 64bit components (since running in 32bit was not an option). Some research showed, that there is a 11.1.0.7.0 patch for 64bit, which can be downloaded from Metalink, but this requires a previous version to update. The solution to get everything working is downloading and installing the client tools from the 11.1.0.6.0 64bit server and finally applying the 1.4gb (!) 11.1.0.7.0 patch.

Tuesday, January 27, 2009 9:02:41 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0] - Trackback
64bit | Oracle
# Thursday, January 22, 2009

This is not new, but something that helped me today.

When debugging, you can see the types in scope in the auto’s window:

Default debugger

This shows only the relevant information after expanding the view. One way of improving the experience is by implementing the ToString() method.

ToString method

While this helps a lot, this means you can’t use the ToString method for something else. Luckily in VS 2008 the DebuggerDisplayAttribute was introduced, this allows you to achieve the same effect and more.

DebuggerDisplayAttribute

And the code:

[System.Diagnostics.DebuggerDisplay("Date:{Date}, Value:{Value}", Name="{Name}")]
class Item
{
    public string Name { get; set; }

    public DateTime Date { get; set; }

    public int Value { get; set; }
}
Thursday, January 22, 2009 8:31:28 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0] - Trackback
C# | Codesnippet
# Tuesday, December 30, 2008

String.Join concatenates an array of strings together without checking for empty entries. This means the separator character is added twice, between non-empty items sometimes.

String[] input = {foo, null, bar};

var result = String.Join(",", input);

// result == "foo,,bar"

My alternative uses the IEnumerable.Aggregate extension method, it checks for there empty entries and when it finds one doesn't add a redundant separator.

 string[] input = { "foo", null, "bar" };
 string result = input.Aggregate((x, y) => String.IsNullOrEmpty(y) ? x : string.Concat(x, ",", y));

// result == "foo,bar"
Tuesday, December 30, 2008 5:40:12 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1] - Trackback
Codesnippet
# Monday, November 03, 2008

After a week of geeking out, PDC 2008 is over. It was an intense week with a bunch of interesting announcements and promising technologies.

The highlights:

Dublin”: an application server build upon IIS 7 (Win2k8) hosting WCF and WF 4.0. But it’s more! Besides hosting WCF and WF, it also includes tooling (in the IIS management interface and Power Shell commandlets), templates in Visual Studio for deploying and a database filled with management information. (See also: BB18).

Geneva”: an STS (Security Token Server) which allows you to extract the authentication from your applications (making it the problem of the IT professionals ;-)). Using the Geneva Server and the Geneva Framework federation, extracting metadata about your users from diverse sources (age, shoe size etc.) becomes a matter of configuration instead of a matter of fragile hardcoded queries. (See also: BB42).

C# Futures: dynamic types, a little love from the dynamic languages for their static cousins. (See also: TL16 and TL10).

Boku: the best presentation from MSFT research, a ‘game’ which allows you to program using an Xbox controller.

Oslo”: a language “M”, a visual modeler “Quadrant” and a repository. Everything is data, the quadrant visual modeler is stored as data in the repository. “M” (and MGrammer and MSchema) allows you to define your own DSL for your problem (e.g. music library with songs), build a grammar for it and create an object graph in memory. Quadrant is a visual modeler for your Visual DSL, which gives your end users a very rich editing experience. I did a hands on lab with “Oslo” and Dublin, modeling a WCF and WF solution and deploying it all from Quadrant, very slick! (See also: TL23 and TL31).

Windows Azure: making hosting easy and cheap. Combined with all the announced services (.NET Services, SQL Services, Access Services, Workflow Services etc.) this is a very compelling story for hosting your websites and –applications without the headaches of scaling and maintenance. (See also: ES16 and BB01).

CodeContract class: the new CodeContract class in .NET 4.0 allows you to defined pre- and post-conditions for the parameters of your methods (should never be null) and uses static analysis to verify those conditions. (This and more changes to the CLR in 4.0 see: PC49).

Expect more detailed posts about these and other subjects after my vacation.

See you at PDC 2009 (17 November 2009 – 20 November 2009).

Monday, November 03, 2008 8:33:08 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] - Trackback
Conference | PDC2008
# Tuesday, October 21, 2008

Scott Hanselman has some great tips for cleaning up disk space under Windows Vista. The best tip is using vsp1cln.exe to remove the sp1 install files.

vsp1cln.exe - After you install Vista SP1, it leaves around the original files so you can uninstall the Service Pack if you want. After a few months with the Service Pack, I've decided for myself that it's a good thing and decided I don't need the option.
Open up an administrative command prompt. That means, click the Start Menu, type cmd.exe, then right-click on it and click "Run as Administrator." Alternatively, you can press Ctrl-Shift-Enter to run something as Administrator.
Next, type "vsp1cln" at the command prompt. If you select yes, you'll get back around 2 to 3 gigs. The only thing, again is that you can't uninstall SP1.

Tuesday, October 21, 2008 12:59:52 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] - Trackback
General
# Monday, October 20, 2008

Last week the timeline for PDC08 was posted on the PDC site. All the sessions you previously selected, to help make a better schedule, are already added to your personal schedule. This is my schedule, based on the sessions I selected. As you can see, I have a small challenge, with 2-4 sessions at the same time, so I’m going to have some difficult choices to make.

Monday, October 27  
8:30 AM - 11:00 AM Keynote
11:00 AM - 12:15 PM Identity Roadmap for Software + Services
Deep Dive: The New Rendering Engine in Microsoft Internet Explorer 8
Under the Hood: Advances in the .NET Type System
12:45 PM - 1:30 PM Datacenters and Resilient Services
"Dublin" and .NET Services: Extending On-Premises Applications to the Cloud
1:45 PM - 3:00 PM Identity: "Geneva" Server and Framework Overview
The Future of C#
3:30 PM - 4:45 PM Microsoft Silverlight, WPF and the Microsoft .NET Framework: Sharing Skills and Code
Deep Dive: Dynamic Languages in Microsoft .NET 
Parallel Programming for C++ Developers in the Next Version of Microsoft Visual Studio
5:15 PM - 6:30 PM Developing and Deploying Your First Cloud Service
Microsoft Visual C++: 10 Is the New 6
WF 4.0: A First Look
IronRuby: The Right Language for the Right Job
Microsoft Visual Studio Team System Database Edition: Overview
Tuesday, October 28  
8:30 AM - 12:00 PM Keynote
12:45 PM - 1:30 PM WCF: Zen of Performance and Scale
1:45 PM - 3:00 PM SQL Server 2008: Developing Large Scale Web Applications and Services
SQL Server 2008: Beyond Relational
Essential Cloud Storage Services
Developing Applications Using Data Services
A Lap around "Oslo"
3:30 PM - 4:45 PM Architecture of the Building Block Services
Identity: "Geneva" Deep Dive
"Oslo": The Language
5:15 PM - 6:30 PM Live Services: Building Applications with the Live Framework
Identity: Live Identity Services Drilldown
Architecting Services for the Cloud
ASP.NET and JQuery
Entity Framework Futures
Wednesday, October 29  
8:30 AM - 11:00 AM Keynote
10:30 AM - 11:45 AM SQL Server Data Services: Futures
Live Services: Live Framework Programming Model Architecture and Insights
Service Bus Services: Connectivity, Messaging, Events, and Discovery
Microsoft Internet Information Services 7.0 and Beyond
WCF 4.0: Building WCF Services with WF in Microsoft .NET 4.0
Parallel Programming for Managed Developers with the Next Version of Microsoft Visual Studio
Panel: The Future of Programming Languages  403AB
12:00 PM - 12:45 PM SQL Server 2008: Developing Secure Applications
Microsoft XNA Game Studio: An Overview
1:15 PM - 2:30 PM SQL Server 2008: New and Future T-SQL Programmability
Logging, Diagnosing, and Troubleshooting Applications Running Live in the Cloud
Modeling Data for Efficient Access at Scale
Concurrency Runtime Deep Dive: How to Harvest Multicore Computing Resources
3:00 PM - 4:15 PM Live Services: Mesh Services Architecture and Concepts
"Dublin": Hosting and Managing Workflows and Services in Windows Application Server
SQL Server 2008: Deep Dive into Spatial Data
Offline-Enabled Data Services and Desktop Applications
"Oslo": Repository and Models
4:45 PM - 6:00 PM .NET Services: Access Control Service Drilldown
Deploying Web Applications with Microsoft Internet Information Services 7.0 and the Web Deployment Tool
Business Considerations for Cloud Computing
WF 4.0: Extending with Custom Activities
Thursday, October 30  
8:30 AM - 9:45 AM SQL Server Data Services : Under the Hood
Dynamics Online: Building Business Applications with Commerce and Payment APIs 
Developing RESTful Services
Microsoft .NET Framework: Declarative Programming Using XAML
Research: Contract Checking and Automated Test Generation with Pex
10:15 AM - 11:30 AM Messaging Services: Protocols, Protection, and How We Scale
ASP.NET: Cache Extensibility
Microsoft .NET Framework: CLR Futures 
1:45 PM - 3:00 PM Workflow Services: Orchestrating Services and Business Processes Using Cloud-Based Workflow
Identity: Windows CardSpace "Geneva" Under the Hood
An Introduction to Microsoft F#
Monday, October 20, 2008 3:03:55 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] - Trackback
Conference | PDC2008
# Monday, October 06, 2008

Blog Bling BrainLast week the final (25) sessions were added to the PDC Session list, making it a total of 178 sessions. I’m not sure which sessions are new or updated, so this list will not be unfamiliar to regular readers of this blog (all 5 of you).

The sessions I will try to attend, if they can schedule around my wishes, are: sessions about “Oslo”, “Zermatt”,  CLR Futures, some language sessions (C#, F#, Dynamic Languages, XAML), “Dublin” and the Parallel Symposium.

Update: I had another look at the session list today and 10 more sessions were added, making it a total of 188.

Monday, October 06, 2008 7:38:07 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [1] - Trackback
Conference | PDC2008

Yesterday dasBlog 2.2 (2.2.8279.16125) was released on CodePlex. This release adds OpenID for comments (and admin login), support for IIS 7 and support for custom 404 pages.

As always you can download the web- and the full install from CodePlex or get the source from repository.

Monday, October 06, 2008 1:38:21 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] - Trackback
dasBlog
Ads
About
© Copyright 2012
Paul van Brenk
Sign In
newtelligence dasBlog 2.3.2011.0
All Content © 2012, Paul van Brenk
DasBlog theme 'Business' created by Christoph De Baene (delarou)