(From http://neverblog.net/disable-annoying-java-update-notification/)

  1. Open the Registry Editor by going to the Start button and typing in regedt32.
  2. Navigate through to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Update\Policy
  3. Change the value of EnableAutoUpdateCheck to 0 and the value of EnableJavaUpdate to 0.

The ultimate developer tool Snippet Compiler fully supports .NET 3.5. You only need to add the System.Core.dll to your references (this can be done via Tools -> References).

Now the following queries work as expected:

var temp2 = temp.Select(x => x.ToString());
var temp2 = (from x in temp where x > 2 select x.ToString()).ToArray();

There also have been several other improvements since 2.8 (which was the last version I used). The intelli- sense is much better, the syntax highlighting is fine, support for addins and the performance is still amazing…


Just spent 15 minutes to figure out why my databinding would not work.. First thought the XAML had some issues, but after a length debug session I found out – binding to fields just does not work



I am big fan of domain driven design and the Onion Architecture described by Jeffrey Palermo. Thus my current project is split into the following layers:

Level 0 – Tools: Common tools and extensions which don’t have any dependencies at all. For example the indispensable GetIfExists- method for dictionaries is located here.

Level 1 – Core: This is where the domain model lives. Additionally to my entity and value types here are the interfaces for the repositories and most services, which are located in the InfrastructureLayer

Level 2 – Infrastructure: Contains the FluentNhibernate- class maps and the repository implementations. References the tools but not the core- layer.

Level 3 – Services: Pretty thin layer which contains the services for the domain

Level 4 – Client Logic: As I want a clear seperation between my view models and

Level 5 – Presentation: Pretty easy… all the WPF stuff

The concept of levelization is very fine, because you can use NDepend to check the dependencies and if each class has the level you want it to.


For my mapping tests I am using Sqlite because it’s faster and I don’t have to care about things like cleaning up the database and creating the schema (which you don’t need for in- memory databases).

A few times I got the following error: NHibernate.HibernateException: The IDbCommand and IDbConnection implementation in the assembly System.Data.SQLite could not be found. Ensure that the assembly System.Data.SQLite is located in the application directory or in the Global Assembly Cache.

I looked to my project references and there was a reference to System.Data.SQLite.DLL .. After some research I found the error.. as I didn’t reference and classes of the assembly in my code and “copy local” was set to false for this assembly, it won’t be deployed by default. After setting “copy local” to true everything worked as expected.


Auto- Mapping does not fully support inheritance yet. As far as I know now all default- conventions are used for the auto- mapping. Thereforce you always get an error when using a reference to another entitity within a derived class.

More information can be found here


Template- Bindings can be used to customize the style of a control template depending on the configuration of the parent- control. Example: To allow the textbox- control to set the border- style for each instead we might use the following template- binding.

BorderThickness=”{TemplateBinding BorderThickness}”>

This is quite ok, but generally you also wan’t to use a default- value if there isn’t any BorderThickness set on the control. For these cases you can use a global style (created by just specifying the x:Type and no x:Key.


You might get an error if you just derive the view from another base class. In order to use a base class, you have to update your XAML to something like this:

<local:MyViewBase x:Class=”Gui.InsuranceCompanyContactPersonEditView”
xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”
xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”
xmlns:local=”clr-namespace:Gui”>
</local:MyViewBase>


At my current project Bugfighter there is some Javascript- code, which is needed for all pages. The main part of this code is configuration – which projects are there, which projects can the user see, what is the URL for the delete action, …

The problem is that this code can not be included statically, as it has to query the database or build links based on the current page (using the ASP.NET MVC Routing engine).

Using sub- controllers

The problem can be solved easily using SubControllers. This feature, included in the MvcContrib project allows invoking any controller action in any view. I am basically creating this sub- controller first in my common base controller and invoking the action in the shared master page:

ViewData[ViewDataKeys.CommonJavascript] = IoC.Resolve<UtilController>().GetResult(this);
<% ViewData.Get<Action>(ViewDataKeys.CommonJavascript).Invoke(); %>

On the server side a action with the name of the subcontroller gets invoked. This action can do anything as any other action – in my case I am just rendering a shared view which outputs the settings to the response stream.




Follow

Get every new post delivered to your Inbox.