entities

Proper entity types for XHTML, XML and inside inline JavaScript

First, the way I understand it, it's more appropriate to use numeric entities in an XHTML document, such as " instead of ", is that right? Second, for my RSS XML feed, which entity type is correct? Named or numeric? I believe it's numeric, but see examples of both in my searches. Third, which of the following is correct for e...

Is it right to use IoC for the extensibility of my entities or domain model?

Hi Everyone, I've came across a dilemma which I think is worth discussing here. I have a set of domain objects (you can also call them entities, if you like), which get some data from a separate DAL which is resolved with an IoC. I was thinking about making my system very extensible, and I'm wandering if it is right to also resolve th...

DDD: what's the use of the difference between entities and value objects?

Entities and value objects are both domain objects. What's the use of knowing the distinction between the two in DDD? Eg does thinking about domain objects as being either an entity or value object foster a cleaner domain model? ...

MVC Views and Controllers: Re-instantiate entities when form submitted

We are working with entities in our MVC controllers which are passed to strongly typed views. How do we re-instantiate these entities in the controller with updated data when the form is posted in the view? The form does not contain all the fields of the entity so all of the data needed to re-instantiate the entities won't be there in ...

HTML >> Very simple question

Hey ppl, can someone tell me the num; for that >> sign. The one where the >> are one character. Thanks :) Bonus points for << aswell ^_^ ...

Showing business entities in grids with only using a few properties

I am trying to get my head around business entities that you want to list in a grid or list where a user will pick one to edit/view. Lets say I have an Entity that have a lot of properties and collections, but my Grid will only display like 2 properties to the user. Besides using lazy loading on collections what would be the best / effi...

Exposing Entities Outside The Assembly

I'm looking for opinions on best practices with regards to passing entities beyond assembly boundaries. I'm using Linq-To-SQL, but the same question would apply to Entity Framework, NHibernate, etc. I have an assembly that I want to reuse in multiple projects. In it there are several entities which I have so far kept internal, however I...

Grouping a list of of entities which has a sublist in c#

I have a set of Entities which basically has this structure. {Stats Name="<Product name> (en)" TotalResources="10" ..} {DayStats Date="2009-12-10" TotalResources="5"} {DayStats Date="2009-12-11" TotalResources="5"} {Stats} {Stats Name="<Product name> (us)" TotalResources="10" ..} {DayStats Date="2009-12-10" TotalResources="5...

Entity Framework v4 -> need some help with POCO's and Entities

I'm using EF4 and I've got two entities that I wish to map to the same POCO. I'm not sure how I can do this. Entity 1 → Foo (this represents a table FOO in the db) POCO → Foo Entity 2 → FooView (this represents a view FooView in the db) POCO → Foo I understand that I need to do something like IObjectSet<Foo> _foos = Creat...

Many-to-many relationship for many types of entities

I have four tables: Disks, Folders, Files and Links. It is four types of entities, and they can not be merged into one type (e.g. into one table) because they have different number and types of attributes. And there are relationships: Disks can contain Folders, Files and Links; Folders can contain Folders, Files and Links too; Files an...

Linking Objects to list for manual editing later (Game Engine/Framework - Entity management part)

First of all hello, this is my first time here. I'm young coder (15) and this is my second attempt to make a game (actually whole reusable game engine AND framework, not sure how to call it, maybe GDK?), while making it much more organized this time. IMPORTANT NOTE: I'm using XNA framework, so the game engine is not purely low level Dir...

In an MVC web-application, it is correct to think of the models as the "entities"?

We have an ASP.NET MVC application. Is it correct to think of the models as the "entities" in the system? Presumably this comes down to the "type" of model (view or domain) - and if they are domain models then they are equivalent to entities? Edit: I ask the question to determine whether the introduction of the "entity" nomenclature in...

Using Linq to select a list of Entities, linked Entities, linked Entities

Apologies for the poor question title - I'm not sure how to describe what I'm doing but that is the best I could come up with, please edit it if what I'm asking for has a real name! I have Programmes, which can have a group of Projects assigned, which in turn have groups of Outputs assigned. I would like to get all the outputs for the ...

Objects / Entities: Many to Many + Many to One

Users / \ / \ M-T-O M-T-O / \ / \ Products----M-T-M----Tags I wonder if there is any documentation on how to create a schema like this with entities. I got stuck at wondering which entity should be responsible for what in the relation. ...

Perl - read file with encoding method?

Hi, im not too good when it comes to encoding and I am wanting to figure out how to return data as the same encoding it started with... I have a file with some characters in such as '»' by the time I have edited and and inserted into database they have turned into &raquo. decode_entities() does nothing and encode_entities encodes the c...

What are the advantages or disadvantages of using dbml for linq2sql queries?

I am currently reading Pro Asp.Net MVC, and they are building all of their linq2sql entity classes by hand, and mapping them with the linq mapping attributes. However, everyone else I see (from google searches) talking about linq 2 sql seem to be using the visual designer for building all of their entities. Which is the preferred way t...

DOMDocument::loadXML vs. HTML Entities

I currently have a problem reading in XHTML as the XML parser doesn't recognise HTML character entities so: <?php $text = <<<EOF <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>Entities are Causing Me Problems</title> </head> <body> <p>Copy...

How do I unescape HTML entities in a string in Python 3.1?

I have looked all around and only found solutions for python 2.6 and earlier, NOTHING on how to do this in python 3.X. (I only have access to Win7 box.) I HAVE to be able to do this in 3.1 and preferably without external libraries. Currently, I have httplib2 installed and access to command-prompt curl (that's how I'm getting the source ...

What is the difference between "LINQ to Entities", "LINQ to SQL" and "LINQ to Dataset".

I've been working for quite a while now with LINQ. However, it remains a bit of a mystery what the real differences are between the mentioned flavours of LINQ. The successful answer will contain a short differentiation between them. What is the main goal of each flavor, what is the benefit, and is there a performance impact... P.S. I ...

Hibernate mapping, on a unmapped class

Hi, I' ve got 2 tables... Challenge and ChallengeYear, ChallengeYear is only to create a list of years in challenge. I only want to make Challenge an entity, containing a list of List years. Is this possible? I've looked in to @SecondaryTable together with @JoinColumn and @OneToMany, but neither of those can do the trick, or i am ove...