model

C++ 3D Model Animation libraries?

I have my own game engine using C++ and OpenGL, but I have models with individual pieces that can be moved, and Im not sure how to animate them without hardcoding it. Are there any libraries that would provide a solution via scripts or IK or some other animation technique without resorting to a game engine such as Ogre? ...

Fat models, skinny controllers and the MVC design pattern

I just read a [blog post][1] that explains MVC with a banking analogy. I have a few months of experience with web application development with an MVC framework (CakePHP), so I get the basics, but I began to see a theme that made me think I'm taking a flawed approach to where I put my logic: Fat models, skinny controllers Keep as much b...

Moving business rules into model

I asked a question earlier which elicited some great responses. Here's the earlier question On the back of some advice given there, I've tried moving the following controller logic if params[:concept][:consulted_legal] == 0 && params[:concept][:consulted_marketing] == 1 @concept.attributes = {:status => 'Awaiting Compliance Approva...

MVC: Data Models and View Models

I've read some MVC advice in the past regarding models stating that you should not reuse the same model objects for the domain and the view; but I haven't been able to find anyone willing to discuss why this is bad. It is my opinion that creating two separate models - one for the domain, one for the view - and then mapping between them ...

Modeling Entities with Things in Common: Super-type/Sub-type?

I will be using LLBLGen to generate a model, however I don't want to solve my design issues by just using whatever built-in inheritance tools it has. I want the model to make sense regardless of the OR/M tool. So, I have several different kinds of entities that can have addresses and each entity can have multiple address (primary, maili...

For one of my models, I have a few instances that should be auto-populated. How do I handle this?

I have to be specific for this to make sense. In my application I have a model called theme which contains widget color theme information. We provide a few themes, but mainly rely on the user to create their own themes. So the question is: where do I store my themes? If I store them in the theme database, then anytime I switch databas...

Designing for High Volumes of Data in an iPhone App

I have an I phone app which upon opening needs to display a table of data containing roughly 25000 records. Each record consists of two fields: TITLE and DESCRIPTION. Both fields are visible in each table cell. The tableview also is fully searchable with a UISearchBar. When the application starts and this view is loaded a "collecti...

Using helpers in model: how do I include helper dependencies?

I'm writing a model that handles user input from a text area. Following the advice from http://blog.caboo.se/articles/2008/8/25/sanitize-your-users-html-input, I'm cleaning up the input in the model before saving to database, using the before_validate callback. The relevant parts of my model look like this: include ActionView::Helpers...

How does the Generic UpdateModel<T> differ from UpdateModel in MVC 'Controller' ?

There are MANY overloads to UpdateModel in the ASP.NET MVC controller class. Some of them are generic, and some aren't. Obviously I want to use the generic version but I don't see what it actually does for me? Isn't UpdateModel just a way to populate the properties using reflection. So what's the difference between this: Up...

Dynamic Properties for object instances?

Hi After the previous question "What are the important rules in Object Model Design", now I want to ask this: Is there any way to have dynamic properties for class instances? Suppose that we have this schematic object model: http://www.freeimagehosting.net/>http://www.freeimagehosting.net/uploads/d3a08e6c83.gif border=0 alt="Free Im...

Are there human 3D models/libraries?

I'm a dance teacher and I was thinking of writing some code to produce 3D animations of dance moves from choreography stored in a database. The dancing to data model representation I could write but I know nothing about graphics programming. I wondered if anyone could recommend a library or similar of 3D human models, ideally with reali...

System Use Cases

I am working on a system that automates scheduled monthly payments for customer bills. When I tried to model use cases, I realized that there are use cases that relates to the customer like: - Login - Customer Registration - Update Profile - Search Transactions. - etc. But there many activities which will be handled by the system autom...

Rails: Best practice for model dependency class locations?

I have a rails app moving along fairly well, but the fact that I'm doing this myself means that some poor sod is eventually going to see this and say, "What the hell were you thinking? Why did you put this here?!?!" Where is that poor, sorry soul going to expect to see a series of classes that aren't used by anything but a single model...

Is it possible to send more than one model object to an ASP.NET MVC View?

On my start page, I'd like to display the first items from several different lists that i have on other pages - somewhat like the "recent" page here on SO displays both recent posts and recent comments. In my case I want to list the two most recent posts in a guest book, and the next upcoming event. In order to do this, how can I pass ...

Is there a way to get a collection of all the Models in your Rails app?

Is there a way that you can get a collection of all of the Models in your Rails app? Basically, can I do the likes of: - Models.each do |model| puts model.class.name end Thanks in advance. ...

Zend Framework, run query without a view?

Hello, I am currently building a small admin section for a website using Zend Framework, this is only my second time of using the framework so I am a little unsure on something things. for example are I have an archive option for news articles where the user will hopefully click a link and the article will be archived however I cannot w...

Exposing your core on the wire data model

I have a C# client and a java server. I have data object that go on the wire back and forth. Lets call them FooData.cs where everything is just a get and a set (no logic) FooData data = new FooData(); data.Price = 10; data.Quantity = 20; i have other derived fields that i want to use in the application but dont need to be sent on th...

Rails: Modifying a Model Generated by Scaffolding

How do you modify a model you've generated using modeling? For example, the model myModel originally had columns a, b and c, but I now want to add column d. ...

Viewing Rails model page works on first view but not subsequent views

This is using Rails 2.2.2 I have a model that uses the acts_as_flaggable plugin, and on the page I use to display an instance of the model, I list any flags that the model has. When I start my Rails dev server(mongrel) using the standard script/server command, load the page holding the following code, it loads fine: <% @object.flags.e...

How to make not-null varchar columns to be required to be not empty in ASP.NET MVC validation?

So I'm using ASP.NET MVC RC1 and using the DefaultModelBinder's validation to show validation errors when not-null integer fields are not set to a value. This is done by default by MVC. However the same is not true for string(varchar) fields, because the binder is passed an empty string from the view, which is completely valid for a no...