Posts Tagged ‘NHibernate’

Microsoft Entity Framework – Kein Vertrauen

Tuesday, June 24th, 2008

Das ADO.NET Entity Framework steht immer wieder in der Kritik, wichtige Aspekte eines Object Relational Mapper (ORM) nicht umzusetzen. Neben technischen Details wie z.B. mangelhaftes Lazy Loading geht es dabei vor allem um die zu datenlastige Sichtweise des Frameworks.

Nun hat sich eine Gruppe von Entwicklern zusammen gefunden und einen offenen Brief an Microsoft geschrieben.

Hier http://efvote.wufoo.com/forms/ado-net-entity-framework-vote-of-no-confidence/ kann der offene “Vote for No Confidence” Brief eingesehen und unterzeichnet werden.

Kurzfristig wird dadurch wohl keine Änderung am Entity Framework erreicht da “der Markt” von Microsoft eine Auslieferung erwartet. Da es aber seit Jahren Alternativen gibt ist derzeit niemand gezwungen das Entity Framework als “early adopter” einzusetzen. Vielleicht führt das bei Microsoft zu einem Umdenken.

Persönlich kann ich nur sagen dass wir mit NHibernate allerbeste Erfahrungen gemacht haben. Daran muss sich das Entity Framework messen.

Technorati-Tags: ,

File Upload zu Google Code

Saturday, June 14th, 2008

Wenn man bei http://code.google.com ein neues Projekt anlegt und dann sofort versucht eine Datei in den Download Bereich hoch zu laden gibt’s die lapidare Fehlermeldung dass man keine Berechtigung dazu hätte und man solle sich an den Administrator des Projektes wenden.

Abhilfe: neu anmelden. Da muss man erst mal drauf kommen…

Es ging übrigens um das ReSharper NHibernate Plugin welches jetzt als Open Source zur Verfügung steht.

Technorati-Tags:

ReSharper NHibernate Plugin 1.0 Alpha 1

Monday, May 26th, 2008

I’m glad to announce the first alpha release of version 1.0 of my ReSharper NHibernate plugin (v0.9.1). You can download the binary version here. Source code will soon be released.

Please note! The R# open api changes somewhere between build 804 and build 807. The plugin is compiled against build 807 and should work with build 807 and above. Please let me know if you have problems using the plugin with a R# build.

Features for v1.0

Navigation and refactoring

  • References to properties and fields in mapping files are found. That means you can Ctrl-Click (Go To Declaration) on a mapped property in the mapping file to navigate to its declaration.
  • Full rename refactoring support on mapped properties and fields.
  • You can navigate from the declaration to the mapping file by Go To Usage (or Find Usages).
  • NHibernates access attribute is interpreted so that mapped fields are found. Note that internal or private fields are not found because of a limitation in ReSharpers reference searcher. If mapping file and implementation of the mapped class are in different assemblies the mapping assembly should reference the assembly with the class implementaion in order to find the references.

Analysis support for .hbm.xml files

  • Undefined mapped properties are marked
  • Undefined types and namespaces are marked
  • Mapping files that are not embedded as resource are marked (#1 error)
  • Undefined access attribute values are marked (only the predefined values are supported)
  • The severity of the errors can be configured under ReSharper | Options | Code Inspection | Inspection Severity | NHibernate mappings.

What’s next?

The next days I will work on releasing the plugin as open source. Plans for future releases are better support for class names and quick fixes for errors found in code inspection. If you would like to see any feature drop me a note please.

Hope you enjoy it! If you find any bugs it would be nice to hear from you!

Technorati-Tags: ,

NHibernate Plugin – Update

Wednesday, April 23rd, 2008

Please note that there is an update to the plugin!

You can find an updated version 0.1.6 of my ReSharper NHibernate Plugin here.

The plugin is compiled against ReSharper build 780. There was a breaking change in the open api so this version should work with build 775 and above.

I worked on the mapping file parser and started to support references. You can Ctrl-Click on a mapped id name, property name or component name to navigate to the declaring source. This works for mapped properties and fields, the access attribute is evaluated. Support for bag, many-to-one etc. will be added soon.

The way back from C# to the mapping file for example with Find Usages/Alt-F7 is still not ready. Sometimes the reference to a mapped property is found, sometimes not. Sorry for that, I’m working on it.

Technorati-Tags: ,

ReSharper NHibernate Plugin Update

Wednesday, April 2nd, 2008

Update: Version 0.1.6 is released which works with ReSharper build 775 and above. See details.

A new build of my NHibernate plugin is available for download here.

I worked mainly on the analysis of .hbm.xml files. The access attribute is now interpreted to find mapped properties and fields. Please note that only the standard values are supported. If you have implemented your own access method (IPropertyAccessor) it is marked as an error.

You may change the severity of the inspections under the usual

  • ReSharper | Options… | Inspection severity | NHibernate mappings.

Please note that the error indicator on the right is not working, only the stripes per error are displayed. I think it is a problem of the EAP version (latest build I used was 767). JetBrainers if you are reading this: please answer my questions in your OpenAPI forum ;-)

Next features I will work on are quick-fixes and navigation.

Please drop me a note if you find any bug or would like to see some feature.

Technorati-Tags: ,

ReSharper NHibernate Plugin – Early bird release

Thursday, March 27th, 2008

Please note that there is an update to the plugin!

I started to implement a ReSharper plugin to support NHibernate mapping files. It runs with ReSharper 4.0 only, so you need to get one of the nightly EAP builds from here.

Please note that the plugin is in a very early state and far away from complete. What we have so far is analysis of .hbm.xml files:

  • Name and type of mapped class is verified
  • Id name and type is verified
  • Property names and types are verified (not the access attribute!)
  • many-to-one and one-to-one names and types are verified
  • Component names and types are verified, including properties and nested components
  • Subclass names are verified

Pease note that the access attribute is not evaluated, so mapped properties have to exist as a property in the mapped class. I will work on this next and will support the standard access methods like field.pascalcase-m-underscore.

After finishing the analysis stage I will start to implement features like navigation (for example from mapped property to mapping file), refactoring (support for rename class/property/field beeing the most wanted) and quick-fixes (for example map this property).

I will release the plugin as open source later. First I have to check many things with JetBrains (for example how to do automated unit tests) and have to clean up the code.

For those of you who can’t wait, here is the download link. You will find a little batch script that copies the plugin files. Please close VS2008 before copying.

Feel free to contact me for feedback, bug reports and feature requests.

Technorati-Tags: ,