CMS Vendor Meme – the Sense/Net Response

About two weeks ago ECMS vendor Day started off a smaller lavina in the CMS vendor blogosphere by completing the reality checklist published by CMS Watch and tagged some other vendor to have them complete it as well.

As of now more than 20 vendors have completed this checklist. Even though Sense/Net was not tagged once we heard of this meme, we decided to fill out the test and evaluate ourselves as well. You can see the Sense/Net CMS Vendor meme results here.

Querying many-to-many relations in NHibernate


Warning: count(): Parameter must be an array or an object that implements Countable in /nfs/c03/h02/mnt/50561/domains/gergelyorosz.com/html/wp-content/plugins/wp-syntax/wp-syntax.php on line 76

I’ve ran into a querying scenario with NHibernate that was much less obvious to solve with the NHibernate query API than it would have been with SQL – for me at least.

In my model I’ve had a simple many-to-many relation: Entries that had multiple Categories each and Categories that belonged to multiple Entries as well.

Categories and Entries: an Entity-Relationship Diagram

Categories and Entries: a many-to-many relationship

In the underlying SQL model the many-to-many relationship was implemented via a relationship table:

Many-to-many relationship table structure

Categories and Entries table structure

Now I wanted to find all entites within a given category. Pretty simple, right? In SQL it would have been a simple join:

SELECT Entry.* FROM Entry JOIN Category_rel_Entry ON Category_rel_Entry.Entry_ID = Entry.ID WHERE Category_rel_Entry.Category_ID = @CategoryId

In Nhibernate this query is a bit more tricky, let me share how it can be done.

Note: this post is also a good example of how to define a many to many relationship schema in NHibernate.

Read More…

How to resample images – a simple algorithm

When working with images I sooner or later usually run into the problem of creating thumbnails. Resampling images is not really difficult in the major programming languages however I have not found built-in support for caclulating thumbnail dimensions neither in .NET nor in PHP. And it seems that this made me re-invent the wheel over and over again creating codes with various lengths just for this simple task.

In Sense/Net 6.0, the open source ECMS I am working on I came across the exact same problem: I wanted to resize images, this time on the fly. This time however I decided to do it a bit less complicated as in previous cases and create a clean and simple solution. After a good deal of googling, tutorial reading and planning I came up with a fairly simple and good code snipplet.

Read More…

ASP.NET server side element names changed?

As far as I’ve known if the ClientID of a server control looked someting like this:

ctl00_WebPartManager1_184c801b_7c67_4967_be37_3ab10406f967_ctl00_linkVote1
.

Then the name sent on postback (which identified the control on the server side) was:

ctl00$WebPartManager1$184c801b$7c67$4967$be37$3ab10406f967$ctl00$linkVote1
.

But since some time the _ to $ conversion is not true any more. Instead the _ signs are randomly replaced by dollar signs. Recently the name sent back on postback is:

ctl00$WebPartManager1$184c801b_7c67_4967_be37_3ab10406f967$ctl00$linkVote1
.

This change screwed up quite a lot of client side manual __doPostback() codes I’ve written – most of the making these invokes due to JQuery addons.
Read More…

A great disk storage usage monitoring tool

It’s quite a common problem that disk space shrinks dramatically and something has to be deleted. But what are those big files taking up the free space? With Windows you simply need some kind of tool to get a picture of disk usage. And the best tool I’ve found to do the job so far is Scanner2. It!s freeware, it’s simple and – beleive it or not – it was written 10 years ago.

Read More…

Deleting a one-to-many relationship in NHibernate

I have had some trouble deleting the child in a one-to-many relationship in NHibernate. My schema described a simple parent-child relationship: a parent can have multiple children and every child has exactly one parent.

In the database schema I had two tables parentTable and childTable. ParentTable had an ID column and some other columns. The childTable had an ID primary key column, some other columns and a parentId NOT NULL column which had a foreign key constraint against the ID column in the parentTable.

Parent-Child Database Relationship (One-to-many)

Read More…

Monitoring website load

Over the weekend I’ve been in charge of monitoring one of our bigger portals which consists a database server (running SQL Server 2005) and multiple web servers (running IIS 6.0 and ASP.NET) connecting to it. The architecture of the system is the following:

System architecture diagram

I’ve chosen a really simple – and at first glance efficient – way of monitoring the system with the Windows Performance Monitor (also known as PerfMon): Read More…

Building an AJAX Tree control

Recently I’ve been in need to create use a tree control that is capable of doing the following:
– Displays tree items
– Branches can be opened to see children
– The tree is dynamically built to minimize server load

I was sure that there are plenty of solutions out there that I could use. After doing some search I found that the Ext framework offers a control that would be easy to integrate and use. So if you’re interested in how to integrate the Ext tree control with an ASP.NET or PHP backend to have it work like the Ext tree sample, read on.
Read More…

TFS – deleting old workspaces

I use Visual Studio 2008 on a daily basis however for some older projects I have to work with VS 2005. Recently our company has set a new Team Foundation Server in use and all active projects have been migrated there. In VS 2008 everything worked just fine.

However when trying to re-map a project to the same localtion as before (only from the new TFS server) I got the following error message: “The path [yourpath] is already mapped in workspace [yourworkspace]”. It took me a while to figure out what the resolution of the problem was.
Read More…

Qualified for ITech Challenge National Finals!

With two of my friends at the Budapest University of Technology we’ve entered the ITech Challenge management competiton (our chosen team name is Drunk Puppies :) ). This competiton is about managing an IT firm and making most profits possible; this year each team had to manage a telecommunications company. I would actually say that the competiton is actually 90% management and 10% IT (some basic knowledge was required on how the phone/cable/internet infrastructure works and depends on each other).

Every year there are about 200 teams competing in the country, 20 of which can make it to the finals. We’ve taken part one of the qualifiers yesterday where the top 3 teams of the participating 32 were to advance. We came in at 2nd place meaning we’ve qualified ourselves to the national finals! Woo!

Read More…

1 5 6 7 8  Scroll to top